preprent "tint2:" to all logging messages
This commit is contained in:
@@ -224,7 +224,7 @@ int compute_desired_size(Area *a)
|
||||
if (a->_compute_desired_size)
|
||||
return a->_compute_desired_size(a);
|
||||
if (a->size_mode == LAYOUT_FIXED)
|
||||
fprintf(stderr, YELLOW "Area %s does not set desired size!" RESET "\n", a->name);
|
||||
fprintf(stderr, YELLOW "tint2: Area %s does not set desired size!" RESET "\n", a->name);
|
||||
return container_compute_desired_size(a);
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@ void draw_tree(Area *a)
|
||||
a->posx,
|
||||
a->posy);
|
||||
else
|
||||
fprintf(stderr, RED "%s %d: area %s has no pixmap!!!" RESET "\n", __FILE__, __LINE__, a->name);
|
||||
fprintf(stderr, RED "tint2: %s %d: area %s has no pixmap!!!" RESET "\n", __FILE__, __LINE__, a->name);
|
||||
|
||||
for (GList *l = a->children; l; l = l->next)
|
||||
draw_tree((Area *)l->data);
|
||||
@@ -843,10 +843,10 @@ int top_bottom_bg_border_width(Background *bg)
|
||||
|
||||
void area_dump_geometry(Area *area, int indent)
|
||||
{
|
||||
fprintf(stderr, "%*s%s:\n", indent, "", area->name);
|
||||
fprintf(stderr, "tint2: %*s%s:\n", indent, "", area->name);
|
||||
indent += 2;
|
||||
if (!area->on_screen) {
|
||||
fprintf(stderr, "%*shidden\n", indent, "");
|
||||
fprintf(stderr, "tint2: %*shidden\n", indent, "");
|
||||
return;
|
||||
}
|
||||
fprintf(stderr,
|
||||
@@ -876,7 +876,7 @@ void area_dump_geometry(Area *area, int indent)
|
||||
if (area->_dump_geometry)
|
||||
area->_dump_geometry(area, indent);
|
||||
if (area->children) {
|
||||
fprintf(stderr, "%*sChildren:\n", indent, "");
|
||||
fprintf(stderr, "tint2: %*sChildren:\n", indent, "");
|
||||
indent += 2;
|
||||
for (GList *l = area->children; l; l = l->next)
|
||||
area_dump_geometry((Area *)l->data, indent);
|
||||
@@ -1132,7 +1132,7 @@ void free_gradient_instance(GradientInstance *gi)
|
||||
void instantiate_area_gradients(Area *area)
|
||||
{
|
||||
if (debug_gradients)
|
||||
fprintf(stderr, "Initializing gradients for area %s\n", area->name);
|
||||
fprintf(stderr, "tint2: Initializing gradients for area %s\n", area->name);
|
||||
for (int i = 0; i < MOUSE_STATE_COUNT; i++) {
|
||||
g_assert_null(area->gradient_instances_by_state[i]);
|
||||
GradientClass *g = area->bg->gradients[i];
|
||||
@@ -1147,7 +1147,7 @@ void instantiate_area_gradients(Area *area)
|
||||
void free_area_gradient_instances(Area *area)
|
||||
{
|
||||
if (debug_gradients)
|
||||
fprintf(stderr, "Freeing gradients for area %s\n", area->name);
|
||||
fprintf(stderr, "tint2: Freeing gradients for area %s\n", area->name);
|
||||
for (int i = 0; i < MOUSE_STATE_COUNT; i++) {
|
||||
for (GList *l = area->gradient_instances_by_state[i]; l; l = l->next) {
|
||||
GradientInstance *gi = (GradientInstance *)l->data;
|
||||
|
||||
@@ -117,14 +117,14 @@ void save_cache(Cache *cache, const gchar *cache_path)
|
||||
fd = open(cache_path, O_RDONLY | O_CREAT, 0600);
|
||||
}
|
||||
if (fd == -1) {
|
||||
fprintf(stderr, RED "Could not save icon theme cache!" RESET "\n");
|
||||
fprintf(stderr, RED "tint2: Could not save icon theme cache!" RESET "\n");
|
||||
return;
|
||||
}
|
||||
flock(fd, LOCK_EX);
|
||||
|
||||
FILE *f = fopen(cache_path, "w");
|
||||
if (!f) {
|
||||
fprintf(stderr, RED "Could not save icon theme cache!" RESET "\n");
|
||||
fprintf(stderr, RED "tint2: Could not save icon theme cache!" RESET "\n");
|
||||
goto unlock;
|
||||
}
|
||||
g_hash_table_foreach(cache->_table, write_cache_line, f);
|
||||
|
||||
@@ -223,7 +223,7 @@ void copy_file(const char *path_src, const char *path_dest)
|
||||
|
||||
while ((nb = fread(buffer, 1, sizeof(buffer), file_src)) > 0) {
|
||||
if (nb != fwrite(buffer, 1, nb, file_dest)) {
|
||||
fprintf(stderr, "Error while copying file %s to %s\n", path_src, path_dest);
|
||||
fprintf(stderr, "tint2: Error while copying file %s to %s\n", path_src, path_dest);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ pid_t tint_exec(const char *command, const char *dir, const char *tooltip, Time
|
||||
pid_t pid;
|
||||
pid = fork();
|
||||
if (pid < 0) {
|
||||
fprintf(stderr, "Could not fork\n");
|
||||
fprintf(stderr, "tint2: Could not fork\n");
|
||||
} else if (pid == 0) {
|
||||
// Child process
|
||||
#if HAVE_SN
|
||||
@@ -388,7 +388,7 @@ pid_t tint_exec(const char *command, const char *dir, const char *tooltip, Time
|
||||
chdir(dir);
|
||||
close_all_fds();
|
||||
execl("/bin/sh", "/bin/sh", "-c", command, NULL);
|
||||
fprintf(stderr, "Failed to execlp %s\n", command);
|
||||
fprintf(stderr, "tint2: Failed to execlp %s\n", command);
|
||||
#if HAVE_SN
|
||||
if (startup_notifications && time) {
|
||||
sn_launcher_context_unref(ctx);
|
||||
@@ -776,7 +776,7 @@ Imlib_Image load_image(const char *path, int cached)
|
||||
RsvgHandle *svg = rsvg_handle_new_from_file(path, &err);
|
||||
|
||||
if (err != NULL) {
|
||||
fprintf(stderr, "Could not load svg image!: %s", err->message);
|
||||
fprintf(stderr, "tint2: Could not load svg image!: %s", err->message);
|
||||
g_error_free(err);
|
||||
} else {
|
||||
GdkPixbuf *pixbuf = rsvg_handle_get_pixbuf(svg);
|
||||
@@ -931,7 +931,7 @@ void get_text_size2(const PangoFontDescription *font,
|
||||
*height_ink = rect_ink.height;
|
||||
*height = rect.height;
|
||||
*width = rect.width;
|
||||
// fprintf(stderr, "dimension : %d - %d\n", rect_ink.height, rect.height);
|
||||
// fprintf(stderr, "tint2: dimension : %d - %d\n", rect_ink.height, rect.height);
|
||||
|
||||
g_object_unref(layout);
|
||||
cairo_destroy(c);
|
||||
|
||||
@@ -65,7 +65,7 @@ void sample_fps(double fps)
|
||||
}
|
||||
}
|
||||
}
|
||||
// fprintf(stderr, "fps = %.0f => i = %d\n", fps, i);
|
||||
// fprintf(stderr, "tint2: fps = %.0f => i = %d\n", fps, i);
|
||||
fps_distribution[i] += 1.;
|
||||
fps_distribution[0] += 1.;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ void fps_compute_stats(double *low, double *median, double *high, double *sample
|
||||
double value =
|
||||
(i < 60) ? i : (i < 74) ? (60 + (i - 60) * 10) : (i < 146) ? (200 + (i - 74) * 25)
|
||||
: (i < 165) ? (2000 + (i - 146) * 1000) : 20000;
|
||||
// fprintf(stderr, "%6.0f (i = %3d) : %.0f | ", value, i, (double)fps_distribution[i]);
|
||||
// fprintf(stderr, "tint2: %6.0f (i = %3d) : %.0f | ", value, i, (double)fps_distribution[i]);
|
||||
cum += fps_distribution[i];
|
||||
if (*low < 0 && cum >= cum_low)
|
||||
*low = value;
|
||||
|
||||
@@ -40,7 +40,7 @@ GradientType gradient_type_from_string(const char *str)
|
||||
return GRADIENT_VERTICAL;
|
||||
if (g_str_equal(str, "radial"))
|
||||
return GRADIENT_CENTERED;
|
||||
fprintf(stderr, RED "Invalid gradient type: %s" RESET "\n", str);
|
||||
fprintf(stderr, RED "tint2: Invalid gradient type: %s" RESET "\n", str);
|
||||
return GRADIENT_VERTICAL;
|
||||
}
|
||||
|
||||
|
||||
@@ -184,17 +184,17 @@ int uevent_init()
|
||||
/* open socket */
|
||||
uevent_fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT);
|
||||
if (uevent_fd < 0) {
|
||||
fprintf(stderr, "Error: socket open failed\n");
|
||||
fprintf(stderr, "tint2: Error: socket open failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Listen to netlink socket */
|
||||
if (bind(uevent_fd, (void *)&nls, sizeof(struct sockaddr_nl))) {
|
||||
fprintf(stderr, "Bind failed\n");
|
||||
fprintf(stderr, "tint2: Bind failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
fprintf(stderr, "Kernel uevent interface initialized...\n");
|
||||
fprintf(stderr, "tint2: Kernel uevent interface initialized...\n");
|
||||
|
||||
return uevent_fd;
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ int get_window_desktop(Window win)
|
||||
|
||||
if (best_match < 0)
|
||||
best_match = 0;
|
||||
// fprintf(stderr, "window %lx %s : viewport %d, (%d, %d)\n", win, get_task(win) ? get_task(win)->title : "??",
|
||||
// fprintf(stderr, "tint2: window %lx %s : viewport %d, (%d, %d)\n", win, get_task(win) ? get_task(win)->title : "??",
|
||||
// best_match+1, x, y);
|
||||
return best_match;
|
||||
}
|
||||
@@ -185,7 +185,7 @@ int get_window_monitor(Window win)
|
||||
|
||||
if (best_match < 0)
|
||||
best_match = 0;
|
||||
// fprintf(stderr, "desktop %d, window %lx %s : monitor %d, (%d, %d)\n", 1 + get_current_desktop(), win,
|
||||
// fprintf(stderr, "tint2: desktop %d, window %lx %s : monitor %d, (%d, %d)\n", 1 + get_current_desktop(), win,
|
||||
// get_task(win) ? get_task(win)->title : "??", best_match+1, x, y);
|
||||
return best_match;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user