[eog] Don't create thumbnails out of outdated image pixbufs



commit 35ea437d25c94cbd7c0c61c7a4c3094a239048d8
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Mon Sep 13 18:38:14 2010 +0300

    Don't create thumbnails out of outdated image pixbufs
    
    Fixes bug #614634 - EOG prevents the Desktop thumbnails to be updated

 src/eog-thumbnail.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/eog-thumbnail.c b/src/eog-thumbnail.c
index 376cfa1..05c0a4e 100644
--- a/src/eog-thumbnail.c
+++ b/src/eog-thumbnail.c
@@ -440,7 +440,7 @@ eog_thumbnail_load (EogImage *image, GError **error)
 	GdkPixbuf *thumb = NULL;
 	GFile *file;
 	EogThumbData *data;
-	GdkPixbuf *pixbuf;
+	GdkPixbuf *pixbuf = NULL;
 
 	g_return_val_if_fail (image != NULL, NULL);
 	g_return_val_if_fail (error != NULL && *error == NULL, NULL);
@@ -465,7 +465,9 @@ eog_thumbnail_load (EogImage *image, GError **error)
 	if (thumb != NULL) {
 		eog_debug_message (DEBUG_THUMBNAIL, "%s: loaded from cache",data->uri_str);
 	} else if (gnome_desktop_thumbnail_factory_can_thumbnail (factory, data->uri_str, data->mime_type, data->mtime)) {
-		pixbuf = eog_image_get_pixbuf (image);
+		/* Only use the image pixbuf when it is up to date. */
+		if (!eog_image_is_file_changed (image))
+			pixbuf = eog_image_get_pixbuf (image);
 
 		if (pixbuf != NULL) {
 			/* generate a thumbnail from the in-memory image,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]