Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-07-01 09:33:12 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-07-01 09:33:12 (GMT)
commit92ec6f72d87a8f6712a9580b88591a33b84598f5 (patch)
treee61d64f05d1584cdf9b6861ef4d4595c35e1a83f
parent84c94ecabeb21541d7ef888e1b480c3b6fa72130 (diff)
Restore CanvasIcon prelighting.
-rw-r--r--sugar/graphics/canvasicon.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/sugar/graphics/canvasicon.py b/sugar/graphics/canvasicon.py
index 25368ff..d809a6b 100644
--- a/sugar/graphics/canvasicon.py
+++ b/sugar/graphics/canvasicon.py
@@ -166,6 +166,8 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
self._palette = None
hippo.CanvasBox.__init__(self, **kwargs)
+
+ self.connect_after('motion-notify-event', self._motion_notify_event_cb)
def _clear_buffers(self):
cur_buf_key = self._get_current_buffer_key()
@@ -314,6 +316,13 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
self.emit_activated()
return True
+ def _motion_notify_event_cb(self, button, event):
+ if event.detail == hippo.MOTION_DETAIL_ENTER:
+ self.prelight(True)
+ elif event.detail == hippo.MOTION_DETAIL_LEAVE:
+ self.prelight(False)
+ return False
+
def prelight(self, enter):
"""
Override this method for adding prelighting behavior.