diff options
author | William Hua <william.hua@canonical.com> | 2015-02-18 11:19:40 -0500 |
---|---|---|
committer | William Hua <william.hua@canonical.com> | 2015-02-18 11:19:40 -0500 |
commit | d63326c3ae6d8a66214756964196fa2afb7ab13a (patch) | |
tree | 2e3936330943fc6e598dee42151bbf5b3a1ad261 /lib/source.vala | |
parent | a8721bcb87bef4c18e501cf559af35926d11c0eb (diff) | |
download | ayatana-indicator-keyboard-d63326c3ae6d8a66214756964196fa2afb7ab13a.tar.gz ayatana-indicator-keyboard-d63326c3ae6d8a66214756964196fa2afb7ab13a.tar.bz2 ayatana-indicator-keyboard-d63326c3ae6d8a66214756964196fa2afb7ab13a.zip |
Use foreach when possible.
Diffstat (limited to 'lib/source.vala')
-rw-r--r-- | lib/source.vala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/source.vala b/lib/source.vala index 38a628c1..b7d7a971 100644 --- a/lib/source.vala +++ b/lib/source.vala @@ -100,12 +100,12 @@ public class Indicator.Keyboard.Source : Object { fcitx = name; } } else if (variant.is_of_type (new VariantType ("a{ss}"))) { - var iter = variant.iterator (); + foreach (var pair in variant) { + unowned string key; + unowned string value; - unowned string key; - unowned string value; + ((!) pair).get ("{&s&s}", out key, out value); - while (iter.next ("{&s&s}", out key, out value)) { if (key == "xkb") { xkb = value; } else if (key == "ibus") { |