summaryrefslogtreecommitdiff
path: root/caribou
diff options
context:
space:
mode:
authorEitan Isaacson <eitan@monotonous.org>2010-06-10 08:32:34 -0700
committerEitan Isaacson <eitan@monotonous.org>2010-06-10 08:51:57 -0700
commit4c9ac3c9445507e10a9600b937bb504f211bcdde (patch)
treeb92500f3a875ecae2e790bffa50c19cfd4ef760b /caribou
parent6aba181b3f4d4ccc0c5045ac62518f242313b059 (diff)
downloadcaribou-4c9ac3c9445507e10a9600b937bb504f211bcdde.tar.gz
Load with json or xml extension.
Diffstat (limited to 'caribou')
-rw-r--r--caribou/window.py17
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,