[Sugar-devel] [PATCH] keyboard cpsection: don't choke on option group (SL#2022)
Sascha Silbe
sascha-pgp at silbe.org
Mon May 31 05:52:23 EDT 2010
Don't wrap the option group in another list if it's already a list.
Signed-off-by: Sascha Silbe <sascha-pgp at silbe.org>
---
extensions/cpsection/keyboard/model.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/extensions/cpsection/keyboard/model.py b/extensions/cpsection/keyboard/model.py
index 9d61c0c..089c2ea 100644
--- a/extensions/cpsection/keyboard/model.py
+++ b/extensions/cpsection/keyboard/model.py
@@ -142,8 +142,10 @@ class KeyboardManager(object):
def set_option_group(self, option_group):
"""Sets the supplied option for switching keyboard group"""
#XXX: Merge, not overwrite previous options
- if option_group is None or not option_group:
+ if not option_group:
options = ['']
+ elif isinstance(option_group, list):
+ options = option_group
else:
options = [option_group]
self._gconf_client.set_list(_OPTIONS_KEY, gconf.VALUE_STRING, options)
--
tg: (a388ecf..) t/bug-2022 (depends on: upstream/master)
More information about the Sugar-devel
mailing list