diff options
-rw-r--r-- | configure.ac | 41 | ||||
-rw-r--r-- | docs/manpages/Makefile.am | 5 | ||||
-rw-r--r-- | po/POTFILES.in | 3 | ||||
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/meson.build | 3 | ||||
-rw-r--r-- | src/tracker-preferences/.gitignore | 2 | ||||
-rw-r--r-- | src/tracker-preferences/Makefile.am | 50 | ||||
-rw-r--r-- | src/tracker-preferences/config.vapi | 29 | ||||
-rw-r--r-- | src/tracker-preferences/meson.build | 37 | ||||
-rw-r--r-- | src/tracker-preferences/tracker-config.vapi | 52 | ||||
-rw-r--r-- | src/tracker-preferences/tracker-preferences.appdata.xml | 34 | ||||
-rw-r--r-- | src/tracker-preferences/tracker-preferences.desktop.in.in | 13 | ||||
-rw-r--r-- | src/tracker-preferences/tracker-preferences.ui | 1578 | ||||
-rw-r--r-- | src/tracker-preferences/tracker-preferences.vala | 997 | ||||
-rw-r--r-- | src/tracker-preferences/tracker-status-icon-config.vapi | 29 |
15 files changed, 0 insertions, 2877 deletions
diff --git a/configure.ac b/configure.ac index 7d05d14b5..d50b2edcc 100644 --- a/configure.ac +++ b/configure.ac @@ -415,16 +415,6 @@ PKG_CHECK_MODULES(TRACKER_NEEDLE, [$TRACKER_NEEDLE_REQUIRED], [have_tracker_needle=yes], [have_tracker_needle=no]) -# Check requirements for tracker-preferences -TRACKER_PREFERENCES_REQUIRED="glib-2.0 >= $GLIB_REQUIRED - gio-unix-2.0 >= $GLIB_REQUIRED - gmodule-2.0 >= $GLIB_REQUIRED - gtk+-3.0 >= $GTK_REQUIRED" - -PKG_CHECK_MODULES(TRACKER_PREFERENCES, [$TRACKER_PREFERENCES_REQUIRED], - [have_tracker_preferences=yes], - [have_tracker_preferences=no]) - # Check we have Vala valac command we need VALA_MIN_VERSION=0.18.0 AM_PROG_VALAC([$VALA_MIN_VERSION]) @@ -518,7 +508,6 @@ if test "x$enable_minimal" = "xyes"; then enable_miner_apps=no enable_miner_rss=no enable_tracker_needle=no - enable_tracker_preferences=no fi #################################################################### @@ -1271,34 +1260,6 @@ fi AM_CONDITIONAL(HAVE_TRACKER_NEEDLE, test "$have_tracker_needle" = "yes") ################################################################## -# Check for tracker-preferences -################################################################## - -AC_ARG_ENABLE([tracker-preferences], - AS_HELP_STRING([--enable-tracker-preferences], - [enable GTK+ UI to configure Tracker [[default=auto]]]), - [enable_tracker_preferences=$enableval], - [enable_tracker_preferences=auto]) - -# If we don't have miner-fs enabled, the preferences are pointless -# So we override in this case. -if test "x$enable_tracker_miner_fs" = "xyes" ; then - enable_tracker_miner_fs="no" -fi - -if test "x$enable_tracker_preferences" = "xyes" ; then - if test "x$have_tracker_preferences" != "xyes"; then - AC_MSG_ERROR([Could not find tracker-preferences dependencies ($TRACKER_PREFERENCES_REQUIRED).]) - fi -else - if test "x$enable_tracker_preferences" = "xno"; then - have_tracker_preferences="no (disabled)" - fi -fi - -AM_CONDITIONAL(HAVE_TRACKER_PREFERENCES, test "$have_tracker_preferences" = "yes") - -################################################################## # Check for tracker-resdump ################################################################## @@ -2263,7 +2224,6 @@ AC_CONFIG_FILES([ src/tracker-store/Makefile src/tracker/Makefile src/tracker-extract/Makefile - src/tracker-preferences/Makefile src/tracker-needle/Makefile src/tracker-needle/icons/Makefile src/tracker-needle/icons/16x16/Makefile @@ -2434,7 +2394,6 @@ fi echo " Applications: - Build tracker-preferences: $have_tracker_preferences Build tracker-needle: $have_tracker_needle Frameworks / Options: diff --git a/docs/manpages/Makefile.am b/docs/manpages/Makefile.am index b47c965d8..e26148965 100644 --- a/docs/manpages/Makefile.am +++ b/docs/manpages/Makefile.am @@ -1,4 +1,3 @@ -tp = tracker-preferences.1 tn = tracker-needle.1 tmrss = tracker-miner-rss.1 @@ -20,10 +19,6 @@ common = \ # Require only common and enabled manpages man_MANS = $(common) -if HAVE_TRACKER_PREFERENCES -man_MANS += $(tp) -endif - if HAVE_TRACKER_NEEDLE man_MANS += $(tn) endif diff --git a/po/POTFILES.in b/po/POTFILES.in index a06cd5c9a..042a150af 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -39,9 +39,6 @@ src/tracker-needle/tracker-stats.vala src/tracker-needle/tracker-tags-view.vala src/tracker-needle/tracker-utils.vala src/tracker-needle/tracker-view.vala -src/tracker-preferences/tracker-preferences.desktop.in.in -[type: gettext/glade]src/tracker-preferences/tracker-preferences.ui -src/tracker-preferences/tracker-preferences.vala src/tracker-store/tracker-main.vala src/tracker-store/tracker-store.desktop.in.in src/tracker-store/org.freedesktop.Tracker.Store.gschema.xml.in diff --git a/src/Makefile.am b/src/Makefile.am index 688d56eab..131f1dd64 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -28,10 +28,6 @@ if HAVE_TRACKER_WRITEBACK SUBDIRS += tracker-writeback endif -if HAVE_TRACKER_PREFERENCES -SUBDIRS += tracker-preferences -endif - if HAVE_TRACKER_NEEDLE SUBDIRS += tracker-needle endif diff --git a/src/meson.build b/src/meson.build index 1192caf07..1ea96192e 100644 --- a/src/meson.build +++ b/src/meson.build @@ -44,7 +44,4 @@ subdir('tracker-store') # Example search application subdir('tracker-needle') -# Example configuration application -subdir('tracker-preferences') - meson.add_install_script('create-miner-symlinks.sh', dbus_services_dir, tracker_miner_services_dir) diff --git a/src/tracker-preferences/.gitignore b/src/tracker-preferences/.gitignore deleted file mode 100644 index 4b004ae27..000000000 --- a/src/tracker-preferences/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -tracker-preferences -*.desktop.in diff --git a/src/tracker-preferences/Makefile.am b/src/tracker-preferences/Makefile.am deleted file mode 100644 index 0b6a684ee..000000000 --- a/src/tracker-preferences/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ -@INTLTOOL_DESKTOP_RULE@ - -bin_PROGRAMS = tracker-preferences - -desktopdir = $(datadir)/applications -desktop_DATA = tracker-preferences.desktop - -appdatadir = $(datadir)/appdata -appdata_DATA = tracker-preferences.appdata.xml - -pkgdata_DATA = tracker-preferences.ui - -AM_VALAFLAGS = \ - --pkg gtk+-3.0 --pkg gmodule-2.0 --pkg posix \ - $(BUILD_VALAFLAGS) \ - config.vapi \ - tracker-config.vapi - -AM_CPPFLAGS = \ - $(BUILD_VALACFLAGS) \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src \ - -DTRACKER_UI_DIR=\"$(datadir)/tracker/\" \ - -DLOCALEDIR=\""$(localedir)"\" \ - $(TRACKER_PREFERENCES_CFLAGS) \ - -include config.h - -LDADD = \ - $(top_builddir)/src/libtracker-common/libtracker-common.la \ - $(BUILD_LIBS) \ - $(TRACKER_PREFERENCES_LIBS) - -tracker_preferences_SOURCES = \ - tracker-preferences.vala \ - $(top_srcdir)/src/miners/fs/tracker-config.c - -EXTRA_DIST = \ - $(desktop_DATA:.desktop=.desktop.in.in) \ - $(pkgdata_DATA) \ - $(appdata_DATA) \ - config.vapi \ - tracker-config.vapi \ - meson.build - -CLEANFILES = \ - $(desktop_DATA) \ - $(desktop_DATA:.desktop=.desktop.in) - -%.desktop.in: %.desktop.in.in - @sed -e "s|@VERSION[@]|${VERSION}|" $< > $@ diff --git a/src/tracker-preferences/config.vapi b/src/tracker-preferences/config.vapi deleted file mode 100644 index 0f801f594..000000000 --- a/src/tracker-preferences/config.vapi +++ /dev/null @@ -1,29 +0,0 @@ -// config.vapi -// -// Copyright (C) 2011 Martyn Russell <martyn@lanedo.com> -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -// 02110-1301, USA. -// - -[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")] -namespace Config -{ - public const string GETTEXT_PACKAGE; - public const string PACKAGE_NAME; - public const string PACKAGE_VERSION; - public const string APP_PATH; - public const string LOCALEDIR; -} diff --git a/src/tracker-preferences/meson.build b/src/tracker-preferences/meson.build deleted file mode 100644 index b193df0ed..000000000 --- a/src/tracker-preferences/meson.build +++ /dev/null @@ -1,37 +0,0 @@ -executable( - 'tracker-preferences', - 'config.vapi', - 'tracker-preferences.vala', - '../miners/fs/tracker-config.c', - dependencies: [tracker_common_dep, tracker_sparql_dep, gmodule, gtk3], - c_args: tracker_c_args + [ - '-D_XOPEN_SOURCE', - '-D_XOPEN_SOURCE_EXTENDED', - '-include', 'config.h' - ], - vala_args: [ - '--pkg', 'posix' - ], - install: true, - install_rpath: tracker_internal_libs_dir -) - -desktop_file_untranslated = configure_file( - input: 'tracker-preferences.desktop.in.in', - output: 'tracker-preferences.desktop.in', - configuration: conf) - -desktop_file = custom_target('tracker-preferences-desktop-file', - input: desktop_file_untranslated, - output: 'tracker-preferences.desktop', - command: ['intltool-merge', '--quiet', '--desktop-style', '--utf8', join_paths(meson.source_root(), 'po'), '@INPUT@', '@OUTPUT@'], - install: true, - install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'applications')) - -install_data( - 'tracker-preferences.appdata.xml', - install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'appdata')) - -install_data( - 'tracker-preferences.ui', - install_dir: join_paths(get_option('prefix'), get_option('datadir'))) diff --git a/src/tracker-preferences/tracker-config.vapi b/src/tracker-preferences/tracker-config.vapi deleted file mode 100644 index 3cca1f02e..000000000 --- a/src/tracker-preferences/tracker-config.vapi +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2008-2009, Nokia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - * Author: Philip Van Hoof <philip@codeminded.be> - */ - -namespace Tracker { - [CCode (cheader_filename = "miners/fs/tracker-config.h")] - public class Config : GLib.Object { - public Config (); - - public int verbosity { get; set; } - public int initial_sleep { get; set; } - public bool enable_monitors { get; set; } - public int throttle { get; set; } - public bool enable_thumbnails { get; set; } - public bool index_on_battery { get; set; } - public bool index_on_battery_first_time { get; set; } - public bool index_removable_devices { get; set; } - public bool index_optical_discs { get; set; } - public bool index_mounted_directories { get; set; } - public int low_disk_space_limit { get; set; } - public int removable_days_threshold { get; set; } - public GLib.SList<string> index_recursive_directories { get; set; } - public GLib.SList<string> index_recursive_directories_unfiltered { get; } - public GLib.SList<string> index_single_directories { get; set; } - public GLib.SList<string> index_single_directories_unfiltered { get; } - public GLib.SList<string> ignored_directories { get; set; } - public GLib.SList<string> ignored_directories_with_content { get; set; } - public GLib.SList<string> ignored_files { get; set; } - public GLib.SList<string> ignored_directory_patterns { get; } - public GLib.SList<string> ignored_file_patterns { get ; } - - public bool save (); - } -} - diff --git a/src/tracker-preferences/tracker-preferences.appdata.xml b/src/tracker-preferences/tracker-preferences.appdata.xml deleted file mode 100644 index 8b66af3a9..000000000 --- a/src/tracker-preferences/tracker-preferences.appdata.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 2014 Martyn Russell <martyn@lanedo.com> --> -<component type="desktop"> - <id>tracker-preferences.desktop</id> - <metadata_license>CC0-1.0</metadata_license> - <project_license>GPL-2.0+</project_license> - <name>Search and Indexing</name> - <summary>Configure file indexing with Tracker</summary> - <description> - <p>The Desktop Search application (usually separately installed) - finds content which is indexed only. Using this application, you can - quickly configure what data on your system you want indexed or not - indexed. Not only that, you get to control how it is indexed to - ensure indexing does not impede daily use of your computer.</p> - <p>Some of the preferences you can configure using this application - include:</p> - <ul> - <li>What locations you index</li> - <li>When you index (e.g. not on laptop battery)</li> - <li>How you index (e.g. aggressively or in the background)</li> - <li>Black listing files/directories based on globbing pattern matching</li> - <li>Reset the database and reindex your content</li> - </ul> - </description> - <screenshots> - <screenshot type="default" width="642" height="652"> - <image>https://wiki.gnome.org/Projects/Tracker?action=AttachFile&do=get&target=tracker-preferences.png</image> - </screenshot> - </screenshots> - <url type="homepage">https://wiki.gnome.org/Projects/Tracker</url> - <update_contact>tracker-list@gnome.org</update_contact> - <project_group>GNOME</project_group> - <translation type="gettext">tracker</translation> -</component> diff --git a/src/tracker-preferences/tracker-preferences.desktop.in.in b/src/tracker-preferences/tracker-preferences.desktop.in.in deleted file mode 100644 index 0a89b2b10..000000000 --- a/src/tracker-preferences/tracker-preferences.desktop.in.in +++ /dev/null @@ -1,13 +0,0 @@ -[Desktop Entry] -_Name=Search and Indexing -_Comment=Configure file indexing with Tracker -Icon=tracker -Exec=tracker-preferences -Terminal=false -Type=Application -Categories=Settings;X-GNOME-PersonalSettings; -StartupNotify=true -X-GNOME-Bugzilla-Bugzilla=GNOME -X-GNOME-Bugzilla-Product=tracker -X-GNOME-Bugzilla-Component=Tracker Preferences -X-GNOME-Bugzilla-Version=@VERSION@ diff --git a/src/tracker-preferences/tracker-preferences.ui b/src/tracker-preferences/tracker-preferences.ui deleted file mode 100644 index f8302f022..000000000 --- a/src/tracker-preferences/tracker-preferences.ui +++ /dev/null @@ -1,1578 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.18.3 --> -<interface> - <requires lib="gtk+" version="3.12"/> - <object class="GtkAdjustment" id="adjustment_delay"> - <property name="upper">1000</property> - <property name="value">10</property> - <property name="step_increment">1</property> - </object> - <object class="GtkAdjustment" id="adjustment_disk_space_limit"> - <property name="lower">-1</property> - <property name="upper">100</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> - </object> - <object class="GtkAdjustment" id="adjustment_drop_device_threshold"> - <property name="upper">365</property> - <property name="value">3</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> - <property name="page_size">10</property> - </object> - <object class="GtkAdjustment" id="adjustment_throttle"> - <property name="upper">20</property> - <property name="step_increment">1</property> - <property name="page_increment">2</property> - </object> - <object class="GtkListStore" id="liststore_ignored_directories"> - <columns> - <!-- column-name Directory --> - <column type="gchararray"/> - </columns> - </object> - <object class="GtkListStore" id="liststore_ignored_directories_with_content"> - <columns> - <!-- column-name Directory --> - <column type="gchararray"/> - </columns> - </object> - <object class="GtkListStore" id="liststore_ignored_files"> - <columns> - <!-- column-name Filename --> - <column type="gchararray"/> - </columns> - </object> - <object class="GtkListStore" id="liststore_index"> - <columns> - <!-- column-name Directory --> - <column type="gchararray"/> - <!-- column-name Recurse --> - <column type="gboolean"/> - </columns> - </object> - <object class="GtkDialog" id="tracker-preferences"> - <property name="width_request">500</property> - <property name="can_focus">False</property> - <property name="border_width">5</property> - <property name="title" translatable="yes">Indexing Preferences</property> - <property name="icon_name">system-search</property> - <property name="type_hint">normal</property> - <signal name="close" handler="gtk_main_quit" swapped="no"/> - <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="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="GtkButtonBox" id="dialog-action_area1"> - <property name="can_focus">False</property> - <property name="layout_style">end</property> - <child> - <object class="GtkButton" id="button_apply"> - <property name="label">gtk-apply</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="use_stock">True</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_close"> - <property name="label">gtk-close</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="use_stock">True</property> - </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="pack_type">end</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkNotebook" id="notebook"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="border_width">6</property> - <property name="show_border">False</property> - <child> - <object class="GtkBox" id="vbox_indexing"> - <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_indexing"> - <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="alignment3"> - <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_semantics"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkCheckButton" id="checkbutton_enable_monitoring"> - <property name="label" translatable="yes">_Monitor file and directory changes</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="has_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="tracker_preferences_checkbutton_enable_monitoring_toggled_cb" swapped="no"/> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="checkbutton_enable_index_on_battery"> - <property name="label" translatable="yes">Enable when running on _battery</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="tracker_preferences_checkbutton_enable_index_on_battery_toggled_cb" swapped="no"/> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkAlignment" id="alignment4"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="left_padding">12</property> - <child> - <object class="GtkCheckButton" id="checkbutton_enable_index_on_battery_first_time"> - <property name="label" translatable="yes">Enable for _initial data population</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="tracker_preferences_checkbutton_enable_index_on_battery_first_time_toggled_cb" swapped="no"/> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="checkbutton_index_removable_media"> - <property name="label" translatable="yes">Include _removable media</property> - <property name="visible">True</property> - <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_underline">True</property> - <property name="xalign">0</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="tracker_preferences_checkbutton_index_removable_media_toggled_cb" swapped="no"/> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">4</property> - </packing> - </child> - <child> - <object class="GtkAlignment" id="alignment8"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="left_padding">12</property> - <child> - <object class="GtkCheckButton" id="checkbutton_index_optical_discs"> - <property name="label" translatable="yes">Include optical di_scs</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="tracker_preferences_checkbutton_index_optical_discs_toggled_cb" swapped="no"/> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">5</property> - </packing> - </child> - </object> - </child> - </object> - </child> - <child type="label"> - <object class="GtkLabel" id="label_indexing"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Semantics</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> - <object class="GtkFrame" id="frame_limitations"> - <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="alignment7"> - <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="vbox11"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">18</property> - <child> - <object class="GtkBox" id="vbox12"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="label13"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="tooltip_text" translatable="yes">The scheduler is the kernel component that decides which runnable application will be executed by the CPU next. Each application has an associated scheduling policy and priority. - -This option allows you to make Tracker take a back seat and not eat up too much CPU time if you have other applications more deserving of it.</property> - <property name="label" translatable="yes">Index content in the background:</property> - <property name="use_markup">True</property> - <property name="justify">fill</property> - <property name="wrap">True</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="GtkBox" id="vbox7"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkRadioButton" id="radiobutton_sched_idle_always"> - <property name="label" translatable="yes">O_nly when computer is not being used</property> - <property name="visible">True</property> - <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_underline">True</property> - <property name="xalign">0</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkRadioButton" id="radiobutton_sched_idle_first_index"> - <property name="label" translatable="yes">_While other applications are running, except for initial data population</property> - <property name="visible">True</property> - <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_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> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkRadioButton" id="radiobutton_sched_idle_never"> - <property name="label" translatable="yes">While _other applications are running</property> - <property name="visible">True</property> - <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_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> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> - </object> - <packing> - <property name="expand">True</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> - <child> - <object class="GtkBox" id="hbox13"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="spacing">12</property> - <child> - <object class="GtkLabel" id="label_disk_space_limit"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="ypad">4</property> - <property name="label" translatable="yes">Stop indexing when _disk space is below:</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkScale" id="hscale_disk_space_limit"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="adjustment">adjustment_disk_space_limit</property> - <property name="round_digits">0</property> - <property name="digits">0</property> - <property name="value_pos">left</property> - <signal name="format-value" handler="tracker_preferences_hscale_disk_space_limit_format_value_cb" swapped="no"/> - </object> - <packing> - <property name="expand">True</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">1</property> - </packing> - </child> - </object> - </child> - </object> - </child> - <child type="label"> - <object class="GtkLabel" id="label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Limitations</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">1</property> - </packing> - </child> - <child> - <object class="GtkFrame" id="frame_garbage_collection"> - <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="alignment5"> - <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="vbox9"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkLabel" id="label_device_drop_threshold"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xpad">3</property> - <property name="ypad">4</property> - <property name="label" translatable="yes">Indexed content from removable devices that have not been inserted for a while, are cleaned up to avoid build up of unused resources.</property> - <property name="use_underline">True</property> - <property name="wrap">True</property> - <property name="max_width_chars">20</property> - <property name="xalign">0</property> - <property name="yalign">0</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="box1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="spacing">12</property> - <child> - <object class="GtkLabel" id="label_device_drop_threshold1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xpad">3</property> - <property name="ypad">4</property> - <property name="label" translatable="yes">Days before deleting removable devices:</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkScale" id="hscale_drop_device_threshold"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="adjustment">adjustment_drop_device_threshold</property> - <property name="round_digits">0</property> - <property name="digits">0</property> - <property name="value_pos">left</property> - <signal name="format-value" handler="tracker_preferences_hscale_drop_device_threshold_format_value_cb" swapped="no"/> - </object> - <packing> - <property name="expand">True</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">1</property> - </packing> - </child> - </object> - </child> - </object> - </child> - <child type="label"> - <object class="GtkLabel" id="label7"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Garbage Collection</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> - </child> - <child type="tab"> - <object class="GtkLabel" id="label12"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Indexing</property> - </object> - <packing> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <object class="GtkBox" id="vbox_locations"> - <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_locations"> - <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="alignment2"> - <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="vbox14"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">18</property> - <child> - <object class="GtkBox" id="vbox5"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="label8"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Special locations such as your <b>Home</b>, <b>Desktop</b> or <b>Documents</b> directory, can be easily toggled below. This will add or remove their real paths from the list underneath. - -If a directory is toggled to <b>Recurse</b>, it means that all sub-directories underneath it will also be indexed. Otherwise, only files immediately in that directory will be indexed.</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="GtkBox" id="hbox7"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="spacing">6</property> - <child> - <object class="GtkToggleButton" id="togglebutton_home"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_markup" translatable="yes">Index Home Directory</property> - <property name="relief">none</property> - <signal name="toggled" handler="tracker_preferences_togglebutton_home_toggled_cb" swapped="no"/> - <child> - <object class="GtkImage" id="image1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xpad">1</property> - <property name="ypad">1</property> - <property name="pixel_size">24</property> - <property name="icon_name">user-home</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkToggleButton" id="togglebutton_desktop"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_markup" translatable="yes">Index Desktop Directory</property> - <property name="relief">none</property> - <signal name="toggled" handler="tracker_preferences_togglebutton_desktop_toggled_cb" swapped="no"/> - <child> - <object class="GtkImage" id="image"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xpad">1</property> - <property name="ypad">1</property> - <property name="pixel_size">24</property> - <property name="icon_name">user-desktop</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkToggleButton" id="togglebutton_documents"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_markup" translatable="yes">Index Documents Directory</property> - <property name="relief">none</property> - <signal name="toggled" handler="tracker_preferences_togglebutton_documents_toggled_cb" swapped="no"/> - <child> - <object class="GtkImage" id="image11"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xpad">1</property> - <property name="pixel_size">24</property> - <property name="icon_name">folder-documents</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkToggleButton" id="togglebutton_music"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_markup" translatable="yes">Index Music Directory</property> - <property name="relief">none</property> - <signal name="toggled" handler="tracker_preferences_togglebutton_music_toggled_cb" swapped="no"/> - <child> - <object class="GtkImage" id="image14"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xpad">1</property> - <property name="pixel_size">24</property> - <property name="icon_name">folder-music</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> - <child> - <object class="GtkToggleButton" id="togglebutton_pictures"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_markup" translatable="yes">Index Pictures Directory</property> - <property name="relief">none</property> - <signal name="toggled" handler="tracker_preferences_togglebutton_pictures_toggled_cb" swapped="no"/> - <child> - <object class="GtkImage" id="image15"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xpad">1</property> - <property name="pixel_size">24</property> - <property name="icon_name">folder-pictures</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">4</property> - </packing> - </child> - <child> - <object class="GtkToggleButton" id="togglebutton_videos"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_markup" translatable="yes">Index Videos Directory</property> - <property name="relief">none</property> - <signal name="toggled" handler="tracker_preferences_togglebutton_videos_toggled_cb" swapped="no"/> - <child> - <object class="GtkImage" id="image16"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xpad">1</property> - <property name="pixel_size">24</property> - <property name="icon_name">folder-videos</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">5</property> - </packing> - </child> - <child> - <object class="GtkToggleButton" id="togglebutton_download"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_markup" translatable="yes">Index Download Directory</property> - <property name="relief">none</property> - <signal name="toggled" handler="tracker_preferences_togglebutton_download_toggled_cb" swapped="no"/> - <child> - <object class="GtkImage" id="image17"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xpad">1</property> - <property name="pixel_size">24</property> - <property name="icon_name">folder-download</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">6</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkBox" id="hbox_duplicate_warning"> - <property name="can_focus">False</property> - <property name="spacing">6</property> - <child> - <object class="GtkImage" id="image5"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-dialog-warning</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label14"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">One or more special locations have the same path. -Those which are the same are disabled!</property> - <property name="justify">fill</property> - <property name="wrap">True</property> - <property name="xalign">0</property> - </object> - <packing> - <property name="expand">True</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">2</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="GtkBox" id="vbox3"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkBox" id="hbox1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="spacing">6</property> - <child> - <object class="GtkScrolledWindow" id="scrolledwindow1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkTreeView" id="treeview_index"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="model">liststore_index</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> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkBox" id="vbox23"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkButton" id="button_index_add"> - <property name="visible">True</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> - <signal name="clicked" handler="tracker_preferences_button_index_add_clicked_cb" swapped="no"/> - <child> - <object class="GtkImage" id="image3"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-add</property> - </object> - </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_index_remove"> - <property name="visible">True</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> - <signal name="clicked" handler="tracker_preferences_button_index_remove_clicked_cb" swapped="no"/> - <child> - <object class="GtkImage" id="image4"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-remove</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</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> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> - </child> - </object> - </child> - <child type="label"> - <object class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Where is your content?</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - </child> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - <child type="tab"> - <object class="GtkLabel" id="label2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Locations</property> - </object> - <packing> - <property name="position">1</property> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <object class="GtkBox" id="vbox_ignored_content"> - <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_ignored_directories"> - <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="alignment13"> - <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="hbox2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="spacing">12</property> - <property name="homogeneous">True</property> - <child> - <object class="GtkBox" id="vbox_ignored_directories"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="label10"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Glob patterns to ignore:</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="GtkBox" id="hbox6"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="spacing">6</property> - <child> - <object class="GtkScrolledWindow" id="scrolledwindow2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkTreeView" id="treeview_ignored_directories"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="model">liststore_ignored_directories</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> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkBox" id="vbox25"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkButton" id="button_ignored_directories_globs_add"> - <property name="visible">True</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> - <signal name="clicked" handler="tracker_preferences_button_ignored_directories_globs_add_clicked_cb" swapped="no"/> - <child> - <object class="GtkImage" id="image6"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-add</property> - </object> - </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_ignored_directories_remove"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <signal name="clicked" handler="tracker_preferences_button_ignored_directories_remove_clicked_cb" swapped="no"/> - <child> - <object class="GtkImage" id="image7"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-remove</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkButton" id="button_ignored_directories_globs_add1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_text" translatable="yes">Opens the filechooser dialogue</property> - <signal name="clicked" handler="tracker_preferences_button_ignored_directories_add_clicked_cb" swapped="no"/> - <child> - <object class="GtkImage" id="image2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-directory</property> - </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="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">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkBox" id="vbox_ignored_directories_with_content"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="label5"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">With specific files:</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="GtkBox" id="hbox5"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="spacing">6</property> - <child> - <object class="GtkScrolledWindow" id="scrolledwindow5"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkTreeView" id="treeview_ignored_directories_with_content"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="model">liststore_ignored_directories_with_content</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> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkBox" id="vbox8"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkButton" id="button_ignored_directories_with_content_add"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <signal name="clicked" handler="tracker_preferences_button_ignored_directories_with_content_add_clicked_cb" swapped="no"/> - <child> - <object class="GtkImage" id="image12"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-add</property> - </object> - </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_ignored_directories_with_content_remove"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <signal name="clicked" handler="tracker_preferences_button_ignored_directories_with_content_remove_clicked_cb" swapped="no"/> - <child> - <object class="GtkImage" id="image13"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-remove</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <placeholder/> - </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">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> - </child> - </object> - </child> - <child type="label"> - <object class="GtkLabel" id="label6"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Directories</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - </child> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkFrame" id="frame_ignored_files"> - <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="alignment14"> - <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_ignored_files"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="label11"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Glob patterns to ignore:</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="GtkBox" id="hbox3"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="spacing">6</property> - <child> - <object class="GtkScrolledWindow" id="scrolledwindow3"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkTreeView" id="treeview_ignored_files"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="tooltip_text" translatable="yes">Globbing patterns can be used here, for example: “*bar*”. -Most commonly this is used to ignore directories like *~, *.o, *.la, etc</property> - <property name="model">liststore_ignored_files</property> - <property name="headers_visible">False</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-selection4"/> - </child> - </object> - </child> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkBox" id="vbox6"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkButton" id="button_ignored_files_add"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <signal name="clicked" handler="tracker_preferences_button_ignored_files_add_clicked_cb" swapped="no"/> - <child> - <object class="GtkImage" id="image8"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-add</property> - </object> - </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_ignored_files_remove"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <signal name="clicked" handler="tracker_preferences_button_ignored_files_remove_clicked_cb" swapped="no"/> - <child> - <object class="GtkImage" id="image9"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-remove</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <placeholder/> - </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">1</property> - </packing> - </child> - </object> - </child> - </object> - </child> - <child type="label"> - <object class="GtkLabel" id="label9"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Files</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - </child> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="position">2</property> - </packing> - </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">Ignored Content</property> - </object> - <packing> - <property name="position">2</property> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <object class="GtkBox" id="vbox_control"> - <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_what_is_indexed"> - <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="alignment9"> - <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="vbox4"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">18</property> - <child> - <object class="GtkBox" id="vbox10"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkCheckButton" id="checkbutton_index_file_content"> - <property name="label" translatable="yes">Index content of _files found</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="tracker_preferences_checkbutton_index_file_content_toggled_cb" swapped="no"/> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="checkbutton_index_numbers"> - <property name="label" translatable="yes">Index _numbers</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="tracker_preferences_checkbutton_index_numbers_toggled_cb" swapped="no"/> - </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="label19"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">What is indexed?</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> - </object> - <packing> - <property name="position">3</property> - </packing> - </child> - <child type="tab"> - <object class="GtkLabel" id="label16"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Control</property> - </object> - <packing> - <property name="position">3</property> - <property name="tab_fill">False</property> - </packing> - </child> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> - </child> - <action-widgets> - <action-widget response="-10">button_apply</action-widget> - <action-widget response="-7">button_close</action-widget> - </action-widgets> - </object> -</interface> diff --git a/src/tracker-preferences/tracker-preferences.vala b/src/tracker-preferences/tracker-preferences.vala deleted file mode 100644 index df8c21389..000000000 --- a/src/tracker-preferences/tracker-preferences.vala +++ /dev/null @@ -1,997 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Copyright (C) 2009, Nokia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -using Gtk; -using GLib; -using Tracker; -using Posix; - -[CCode (cname = "TRACKER_UI_DIR")] -extern const string UIDIR; - -public class Tracker.Preferences { - private GLib.Settings settings_fts = null; - private GLib.Settings settings_miner_fs = null; - private GLib.Settings settings_extract = null; - - private bool suggest_restart = false; - - private const string UI_FILE = "tracker-preferences.ui"; - private const string HOME_STRING = "$HOME"; - private string HOME_STRING_EVALUATED; - - private UserDirectory[] ignored_user_directories = null; - - private Window window; - private CheckButton checkbutton_enable_index_on_battery_first_time; - private CheckButton checkbutton_enable_index_on_battery; - private CheckButton checkbutton_enable_monitoring; - private CheckButton checkbutton_index_removable_media; - private CheckButton checkbutton_index_optical_discs; - private Scale hscale_disk_space_limit; - private RadioButton radiobutton_sched_idle_always; - private RadioButton radiobutton_sched_idle_first_index; - private RadioButton radiobutton_sched_idle_never; - private Scale hscale_drop_device_threshold; - private Gtk.ListStore liststore_index; - private Gtk.ListStore liststore_ignored_directories; - private Gtk.ListStore liststore_ignored_files; - private Gtk.ListStore liststore_ignored_directories_with_content; - private TreeView treeview_index; - private TreeView treeview_ignored_directories; - private TreeView treeview_ignored_directories_with_content; - private TreeView treeview_ignored_files; - private TreeViewColumn treeviewcolumn_index1; - private TreeViewColumn treeviewcolumn_index2; - private ToggleButton togglebutton_home; - private ToggleButton togglebutton_desktop; - private ToggleButton togglebutton_documents; - private ToggleButton togglebutton_music; - private ToggleButton togglebutton_pictures; - private ToggleButton togglebutton_videos; - private ToggleButton togglebutton_download; - private CheckButton checkbutton_index_file_content; - private CheckButton checkbutton_index_numbers; - private Box hbox_duplicate_warning; - private Notebook notebook; - - public Preferences () { - debug ("Getting current settings"); - - HOME_STRING_EVALUATED = dir_from_config (HOME_STRING); - - settings_fts = new GLib.Settings ("org.freedesktop.Tracker.FTS"); - /* settings_fts.delay(); */ - - settings_miner_fs = new GLib.Settings ("org.freedesktop.Tracker.Miner.Files"); - /* settings_miner_fs.delay(); */ - - settings_extract = new GLib.Settings ("org.freedesktop.Tracker.Extract"); - /* settings_extract.delay(); */ - - // Change notification for any key in the schema - settings_fts.changed.connect ((key) => { - print ("tracker-fts: Key '%s' changed\n", key); - }); - - settings_miner_fs.changed.connect ((key) => { - print ("tracker-miner-fs: Key '%s' changed\n", key); - }); - - settings_extract.changed.connect ((key) => { - print ("tracker-extract: Key '%s' changed\n", key); - }); - } - - public void setup_ui () { - var builder = new Gtk.Builder (); - - try { - debug ("Trying to use UI file:'%s'", UIDIR + UI_FILE); - builder.add_from_file (UIDIR + UI_FILE); - } catch (GLib.Error e) { - var msg = new MessageDialog (null, - DialogFlags.MODAL, - MessageType.ERROR, - ButtonsType.CANCEL, - "Failed to load UI file, %s\n", - e.message); - msg.run (); - Gtk.main_quit(); - } - - // Get widgets from .ui file - window = builder.get_object ("tracker-preferences") as Window; - notebook = builder.get_object ("notebook") as Notebook; - - 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; - 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); - hscale_disk_space_limit = builder.get_object ("hscale_disk_space_limit") as Scale; - radiobutton_sched_idle_always = builder.get_object ("radiobutton_sched_idle_always") as RadioButton; - radiobutton_sched_idle_first_index = builder.get_object ("radiobutton_sched_idle_first_index") as RadioButton; - radiobutton_sched_idle_never = builder.get_object ("radiobutton_sched_idle_never") as RadioButton; - hscale_drop_device_threshold = builder.get_object ("hscale_drop_device_threshold") as Scale; - togglebutton_home = builder.get_object ("togglebutton_home") as ToggleButton; - togglebutton_desktop = builder.get_object ("togglebutton_desktop") as ToggleButton; - togglebutton_documents = builder.get_object ("togglebutton_documents") as ToggleButton; - togglebutton_music = builder.get_object ("togglebutton_music") as ToggleButton; - togglebutton_pictures = builder.get_object ("togglebutton_pictures") as ToggleButton; - togglebutton_videos = builder.get_object ("togglebutton_videos") as ToggleButton; - togglebutton_download = builder.get_object ("togglebutton_download") as ToggleButton; - checkbutton_index_file_content = builder.get_object ("checkbutton_index_file_content") as CheckButton; - checkbutton_index_numbers = builder.get_object ("checkbutton_index_numbers") as CheckButton; - hbox_duplicate_warning = builder.get_object ("hbox_duplicate_warning") as Box; - - 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; - treeview_ignored_directories = builder.get_object ("treeview_ignored_directories") as TreeView; - treeview_ignored_directories_with_content = builder.get_object ("treeview_ignored_directories_with_content") as TreeView; - treeview_ignored_files = builder.get_object ("treeview_ignored_files") as TreeView; - - treeview_setup (treeview_index, _("Directory"), true, false); - treeview_setup (treeview_ignored_directories, _("Directory"), false, true); - treeview_setup (treeview_ignored_directories_with_content, _("Directory"), false, true); - treeview_setup (treeview_ignored_files, _("File"), false, true); - - liststore_index = builder.get_object ("liststore_index") as Gtk.ListStore; - liststore_index.set_sort_column_id (0, Gtk.SortType.ASCENDING); - liststore_ignored_directories = builder.get_object ("liststore_ignored_directories") as Gtk.ListStore; - liststore_ignored_files = builder.get_object ("liststore_ignored_files") as Gtk.ListStore; - liststore_ignored_directories_with_content = builder.get_object ("liststore_ignored_directories_with_content") as Gtk.ListStore; - - // Set initial values - 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"); - 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")); - - // What do we do here if extract/miner-fs are different, we - // could use inconsistent states for radiobuttons, but instead - // we're going to just assume miner-fs is the lead here and - // overwrite the extract config with anything we change here. - int sched_idle = settings_miner_fs.get_enum ("sched-idle"); - - if (sched_idle == 0) { - radiobutton_sched_idle_always.active = true; - } else if (sched_idle == 1) { - radiobutton_sched_idle_first_index.active = true; - } else if (sched_idle == 2) { - radiobutton_sched_idle_never.active = true; - } else { - // If broken value set, use default. - radiobutton_sched_idle_first_index.active = true; - } - - // Evaluate any user directories which have same target directory - sanitize_user_dirs (); - - // Populate and toggle user directories - model_populate (liststore_index, settings_miner_fs.get_strv ("index-recursive-directories"), true, true); - model_populate (liststore_index, settings_miner_fs.get_strv ("index-single-directories"), true, false); - model_populate (liststore_ignored_directories, settings_miner_fs.get_strv ("ignored-directories"), false, false); - model_populate (liststore_ignored_files, settings_miner_fs.get_strv ("ignored-files"), false, false); - model_populate (liststore_ignored_directories_with_content, settings_miner_fs.get_strv ("ignored-directories-with-content"), false, false); - - if (ignored_user_directories.length > 0) { - hbox_duplicate_warning.show (); - } else { - hbox_duplicate_warning.hide (); - } - - togglebutton_home.active = model_contains (liststore_index, HOME_STRING_EVALUATED); - togglebutton_desktop.active = model_contains (liststore_index, "&DESKTOP"); - togglebutton_documents.active = model_contains (liststore_index, "&DOCUMENTS"); - togglebutton_music.active = model_contains (liststore_index, "&MUSIC"); - togglebutton_pictures.active = model_contains (liststore_index, "&PICTURES"); - togglebutton_videos.active = model_contains (liststore_index, "&VIDEOS"); - togglebutton_download.active = model_contains (liststore_index, "&DOWNLOAD"); - - checkbutton_index_file_content.active = settings_fts.get_int ("max-words-to-index") > 0; - checkbutton_index_numbers.active = settings_fts.get_boolean ("ignore-numbers") != true; - - // Connect signals - // builder.connect_signals (null); - builder.connect_signals_full (connect_signals); - } - - public void show () { - setup_ui (); - - window.show (); - } - - // 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)] - private void connect_signals (Gtk.Builder builder, GLib.Object object, - string signal_name, string handler_name, - GLib.Object? connect_object, - GLib.ConnectFlags flags) { - var module = Module.open (null, ModuleFlags.BIND_LAZY); - void* sym; - - if (!module.symbol (handler_name, out sym)) { - warning ("Symbol not found! %s\n", handler_name); - } else { - Signal.connect (object, signal_name, (GLib.Callback) sym, this); - } - } - - [CCode (instance_pos = -1)] - public void response_cb (Dialog source, int response_id) { - debug ("Got response id %d (apply:%d, close:%d)", response_id, ResponseType.APPLY, ResponseType.CLOSE); - - switch (response_id) { - case ResponseType.APPLY: - debug ("Converting directories for storage"); - - settings_miner_fs.set_strv ("index-single-directories", model_to_strv (liststore_index, true, false)); - settings_miner_fs.set_strv ("index-recursive-directories", model_to_strv (liststore_index, true, true)); - settings_miner_fs.set_strv ("ignored-directories", model_to_strv (liststore_ignored_directories, false, false)); - settings_miner_fs.set_strv ("ignored-files", model_to_strv (liststore_ignored_files, false, false)); - settings_miner_fs.set_strv ("ignored-directories-with-content", model_to_strv (liststore_ignored_directories_with_content, false, false)); - - settings_miner_fs.set_int ("low-disk-space-limit", (int) hscale_disk_space_limit.get_value ()); - settings_miner_fs.set_int ("removable-days-threshold", (int) hscale_drop_device_threshold.get_value ()); - - int sched_idle; - - if (radiobutton_sched_idle_always.active) { - sched_idle = 0; - } else if (radiobutton_sched_idle_first_index.active) { - sched_idle = 1; - } else if (radiobutton_sched_idle_never.active) { - sched_idle = 2; - } else { - assert_not_reached (); - } - - // What do we do here if extract/miner-fs are different, we - // could use inconsistent states for radiobuttons, but instead - // we're going to just assume miner-fs is the lead here and - // overwrite the extract config with anything we change here. - settings_miner_fs.set_enum ("sched-idle", sched_idle); - settings_extract.set_enum ("sched-idle", sched_idle); - - debug ("Saving settings..."); - settings_fts.apply (); - debug (" tracker-fts: Done"); - settings_miner_fs.apply (); - debug (" tracker-miner-fs: Done"); - settings_extract.apply (); - debug (" tracker-extract: Done"); - - if (suggest_restart) { - Dialog dialog = new MessageDialog (window, - DialogFlags.DESTROY_WITH_PARENT, - MessageType.INFO, - ButtonsType.CLOSE, - _("Some of the requested changes will take effect on the next session restart."), - null); - /* Reset this suggestion */ - suggest_restart = false; - dialog.run (); - dialog.destroy (); - } - - return; - - default: - break; - } - - Gtk.main_quit (); - } - - [CCode (instance_pos = -1)] - public void checkbutton_enable_monitoring_toggled_cb (CheckButton source) { - settings_miner_fs.set_boolean ("enable-monitors", source.active); - } - - [CCode (instance_pos = -1)] - public void checkbutton_enable_index_on_battery_toggled_cb (CheckButton source) { - settings_miner_fs.set_boolean ("index-on-battery", source.active); - checkbutton_enable_index_on_battery_first_time.set_sensitive (!source.active); - } - - [CCode (instance_pos = -1)] - public void checkbutton_enable_index_on_battery_first_time_toggled_cb (CheckButton source) { - settings_miner_fs.set_boolean ("index-on-battery-first-time", source.active); - } - - [CCode (instance_pos = -1)] - public void checkbutton_index_removable_media_toggled_cb (CheckButton source) { - settings_miner_fs.set_boolean ("index-removable-devices", source.active); - checkbutton_index_optical_discs.set_sensitive (source.active); - } - - [CCode (instance_pos = -1)] - public void checkbutton_index_optical_discs_toggled_cb (CheckButton source) { - settings_miner_fs.set_boolean ("index-optical-discs", source.active); - } - - [CCode (instance_pos = -1)] - public string hscale_disk_space_limit_format_value_cb (Scale source, double value) { - if (((int) value) == -1) { - /* To translators: This is a feature that is - * disabled for disk space checking. - */ - return _("Disabled"); - } - - return "%d%%".printf ((int) value); - } - - [CCode (instance_pos = -1)] - public string hscale_drop_device_threshold_format_value_cb (Scale source, double value) { - if (((int) value) == 0) { - /* To translators: This is a feature that is - * disabled for removing a device from a - * database cache. - */ - return _("Disabled"); - } - - return "%d".printf ((int) value); - } - - [CCode (instance_pos = -1)] - public void button_index_add_clicked_cb (Button source) { - store_add_dir (liststore_index); - } - - [CCode (instance_pos = -1)] - public void button_index_remove_clicked_cb (Button source) { - store_del_dir (treeview_index); - } - - [CCode (instance_pos = -1)] - public void button_ignored_directories_globs_add_clicked_cb (Button source) { - store_add_value_dialog (liststore_ignored_directories); - } - - [CCode (instance_pos = -1)] - public void button_ignored_directories_add_clicked_cb (Button source) { - store_add_dir (liststore_ignored_directories); - } - - [CCode (instance_pos = -1)] - public void button_ignored_directories_remove_clicked_cb (Button source) { - store_del_dir (treeview_ignored_directories); - } - - [CCode (instance_pos = -1)] - public void button_ignored_directories_with_content_add_clicked_cb (Button source) { - store_add_value_dialog (liststore_ignored_directories_with_content); - } - - [CCode (instance_pos = -1)] - public void button_ignored_directories_with_content_remove_clicked_cb (Button source) { - store_del_dir (treeview_ignored_directories_with_content); - } - - [CCode (instance_pos = -1)] - public void button_ignored_files_add_clicked_cb (Button source) { - store_add_value_dialog (liststore_ignored_files); - } - - [CCode (instance_pos = -1)] - public void button_ignored_files_remove_clicked_cb (Button source) { - store_del_dir (treeview_ignored_files); - } - - private void togglebutton_directory_update_model (ToggleButton source, Gtk.ListStore store, string to_check) { - if (source.active && !model_contains (store, to_check)) { - TreeIter iter; - liststore_index.append (out iter); - var v = Value (typeof (string)); - v.set_string (to_check); - - bool recurse = to_check != HOME_STRING_EVALUATED; - liststore_index.set_value (iter, 0, v); - liststore_index.set_value (iter, 1, recurse); - } - - if (!source.active && model_contains (store, to_check)) { - bool valid; - TreeIter iter; - - valid = store.get_iter_first (out iter); - while (valid) { - Value value; - store.get_value (iter, 0, out value); - if (value.get_string () == to_check) { - #if VALA_0_36 - store.remove (ref iter); - #else - store.remove (iter); - #endif - valid = store.get_iter_first (out iter); - } else { - valid = store.iter_next (ref iter); - } - } - } - } - - [CCode (instance_pos = -1)] - public void togglebutton_home_toggled_cb (ToggleButton source) { - togglebutton_directory_update_model (source, liststore_index, HOME_STRING_EVALUATED); - } - - [CCode (instance_pos = -1)] - public void togglebutton_desktop_toggled_cb (ToggleButton source) { - togglebutton_directory_update_model (source, liststore_index, Environment.get_user_special_dir (UserDirectory.DESKTOP)); - } - - [CCode (instance_pos = -1)] - public void togglebutton_documents_toggled_cb (ToggleButton source) { - togglebutton_directory_update_model (source, liststore_index, Environment.get_user_special_dir (UserDirectory.DOCUMENTS)); - } - - [CCode (instance_pos = -1)] - public void togglebutton_music_toggled_cb (ToggleButton source) { - togglebutton_directory_update_model (source, liststore_index, Environment.get_user_special_dir (UserDirectory.MUSIC)); - } - - [CCode (instance_pos = -1)] - public void togglebutton_pictures_toggled_cb (ToggleButton source) { - togglebutton_directory_update_model (source, liststore_index, Environment.get_user_special_dir (UserDirectory.PICTURES)); - } - - [CCode (instance_pos = -1)] - public void togglebutton_videos_toggled_cb (ToggleButton source) { - togglebutton_directory_update_model (source, liststore_index, Environment.get_user_special_dir (UserDirectory.VIDEOS)); - } - - [CCode (instance_pos = -1)] - public void togglebutton_download_toggled_cb (ToggleButton source) { - togglebutton_directory_update_model (source, liststore_index, Environment.get_user_special_dir (UserDirectory.DOWNLOAD)); - } - - private void reset_parser () { - string path = Path.build_filename (Environment.get_user_cache_dir (), "tracker", "parser-sha1.txt", null); - FileUtils.unlink (path); - } - - [CCode (instance_pos = -1)] - public void checkbutton_index_file_content_toggled_cb (CheckButton source) { - // FIXME: Should make number configurable, 10000 is the default. - if (source.active) { - settings_fts.reset ("max-words-to-index"); - } else { - settings_fts.set_int ("max-words-to-index", 0); - } - - reset_parser (); - suggest_restart = true; - } - - [CCode (instance_pos = -1)] - public void checkbutton_index_numbers_toggled_cb (CheckButton source) { - settings_fts.set_boolean ("ignore-numbers", !source.active); - reset_parser (); - suggest_restart = true; - } - - private void toggles_update (UserDirectory[] matches, bool active) { - // Check if we need to untoggle a button - foreach (UserDirectory ud in matches) { - switch (ud) { - case UserDirectory.DESKTOP: - togglebutton_desktop.active = active; - break; - case UserDirectory.DOCUMENTS: - togglebutton_documents.active = active; - break; - case UserDirectory.DOWNLOAD: - togglebutton_download.active = active; - break; - case UserDirectory.MUSIC: - togglebutton_music.active = active; - break; - case UserDirectory.PICTURES: - togglebutton_pictures.active = active; - break; - case UserDirectory.VIDEOS: - togglebutton_videos.active = active; - break; - } - } - } - - private void store_add_value_dialog (Gtk.ListStore store) { - Dialog dialog; - Entry entry; - Container content_area; - - dialog = new Dialog.with_buttons (_("Enter value"), - window, - DialogFlags.DESTROY_WITH_PARENT, - _("_Cancel"), ResponseType.CANCEL, - _("_OK"), ResponseType.ACCEPT); - - dialog.set_default_response(ResponseType.ACCEPT); - content_area = (Container) dialog.get_content_area (); - entry = new Entry (); - entry.set_activates_default (true); - entry.show (); - content_area.add (entry); - - if (dialog.run () == ResponseType.ACCEPT) { - string text = entry.get_text (); - - if (text != null && text != "") { - TreeIter iter; - store.append (out iter); - var v = Value (typeof (string)); - v.set_string (text); - store.set_value (iter, 0, v); - } - } - - dialog.destroy (); - } - - private void store_add_dir (Gtk.ListStore store) { - FileChooserDialog dialog = new FileChooserDialog (_("Select directory"), - window, - FileChooserAction.SELECT_FOLDER, - _("_Cancel"), - ResponseType.CANCEL, - _("_OK"), - ResponseType.ACCEPT); - - while (true) { - if (dialog.run () == ResponseType.ACCEPT) { - TreeIter iter; - File f; - - f = dialog.get_file (); - string path = f.get_path (); - - if (model_contains (store, path)) { - MessageDialog md = new MessageDialog (dialog, - DialogFlags.DESTROY_WITH_PARENT, - MessageType.ERROR, - ButtonsType.CLOSE, - _("That directory is already selected as a location to index"), - null); - md.run (); - md.destroy (); - continue; - } - - string dir = f.get_path (); - - // Check which UserDirectorys we match with str - UserDirectory[] matches = dir_match_user_directories (dir); - - // Add to store - store.append (out iter); - var v = Value (typeof (string)); - v.set_string (dir); - store.set_value (iter, 0, v); - - toggles_update (matches, true); - - if (dir == HOME_STRING_EVALUATED) - togglebutton_home.active = true; - - } - - break; - } - - dialog.destroy (); - } - - private void store_del_dir (TreeView view) { - List<TreePath> list; - Gtk.ListStore store; - TreeModel model; - - TreeSelection selection = view.get_selection (); - list = selection.get_selected_rows (out model); - - store = (Gtk.ListStore) model; - - foreach (TreePath path in list) { - TreeIter iter; - - if (!model.get_iter (out iter, path)) { - continue; - } - - Value value; - - model.get_value (iter, 0, out value); - string dir = value.get_string (); - - // Check which UserDirectorys we match with str - UserDirectory[] matches = dir_match_user_directories (dir); - - #if VALA_0_36 - store.remove (ref iter); - #else - store.remove (iter); - #endif - - // Check if we need to untoggle a button - toggles_update (matches, false); - - if (dir == HOME_STRING_EVALUATED) - togglebutton_home.active = false; - } - } - - private UserDirectory[] dir_match_user_directories (string input) { - UserDirectory[] matches = {}; - int i; - - for (i = 0; i < UserDirectory.N_DIRECTORIES; i++) { - UserDirectory ud = (UserDirectory) i; - unowned string dir = null; - - dir = Environment.get_user_special_dir (ud); - if (input == dir) { - matches += ud; - } - } - - return matches; - } - - private string dir_to_config (string input) { - string output = input; - - if (HOME_STRING_EVALUATED != null && HOME_STRING_EVALUATED == input) { - return HOME_STRING; - } - - for (int i = 0; i < UserDirectory.N_DIRECTORIES; i++) { - UserDirectory ud = (UserDirectory) i; - unowned string dir = null; - - dir = Environment.get_user_special_dir (ud); - if (input == dir) { - // Convert 'G_USER_DIRECTORY_FOO' to '&FOO' - string ud_string = ud.to_string (); - output = "&%s".printf (ud_string.substring (ud_string.last_index_of_char ('_') + 1, -1)); - } - } - - return output; - } - - private string dir_from_config (string input) { - string output = input; - - if (input.has_prefix ("&")) { - unowned string dir = null; - - // Convert '&FOO' to 'G_USER_DIRECTORY_FOO' - string ud_input = "G_USER_DIRECTORY_%s".printf (input.next_char ()); - - for (int i = 0; i < UserDirectory.N_DIRECTORIES && dir == null; i++) { - UserDirectory ud = (UserDirectory) i; - - if (ud_input == ud.to_string ()) { - dir = Environment.get_user_special_dir (ud); - } - } - - // debug ("Found dir '%s' evaluates to '%s'", input, dir); - - if (dir != null) - output = dir; - } else if (input.has_prefix ("$")) { - unowned string env = Environment.get_variable (input.substring (1, -1)); - - // debug ("Found env '%s' (%s) evaluates to '%s'", input, input.substring (1, -1), env); - - if (env != null) - output = env; - } - - return output; - } - - private string[] model_to_strv (Gtk.ListStore model, bool recurse_required, bool recurse_value) { - string[] list = {}; - TreeIter iter; - bool valid; - - for (valid = model.get_iter_first (out iter); - valid; - valid = model.iter_next (ref iter)) { - Value value; - - model.get_value (iter, 0, out value); - - if (recurse_required) { - Value recurse; - - model.get_value (iter, 1, out recurse); - - if (recurse_value != recurse.get_boolean ()) - continue; - } - - // Convert from real value to config values, - // e.g. '$HOME/Desktop' to '&DESKTOP' - string dir = dir_to_config (value.get_string ()); - list += dir; - } - - return list; - } - - public bool model_contains (TreeModel model, string needle) { - TreeIter iter; - string needle_evaluated; - bool valid; - - needle_evaluated = dir_from_config (needle); - - for (valid = model.get_iter_first (out iter); - valid; - valid = model.iter_next (ref iter)) { - Value value; - - model.get_value (iter, 0, out value); - - if (value.get_string () == needle_evaluated) { - return true; - } - } - - return false; - } - - private void model_populate (Gtk.ListStore model, string[] list, bool have_recurse, bool recurse) { - int position = 0; - - foreach (string s in list) { - // Convert any dirs from config to real values - bool ignore = false; - - // Don't insert configs if toggle is not sensitive - foreach (UserDirectory ud in ignored_user_directories) { - string ud_string = ud.to_string (); - string output = "&%s".printf (ud_string.substring (ud_string.last_index_of_char ('_') + 1, -1)); - - if (s == output) { - ignore = true; - break; - } - } - - if (ignore) { - debug ("Ignoring '%s' (duplicates other entries in config)", s); - continue; - } - - string str = dir_from_config (s); - - try { - if (have_recurse) - model.insert_with_values (null, - position++, - 0, - Filename.to_utf8 (str, - -1, - null, - null), - 1, - recurse, - -1); - else - model.insert_with_values (null, - position++, - 0, - Filename.to_utf8 (str, - -1, - null, - null), - -1); - } catch (GLib.ConvertError e) { - print ("Could not convert filename to UTF8: %s", e.message); - } - } - } - - private void treeview_setup (TreeView view, string title, bool show_recurse_column, bool sort) { - TreeViewColumn column; - GLib.List<weak TreeViewColumn> columns = view.get_columns (); - - // Needed to fix glade mess - foreach (TreeViewColumn c in columns) { - view.remove_column (c); - } - - column = new TreeViewColumn.with_attributes (title, - new CellRendererText (), - "text", 0, - null); - column.set_expand (true); - view.append_column (column); - - if (show_recurse_column) { - Gtk.ListStore store = view.get_model () as Gtk.ListStore; - CellRendererToggle cell = new CellRendererToggle (); - - column = new TreeViewColumn.with_attributes (_("Recurse"), - cell, - "active", true, - null); - column.set_expand (false); - view.append_column (column); - - cell.toggled.connect ((toggle, path) => { - var tree_path = new TreePath.from_string (path); - TreeIter iter; - - store.get_iter (out iter, tree_path); - store.set (iter, 1, !toggle.active); - }); - } - - if (sort) { - TreeSortable sortable = view.get_model() as TreeSortable; - sortable.set_sort_column_id (0, SortType.ASCENDING); - } - } - - private void sanitize_user_dirs () { - string[] all_dirs = null; - - all_dirs += HOME_STRING_EVALUATED; - - for (int i = 0; i < UserDirectory.N_DIRECTORIES; i++) { - UserDirectory ud = (UserDirectory) i; - - string dir = Environment.get_user_special_dir (ud); - if (dir == null) { - continue; - } - - foreach (string d in all_dirs) { - if (d == dir) { - debug ("Directory '%s' duplicated in XDG dir %d", d, ud); - - switch (ud) { - case UserDirectory.DESKTOP: - case UserDirectory.DOCUMENTS: - case UserDirectory.DOWNLOAD: - case UserDirectory.MUSIC: - case UserDirectory.PICTURES: - case UserDirectory.VIDEOS: - ignored_user_directories += ud; - break; - - default: - // We don't care about others, we don't - // have toggle buttons for them - break; - } - - break; - } - } - - // Add dir to list of dirs we know about to filter - // out subsequent dirs - all_dirs += dir; - } - - foreach (UserDirectory ud in ignored_user_directories) { - switch (ud) { - case UserDirectory.DESKTOP: - togglebutton_desktop.sensitive = false; - break; - case UserDirectory.DOCUMENTS: - togglebutton_documents.sensitive = false; - break; - case UserDirectory.DOWNLOAD: - togglebutton_download.sensitive = false; - break; - case UserDirectory.MUSIC: - togglebutton_music.sensitive = false; - break; - case UserDirectory.PICTURES: - togglebutton_pictures.sensitive = false; - break; - case UserDirectory.VIDEOS: - togglebutton_videos.sensitive = false; - break; - default: - break; - } - } - } -} - -static bool print_version = false; - -const OptionEntry[] options = { - { "version", - 'V', - 0, - OptionArg.NONE, - ref print_version, - N_("Print version"), - null }, - { null } -}; - -static int main (string[] args) { - OptionContext context = new OptionContext (_("Desktop Search preferences")); - - try { - context.set_help_enabled (true); - context.add_main_entries (options, null); - context.add_group (Gtk.get_option_group (true)); - context.parse (ref args); - } catch (Error e) { - printerr (e.message + "\n\n"); - printerr (context.get_help (true, null)); - return 1; - } - - if (print_version) { - string about = ""; - string license = ""; - - about += "Tracker " + Config.PACKAGE_VERSION + "\n"; - - license += "This program is free software and comes without any warranty.\n"; - license += "It is licensed under version 2 or later of the General Public "; - license += "License which can be viewed at:\n"; - license += "\n"; - license += " http://www.gnu.org/licenses/gpl.txt\n"; - - print ("\n" + about + "\n" + license + "\n"); - return 0; - } - - Gtk.init (ref args); - - Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR); - Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8"); - Intl.textdomain (Config.GETTEXT_PACKAGE); - - Tracker.Preferences p = new Tracker.Preferences (); - p.show(); - - Gtk.main (); - - return 0; -} diff --git a/src/tracker-preferences/tracker-status-icon-config.vapi b/src/tracker-preferences/tracker-status-icon-config.vapi deleted file mode 100644 index d2a0ae722..000000000 --- a/src/tracker-preferences/tracker-status-icon-config.vapi +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2008-2009, Nokia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -namespace Tracker { - [CCode (cheader_filename = "tracker-status-icon/tracker-icon-config.h")] - public class IconConfig : GLib.Object { - public IconConfig.with_domain (string domain); - - public int visibility { get; set; } - public bool save (); - } -} - |