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/key-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/key-model.vala')
-rw-r--r-- | libcaribou/key-model.vala | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/libcaribou/key-model.vala b/libcaribou/key-model.vala index bae89bc..32ed771 100644 --- a/libcaribou/key-model.vala +++ b/libcaribou/key-model.vala @@ -79,21 +79,19 @@ namespace Caribou { return false; } - public List<KeyModel> get_extended_keys () { - return (List<KeyModel>) collection_to_object_list(extended_keys); + public KeyModel[] get_extended_keys () { + return (KeyModel[]) extended_keys.to_array (); } - public List<KeyModel> get_keys () { - List<KeyModel> all_keys = new List<KeyModel> (); - all_keys.append (this); - var ekeys = (List<weak KeyModel>) get_extended_keys (); - all_keys.concat (ekeys.copy()); - return all_keys; + public KeyModel[] get_keys () { + Gee.ArrayList<KeyModel> all_keys = new Gee.ArrayList<KeyModel> (); + all_keys.add (this); + all_keys.add_all (extended_keys); + return (KeyModel[]) all_keys.to_array (); } - public List<IKeyboardObject> get_children () { - return (List<IKeyboardObject>) - collection_to_object_list (extended_keys); + public IKeyboardObject[] get_children () { + return (IKeyboardObject[]) extended_keys.to_array (); } public void activate () { |