Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/thoughtview.py
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@sugarlabs.org>2009-01-29 12:23:47 (GMT)
committer Tomeu Vizoso <tomeu@sugarlabs.org>2009-01-29 12:23:47 (GMT)
commit05a816a38fe398e9b80712764bd4946df23eb4d0 (patch)
treeb8629666f6c7a2b39b1c9a82f5f047a4c2a9d038 /thoughtview.py
parenta924e1c2bcca44554760ce067d0cc9ecf810d87b (diff)
Create a new descendant thought by dragging a handle
Diffstat (limited to 'thoughtview.py')
-rw-r--r--thoughtview.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/thoughtview.py b/thoughtview.py
index d3ecc1c..478dd00 100644
--- a/thoughtview.py
+++ b/thoughtview.py
@@ -24,6 +24,7 @@ import gtk
from sugar.graphics import style
from gaphas.examples import Box, Text
+from gaphas.connector import Handle
class ThoughtView(Box):
@@ -33,7 +34,8 @@ class ThoughtView(Box):
def __init__(self, thought_id, name, x, y, color):
Box.__init__(self)
- logging.debug('ThoughtView %r %r' % (thought_id, name))
+ self.new_thought_handle = Handle()
+ self._handles.append(self.new_thought_handle)
self.id = thought_id
self._name = name
@@ -93,3 +95,9 @@ class ThoughtView(Box):
context.cairo.show_layout(layout)
context.cairo.restore()
+ def normalize(self):
+ updated = super(ThoughtView, self).normalize()
+ self.new_thought_handle.x = 20
+ self.new_thought_handle.y = 20
+ return updated
+