Mercurial > geeqie
diff src/thumb_standard.c @ 506:fc9c8a3e1a8b
Handle the newline in DEBUG_N() macro instead of adding one
in each debug message string.
author | zas_ |
---|---|
date | Thu, 24 Apr 2008 00:15:03 +0000 |
parents | c7a2471e5c4e |
children | 135570a8bd96 |
line wrap: on
line diff
--- a/src/thumb_standard.c Wed Apr 23 23:52:20 2008 +0000 +++ b/src/thumb_standard.c Thu Apr 24 00:15:03 2008 +0000 @@ -235,7 +235,8 @@ if (mtime_str && strtol(mtime_str, NULL, 10) == tl->source_mtime) { result = TRUE; - DEBUG_1("thumb fail valid: %s\n thumb: %s\n", tl->source_path, fail_path); + DEBUG_1("thumb fail valid: %s", tl->source_path); + DEBUG_1(" thumb: %s", fail_path); } g_object_unref(G_OBJECT(pixbuf)); @@ -332,7 +333,8 @@ } g_free(base_path); - DEBUG_1("thumb saving: %s\n saved: %s\n", tl->source_path, tl->thumb_path); + DEBUG_1("thumb saving: %s", tl->source_path); + DEBUG_1(" saved: %s", tl->thumb_path); /* save thumb, using a temp file then renaming into place */ tmp_path = unique_filename(tl->thumb_path, ".tmp", "_", 2); @@ -367,10 +369,10 @@ g_free(mark_app); g_free(tmp_path); - if (!success && debug) + if (!success) { - printf("thumb save failed: %s\n", tl->source_path); - printf(" thumb: %s\n", tl->thumb_path); + DEBUG_1("thumb save failed: %s", tl->source_path); + DEBUG_1(" thumb: %s", tl->thumb_path); } } @@ -451,7 +453,7 @@ tl->cache_hit = FALSE; - DEBUG_1("thumb copied: %s\n", tl->source_path); + DEBUG_1("thumb copied: %s", tl->source_path); thumb_loader_std_save(tl, pixbuf); } @@ -500,7 +502,7 @@ { if (!tl->thumb_path_local && remove_broken) { - DEBUG_1("thumb broken, unlinking: %s\n", tl->thumb_path); + DEBUG_1("thumb broken, unlinking: %s", tl->thumb_path); unlink_file(tl->thumb_path); } @@ -532,12 +534,13 @@ ThumbLoaderStd *tl = data; GdkPixbuf *pixbuf; - DEBUG_1("thumb image done: %s\n from: %s\n", tl->source_path, tl->il->path); + DEBUG_1("thumb image done: %s", tl->source_path); + DEBUG_1(" from: %s", tl->il->path); pixbuf = image_loader_get_pixbuf(tl->il); if (!pixbuf) { - DEBUG_1("...but no pixbuf\n"); + DEBUG_1("...but no pixbuf"); thumb_loader_std_error_cb(il, data); return; } @@ -568,7 +571,8 @@ return; } - DEBUG_1("thumb image error: %s\n from: %s\n", tl->source_path, tl->il->fd->path); + DEBUG_1("thumb image error: %s", tl->source_path); + DEBUG_1(" from: %s", tl->il->fd->path); if (thumb_loader_std_next_source(tl, TRUE)) return; @@ -805,7 +809,7 @@ { struct stat st; - DEBUG_1("thumb uri foreign, doing day check: %s\n", uri); + DEBUG_1("thumb uri foreign, doing day check: %s", uri); if (stat_utf8(tv->path, &st)) { @@ -886,7 +890,7 @@ local, subfolder); if (isfile(thumb_path)) { - DEBUG_1("thumb removing: %s\n", thumb_path); + DEBUG_1("thumb removing: %s", thumb_path); unlink_file(thumb_path); } g_free(thumb_path); @@ -975,12 +979,12 @@ tm->tl->thumb_path = NULL; tm->tl->thumb_path_local = FALSE; - DEBUG_1("thumb move attempting save:\n"); + DEBUG_1("thumb move attempting save:"); thumb_loader_std_save(tm->tl, pixbuf); } - DEBUG_1("thumb move unlink: %s\n", tm->thumb_path); + DEBUG_1("thumb move unlink: %s", tm->thumb_path); unlink_file(tm->thumb_path); }