diff options
author | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-01-24 14:52:05 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-01-24 14:52:05 (GMT) |
commit | dbb1e04ee6f544d9b18f2b78633138602dab0d4b (patch) | |
tree | 2ed8f0876f1fbd545afd2ed0e653883bd75ebbaa /model.py | |
parent | 852766ad7192a6b53eea8127643e8a81ecf49efa (diff) |
Place a first thought in new modelsmodel-as-a-tree
Diffstat (limited to 'model.py')
-rw-r--r-- | model.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -31,9 +31,11 @@ class MindMapModel(gtk.TreeStore): self._thoughts_by_id = {} self._thoughts = [] - def create_new_thought(self): - self.append(None, (self._next_thought_id, '', 0, 0, '')) + def create_new_thought(self, name='', x=0, y=0, color=''): + thought_id = self._next_thought_id + self.append(None, (thought_id, name, x, y, color)) self._next_thought_id += 1 + return thought_id def serialize(self): thoughts = [] |