[tracker/miner-directory-flags: 4/6] libtracker-miner: Add "monitor" flag to TrackerDirectoryFlags



commit 816299f78ceb5f24e6c4d714d31432261492f555
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Apr 25 18:06:00 2011 +0200

    libtracker-miner: Add "monitor" flag to TrackerDirectoryFlags
    
    This is meant to replace the ::monitor-directory signal.

 src/libtracker-miner/tracker-miner-fs.c |    6 +++++-
 src/libtracker-miner/tracker-miner-fs.h |    3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 3201e5f..1b16e1d 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -3557,7 +3557,11 @@ crawler_check_directory_contents_cb (TrackerCrawler *crawler,
 	g_signal_emit (fs, signals[CHECK_DIRECTORY_CONTENTS], 0, parent, children, &process);
 
 	if (process) {
-		g_signal_emit (fs, signals[MONITOR_DIRECTORY], 0, parent, &add_monitor);
+		if ((fs->private->current_directory->flags & TRACKER_DIRECTORY_MONITOR) != 0) {
+			add_monitor = TRUE;
+		} else {
+			g_signal_emit (fs, signals[MONITOR_DIRECTORY], 0, parent, &add_monitor);
+		}
 
 		/* If the directory crawled doesn't have ANY file, we need to
 		 * force a mtime cache reload using the given directory as input
diff --git a/src/libtracker-miner/tracker-miner-fs.h b/src/libtracker-miner/tracker-miner-fs.h
index da904b5..7f1e92f 100644
--- a/src/libtracker-miner/tracker-miner-fs.h
+++ b/src/libtracker-miner/tracker-miner-fs.h
@@ -48,7 +48,8 @@ typedef struct _TrackerMinerFSPrivate TrackerMinerFSPrivate;
 typedef enum {
 	TRACKER_DIRECTORY_NONE              = 0,
 	TRACKER_DIRECTORY_RECURSE           = 1 << 0,
-	TRACKER_DIRECTORY_CHECK_MTIME       = 1 << 1
+	TRACKER_DIRECTORY_CHECK_MTIME       = 1 << 1,
+	TRACKER_DIRECTORY_MONITOR           = 1 << 2
 } TrackerDirectoryFlags;
 
 /**



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