Mercurial > geeqie
diff src/pan-view.c @ 495:c7a2471e5c4e
Introduce macros to display debug messages.
if (debug) printf(...) is now replaced by variadic macros:
DEBUG_1()
And for higher debugging levels:
DEBUG_2()
DEBUG_3()
DEBUG_4()
| author | zas_ |
|---|---|
| date | Wed, 23 Apr 2008 20:47:19 +0000 |
| parents | 5212d4fed37f |
| children | a33badd85f16 |
line wrap: on
line diff
--- a/src/pan-view.c Wed Apr 23 13:46:18 2008 +0000 +++ b/src/pan-view.c Wed Apr 23 20:47:19 2008 +0000 @@ -773,7 +773,7 @@ row = row * 2 - 1; col = col * 2 - 1; - if (debug) printf("intersect speedup grid is %dx%d, based on %d average per grid\n", col, row, grid_size); + DEBUG_1("intersect speedup grid is %dx%d, based on %d average per grid\n", col, row, grid_size); for (j = 0; j < row; j++) for (i = 0; i < col; i++) @@ -791,7 +791,7 @@ pw->list_grid = g_list_prepend(pw->list_grid, pg); - if (debug) printf("grid section: %d,%d (%dx%d)\n", pg->x, pg->y, pg->w, pg->h); + DEBUG_1("grid section: %d,%d (%dx%d)\n", pg->x, pg->y, pg->w, pg->h); } } @@ -961,7 +961,7 @@ pan_cache_free(pw); - if (debug) printf("computed %d objects\n", g_list_length(pw->list)); + DEBUG_1("computed %d objects\n", g_list_length(pw->list)); } static GList *pan_layout_intersect_l(GList *list, GList *item_list, @@ -1117,7 +1117,7 @@ { gdouble align; - if (debug) printf("Canvas size is %d x %d\n", width, height); + DEBUG_1("Canvas size is %d x %d\n", width, height); pan_grid_build(pw, width, height, 1000); @@ -1499,7 +1499,7 @@ if (!pi) return; - if (debug) printf("info set to %s\n", pi->fd->path); + DEBUG_1("info set to %s\n", pi->fd->path); pbox = pan_item_box_new(pw, NULL, pi->x + pi->width + 4, pi->y, 10, 10, PAN_POPUP_BORDER,
