tracker r2040 - in branches/indexer-split: . src/trackerd



Author: mr
Date: Mon Aug 11 14:11:05 2008
New Revision: 2040
URL: http://svn.gnome.org/viewvc/tracker?rev=2040&view=rev

Log:
	* src/trackerd/tracker-monitor.c: (tracker_monitor_init),
	(monitor_event_cb): Improve the last commit so we use the _CHANGED
	event for FAM only because it is dumb and doesn't allow GIO to
	signal _CHANGES_DONE.


Modified:
   branches/indexer-split/ChangeLog
   branches/indexer-split/src/trackerd/tracker-monitor.c

Modified: branches/indexer-split/src/trackerd/tracker-monitor.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-monitor.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-monitor.c	Mon Aug 11 14:11:05 2008
@@ -65,6 +65,11 @@
 	guint          monitor_limit;
 	gboolean       monitor_limit_warned;
 	guint          monitors_ignored;
+
+	/* For FAM, the _CHANGES_DONE event is not signalled, so we
+	 * have to just use the _CHANGED event instead.
+	 */
+	gboolean       use_changed_event;
 };
 
 enum {
@@ -260,6 +265,7 @@
 			 * based on testing 
 			 */
 			priv->monitor_limit = 400;
+			priv->use_changed_event = TRUE;
 		}
 		else if (strcmp (name, "GFenDirectoryMonitor") == 0) {
 			/* Using Fen, what is this? */
@@ -695,6 +701,12 @@
 		   
 	if (!black_list_file_check (monitor, file)) {
 		switch (event_type) {
+		case G_FILE_MONITOR_EVENT_CHANGED:
+			if (!monitor->private->use_changed_event) {
+				/* Do nothing */
+				break;
+			}
+
 		case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: 
 		case G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED:
 			g_signal_emit (monitor, 
@@ -728,7 +740,6 @@
 				       is_directory);
 			break;
 			
-		case G_FILE_MONITOR_EVENT_CHANGED:
 		case G_FILE_MONITOR_EVENT_UNMOUNTED:
 			/* Do nothing */
 			break;



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