Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/model.py
diff options
context:
space:
mode:
Diffstat (limited to 'model.py')
-rw-r--r--model.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/model.py b/model.py
index aaead38..38d1ca6 100644
--- a/model.py
+++ b/model.py
@@ -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 = []