summaryrefslogtreecommitdiff
path: root/libcaribou/group-model.vala
diff options
context:
space:
mode:
authorEitan Isaacson <eitan@monotonous.org>2011-05-31 12:09:24 -0700
committerEitan Isaacson <eitan@monotonous.org>2011-06-01 12:47:01 -0700
commit6ce0faf5d814a8b791427ac20aaa8b87a46c77eb (patch)
tree131f127ccd4635f052f257d4b4677ea68a835b00 /libcaribou/group-model.vala
parent22ed36c74597159cf4866abee35bb898127dea5a (diff)
downloadcaribou-6ce0faf5d814a8b791427ac20aaa8b87a46c77eb.tar.gz
Added IKeyboardObject interface, and have all model classes implement it.
Diffstat (limited to 'libcaribou/group-model.vala')
-rw-r--r--libcaribou/group-model.vala14
1 files changed, 13 insertions, 1 deletions
diff --git a/libcaribou/group-model.vala b/libcaribou/group-model.vala
index 965cb96..1a111ae 100644
--- a/libcaribou/group-model.vala
+++ b/libcaribou/group-model.vala
@@ -1,7 +1,7 @@
using GLib;
namespace Caribou {
- public class GroupModel : GLib.Object {
+ public class GroupModel : Object, IKeyboardObject {
public string active_level { get; private set; }
public string group;
@@ -46,5 +46,17 @@ namespace Caribou {
else
active_level = new_level;
}
+
+ public IKeyboardObject[] get_children () {
+ IKeyboardObject[] children = new IKeyboardObject[levels.size ()];
+ uint i = 0;
+
+ foreach (LevelModel obj in levels.get_values ()) {
+ children[i++] = (IKeyboardObject) obj;
+ }
+
+ return children;
+ }
+
}
} \ No newline at end of file