From c1ea18fd453885a9cc946e5b1a11a875a23fd4bd Mon Sep 17 00:00:00 2001 From: simon04 Date: Sun, 6 Nov 2011 12:20:22 +0100 Subject: [PATCH] configurator: add missing bindings for checkboxes (see #29) --- weather-extension-configurator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weather-extension-configurator.py b/weather-extension-configurator.py index bf4f6b8..2cbb5d6 100755 --- a/weather-extension-configurator.py +++ b/weather-extension-configurator.py @@ -81,9 +81,12 @@ class WeatherConfigurator: self.elements.append(vbox) def add_check(self, key, label, tooltip=None): + def set(cb): + self.schema.set_boolean(key, cb.get_active()) button = Gtk.CheckButton(None) active = self.schema.get_boolean(key) button.set_active(active) + button.connect('toggled', set) self.add_tooltip(button, tooltip) self.add_label(label, tooltip) self.elements.append(button)