changeset 1218:46e4fda574dd

improved buffering and notifications
author nadvornik
date Tue, 23 Dec 2008 19:15:12 +0000
parents 70f1d002436f
children 86fcbd0fcb7b
files src/metadata.c
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/metadata.c	Tue Dec 23 19:13:48 2008 +0000
+++ b/src/metadata.c	Tue Dec 23 19:15:12 2008 +0000
@@ -118,10 +118,11 @@
 
 static void metadata_write_queue_add(FileData *fd)
 {
-	if (g_list_find(metadata_write_queue, fd)) return;
-	
-	metadata_write_queue = g_list_prepend(metadata_write_queue, fd);
-	file_data_ref(fd);
+	if (!g_list_find(metadata_write_queue, fd))
+		{
+		metadata_write_queue = g_list_prepend(metadata_write_queue, fd);
+		file_data_ref(fd);
+		}
 
 	if (metadata_write_idle_id != -1) 
 		{
@@ -256,6 +257,9 @@
 		exif_update_metadata(fd->exif, key, values);
 		}
 	metadata_write_queue_add(fd);
+	file_data_increment_version(fd);
+	file_data_send_notification(fd, NOTIFY_TYPE_INTERNAL);
+
 	return TRUE;
 }