fixed test for changed files in cache
authorVladimir Nadvornik <nadvornik@suse.cz>
Fri, 18 Jul 2008 21:20:49 +0000 (21:20 +0000)
committerVladimir Nadvornik <nadvornik@suse.cz>
Fri, 18 Jul 2008 21:20:49 +0000 (21:20 +0000)
src/filecache.c
src/image.c

index 37985db..da320f5 100644 (file)
@@ -66,8 +66,8 @@ gboolean file_cache_get(FileCacheData *fc, FileData *fd)
                        fc->list = g_list_remove_link(fc->list, work);
                        fc->list = g_list_concat(work, fc->list);
                        
-//                     if (file_data_check_changed_files(fd)) /* this will eventually remove changed files from cache via file_cache_notify_cb */
-//                             return FALSE;
+                       if (file_data_check_changed_files(fd)) /* this will eventually remove changed files from cache via file_cache_notify_cb */
+                               return FALSE;
                                
                        if (debug_file_cache) file_cache_dump(fc);
                        return TRUE;
index 1cc78dd..4b56016 100644 (file)
@@ -1356,7 +1356,9 @@ static void image_notify_cb(FileData *fd, NotifyType type, gpointer data)
        ImageWindow *imd = data;
 
        if (!imd || !image_get_pixbuf(imd) ||
-           imd->il || !imd->image_fd ||
+           /* imd->il || */ /* loading in progress - do not check - it should start from the beginning anyway */ 
+           !imd->image_fd || /* nothing to reload */
+           imd->state == IMAGE_STATE_NONE || /* loading not started, no need to reload */
            !options->update_on_time_change) return;
 
        if (type == NOTIFY_TYPE_REREAD && fd == imd->image_fd)