diff src/thumb.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.c	Wed Apr 23 23:52:20 2008 +0000
+++ b/src/thumb.c	Thu Apr 24 00:15:03 2008 +0000
@@ -55,7 +55,7 @@
 		cache_path = g_strconcat(cache_dir, "/", filename_from_path(tl->path),
 					 GQ_CACHE_EXT_THUMB, NULL);
 
-		DEBUG_1("Saving thumb: %s\n", cache_path);
+		DEBUG_1("Saving thumb: %s", cache_path);
 
 		pathl = path_from_utf8(cache_path);
 		success = pixbuf_to_file_as_png(tl->pixbuf, pathl);
@@ -72,7 +72,7 @@
 			}
 		else
 			{
-			DEBUG_1("Saving failed: %s\n", pathl);
+			DEBUG_1("Saving failed: %s", pathl);
 			}
 
 		g_free(pathl);
@@ -103,7 +103,7 @@
 		cache_path = g_strconcat(cache_dir, "/", filename_from_path(tl->path),
 					 GQ_CACHE_EXT_THUMB, NULL);
 
-		DEBUG_1("marking thumb failure: %s\n", cache_path);
+		DEBUG_1("marking thumb failure: %s", cache_path);
 
 		pathl = path_from_utf8(cache_path);
 		f = fopen(pathl, "w");
@@ -146,12 +146,12 @@
 	gint pw, ph;
 	gint save;
 
-	DEBUG_1("thumb done: %s\n", tl->path);
+	DEBUG_1("thumb done: %s", tl->path);
 
 	pixbuf = image_loader_get_pixbuf(tl->il);
 	if (!pixbuf)
 		{
-		DEBUG_1("...but no pixbuf: %s\n", tl->path);
+		DEBUG_1("...but no pixbuf: %s", tl->path);
 		thumb_loader_error_cb(tl->il, tl);
 		return;
 		}
@@ -162,7 +162,7 @@
 	if (tl->cache_hit && pw != tl->max_w && ph != tl->max_h)
 		{
 		/* requested thumbnail size may have changed, load original */
-		DEBUG_1("thumbnail size mismatch, regenerating: %s\n", tl->path);
+		DEBUG_1("thumbnail size mismatch, regenerating: %s", tl->path);
 		tl->cache_hit = FALSE;
 
 		thumb_loader_setup(tl, tl->path);
@@ -172,7 +172,7 @@
 			image_loader_free(tl->il);
 			tl->il = NULL;
 
-			DEBUG_1("regeneration failure: %s\n", tl->path);
+			DEBUG_1("regeneration failure: %s", tl->path);
 			thumb_loader_error_cb(tl->il, tl);
 			}
 		return;
@@ -227,7 +227,7 @@
 		return;
 		}
 
-	DEBUG_1("thumb error: %s\n", tl->path);
+	DEBUG_1("thumb error: %s", tl->path);
 
 	image_loader_free(tl->il);
 	tl->il = NULL;
@@ -332,16 +332,16 @@
 			{
 			if (cache_time_valid(cache_path, tl->path))
 				{
-				DEBUG_1("Found in cache:%s\n", tl->path);
+				DEBUG_1("Found in cache:%s", tl->path);
 
 				if (filesize(cache_path) == 0)
 					{
-					DEBUG_1("Broken image mark found:%s\n", cache_path);
+					DEBUG_1("Broken image mark found:%s", cache_path);
 					g_free(cache_path);
 					return FALSE;
 					}
 
-				DEBUG_1("Cache location:%s\n", cache_path);
+				DEBUG_1("Cache location:%s", cache_path);
 				}
 			else
 				{