diff options
author | Eitan Isaacson <eitan@monotonous.org> | 2010-06-10 08:32:34 -0700 |
---|---|---|
committer | Eitan Isaacson <eitan@monotonous.org> | 2010-06-10 08:51:57 -0700 |
commit | 4c9ac3c9445507e10a9600b937bb504f211bcdde (patch) | |
tree | b92500f3a875ecae2e790bffa50c19cfd4ef760b /caribou | |
parent | 6aba181b3f4d4ccc0c5045ac62518f242313b059 (diff) | |
download | caribou-4c9ac3c9445507e10a9600b937bb504f211bcdde.tar.gz |
Load with json or xml extension.
Diffstat (limited to 'caribou')
-rw-r--r-- | caribou/window.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/caribou/window.py b/caribou/window.py index 738dfb6..6d55c98 100644 --- a/caribou/window.py +++ b/caribou/window.py @@ -134,12 +134,19 @@ class CaribouWindow(gtk.Window): return offset def _get_keyboard_conf(self): - layout = self._gconf_client.get_string(CARIBOU_GCONF_LAYOUT_KEY) - if not layout: - return None + layout = self._gconf_client.get_string(CARIBOU_GCONF_LAYOUT_KEY) \ + or "qwerty" conf_file_path = os.path.join(data_path, CARIBOU_LAYOUT_DIR, layout) - if os.path.exists(conf_file_path): - return conf_file_path + + json_path = '%s.json' % conf_file_path + + if os.path.exists(json_path): + return json_path + + xml_path = '%s.xml' % conf_file_path + + if os.path.exists(xml_path): + return xml_path class CaribouWindowDocked(CaribouWindow, animation.AnimatedWindowBase, |