configurator: add missing bindings for checkboxes (see #29)

yahoo_weather
simon04 13 years ago
parent d35b35b682
commit c1ea18fd45
  1. 3
      weather-extension-configurator.py

@ -81,9 +81,12 @@ class WeatherConfigurator:
self.elements.append(vbox) self.elements.append(vbox)
def add_check(self, key, label, tooltip=None): def add_check(self, key, label, tooltip=None):
def set(cb):
self.schema.set_boolean(key, cb.get_active())
button = Gtk.CheckButton(None) button = Gtk.CheckButton(None)
active = self.schema.get_boolean(key) active = self.schema.get_boolean(key)
button.set_active(active) button.set_active(active)
button.connect('toggled', set)
self.add_tooltip(button, tooltip) self.add_tooltip(button, tooltip)
self.add_label(label, tooltip) self.add_label(label, tooltip)
self.elements.append(button) self.elements.append(button)

Loading…
Cancel
Save