[gthumb] Fixed thumbnail updates in the file list



commit e458134c0eca1ce69aa878b504e42890384259fc
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Fri May 14 10:47:18 2010 +0200

    Fixed thumbnail updates in the file list

 gthumb/gth-file-list.c |   34 +++++++++++++++++++---------------
 1 files changed, 19 insertions(+), 15 deletions(-)
---
diff --git a/gthumb/gth-file-list.c b/gthumb/gth-file-list.c
index ced331e..f272620 100644
--- a/gthumb/gth-file-list.c
+++ b/gthumb/gth-file-list.c
@@ -317,19 +317,28 @@ gth_file_list_init (GthFileList *file_list)
 static void _gth_file_list_update_next_thumb (GthFileList *file_list);
 
 
-static gboolean
-flash_queue_cb (gpointer data)
+static void
+flash_queue (GthFileList *file_list)
 {
-	GthFileList *file_list = data;
-	GthFileStore *file_store;
+	if (file_list->priv->dirty) {
+		GthFileStore *file_store;
 
-	file_store = (GthFileStore *) gth_file_view_get_model (GTH_FILE_VIEW (file_list->priv->view));
-	gth_file_store_exec_set (file_store);
+		file_store = (GthFileStore *) gth_file_view_get_model (GTH_FILE_VIEW (file_list->priv->view));
+		gth_file_store_exec_set (file_store);
+		file_list->priv->dirty = FALSE;
+	}
+
+	if (file_list->priv->dirty_event != 0) {
+		g_source_remove (file_list->priv->dirty_event);
+		file_list->priv->dirty_event = 0;
+	}
+}
 
-	g_source_remove (file_list->priv->dirty_event);
-	file_list->priv->dirty_event = 0;
-	file_list->priv->dirty = FALSE;
 
+static gboolean
+flash_queue_cb (gpointer data)
+{
+	flash_queue ((GthFileList *) data);
 	return FALSE;
 }
 
@@ -1303,12 +1312,7 @@ gth_file_list_get_vadjustment (GthFileList *file_list)
 static void
 _gth_file_list_thumbs_completed (GthFileList *file_list)
 {
-	GthFileStore *file_store;
-
-	file_store = (GthFileStore *) gth_file_view_get_model (GTH_FILE_VIEW (file_list->priv->view));
-	if (file_list->priv->n_thumb >= 0)
-		gth_file_store_exec_set (file_store);
-
+	flash_queue (file_list);
 	_gth_file_list_done (file_list);
 }
 



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