diff options
author | Eitan Isaacson <eitan@monotonous.org> | 2011-05-03 16:29:19 -0700 |
---|---|---|
committer | Eitan Isaacson <eitan@monotonous.org> | 2011-05-05 15:29:06 -0400 |
commit | 66ca73770cb01cd1c48839ca4eeef6bb24a2f300 (patch) | |
tree | 410ea97cef43595cbeeef14e7d6e1848af18bac5 /caribou | |
parent | 16723b585ad8892bb0b2dd3cc317b319a1b3558d (diff) | |
download | caribou-66ca73770cb01cd1c48839ca4eeef6bb24a2f300.tar.gz |
Preset radio buttons to correct value
Diffstat (limited to 'caribou')
-rw-r--r-- | caribou/settings/preferences_window.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/caribou/settings/preferences_window.py b/caribou/settings/preferences_window.py index 58d1b4c..9ca57de 100644 --- a/caribou/settings/preferences_window.py +++ b/caribou/settings/preferences_window.py @@ -120,10 +120,12 @@ class AbstractPreferencesUI: control.set_col_spacings(3) radios = [] for string, localized in setting.allowed: - radios.append(Gtk.RadioButton.new_with_label( - [], localized)) - for radio in radios[1:]: + rb = Gtk.RadioButton.new_with_label([], localized) + radios.append(rb) + for radio, allowed in zip(radios[1:], setting.allowed[1:]): radio.join_group(radios[0]) + if allowed[0] == setting.value: + radio.set_active(True) hid = setting.connect( 'value-changed', |