diff options
author | William Hua <william.hua@canonical.com> | 2013-09-20 21:22:57 -0400 |
---|---|---|
committer | William Hua <william.hua@canonical.com> | 2013-09-20 21:22:57 -0400 |
commit | f485f87438c2c80bf378b42d997e9adde4d99cae (patch) | |
tree | 4a425f0604ab669d1ca8d1845c36fc38b6af37fc /lib | |
parent | 474217efa011b2f360edad72c1a8872dbe7d257e (diff) | |
download | ayatana-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.vala | 10 |
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) { |