summaryrefslogtreecommitdiff
path: root/src/gui/preferencesWindow.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/preferencesWindow.vala')
-rw-r--r--src/gui/preferencesWindow.vala14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/preferencesWindow.vala b/src/gui/preferencesWindow.vala
index fe3eeb0..5d22d6b 100644
--- a/src/gui/preferencesWindow.vala
+++ b/src/gui/preferencesWindow.vala
@@ -46,6 +46,7 @@ public class PreferencesWindow : GLib.Object {
private ThemeList? theme_list = null;
private Gtk.ToggleButton? indicator = null;
+ private Gtk.ToggleButton? search_by_string = null;
private Gtk.ToggleButton? autostart = null;
private Gtk.ToggleButton? captions = null;
@@ -159,6 +160,9 @@ public class PreferencesWindow : GLib.Object {
this.indicator = (builder.get_object("indicator-checkbox") as Gtk.ToggleButton);
this.indicator.toggled.connect(on_indicator_toggled);
+ this.search_by_string = (builder.get_object("select-by-string-checkbox") as Gtk.ToggleButton);
+ this.search_by_string.toggled.connect(on_search_by_string_toggled);
+
this.captions = (builder.get_object("captions-checkbox") as Gtk.ToggleButton);
this.captions.toggled.connect(on_captions_toggled);
@@ -234,6 +238,7 @@ public class PreferencesWindow : GLib.Object {
this.indicator.active = Config.global.show_indicator;
this.autostart.active = Config.global.auto_start;
this.captions.active = Config.global.show_captions;
+ this.search_by_string.active = Config.global.search_by_string;
if (Config.global.theme.has_slice_captions) {
this.captions.sensitive = true;
@@ -312,6 +317,15 @@ public class PreferencesWindow : GLib.Object {
}
/////////////////////////////////////////////////////////////////////
+ /// Enables or disables Slice selection by typing.
+ /////////////////////////////////////////////////////////////////////
+
+ private void on_search_by_string_toggled(Gtk.ToggleButton check_box) {
+ var check = check_box as Gtk.CheckButton;
+ Config.global.search_by_string = check.active;
+ }
+
+ /////////////////////////////////////////////////////////////////////
/// Called when a new Pie is selected in the PieList.
/////////////////////////////////////////////////////////////////////