[tracker/libtracker-miner] tracker-miner-fs: removed "disabled-modules" config option
- From: Martyn James Russell <mr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/libtracker-miner] tracker-miner-fs: removed "disabled-modules" config option
- Date: Fri, 31 Jul 2009 14:43:51 +0000 (UTC)
commit 642a026431e8018bc08c56c5e19c169cbf2aa7e0
Author: Martyn Russell <martyn imendio com>
Date: Fri Jul 31 15:18:07 2009 +0100
tracker-miner-fs: removed "disabled-modules" config option
src/tracker-miner-fs/tracker-config.c | 62 +-----------------------------
src/tracker-miner-fs/tracker-indexer.c | 1 -
src/tracker-miner-fs/tracker-processor.c | 31 ---------------
3 files changed, 1 insertions(+), 93 deletions(-)
---
diff --git a/src/tracker-miner-fs/tracker-config.c b/src/tracker-miner-fs/tracker-config.c
index ec58c56..deb731f 100644
--- a/src/tracker-miner-fs/tracker-config.c
+++ b/src/tracker-miner-fs/tracker-config.c
@@ -65,7 +65,6 @@ typedef struct {
/* Indexing */
gint throttle;
gboolean enable_thumbnails;
- GSList *disabled_modules;
gboolean disable_indexing_on_battery;
gboolean disable_indexing_on_battery_init;
@@ -113,7 +112,6 @@ enum {
/* Indexing */
PROP_THROTTLE,
PROP_ENABLE_THUMBNAILS,
- PROP_DISABLED_MODULES,
PROP_DISABLE_INDEXING_ON_BATTERY,
PROP_DISABLE_INDEXING_ON_BATTERY_INIT,
PROP_LOW_DISK_SPACE_LIMIT,
@@ -131,7 +129,6 @@ static ObjectToKeyFile conversions[] = {
{ G_TYPE_POINTER, "no-watch-directory-roots", GROUP_MONITORS, "NoWatchDirectory" },
{ G_TYPE_INT, "throttle", GROUP_INDEXING, "Throttle" },
{ G_TYPE_BOOLEAN, "enable-thumbnails", GROUP_INDEXING, "EnableThumbnails" },
- { G_TYPE_POINTER, "disabled-modules", GROUP_INDEXING, "DisabledModules" },
{ G_TYPE_BOOLEAN, "disable-indexing-on-battery", GROUP_INDEXING, "BatteryIndex" },
{ G_TYPE_BOOLEAN, "disable-indexing-on-battery-init", GROUP_INDEXING, "BatteryIndexInitial" },
{ G_TYPE_INT, "low-disk-space-limit", GROUP_INDEXING, "LowDiskSpaceLimit" },
@@ -215,13 +212,6 @@ tracker_config_class_init (TrackerConfigClass *klass)
" Set to false to completely disable thumbnail generation",
DEFAULT_ENABLE_THUMBNAILS,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
- g_object_class_install_property (object_class,
- PROP_DISABLED_MODULES,
- g_param_spec_pointer ("disabled-modules",
- "Disabled modules",
- " List of disabled modules (separator=;)\n"
- " The modules that are indexed are kept in $prefix/lib/tracker/indexer-modules",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
;
g_object_class_install_property (object_class,
PROP_DISABLE_INDEXING_ON_BATTERY,
@@ -316,10 +306,6 @@ config_set_property (GObject *object,
tracker_config_set_enable_thumbnails (TRACKER_CONFIG (object),
g_value_get_boolean (value));
break;
- case PROP_DISABLED_MODULES:
- tracker_config_set_disabled_modules (TRACKER_CONFIG (object),
- g_value_get_pointer (value));
- break;
case PROP_DISABLE_INDEXING_ON_BATTERY:
tracker_config_set_disable_indexing_on_battery (TRACKER_CONFIG (object),
g_value_get_boolean (value));
@@ -387,9 +373,6 @@ config_get_property (GObject *object,
case PROP_ENABLE_THUMBNAILS:
g_value_set_boolean (value, priv->enable_thumbnails);
break;
- case PROP_DISABLED_MODULES:
- g_value_set_pointer (value, priv->disabled_modules);
- break;
case PROP_DISABLE_INDEXING_ON_BATTERY:
g_value_set_boolean (value, priv->disable_indexing_on_battery);
break;
@@ -428,9 +411,6 @@ config_finalize (GObject *object)
g_slist_foreach (priv->no_watch_directory_roots, (GFunc) g_free, NULL);
g_slist_free (priv->no_watch_directory_roots);
- g_slist_foreach (priv->disabled_modules, (GFunc) g_free, NULL);
- g_slist_free (priv->disabled_modules);
-
(G_OBJECT_CLASS (tracker_config_parent_class)->finalize) (object);
}
@@ -556,11 +536,7 @@ config_load (TrackerConfig *config)
break;
case G_TYPE_POINTER:
- if (g_strcmp0 (conversions[i].property, "disabled-modules") == 0) {
- is_directory_list = FALSE;
- } else {
- is_directory_list = TRUE;
- }
+ is_directory_list = TRUE;
tracker_keyfile_object_load_string_list (G_OBJECT (file),
conversions[i].property,
@@ -734,18 +710,6 @@ tracker_config_get_enable_thumbnails (TrackerConfig *config)
return priv->enable_thumbnails;
}
-GSList *
-tracker_config_get_disabled_modules (TrackerConfig *config)
-{
- TrackerConfigPrivate *priv;
-
- g_return_val_if_fail (TRACKER_IS_CONFIG (config), NULL);
-
- priv = TRACKER_CONFIG_GET_PRIVATE (config);
-
- return priv->disabled_modules;
-}
-
gboolean
tracker_config_get_disable_indexing_on_battery (TrackerConfig *config)
{
@@ -1037,27 +1001,3 @@ tracker_config_set_no_watch_directory_roots (TrackerConfig *config,
g_object_notify (G_OBJECT (config), "no-watch-directory-roots");
}
-void
-tracker_config_set_disabled_modules (TrackerConfig *config,
- GSList *modules)
-{
- TrackerConfigPrivate *priv;
- GSList *l;
-
- g_return_if_fail (TRACKER_IS_CONFIG (config));
-
- priv = TRACKER_CONFIG_GET_PRIVATE (config);
-
- l = priv->disabled_modules;
-
- if (!modules) {
- priv->disabled_modules = NULL;
- } else {
- priv->disabled_modules = tracker_gslist_copy_with_string_data (modules);
- }
-
- g_slist_foreach (l, (GFunc) g_free, NULL);
- g_slist_free (l);
-
- g_object_notify (G_OBJECT (config), "disabled-modules");
-}
diff --git a/src/tracker-miner-fs/tracker-indexer.c b/src/tracker-miner-fs/tracker-indexer.c
index f3ba724..6906591 100644
--- a/src/tracker-miner-fs/tracker-indexer.c
+++ b/src/tracker-miner-fs/tracker-indexer.c
@@ -982,7 +982,6 @@ indexer_load_modules (TrackerIndexer *indexer)
priv = indexer->private;
priv->indexer_modules = g_hash_table_new (g_str_hash, g_str_equal);
- disabled_modules = tracker_config_get_disabled_modules (priv->config);
modules = tracker_module_config_get_modules ();
for (l = modules; l; l = l->next) {
diff --git a/src/tracker-miner-fs/tracker-processor.c b/src/tracker-miner-fs/tracker-processor.c
index 73ac796..fb1d8b6 100644
--- a/src/tracker-miner-fs/tracker-processor.c
+++ b/src/tracker-miner-fs/tracker-processor.c
@@ -834,27 +834,6 @@ process_module_files_add_legacy_options (TrackerProcessor *processor)
}
}
-static gboolean
-process_module_is_disabled (TrackerProcessor *processor,
- const gchar *module_name)
-{
- GSList *disabled_modules;
-
- if (!tracker_module_config_get_enabled (module_name)) {
- g_message (" Module disabled by module config");
- return TRUE;
- }
-
- disabled_modules = tracker_config_get_disabled_modules (processor->private->config);
-
- if (g_slist_find_custom (disabled_modules, module_name, (GCompareFunc) g_strcmp0)) {
- g_message (" Module disabled by user");
- return TRUE;
- }
-
- return FALSE;
-}
-
static void
process_module (TrackerProcessor *processor,
const gchar *module_name)
@@ -863,11 +842,6 @@ process_module (TrackerProcessor *processor,
g_message ("Processing module:'%s'", module_name);
- if (process_module_is_disabled (processor, module_name)) {
- process_module_next (processor);
- return;
- }
-
/* Here we set up legacy .cfg options like watch roots */
tracker_status_set_and_signal (TRACKER_STATUS_WATCHING);
@@ -924,11 +898,6 @@ process_device (TrackerProcessor *processor,
g_message ("Processing device with root:'%s'", device_root);
- if (process_module_is_disabled (processor, module_name)) {
- process_device_next (processor);
- return;
- }
-
/* Here we set up legacy .cfg options like watch roots */
tracker_status_set_and_signal (TRACKER_STATUS_WATCHING);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]