aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorWilliam Hua <william.hua@canonical.com>2013-09-20 21:22:57 -0400
committerWilliam Hua <william.hua@canonical.com>2013-09-20 21:22:57 -0400
commitf485f87438c2c80bf378b42d997e9adde4d99cae (patch)
tree4a425f0604ab669d1ca8d1845c36fc38b6af37fc /lib
parent474217efa011b2f360edad72c1a8872dbe7d257e (diff)
downloadayatana-indicator-keyboard-f485f87438c2c80bf378b42d997e9adde4d99cae.tar.gz
ayatana-indicator-keyboard-f485f87438c2c80bf378b42d997e9adde4d99cae.tar.bz2
ayatana-indicator-keyboard-f485f87438c2c80bf378b42d997e9adde4d99cae.zip
Fallback to LightDM default.
Diffstat (limited to 'lib')
-rw-r--r--lib/main.vala10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/main.vala b/lib/main.vala
index 485f37a4..7daba518 100644
--- a/lib/main.vala
+++ b/lib/main.vala
@@ -251,6 +251,16 @@ public class Indicator.Keyboard.Service : Object {
}
}
+ if (list.size == 0) {
+ var layout = LightDM.get_layout ();
+
+ var source = layout.name;
+ source = source.replace (" ", "+");
+ source = source.replace ("\t", "+");
+
+ list.add (source);
+ }
+
var builder = new VariantBuilder (new VariantType ("a(ss)"));
foreach (var layout in list) {