[tracker/live-config-changes: 5/6] TrackerMinerFiles: Listen to changes in IgnoredDirectories[WithContent].
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/live-config-changes: 5/6] TrackerMinerFiles: Listen to changes in IgnoredDirectories[WithContent].
- Date: Tue, 2 Mar 2010 16:29:51 +0000 (UTC)
commit c565f0f793e779405b434bee5065ca385508c7a1
Author: Carlos Garnacho <carlos lanedo com>
Date: Mon Mar 1 18:08:16 2010 +0100
TrackerMinerFiles: Listen to changes in IgnoredDirectories[WithContent].
Any change on these values will force a check on all indexed
contents, so all monitors are properly added/removed as necessary.
src/tracker-miner-fs/tracker-miner-files.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-miner-fs/tracker-miner-files.c b/src/tracker-miner-fs/tracker-miner-files.c
index 7e50178..2bb21e3 100644
--- a/src/tracker-miner-fs/tracker-miner-files.c
+++ b/src/tracker-miner-fs/tracker-miner-files.c
@@ -128,6 +128,9 @@ static void index_recursive_directories_cb (GObject *g
static void index_single_directories_cb (GObject *gobject,
GParamSpec *arg1,
gpointer user_data);
+static void ignore_directories_cb (GObject *gobject,
+ GParamSpec *arg1,
+ gpointer user_data);
static DBusGProxy *extractor_create_proxy (void);
static gboolean miner_files_check_file (TrackerMinerFS *fs,
GFile *file);
@@ -465,6 +468,12 @@ miner_files_constructed (GObject *object)
g_signal_connect (mf->private->config, "notify::index-single-directories",
G_CALLBACK (index_single_directories_cb),
mf);
+ g_signal_connect (mf->private->config, "notify::ignored-directories",
+ G_CALLBACK (ignore_directories_cb),
+ mf);
+ g_signal_connect (mf->private->config, "notify::ignored-directories-with-content",
+ G_CALLBACK (ignore_directories_cb),
+ mf);
g_slist_foreach (mounts, (GFunc) g_free, NULL);
g_slist_free (mounts);
@@ -1101,6 +1110,17 @@ index_single_directories_cb (GObject *gobject,
private->index_single_directories = tracker_gslist_copy_with_string_data (new_dirs);
}
+static void
+ignore_directories_cb (GObject *gobject,
+ GParamSpec *arg1,
+ gpointer user_data)
+{
+ TrackerMinerFiles *miner_files = user_data;
+
+ /* Recheck all directories for compliance with the new config */
+ tracker_miner_fs_force_recheck (TRACKER_MINER_FS (miner_files));
+}
+
static gboolean
miner_files_check_file (TrackerMinerFS *fs,
GFile *file)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]