Mercurial > geeqie.yaz
changeset 803:764fd82dd099
better check for notify type
author | nadvornik |
---|---|
date | Sun, 08 Jun 2008 19:09:44 +0000 |
parents | 3cfc54c77b30 |
children | e702eaa6d1df |
files | 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 |
diffstat | 9 files changed, 21 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cache_maint.c Sun Jun 08 09:25:39 2008 +0000 +++ b/src/cache_maint.c Sun Jun 08 19:09:44 2008 +0000 @@ -627,7 +627,7 @@ 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) {
--- a/src/collect-io.c Sun Jun 08 09:25:39 2008 +0000 +++ b/src/collect-io.c Sun Jun 08 19:09:44 2008 +0000 @@ -928,7 +928,7 @@ 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) {
--- a/src/collect.c Sun Jun 08 09:25:39 2008 +0000 +++ b/src/collect.c Sun Jun 08 19:09:44 2008 +0000 @@ -766,7 +766,7 @@ { CollectionData *cd = data; - if (!fd->change) return; + if (type != NOTIFY_TYPE_CHANGE || !fd->change) return; switch(fd->change->type) {
--- a/src/dupe.c Sun Jun 08 09:25:39 2008 +0000 +++ b/src/dupe.c Sun Jun 08 19:09:44 2008 +0000 @@ -3566,7 +3566,7 @@ { DupeWindow *dw = data; - if (!fd->change) return; + if (type != NOTIFY_TYPE_CHANGE || !fd->change) return; switch(fd->change->type) {
--- a/src/img-view.c Sun Jun 08 09:25:39 2008 +0000 +++ b/src/img-view.c Sun Jun 08 19:09:44 2008 +0000 @@ -1693,7 +1693,7 @@ { ViewWindow *vw = data; - if (!fd->change) return; + if (type != NOTIFY_TYPE_CHANGE || !fd->change) return; switch(fd->change->type) {
--- a/src/layout_image.c Sun Jun 08 09:25:39 2008 +0000 +++ b/src/layout_image.c Sun Jun 08 19:09:44 2008 +0000 @@ -2093,7 +2093,7 @@ { LayoutWindow *lw = data; - if (!fd->change) return; + if (type != NOTIFY_TYPE_CHANGE || !fd->change) return; switch(fd->change->type) {
--- a/src/search.c Sun Jun 08 09:25:39 2008 +0000 +++ b/src/search.c Sun Jun 08 19:09:44 2008 +0000 @@ -2868,7 +2868,7 @@ { SearchData *sd = data; - if (!fd->change) return; + if (type != NOTIFY_TYPE_CHANGE || !fd->change) return; switch(fd->change->type) {
--- a/src/view_file_icon.c Sun Jun 08 09:25:39 2008 +0000 +++ b/src/view_file_icon.c Sun Jun 08 19:09:44 2008 +0000 @@ -2559,7 +2559,7 @@ { ViewFile *vf = data; - if (!fd->change) return; + if (type != NOTIFY_TYPE_CHANGE || !fd->change) return; switch(fd->change->type) {
--- a/src/view_file_list.c Sun Jun 08 09:25:39 2008 +0000 +++ b/src/view_file_list.c Sun Jun 08 19:09:44 2008 +0000 @@ -1909,18 +1909,21 @@ 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)