[Tracker] tracker-prefs read the wrong key for IndexEvolutionmail



Here is the patch.

also, I make invisible for IndexThunderbirdmail and IndexKmail,
since they are not ready.
if I am wrong, please correct me.



Index: src/trackerd/tracker-utils.c
===================================================================
--- src/trackerd/tracker-utils.c        (revision 673)
+++ src/trackerd/tracker-utils.c        (working copy)
@@ -2256,9 +2256,13 @@
 
        key_file = g_key_file_new ();
 
-       filename = g_build_filename (tracker->config_dir, "tracker.cfg", NULL);
+       filename = g_build_filename (tracker->config_dir, "/tracker/tracker.cfg", NULL);
 
        if (!g_file_test (filename, G_FILE_TEST_EXISTS)) {
+               char *tracker_dir = g_build_filename(tracker->config_dir,"/tracker",NULL);
+               if (!g_file_test(tracker_dir,G_FILE_TEST_EXISTS)) {
+                      g_mkdir_with_parents(tracker_dir,0700);
+               }
                char *contents, *language;
 
                language = get_default_language_code ();
@@ -2299,7 +2303,7 @@
                                         "# Enables use of language-specific stemmer\n",
                                         "EnableStemmer=true\n",
                                         "[Emails]\n",
-                                        "IndexEvolutionEmails=true\n",
+                                        "IndexEvolutionEmails=false\n",
                                         "[Performance]\n",
                                         "# Maximum size of text in bytes to index from a file's text 
contents\n",
                                         "MaxTextToIndex=1048576\n",
Index: src/tracker-preferences/tracker-configuration.c
===================================================================
--- src/tracker-preferences/tracker-configuration.c     (revision 673)
+++ src/tracker-preferences/tracker-configuration.c     (working copy)
@@ -261,7 +261,7 @@
        GError *error = NULL;
 
        priv->dirty = FALSE;
-       priv->filename = g_build_filename (g_strdup (g_get_user_config_dir ()), "tracker.cfg", NULL);
+       priv->filename = g_build_filename (g_strdup (g_get_user_config_dir ()), "/tracker/tracker.cfg", NULL);
        priv->keyfile = g_key_file_new ();
 
        if (!g_file_test (priv->filename, G_FILE_TEST_EXISTS))
Index: src/tracker-preferences/tracker-preferences.glade
===================================================================
--- src/tracker-preferences/tracker-preferences.glade   (revision 673)
+++ src/tracker-preferences/tracker-preferences.glade   (working copy)
@@ -305,7 +305,7 @@
                                 </child>
                                 <child>
                                   <widget class="GtkCheckButton" id="chkEnableThunderbirdIndexing">
-                                    <property name="visible">True</property>
+                                    <property name="visible">False</property>
                                     <property name="label" translatable="yes">Enable Thunderbird email 
indexing</property>
                                     <property name="draw_indicator">True</property>
                                   </widget>
@@ -316,7 +316,7 @@
                                 </child>
                                 <child>
                                   <widget class="GtkCheckButton" id="chkEnableKMailIndexing">
-                                    <property name="visible">True</property>
+                                    <property name="visible">False</property>
                                     <property name="label" translatable="yes">Enable KMail email 
indexing</property>
                                     <property name="draw_indicator">True</property>
                                   </widget>
Index: src/tracker-preferences/tracker-preferences.c
===================================================================
--- src/tracker-preferences/tracker-preferences.c       (revision 673)
+++ src/tracker-preferences/tracker-preferences.c       (working copy)
@@ -218,7 +218,7 @@
                                       "chkEnableEvolutionIndexing");
        if (evolution_available ()) {
                value = tracker_configuration_get_bool (configuration,
-                                                       "/Services/IndexEvolutionEmails",
+                                                       "/Emails/IndexEvolutionEmails",
                                                        NULL);
                gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget),
                                              value);
@@ -423,7 +423,7 @@
                                       "chkEnableEvolutionIndexing");
        value = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
        tracker_configuration_set_bool (configuration,
-                                       "/Services/IndexEvolutionEmails",
+                                       "/Emails/IndexEvolutionEmails",
                                        value);
 
        widget = glade_xml_get_widget (priv->gxml,


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