diff options
author | William Hua <william.hua@canonical.com> | 2014-09-12 12:19:06 -0400 |
---|---|---|
committer | William Hua <william.hua@canonical.com> | 2014-09-12 12:19:06 -0400 |
commit | 449e1ab74019f4d1e9d60f3b97a31309a6f793fa (patch) | |
tree | bb04f341af6e22b99a512615d47828e49429706b /lib/main.vala | |
parent | 79042408b9bd304c61578a8c94e3a131a74444b7 (diff) | |
download | ayatana-indicator-keyboard-449e1ab74019f4d1e9d60f3b97a31309a6f793fa.tar.gz ayatana-indicator-keyboard-449e1ab74019f4d1e9d60f3b97a31309a6f793fa.tar.bz2 ayatana-indicator-keyboard-449e1ab74019f4d1e9d60f3b97a31309a6f793fa.zip |
Use iterator () method.
Diffstat (limited to 'lib/main.vala')
-rw-r--r-- | lib/main.vala | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/main.vala b/lib/main.vala index b8f34599..c5d4b6da 100644 --- a/lib/main.vala +++ b/lib/main.vala @@ -266,11 +266,9 @@ public class Indicator.Keyboard.Service : Object { Act.User? user = manager.get_user ((!) greeter_user); if (user != null && ((!) user).is_loaded) { - VariantIter outer; - VariantIter inner; + var outer = ((!) user).input_sources.iterator (); - var sources = ((!) user).input_sources; - sources.get ("aa{ss}", out outer); + VariantIter inner; while (outer.next ("a{ss}", out inner)) { unowned string key; @@ -460,14 +458,11 @@ public class Indicator.Keyboard.Service : Object { foreach (var user in users) { if (user.is_loaded) { + var outer = user.input_sources.iterator (); 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)) { unowned string key; unowned string source; |