summaryrefslogtreecommitdiff
path: root/libcaribou/level-model.vala
diff options
context:
space:
mode:
authorEitan Isaacson <eitan@monotonous.org>2011-06-15 15:05:30 -0700
committerEitan Isaacson <eitan@monotonous.org>2011-06-22 11:23:21 -0700
commit0fc37c5a73d96400ffe8997399224fa831c7009b (patch)
tree066eeb3b66ebaf7d0af394a822238b8f46513b2e /libcaribou/level-model.vala
parentf735e635ed282a18814857371ccf1baa236e0d18 (diff)
downloadcaribou-0fc37c5a73d96400ffe8997399224fa831c7009b.tar.gz
abolish margin and use align
Diffstat (limited to 'libcaribou/level-model.vala')
-rw-r--r--libcaribou/level-model.vala19
1 files changed, 3 insertions, 16 deletions
diff --git a/libcaribou/level-model.vala b/libcaribou/level-model.vala
index 0d209d3..981a3c0 100644
--- a/libcaribou/level-model.vala
+++ b/libcaribou/level-model.vala
@@ -12,22 +12,9 @@ namespace Caribou {
rows = new Gee.ArrayList<RowModel> ();
}
- internal void add_key (int rownum, int colnum, KeyModel key) {
- int rowindex = rownum;
- RowModel row = null;
-
- if (rownum < 0)
- rowindex = rows.size + rownum;
-
- if (rownum >= rows.size) {
- row = new RowModel ();
- row.key_activated.connect (on_key_activated);
- rows.add(row);
- } else {
- row = rows[rowindex];
- }
-
- row.add_key (colnum, key);
+ internal void add_row (RowModel row) {
+ row.key_activated.connect (on_key_activated);
+ rows.add(row);
}
public RowModel[] get_rows () {