diff options
Diffstat (limited to 'src/gui/settingsWindow.vala')
-rw-r--r-- | src/gui/settingsWindow.vala | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/src/gui/settingsWindow.vala b/src/gui/settingsWindow.vala index b03ae2f..6bb10c1 100644 --- a/src/gui/settingsWindow.vala +++ b/src/gui/settingsWindow.vala @@ -1,19 +1,19 @@ -/* -Copyright (c) 2011 by Simon Schneegans - -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 3 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, see <http://www.gnu.org/licenses/>. -*/ +///////////////////////////////////////////////////////////////////////// +// Copyright (c) 2011-2015 by Simon Schneegans +// +// 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 3 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, see <http://www.gnu.org/licenses/>. +///////////////////////////////////////////////////////////////////////// namespace GnomePie { @@ -99,13 +99,21 @@ public class SettingsWindow : GLib.Object { }); var range_slider = (builder.get_object("range-hscale") as Gtk.Scale); - range_slider.set_range(100, 2000); + range_slider.set_range(0, 2000); range_slider.set_increments(10, 100); range_slider.set_value(Config.global.activation_range); range_slider.value_changed.connect(() => { Config.global.activation_range = (int)range_slider.get_value(); }); + var range_slices = (builder.get_object("range-slices") as Gtk.Scale); + range_slices.set_range(12, 96); + range_slices.set_increments(4, 12); + range_slices.set_value(Config.global.max_visible_slices); + range_slices.value_changed.connect(() => { + Config.global.max_visible_slices = (int)range_slices.get_value(); + }); + this.window.delete_event.connect(this.window.hide_on_delete); } catch (GLib.Error e) { |