better check for notify type
authorVladimir Nadvornik <nadvornik@suse.cz>
Sun, 8 Jun 2008 19:09:44 +0000 (19:09 +0000)
committerVladimir Nadvornik <nadvornik@suse.cz>
Sun, 8 Jun 2008 19:09:44 +0000 (19:09 +0000)
src/cache_maint.c
src/collect-io.c
src/collect.c
src/dupe.c
src/img-view.c
src/layout_image.c
src/search.c
src/view_file_icon.c
src/view_file_list.c

index 5ab56fa..cf73d8a 100644 (file)
@@ -627,7 +627,7 @@ static void cache_maint_copied(FileData *fd)
 
 void cache_notify_cb(FileData *fd, NotifyType type, gpointer data)
 {
-       if (!fd->change) return;
+       if (type != NOTIFY_TYPE_CHANGE || !fd->change) return;
        
        switch(fd->change->type)
                {
index 97a3df4..139d696 100644 (file)
@@ -928,7 +928,7 @@ void collect_manager_flush(void)
 void collect_manager_notify_cb(FileData *fd, NotifyType type, gpointer data)
 {
 
-       if (!fd->change) return;
+       if (type != NOTIFY_TYPE_CHANGE || !fd->change) return;
        
        switch(fd->change->type)
                {
index 089d715..b3ff6ac 100644 (file)
@@ -766,7 +766,7 @@ static void collection_notify_cb(FileData *fd, NotifyType type, gpointer data)
 {
        CollectionData *cd = data;
 
-       if (!fd->change) return;
+       if (type != NOTIFY_TYPE_CHANGE || !fd->change) return;
        
        switch(fd->change->type)
                {
index d25dee8..4396be3 100644 (file)
@@ -3566,7 +3566,7 @@ static void dupe_notify_cb(FileData *fd, NotifyType type, gpointer data)
 {
        DupeWindow *dw = data;
 
-       if (!fd->change) return;
+       if (type != NOTIFY_TYPE_CHANGE || !fd->change) return;
        
        switch(fd->change->type)
                {
index 7f3fded..5986d79 100644 (file)
@@ -1693,7 +1693,7 @@ static void view_window_notify_cb(FileData *fd, NotifyType type, gpointer data)
 {
        ViewWindow *vw = data;
 
-       if (!fd->change) return;
+       if (type != NOTIFY_TYPE_CHANGE || !fd->change) return;
        
        switch(fd->change->type)
                {
index 3687300..65db270 100644 (file)
@@ -2093,7 +2093,7 @@ void layout_image_notify_cb(FileData *fd, NotifyType type, gpointer data)
 {
        LayoutWindow *lw = data;
 
-       if (!fd->change) return;
+       if (type != NOTIFY_TYPE_CHANGE || !fd->change) return;
        
        switch(fd->change->type)
                {
index 96314e8..86a9e1c 100644 (file)
@@ -2868,7 +2868,7 @@ static void search_notify_cb(FileData *fd, NotifyType type, gpointer data)
 {
        SearchData *sd = data;
 
-       if (!fd->change) return;
+       if (type != NOTIFY_TYPE_CHANGE || !fd->change) return;
        
        switch(fd->change->type)
                {
index 4e6064e..2c0a64a 100644 (file)
@@ -2559,7 +2559,7 @@ static void vficon_notify_cb(FileData *fd, NotifyType type, gpointer data)
 {
        ViewFile *vf = data;
 
-       if (!fd->change) return;
+       if (type != NOTIFY_TYPE_CHANGE || !fd->change) return;
        
        switch(fd->change->type)
                {
index aff230e..dacf363 100644 (file)
@@ -1909,18 +1909,21 @@ static void vflist_notify_cb(FileData *fd, NotifyType type, gpointer data)
                g_free(base);
                }
 
-       if (!refresh && fd->change && fd->change->dest)
+       if (type == NOTIFY_TYPE_CHANGE && fd->change)
                {
-               gchar *dest_base = remove_level_from_path(fd->change->dest);
-               refresh = (strcmp(dest_base, vf->dir_fd->path) == 0);
-               g_free(dest_base);
-               }
+               if (!refresh && fd->change->dest)
+                       {
+                       gchar *dest_base = remove_level_from_path(fd->change->dest);
+                       refresh = (strcmp(dest_base, vf->dir_fd->path) == 0);
+                       g_free(dest_base);
+                       }
 
-       if (!refresh && fd->change && fd->change->source)
-               {
-               gchar *source_base = remove_level_from_path(fd->change->source);
-               refresh = (strcmp(source_base, vf->dir_fd->path) == 0);
-               g_free(source_base);
+               if (!refresh && fd->change->source)
+                       {
+                       gchar *source_base = remove_level_from_path(fd->change->source);
+                       refresh = (strcmp(source_base, vf->dir_fd->path) == 0);
+                       g_free(source_base);
+                       }
                }
        
        if (refresh)