diff options
author | Eitan Isaacson <eitan@monotonous.org> | 2011-06-02 11:08:49 -0700 |
---|---|---|
committer | Eitan Isaacson <eitan@monotonous.org> | 2011-06-02 11:08:49 -0700 |
commit | 843bb24cc3383ff11d76f81f956ef2cfe7ce13cb (patch) | |
tree | e6a939b465b9a12f70212cbc396d33dc289e0eb6 /libcaribou/keyboard-model.vala | |
parent | 33f0c869983b390ae4ba53c60f6cb17389c6739d (diff) | |
download | caribou-843bb24cc3383ff11d76f81f956ef2cfe7ce13cb.tar.gz |
Revert "libcaribou: Use GLib.List instead of arrays"
gjs learned to cope with arrays. Let's not introduce GLists, Vala hates them.
This reverts commit 33f0c869983b390ae4ba53c60f6cb17389c6739d.
Diffstat (limited to 'libcaribou/keyboard-model.vala')
-rw-r--r-- | libcaribou/keyboard-model.vala | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libcaribou/keyboard-model.vala b/libcaribou/keyboard-model.vala index 2d1ac7c..e34a3a3 100644 --- a/libcaribou/keyboard-model.vala +++ b/libcaribou/keyboard-model.vala @@ -49,8 +49,8 @@ namespace Caribou { key_activated (key); } - public List<string> get_groups () { - return (List<string>) collection_to_string_list (groups.keys); + public string[] get_groups () { + return (string[]) groups.keys.to_array (); } public GroupModel get_group (string group_name) { @@ -62,14 +62,12 @@ namespace Caribou { if (groups.get (group_name) != null) { active_group = group_name; } else { - string[] keys = (string[]) groups.keys.to_array(); - active_group = keys[0]; + active_group = get_groups ()[0]; } } - public List<IKeyboardObject> get_children () { - return (List<IKeyboardObject>) - collection_to_object_list (groups.values); + public IKeyboardObject[] get_children () { + return (IKeyboardObject[]) groups.values.to_array (); } } }
\ No newline at end of file |