aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/main.vala25
-rw-r--r--po/indicator-keyboard.pot2
2 files changed, 17 insertions, 10 deletions
diff --git a/lib/main.vala b/lib/main.vala
index e0557e34..485f37a4 100644
--- a/lib/main.vala
+++ b/lib/main.vala
@@ -209,12 +209,12 @@ public class Indicator.Keyboard.Service : Object {
foreach (var user in users) {
if (user.is_loaded) {
- var sources = user.input_sources;
- var layouts = user.xkeyboard_layouts;
+ var done = false;
VariantIter outer;
VariantIter inner;
+ var sources = user.input_sources;
sources.get ("aa{ss}", out outer);
while (outer.next ("a{ss}", out inner)) {
@@ -223,6 +223,8 @@ public class Indicator.Keyboard.Service : Object {
while (inner.next ("{&s&s}", out key, out source)) {
if (key == "xkb") {
+ done = true;
+
if (!added.contains (source)) {
list.add (source);
added.add (source);
@@ -231,14 +233,19 @@ public class Indicator.Keyboard.Service : Object {
}
}
- foreach (var layout in layouts) {
- var source = layout;
- source = source.replace (" ", "+");
- source = source.replace ("\t", "+");
+ if (!done) {
+ var layouts = user.xkeyboard_layouts;
+ foreach (var layout in layouts) {
+ done = true;
- if (!added.contains (source)) {
- list.add (source);
- added.add (source);
+ var source = layout;
+ source = source.replace (" ", "+");
+ source = source.replace ("\t", "+");
+
+ if (!added.contains (source)) {
+ list.add (source);
+ added.add (source);
+ }
}
}
}
diff --git a/po/indicator-keyboard.pot b/po/indicator-keyboard.pot
index df7dd668..bdfffeca 100644
--- a/po/indicator-keyboard.pot
+++ b/po/indicator-keyboard.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-08-29 10:20+0800\n"
+"POT-Creation-Date: 2013-09-20 20:56-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"