[caribou] xml-deserializer: fallback to "touch" keyboard type, if not found



commit 0cf2fda3beaa20c7638af9015180f91a72f960f4
Author: Daiki Ueno <ueno unixuser org>
Date:   Mon Feb 25 16:32:58 2013 +0900

    xml-deserializer: fallback to "touch" keyboard type, if not found
    
    https://bugzilla.gnome.org/show_bug.cgi?id=689844

 libcaribou/xml-deserializer.vala |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/libcaribou/xml-deserializer.vala b/libcaribou/xml-deserializer.vala
index 8058c0f..dd42309 100644
--- a/libcaribou/xml-deserializer.vala
+++ b/libcaribou/xml-deserializer.vala
@@ -35,6 +35,15 @@ namespace Caribou {
                               dir, "caribou", "layouts", keyboard_type));
             }
 
+            // If no such keyboard type is found, default to "touch"
+            dirs.add (Path.build_filename (Environment.get_user_data_dir (),
+                                           "caribou", "layouts", "touch"));
+
+            foreach (string dir in Environment.get_system_data_dirs ()) {
+                dirs.add (Path.build_filename (
+                              dir, "caribou", "layouts", "touch"));
+            }
+
             foreach (string data_dir in dirs) {
                 string fn = get_layout_file_inner (data_dir, group, variant);
                 if (fn != null)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]