[gthumb] Break gth_monitor_notify_update_files up into gfile and file versions



commit 9508bc814b4bcebda55b4bb610c48636ff34e41b
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date:   Wed Jun 24 19:17:18 2009 -0400

    Break gth_monitor_notify_update_files up into gfile and file versions
    
    Fixes bug 586884.

 libgthumb/gth-monitor.c |   28 +++++++++++++++++++++++-----
 libgthumb/gth-monitor.h |    2 ++
 2 files changed, 25 insertions(+), 5 deletions(-)
---
diff --git a/libgthumb/gth-monitor.c b/libgthumb/gth-monitor.c
index 5f9e1a7..b3ceda1 100644
--- a/libgthumb/gth-monitor.c
+++ b/libgthumb/gth-monitor.c
@@ -254,17 +254,17 @@ proc_monitor_events (gpointer data)
 	/**/
 
 	if (file_created_list != NULL) {
-		gth_monitor_notify_update_files (GTH_MONITOR_EVENT_CREATED, file_created_list);
+		gth_monitor_notify_update_gfiles (GTH_MONITOR_EVENT_CREATED, file_created_list);
 		gfile_list_free (file_created_list);
 	}
 
 	if (file_deleted_list != NULL) {
-		gth_monitor_notify_update_files (GTH_MONITOR_EVENT_DELETED, file_deleted_list);
+		gth_monitor_notify_update_gfiles (GTH_MONITOR_EVENT_DELETED, file_deleted_list);
 		gfile_list_free (file_deleted_list);
 	}
 
 	if (file_changed_list != NULL) {
-		gth_monitor_notify_update_files (GTH_MONITOR_EVENT_CHANGED, file_changed_list);
+		gth_monitor_notify_update_gfiles (GTH_MONITOR_EVENT_CHANGED, file_changed_list);
 		gfile_list_free (file_changed_list);
 	}
 
@@ -502,8 +502,8 @@ gth_monitor_notify_update_cat_files (const char      *catalog_path,
 
 
 void
-gth_monitor_notify_update_files (GthMonitorEvent  event,
-				 GList           *list)
+gth_monitor_notify_update_gfiles (GthMonitorEvent  event,
+				  GList           *list)
 {
 	GList *path_list = NULL;
 	GList *scan;
@@ -530,6 +530,24 @@ gth_monitor_notify_update_files (GthMonitorEvent  event,
 
 
 void
+gth_monitor_notify_update_files (GthMonitorEvent  event,
+				 GList           *list)
+{
+	g_return_if_fail (GTH_IS_MONITOR (instance));
+
+	if (list == NULL)
+		return;
+
+	/* FIXME: start using the above gfile equivalent */
+	g_signal_emit (G_OBJECT (instance),
+		       monitor_signals[UPDATE_FILES],
+		       0,
+		       event,
+		       list);
+}
+
+
+void
 gth_monitor_notify_update_directory (const char      *dir_path,
 				     GthMonitorEvent  event)
 {
diff --git a/libgthumb/gth-monitor.h b/libgthumb/gth-monitor.h
index a851a9a..7f890f5 100644
--- a/libgthumb/gth-monitor.h
+++ b/libgthumb/gth-monitor.h
@@ -88,6 +88,8 @@ void         gth_monitor_notify_update_bookmarks     (void);
 void         gth_monitor_notify_update_cat_files     (const char      *catalog_path,
 						      GthMonitorEvent  event,
 						      GList           *list);
+void         gth_monitor_notify_update_gfiles        (GthMonitorEvent  event,
+                                                      GList           *list);
 void         gth_monitor_notify_update_files         (GthMonitorEvent  event,
 						      GList           *list);
 void         gth_monitor_notify_update_directory     (const char      *dir_path,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]