[tracker] tracker-preferences: Added reindex function, require GTK+3 & fix optical disc sensitivity.
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-preferences: Added reindex function, require GTK+3 & fix optical disc sensitivity.
- Date: Wed, 31 Jul 2013 21:30:56 +0000 (UTC)
commit 2b5f60a6f0e49b2399184f14d5d0d256c16b7644
Author: Martyn Russell <martyn lanedo com>
Date: Wed Jul 31 22:26:59 2013 +0100
tracker-preferences: Added reindex function, require GTK+3 & fix optical disc sensitivity.
- Glade file required older GTK+ 2.x version, but we require 3.x in the code
base.
- The index optical discs checkbutton was not correctly insensitive at the
right times.
- We now have a "system" page to reindex our data if users want an easy way to
do this.
src/tracker-preferences/tracker-preferences.ui | 415 +++++++++++++---------
src/tracker-preferences/tracker-preferences.vala | 31 ++-
2 files changed, 268 insertions(+), 178 deletions(-)
---
diff --git a/src/tracker-preferences/tracker-preferences.ui b/src/tracker-preferences/tracker-preferences.ui
index c3e22e3..fd53d0a 100644
--- a/src/tracker-preferences/tracker-preferences.ui
+++ b/src/tracker-preferences/tracker-preferences.ui
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <requires lib="gtk+" version="2.16"/>
- <!-- interface-naming-policy toplevel-contextual -->
+ <!-- interface-requires gtk+ 3.0 -->
<object class="GtkAdjustment" id="adjustment_delay">
<property name="upper">1000</property>
<property name="value">10</property>
@@ -62,12 +61,13 @@
<signal name="delete-event" handler="gtk_main_quit" swapped="no"/>
<signal name="response" handler="tracker_preferences_response_cb" swapped="no"/>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
+ <object class="GtkBox" id="dialog-vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
+ <object class="GtkButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
@@ -77,7 +77,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -92,7 +91,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -115,138 +113,7 @@
<property name="can_focus">True</property>
<property name="border_width">6</property>
<child>
- <object class="GtkVBox" id="vbox1">
- <property name="can_focus">False</property>
- <property name="border_width">12</property>
- <property name="spacing">18</property>
- <child>
- <object class="GtkFrame" id="frame_general">
- <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="GtkVBox" id="vbox_general">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkHBox" 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="GtkHBox" 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="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</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">True</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">0</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">General</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox10">
+ <object class="GtkVBox" id="vbox_indexingg">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
@@ -274,7 +141,6 @@
<property name="can_focus">True</property>
<property name="has_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
@@ -293,7 +159,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
@@ -317,7 +182,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
@@ -339,7 +203,6 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">This covers ALL removable
media, memory cards, CDs, DVDs, etc.</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
@@ -363,7 +226,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
@@ -400,7 +262,7 @@
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame_general1">
+ <object class="GtkFrame" id="frame_limitations">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
@@ -451,9 +313,8 @@ This option allows you to make Tracker take a back seat and not eat up too much
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_markup" translatable="yes">Indexing content
will be <b>much slower</b> but other applications will have priority.</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="yalign">0.51999998092651367</property>
+ <property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
@@ -470,8 +331,8 @@ This option allows you to make Tracker take a back seat and not eat up too much
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_markup" translatable="yes">Indexing content
will be <b>much slower</b> but other applications will have priority. This will only be the case
on the <b>first index</b> of your content after you start your computer from a new
install</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
+ <property name="xalign">0.5</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">radiobutton_sched_idle_always</property>
@@ -489,8 +350,8 @@ This option allows you to make Tracker take a back seat and not eat up too much
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_markup" translatable="yes">Indexing content
will be as <b>fast</b> as possible but other applications may suffer and be slower as a
result.</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
+ <property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">radiobutton_sched_idle_always</property>
@@ -579,7 +440,7 @@ This option allows you to make Tracker take a back seat and not eat up too much
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame2">
+ <object class="GtkFrame" id="frame_garbage_collection">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
@@ -650,9 +511,6 @@ This option allows you to make Tracker take a back seat and not eat up too much
<placeholder/>
</child>
</object>
- <packing>
- <property name="position">1</property>
- </packing>
</child>
<child type="tab">
<object class="GtkLabel" id="label12">
@@ -661,12 +519,11 @@ This option allows you to make Tracker take a back seat and not eat up too much
<property name="label" translatable="yes">Indexing</property>
</object>
<packing>
- <property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox2">
+ <object class="GtkVBox" id="vbox_locations">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
@@ -722,7 +579,6 @@ If a directory is toggled to <b>Recurse</b>, it means that all sub-d
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_markup" translatable="yes">Index Home
Directory</property>
- <property name="use_action_appearance">False</property>
<property name="relief">none</property>
<signal name="toggled"
handler="tracker_preferences_togglebutton_home_toggled_cb" swapped="no"/>
<child>
@@ -748,7 +604,6 @@ If a directory is toggled to <b>Recurse</b>, it means that all sub-d
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_markup" translatable="yes">Index Desktop
Directory</property>
- <property name="use_action_appearance">False</property>
<property name="relief">none</property>
<signal name="toggled"
handler="tracker_preferences_togglebutton_desktop_toggled_cb" swapped="no"/>
<child>
@@ -774,7 +629,6 @@ If a directory is toggled to <b>Recurse</b>, it means that all sub-d
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_markup" translatable="yes">Index Documents
Directory</property>
- <property name="use_action_appearance">False</property>
<property name="relief">none</property>
<signal name="toggled"
handler="tracker_preferences_togglebutton_documents_toggled_cb" swapped="no"/>
<child>
@@ -799,7 +653,6 @@ If a directory is toggled to <b>Recurse</b>, it means that all sub-d
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_markup" translatable="yes">Index Music
Directory</property>
- <property name="use_action_appearance">False</property>
<property name="relief">none</property>
<signal name="toggled"
handler="tracker_preferences_togglebutton_music_toggled_cb" swapped="no"/>
<child>
@@ -824,7 +677,6 @@ If a directory is toggled to <b>Recurse</b>, it means that all sub-d
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_markup" translatable="yes">Index Pictures
Directory</property>
- <property name="use_action_appearance">False</property>
<property name="relief">none</property>
<signal name="toggled"
handler="tracker_preferences_togglebutton_pictures_toggled_cb" swapped="no"/>
<child>
@@ -849,7 +701,6 @@ If a directory is toggled to <b>Recurse</b>, it means that all sub-d
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_markup" translatable="yes">Index Videos
Directory</property>
- <property name="use_action_appearance">False</property>
<property name="relief">none</property>
<signal name="toggled"
handler="tracker_preferences_togglebutton_videos_toggled_cb" swapped="no"/>
<child>
@@ -874,7 +725,6 @@ If a directory is toggled to <b>Recurse</b>, it means that all sub-d
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_markup" translatable="yes">Index Download
Directory</property>
- <property name="use_action_appearance">False</property>
<property name="relief">none</property>
<signal name="toggled"
handler="tracker_preferences_togglebutton_download_toggled_cb" swapped="no"/>
<child>
@@ -968,6 +818,9 @@ Those which are the same are disabled!</property>
<property name="headers_clickable">False</property>
<property name="rules_hint">True</property>
<property name="search_column">0</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
</object>
</child>
</object>
@@ -988,7 +841,6 @@ Those which are the same are disabled!</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_markup" translatable="yes">Add directory
to be indexed</property>
- <property name="use_action_appearance">False</property>
<signal name="clicked"
handler="tracker_preferences_button_index_add_clicked_cb" swapped="no"/>
<child>
<object class="GtkImage" id="image3">
@@ -1010,7 +862,6 @@ Those which are the same are disabled!</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_markup" translatable="yes">Remove
directory from being indexed</property>
- <property name="use_action_appearance">False</property>
<signal name="clicked"
handler="tracker_preferences_button_index_remove_clicked_cb" swapped="no"/>
<child>
<object class="GtkImage" id="image4">
@@ -1071,7 +922,7 @@ Those which are the same are disabled!</property>
</child>
</object>
<packing>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
<child type="tab">
@@ -1081,12 +932,12 @@ Those which are the same are disabled!</property>
<property name="label" translatable="yes">Locations</property>
</object>
<packing>
- <property name="position">2</property>
+ <property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox4">
+ <object class="GtkVBox" id="vbox_ignored_content">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
@@ -1145,6 +996,9 @@ Those which are the same are disabled!</property>
<property name="headers_visible">False</property>
<property name="rules_hint">True</property>
<property name="search_column">0</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection2"/>
+ </child>
</object>
</child>
</object>
@@ -1165,7 +1019,6 @@ Those which are the same are disabled!</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Opens text
entry for glob patterns</property>
- <property name="use_action_appearance">False</property>
<signal name="clicked"
handler="tracker_preferences_button_ignored_directories_globs_add_clicked_cb" swapped="no"/>
<child>
<object class="GtkImage" id="image6">
@@ -1186,7 +1039,6 @@ Those which are the same are disabled!</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<signal name="clicked"
handler="tracker_preferences_button_ignored_directories_remove_clicked_cb" swapped="no"/>
<child>
<object class="GtkImage" id="image7">
@@ -1208,7 +1060,6 @@ Those which are the same are disabled!</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Opens the
filechooser dialogue</property>
- <property name="use_action_appearance">False</property>
<signal name="clicked"
handler="tracker_preferences_button_ignored_directories_add_clicked_cb" swapped="no"/>
<child>
<object class="GtkImage" id="image2">
@@ -1281,6 +1132,9 @@ Those which are the same are disabled!</property>
<property name="headers_visible">False</property>
<property name="rules_hint">True</property>
<property name="search_column">0</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection3"/>
+ </child>
</object>
</child>
</object>
@@ -1300,7 +1154,6 @@ Those which are the same are disabled!</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<signal name="clicked"
handler="tracker_preferences_button_ignored_directories_with_content_add_clicked_cb" swapped="no"/>
<child>
<object class="GtkImage" id="image12">
@@ -1321,7 +1174,6 @@ Those which are the same are disabled!</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<signal name="clicked"
handler="tracker_preferences_button_ignored_directories_with_content_remove_clicked_cb" swapped="no"/>
<child>
<object class="GtkImage" id="image13">
@@ -1433,6 +1285,9 @@ Most commonly this is used to ignore directories like *~, *.o, *.la, etc</proper
<property name="headers_clickable">False</property>
<property name="rules_hint">True</property>
<property name="search_column">0</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection4"/>
+ </child>
</object>
</child>
</object>
@@ -1452,7 +1307,6 @@ Most commonly this is used to ignore directories like *~, *.o, *.la, etc</proper
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<signal name="clicked"
handler="tracker_preferences_button_ignored_files_add_clicked_cb" swapped="no"/>
<child>
<object class="GtkImage" id="image8">
@@ -1473,7 +1327,6 @@ Most commonly this is used to ignore directories like *~, *.o, *.la, etc</proper
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<signal name="clicked"
handler="tracker_preferences_button_ignored_files_remove_clicked_cb" swapped="no"/>
<child>
<object class="GtkImage" id="image9">
@@ -1533,12 +1386,226 @@ Most commonly this is used to ignore directories like *~, *.o, *.la, etc</proper
</packing>
</child>
<child type="tab">
- <object class="GtkLabel" id="label4">
+ <object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Ignored Content</property>
</object>
<packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox_control">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">12</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="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</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.
+
+<b>Warning: All data indexed will be removed! It can not be retrieved!</b>
+
+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>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </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 of my indexed
data</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">True</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"><b>Reset Indexed
Data</b></property>
+ <property name="use_markup">True</property>
+ </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_control">
+ <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="GtkVBox" id="vbox_general">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkHBox" 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="GtkHBox" 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="invisible_char_set">True</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">3</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">3</property>
<property name="tab_fill">False</property>
</packing>
diff --git a/src/tracker-preferences/tracker-preferences.vala
b/src/tracker-preferences/tracker-preferences.vala
index 07e0971..4b449ea 100644
--- a/src/tracker-preferences/tracker-preferences.vala
+++ b/src/tracker-preferences/tracker-preferences.vala
@@ -68,6 +68,7 @@ public class Tracker.Preferences {
private ToggleButton togglebutton_videos;
private ToggleButton togglebutton_download;
private HBox hbox_duplicate_warning;
+ private Button button_reindex;
private Notebook notebook;
public Preferences () {
@@ -136,6 +137,8 @@ public class Tracker.Preferences {
togglebutton_download = builder.get_object ("togglebutton_download") as ToggleButton;
hbox_duplicate_warning = builder.get_object ("hbox_duplicate_warning") as HBox;
+ 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;
@@ -162,6 +165,7 @@ public class Tracker.Preferences {
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);
checkbutton_index_optical_discs.active = settings_miner_fs.get_boolean
("index-optical-discs");
hscale_disk_space_limit.set_value ((double) settings_miner_fs.get_int
("low-disk-space-limit"));
hscale_drop_device_threshold.set_value ((double) settings_miner_fs.get_int
("removable-days-threshold"));
@@ -207,10 +211,6 @@ public class Tracker.Preferences {
togglebutton_videos.active = model_contains (liststore_index, "&VIDEOS");
togglebutton_download.active = model_contains (liststore_index, "&DOWNLOAD");
- // We hide this page because it contains the start up
- // delay which is not necessary to display for most people.
- notebook.remove_page (0);
-
// Connect signals
// builder.connect_signals (null);
builder.connect_signals_full (connect_signals);
@@ -451,6 +451,29 @@ public class Tracker.Preferences {
togglebutton_directory_update_model (source, liststore_index,
Environment.get_user_special_dir (UserDirectory.DOWNLOAD));
}
+ [CCode (instance_pos = -1)]
+ public void button_reindex_clicked_cb (Button source) {
+ stdout.printf ("Reindexing...\n");
+
+ string output, errors;
+ int status;
+
+ try {
+ Process.spawn_sync (null, /* working dir */
+ {"tracker-control", "--hard-reset", "--start" },
+ null, /* env */
+ SpawnFlags.SEARCH_PATH,
+ null,
+ out output,
+ out errors,
+ out status);
+ } catch (GLib.Error e) {
+ stderr.printf ("Could not reindex: %s", e.message);
+ }
+ stdout.printf ("%s\n", output);
+ stdout.printf ("Finishing...\n");
+ }
+
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]