[maemo-commits] [maemo-commits] r16211 - projects/haf/branches/hildon-thumbnail/daemonize/thumbs

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Sep 24 16:45:07 EEST 2008
Author: pvanhoof
Date: 2008-09-24 16:45:06 +0300 (Wed, 24 Sep 2008)
New Revision: 16211

Modified:
   projects/haf/branches/hildon-thumbnail/daemonize/thumbs/hildon-thumbnail-factory.c
Log:
A little bit better even

Modified: projects/haf/branches/hildon-thumbnail/daemonize/thumbs/hildon-thumbnail-factory.c
===================================================================
--- projects/haf/branches/hildon-thumbnail/daemonize/thumbs/hildon-thumbnail-factory.c	2008-09-24 13:19:53 UTC (rev 16210)
+++ projects/haf/branches/hildon-thumbnail/daemonize/thumbs/hildon-thumbnail-factory.c	2008-09-24 13:45:06 UTC (rev 16211)
@@ -375,10 +375,17 @@
 			g_unlink (normal);
 			g_unlink (cropped);
 		}
-	} else
-		have_all = (g_file_test (large, G_FILE_TEST_EXISTS) && 
-				    g_file_test (normal, G_FILE_TEST_EXISTS) && 
-				    g_file_test (cropped, G_FILE_TEST_EXISTS));
+	} else {
+		gchar *path;
+		if (item->flags & HILDON_THUMBNAIL_FLAG_CROP) {
+			path = cropped;
+		} else if (item->width > 128) {
+			path = large;
+		} else {
+			path = normal;
+		}
+		have_all = g_file_test (path, G_FILE_TEST_EXISTS);
+	}
 
 	if (error)
 		g_error_free (error);


More information about the maemo-commits mailing list