Revision: 1820
http://geeqie.svn.sourceforge.net/geeqie/?rev=1820&view=rev
Author: nadvornik
Date: 2009-08-22 21:58:49 +0000 (Sat, 22 Aug 2009)
Log Message:
-----------
remove deleted files from metadata queue
Modified Paths:
--------------
trunk/src/main.c
trunk/src/metadata.c
trunk/src/metadata.h
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2009-08-22 20:20:19 UTC (rev 1819)
+++ trunk/src/main.c 2009-08-22 21:58:49 UTC (rev 1820)
@@ -759,6 +759,8 @@
file_data_register_notify_func(thumb_notify_cb, NULL,
NOTIFY_PRIORITY_HIGH);
file_data_register_notify_func(histogram_notify_cb, NULL,
NOTIFY_PRIORITY_HIGH);
file_data_register_notify_func(collect_manager_notify_cb, NULL,
NOTIFY_PRIORITY_LOW);
+ file_data_register_notify_func(metadata_notify_cb, NULL,
NOTIFY_PRIORITY_LOW);
+
gtkrc_load();
Modified: trunk/src/metadata.c
===================================================================
--- trunk/src/metadata.c 2009-08-22 20:20:19 UTC (rev 1819)
+++ trunk/src/metadata.c 2009-08-22 21:58:49 UTC (rev 1820)
@@ -126,6 +126,18 @@
return ret;
}
+void metadata_notify_cb(FileData *fd, NotifyType type, gpointer data)
+{
+ if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE)) &&
g_list_find(metadata_write_queue, fd))
+ {
+ DEBUG_1("Notify metadata: %s %04x", fd->path, type);
+ if (!isname(fd->path))
+ {
+ /* ignore deleted files */
+ metadata_write_queue_remove(fd);
+ }
+ }
+}
gboolean metadata_write_queue_confirm(gboolean force_dialog, FileUtilDoneFunc
done_func, gpointer done_data)
{
@@ -138,6 +150,13 @@
FileData *fd = work->data;
work = work->next;
+ if (!isname(fd->path))
+ {
+ /* ignore deleted files */
+ metadata_write_queue_remove(fd);
+ continue;
+ }
+
if (fd->change) continue; /* another operation in progress,
skip this file for now */
to_approve = g_list_prepend(to_approve, file_data_ref(fd));
Modified: trunk/src/metadata.h
===================================================================
--- trunk/src/metadata.h 2009-08-22 20:20:19 UTC (rev 1819)
+++ trunk/src/metadata.h 2009-08-22 21:58:49 UTC (rev 1820)
@@ -22,6 +22,7 @@
gboolean metadata_write_queue_remove_list(GList *list);
gboolean metadata_write_perform(FileData *fd);
gboolean metadata_write_queue_confirm(gboolean force_dialog, FileUtilDoneFunc
done_func, gpointer done_data);
+void metadata_notify_cb(FileData *fd, NotifyType type, gpointer data);
gint metadata_queue_length(void);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn