diff --git a/extensions/cpsection/keyboard/model.py b/extensions/cpsection/keyboard/model.py
index a5721cd..f34a25b 100644
a
|
b
|
class KeyboardManager(object): |
112 | 112 | def get_current_option_group(self): |
113 | 113 | """Return the enabled option for switching keyboard group""" |
114 | 114 | options = self._gconf_client.get_list(_OPTIONS_KEY, gconf.VALUE_STRING) |
115 | | |
116 | 115 | if not options: |
117 | 116 | options = self._configrec.get_options() |
118 | 117 | |
… |
… |
class KeyboardManager(object): |
128 | 127 | |
129 | 128 | def set_model(self, model): |
130 | 129 | """Sets the supplied keyboard model""" |
| 130 | if model is None: |
| 131 | return |
| 132 | |
131 | 133 | self._gconf_client.set_string(_MODEL_KEY, model) |
132 | 134 | self._configrec.set_model(model) |
133 | 135 | self._configrec.activate(self._engine) |
134 | 136 | |
135 | 137 | def set_option_group(self, option_group): |
136 | 138 | """Sets the supplied option for switching keyboard group""" |
| 139 | if option_group is None: |
| 140 | return |
| 141 | |
137 | 142 | #XXX: Merge, not overwrite previous options |
138 | 143 | options = [option_group] |
139 | 144 | self._gconf_client.set_list(_OPTIONS_KEY, gconf.VALUE_STRING, options) |
… |
… |
class KeyboardManager(object): |
142 | 147 | |
143 | 148 | def set_layouts(self, layouts): |
144 | 149 | """Sets the supplied keyboard layouts (with variants)""" |
| 150 | if layouts is None or layouts == []: |
| 151 | return |
| 152 | |
145 | 153 | self._gconf_client.set_list(_LAYOUTS_KEY, gconf.VALUE_STRING, layouts) |
146 | 154 | layouts_list = [] |
147 | 155 | variants_list = [] |
diff --git a/extensions/cpsection/keyboard/view.py b/extensions/cpsection/keyboard/view.py
index 04edc4d..074d298 100644
a
|
b
|
CLASS = 'Language' |
30 | 30 | ICON = 'module-keyboard' |
31 | 31 | TITLE = _('Keyboard') |
32 | 32 | |
33 | | _APPLY_TIMEOUT = 3000 |
| 33 | _APPLY_TIMEOUT = 500 |
34 | 34 | |
35 | 35 | #TODO: This cpsection adds checks for xklavier in bin/sugar-session and |
36 | 36 | # src/jarabe/controlpanel/gui.py. We should get rid of these checks |