diff options
author | Wade Brainerd <wadetb@gmail.com> | 2009-02-03 08:35:18 (GMT) |
---|---|---|
committer | Wade Brainerd <wadetb@gmail.com> | 2009-02-03 08:35:18 (GMT) |
commit | e10b0af2ed9aa4e8853fd5fd97cb4e6705685fd5 (patch) | |
tree | 06ef1215794e2516e7cf6a31bc42c492d180eaea /keyboard.py | |
parent | ff3ddd6a739f275fff4eeab5eaf3e819ca41fc9b (diff) |
Switch to simplejson for better error reporting.
Nepali fixes.
Updated translations.
Diffstat (limited to 'keyboard.py')
-rw-r--r-- | keyboard.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/keyboard.py b/keyboard.py index d272bdd..bba8ad7 100644 --- a/keyboard.py +++ b/keyboard.py @@ -249,7 +249,8 @@ class KeyboardData: self.scale = KEYBOARD_SCALE def set_layout(self, layout): - pass + self._build_key_list(layout) + self._layout_keys() def _build_key_list(self, layout): """Builds a list of Keys objects from a layout description. @@ -331,12 +332,6 @@ class KeyboardData: k['key-width'] = int(k['key-width'] * self.scale) k['key-height'] = int(k['key-height'] * self.scale) - def set_layout(self, layout): - """Sets the keyboard's layout from a layout description.""" - self._build_key_list(layout) - self._layout_keys() - self._make_key_images() - def find_key_by_label(self, label): for k in self.keys: if k['key-label'] == label: @@ -426,6 +421,11 @@ class KeyboardWidget(KeyboardData, gtk.DrawingArea): self.root_window.disconnect(self.key_press_cb_id) self.root_window.disconnect(self.key_release_cb_id) + def set_layout(self, layout): + """Sets the keyboard's layout from a layout description.""" + KeyboardData.set_layout(self, layout) + self._make_key_images() + def _make_key_images(self): group = self.active_group |