[gthumb/gthumb-3-2] file list: correctly reset the update timeout



commit 1d53841d666a0555b3d9542caf624b321bf50a8a
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Apr 13 11:18:52 2014 +0200

    file list: correctly reset the update timeout

 gthumb/gth-file-list.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gthumb/gth-file-list.c b/gthumb/gth-file-list.c
index 847705d..09e85b7 100644
--- a/gthumb/gth-file-list.c
+++ b/gthumb/gth-file-list.c
@@ -222,6 +222,7 @@ _gth_file_list_clear_queue (GthFileList *file_list)
 
        if (file_list->priv->update_event != 0) {
                g_source_remove (file_list->priv->update_event);
+               file_list->priv->update_event = 0;
                file_list->priv->dirty = FALSE;
        }
 
@@ -448,6 +449,11 @@ restart_thumb_update_cb (gpointer data)
 {
        GthFileList *file_list = data;
 
+       if (file_list->priv->update_event != 0) {
+               g_source_remove (file_list->priv->update_event);
+               file_list->priv->update_event = 0;
+       }
+
        if (file_list->priv->restart_thumb_update != 0) {
                g_source_remove (file_list->priv->restart_thumb_update);
                file_list->priv->restart_thumb_update = 0;
@@ -1609,6 +1615,12 @@ static gboolean
 start_thumbnail_job (gpointer user_data)
 {
        ThumbnailJob *job = user_data;
+       GthFileList  *file_list = job->file_list;
+
+       if (file_list->priv->update_event != 0) {
+               g_source_remove (file_list->priv->update_event);
+               file_list->priv->update_event = 0;
+       }
 
        job->started = TRUE;
        gth_thumb_loader_load (job->loader,


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