[tracker] tracker-preferences: Remove the "System" tab altogether



commit aba9b65ca5c080f9cd064f5dc8d2ef7d31162649
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue May 3 02:11:52 2016 +0200

    tracker-preferences: Remove the "System" tab altogether
    
    Resetting data is not something we should offer a big button for,
    really.

 src/tracker-preferences/tracker-preferences.ui   |  208 ----------------------
 src/tracker-preferences/tracker-preferences.vala |   21 ---
 2 files changed, 0 insertions(+), 229 deletions(-)
---
diff --git a/src/tracker-preferences/tracker-preferences.ui b/src/tracker-preferences/tracker-preferences.ui
index 3fbe3ea..67ab58b 100644
--- a/src/tracker-preferences/tracker-preferences.ui
+++ b/src/tracker-preferences/tracker-preferences.ui
@@ -1561,214 +1561,6 @@ Most commonly this is used to ignore directories like *~, *.o, *.la, etc</proper
                 <property name="tab_fill">False</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkBox" id="vbox_system">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="border_width">12</property>
-                <property name="orientation">vertical</property>
-                <property name="spacing">18</property>
-                <child>
-                  <object class="GtkFrame" id="frame_reset_data">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label_xalign">0</property>
-                    <property name="shadow_type">none</property>
-                    <child>
-                      <object class="GtkAlignment" id="alignment6">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="top_padding">6</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <object class="GtkBox" id="vbox1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="orientation">vertical</property>
-                            <property name="spacing">18</property>
-                            <child>
-                              <object class="GtkLabel" id="label15">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">When resetting your indexed data, 
the databases are removed and your files will no longer be indexed. Upon next start, Tracker will then start 
indexing data as if it was being run for the first time.
-
-&lt;b&gt;Warning: All indexes and caches for your data will be removed! They can not be retrieved! Your REAL 
data and files will not be touched.&lt;/b&gt;
-
-Clicking this button will close the preferences too.</property>
-                                <property name="use_markup">True</property>
-                                <property name="justify">fill</property>
-                                <property name="wrap">True</property>
-                                <property name="max_width_chars">40</property>
-                                <property name="xalign">0</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkButton" id="button_reindex">
-                                <property name="label" translatable="yes">Yes, remove all indexes</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="receives_default">True</property>
-                                <property name="tooltip_text" translatable="yes">An 'index' is an ordered 
referenced to a piece of data. We use indexes to be able to quickly find your information and 
content.</property>
-                                <signal name="clicked" 
handler="tracker_preferences_button_reindex_clicked_cb" swapped="no"/>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
-                    <child type="label">
-                      <object class="GtkLabel" id="label17">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Reset Indexed Data</property>
-                        <attributes>
-                          <attribute name="weight" value="bold"/>
-                        </attributes>
-                      </object>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <object class="GtkFrame" id="frame_delay">
-                    <property name="can_focus">False</property>
-                    <property name="no_show_all">True</property>
-                    <property name="label_xalign">0</property>
-                    <property name="shadow_type">none</property>
-                    <child>
-                      <object class="GtkAlignment" id="alignment1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="top_padding">6</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <object class="GtkBox" id="vbox_general">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="orientation">vertical</property>
-                            <child>
-                              <object class="GtkBox" id="hbox_delay">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="spacing">12</property>
-                                <child>
-                                  <object class="GtkLabel" id="label_delay">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes">_Delay</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="mnemonic_widget">spinbutton_delay</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkBox" id="hbox16">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="spacing">6</property>
-                                    <child>
-                                      <object class="GtkSpinButton" id="spinbutton_delay">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="invisible_char">●</property>
-                                        <property name="primary_icon_activatable">False</property>
-                                        <property name="secondary_icon_activatable">False</property>
-                                        <property name="adjustment">adjustment_delay</property>
-                                        <property name="climb_rate">1</property>
-                                        <property name="snap_to_ticks">True</property>
-                                        <property name="numeric">True</property>
-                                        <signal name="value-changed" 
handler="tracker_preferences_spinbutton_delay_value_changed_cb" swapped="no"/>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">True</property>
-                                        <property name="fill">True</property>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkLabel" id="label_delay_seconds">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="label" translatable="yes">seconds</property>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
-                    <child type="label">
-                      <object class="GtkLabel" id="label_general">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Start up</property>
-                        <attributes>
-                          <attribute name="weight" value="bold"/>
-                        </attributes>
-                      </object>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="position">4</property>
-              </packing>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label4">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">System</property>
-              </object>
-              <packing>
-                <property name="position">4</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
           </object>
           <packing>
             <property name="expand">True</property>
diff --git a/src/tracker-preferences/tracker-preferences.vala 
b/src/tracker-preferences/tracker-preferences.vala
index 159acaa..f6bfff0 100644
--- a/src/tracker-preferences/tracker-preferences.vala
+++ b/src/tracker-preferences/tracker-preferences.vala
@@ -45,7 +45,6 @@ public class Tracker.Preferences {
        private Window window;
        private CheckButton checkbutton_enable_index_on_battery_first_time;
        private CheckButton checkbutton_enable_index_on_battery;
-       private SpinButton spinbutton_delay;
        private CheckButton checkbutton_enable_monitoring;
        private CheckButton checkbutton_index_removable_media;
        private CheckButton checkbutton_index_optical_discs;
@@ -74,7 +73,6 @@ public class Tracker.Preferences {
        private CheckButton checkbutton_index_file_content;
        private CheckButton checkbutton_index_numbers;
        private Box hbox_duplicate_warning;
-       private Button button_reindex;
        private Notebook notebook;
 
        public Preferences () {
@@ -135,7 +133,6 @@ public class Tracker.Preferences {
                checkbutton_enable_monitoring = builder.get_object ("checkbutton_enable_monitoring") as 
CheckButton;
                checkbutton_enable_index_on_battery = builder.get_object 
("checkbutton_enable_index_on_battery") as CheckButton;
                checkbutton_enable_index_on_battery_first_time = builder.get_object 
("checkbutton_enable_index_on_battery_first_time") as CheckButton;
-               spinbutton_delay = builder.get_object ("spinbutton_delay") as SpinButton;
                checkbutton_index_removable_media = builder.get_object ("checkbutton_index_removable_media") 
as CheckButton;
                checkbutton_index_optical_discs = builder.get_object ("checkbutton_index_optical_discs") as 
CheckButton;
                checkbutton_index_optical_discs.set_sensitive (checkbutton_index_removable_media.active);
@@ -155,8 +152,6 @@ public class Tracker.Preferences {
                checkbutton_index_numbers = builder.get_object ("checkbutton_index_numbers") as CheckButton;
                hbox_duplicate_warning = builder.get_object ("hbox_duplicate_warning") as Box;
 
-               button_reindex = builder.get_object ("button_reindex") as Button;
-
                treeview_index = builder.get_object ("treeview_index") as TreeView;
                treeviewcolumn_index1 = builder.get_object ("treeviewcolumn_index1") as TreeViewColumn;
                treeviewcolumn_index2 = builder.get_object ("treeviewcolumn_index1") as TreeViewColumn;
@@ -179,8 +174,6 @@ public class Tracker.Preferences {
                checkbutton_enable_index_on_battery.active = settings_miner_fs.get_boolean 
("index-on-battery");
                checkbutton_enable_index_on_battery_first_time.set_sensitive 
(!checkbutton_enable_index_on_battery.active);
                checkbutton_enable_index_on_battery_first_time.active = settings_miner_fs.get_boolean 
("index-on-battery-first-time");
-               spinbutton_delay.set_increments (1, 1);
-               spinbutton_delay.value = (double) settings_miner_fs.get_int ("initial-sleep");
                checkbutton_enable_monitoring.active = settings_miner_fs.get_boolean ("enable-monitors");
                checkbutton_index_removable_media.active = settings_miner_fs.get_boolean 
("index-removable-devices");
                checkbutton_index_optical_discs.set_sensitive (checkbutton_index_removable_media.active);
@@ -243,10 +236,6 @@ public class Tracker.Preferences {
                window.show ();
        }
 
-       void reindex () {
-               Posix.system ("tracker reset --hard && tracker daemon --start");
-       }
-
        // This function is used to fix up the parameter ordering for callbacks
        // from the .ui file which has the callback names.
        [CCode (instance_pos = -1)]
@@ -331,11 +320,6 @@ public class Tracker.Preferences {
        }
 
        [CCode (instance_pos = -1)]
-       public void spinbutton_delay_value_changed_cb (SpinButton source) {
-               settings_miner_fs.set_int ("initial-sleep", source.get_value_as_int ());
-       }
-
-       [CCode (instance_pos = -1)]
        public void checkbutton_enable_monitoring_toggled_cb (CheckButton source) {
                settings_miner_fs.set_boolean ("enable-monitors", source.active);
        }
@@ -522,11 +506,6 @@ public class Tracker.Preferences {
                suggest_restart = true;
        }
 
-       [CCode (instance_pos = -1)]
-       public void button_reindex_clicked_cb (Button source) {
-               reindex ();
-       }
-
        private void toggles_update (UserDirectory[] matches, bool active) {
                // Check if we need to untoggle a button
                foreach (UserDirectory ud in matches) {


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