diff options
Diffstat (limited to 'libcaribou/xml-deserializer.vala')
-rw-r--r-- | libcaribou/xml-deserializer.vala | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libcaribou/xml-deserializer.vala b/libcaribou/xml-deserializer.vala index d56e22b..853e255 100644 --- a/libcaribou/xml-deserializer.vala +++ b/libcaribou/xml-deserializer.vala @@ -43,8 +43,13 @@ namespace Caribou { return fn; } - throw new IOError.NOT_FOUND ( - "Could not find layout file for %s %s", group, variant); } + // If no layout file is found, default to US + foreach (string data_dir in dirs) { + string fn = get_layout_file_inner (data_dir, "us", ""); + if (fn != null) + return fn; + } + } public static GroupModel? load_group (string keyboard_type, string group, string variant) { @@ -154,4 +159,4 @@ namespace Caribou { return key; } } -}
\ No newline at end of file +} |