Mercurial > geeqie.yaz
comparison src/view_file_icon.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 |
comparison
equal
deleted
inserted
replaced
494:3bb9a8df6ee9 | 495:c7a2471e5c4e |
---|---|
651 | 651 |
652 if (!list) return; | 652 if (!list) return; |
653 uri_text = uri_text_from_filelist(list, &total, (info == TARGET_TEXT_PLAIN)); | 653 uri_text = uri_text_from_filelist(list, &total, (info == TARGET_TEXT_PLAIN)); |
654 filelist_free(list); | 654 filelist_free(list); |
655 | 655 |
656 if (debug) printf(uri_text); | 656 DEBUG_1(uri_text); |
657 | 657 |
658 gtk_selection_data_set(selection_data, selection_data->target, | 658 gtk_selection_data_set(selection_data, selection_data->target, |
659 8, (guchar *)uri_text, total); | 659 8, (guchar *)uri_text, total); |
660 g_free(uri_text); | 660 g_free(uri_text); |
661 } | 661 } |
898 t = col1; | 898 t = col1; |
899 col1 = col2; | 899 col1 = col2; |
900 col2 = t; | 900 col2 = t; |
901 } | 901 } |
902 | 902 |
903 if (debug) printf("table: %d x %d to %d x %d\n", row1, col1, row2, col2); | 903 DEBUG_1("table: %d x %d to %d x %d\n", row1, col1, row2, col2); |
904 | 904 |
905 for (i = row1; i <= row2; i++) | 905 for (i = row1; i <= row2; i++) |
906 { | 906 { |
907 for (j = col1; j <= col2; j++) | 907 for (j = col1; j <= col2; j++) |
908 { | 908 { |
1732 | 1732 |
1733 vfi->columns = new_cols; | 1733 vfi->columns = new_cols; |
1734 | 1734 |
1735 vficon_populate(vfi, TRUE, TRUE); | 1735 vficon_populate(vfi, TRUE, TRUE); |
1736 | 1736 |
1737 if (debug) printf("col tab pop cols=%d rows=%d\n", vfi->columns, vfi->rows); | 1737 DEBUG_1("col tab pop cols=%d rows=%d\n", vfi->columns, vfi->rows); |
1738 } | 1738 } |
1739 | 1739 |
1740 static void vficon_sync(ViewFileIcon *vfi) | 1740 static void vficon_sync(ViewFileIcon *vfi) |
1741 { | 1741 { |
1742 GtkTreeModel *store; | 1742 GtkTreeModel *store; |
1999 vfi); | 1999 vfi); |
2000 | 2000 |
2001 if (!thumb_loader_start(vfi->thumbs_loader, fd->path)) | 2001 if (!thumb_loader_start(vfi->thumbs_loader, fd->path)) |
2002 { | 2002 { |
2003 /* set icon to unknown, continue */ | 2003 /* set icon to unknown, continue */ |
2004 if (debug) printf("thumb loader start failed %s\n", vfi->thumbs_loader->path); | 2004 DEBUG_1("thumb loader start failed %s\n", vfi->thumbs_loader->path); |
2005 vficon_thumb_do(vfi, vfi->thumbs_loader, fd); | 2005 vficon_thumb_do(vfi, vfi->thumbs_loader, fd); |
2006 | 2006 |
2007 return TRUE; | 2007 return TRUE; |
2008 } | 2008 } |
2009 | 2009 |
2615 | 2615 |
2616 n = vficon_count(vfi, NULL); | 2616 n = vficon_count(vfi, NULL); |
2617 if (ignore_list) | 2617 if (ignore_list) |
2618 { | 2618 { |
2619 new_row = vficon_maint_find_closest(vfi, row, n, ignore_list); | 2619 new_row = vficon_maint_find_closest(vfi, row, n, ignore_list); |
2620 if (debug) printf("row = %d, closest is %d\n", row, new_row); | 2620 DEBUG_1("row = %d, closest is %d\n", row, new_row); |
2621 } | 2621 } |
2622 else | 2622 else |
2623 { | 2623 { |
2624 if (row + 1 < n) | 2624 if (row + 1 < n) |
2625 { | 2625 { |