[caribou: 13/14] Load with json or xml extension.
- From: Eitan Isaacson <eitani src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [caribou: 13/14] Load with json or xml extension.
- Date: Thu, 10 Jun 2010 15:53:48 +0000 (UTC)
commit 4c9ac3c9445507e10a9600b937bb504f211bcdde
Author: Eitan Isaacson <eitan monotonous org>
Date: Thu Jun 10 08:32:34 2010 -0700
Load with json or xml extension.
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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]