[tracker/miner-fs-refactor: 39/127] libtracker-miner: Set up monitor in TrackerFileNotifier
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-refactor: 39/127] libtracker-miner: Set up monitor in TrackerFileNotifier
- Date: Mon, 5 Dec 2011 13:22:53 +0000 (UTC)
commit 492a9ddbf8f6120c2c7cef208f11d3191e2bbce2
Author: Carlos Garnacho <carlos lanedo com>
Date: Wed Sep 28 17:59:33 2011 +0200
libtracker-miner: Set up monitor in TrackerFileNotifier
src/libtracker-miner/tracker-file-notifier.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 7355ed7..ebfb715 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -155,7 +155,6 @@ crawler_check_directory_contents_cb (TrackerCrawler *crawler,
priv = TRACKER_FILE_NOTIFIER (user_data)->priv;
process = tracker_indexing_tree_parent_is_indexable (priv->indexing_tree,
parent, children);
-#if 0
if (process) {
TrackerDirectoryFlags parent_flags;
gboolean add_monitor;
@@ -165,9 +164,12 @@ crawler_check_directory_contents_cb (TrackerCrawler *crawler,
add_monitor = (parent_flags & TRACKER_DIRECTORY_FLAG_MONITOR) != 0;
- /* FIXME: add monitor */
+ if (add_monitor) {
+ tracker_monitor_add (priv->monitor, parent);
+ } else {
+ tracker_monitor_remove (priv->monitor, parent);
+ }
}
-#endif
return process;
}
@@ -539,6 +541,7 @@ tracker_file_notifier_finalize (GObject *object)
g_object_unref (priv->file_system);
g_object_unref (priv->crawler);
+ g_object_unref (priv->monitor);
g_list_free (priv->pending_index_roots);
@@ -685,6 +688,9 @@ tracker_file_notifier_init (TrackerFileNotifier *notifier)
g_signal_connect (priv->crawler, "finished",
G_CALLBACK (crawler_finished_cb),
notifier);
+
+ /* Set up monitor */
+ priv->monitor = tracker_monitor_new ();
}
TrackerFileNotifier *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]