[caribou: 4/15] Preferences UI: Support non-strings in combo boxes
- From: Eitan Isaacson <eitani src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [caribou: 4/15] Preferences UI: Support non-strings in combo boxes
- Date: Sat, 28 May 2011 20:18:05 +0000 (UTC)
commit 762929a7d19de489bc14cb92b06bb91906f4cba3
Author: Eitan Isaacson <eitan monotonous org>
Date: Sat May 28 12:58:13 2011 -0700
Preferences UI: Support non-strings in combo boxes
caribou/settings/preferences_window.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/caribou/settings/preferences_window.py b/caribou/settings/preferences_window.py
index 2b6d3ca..af1b245 100644
--- a/caribou/settings/preferences_window.py
+++ b/caribou/settings/preferences_window.py
@@ -151,9 +151,9 @@ class AbstractPreferencesUI:
elif setting.entry_type == ENTRY_COMBO or setting.allowed:
control = Gtk.ComboBoxText.new()
for option in setting.allowed:
- control.append(option[0], option[1])
- control.set_active_id(setting.value)
- value_changed_cb = lambda s, v, w: w.set_active_id(v)
+ control.append(str(option[0]), option[1])
+ control.set_active_id(str(setting.value))
+ value_changed_cb = lambda s, v, w: w.set_active_id(str(v))
control_changed_cb = self._combo_changed_cb
control_changed_signal = 'changed'
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]