Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/sugar/graphics/icon.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sugar/graphics/icon.py b/src/sugar/graphics/icon.py
index f4b125f..20c52ef 100644
--- a/src/sugar/graphics/icon.py
+++ b/src/sugar/graphics/icon.py
@@ -556,6 +556,9 @@ class Icon(gtk.Image):
class CanvasIcon(gtk.EventBox):
__gtype_name__ = 'CanvasIcon'
+ __gsignals__ = {
+ 'activated': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, []),
+ }
def __init__(self, **kwargs):
from sugar.graphics.palette import CanvasInvoker
@@ -910,6 +913,13 @@ class CanvasIcon(gtk.EventBox):
req.width = 0
req.height = 0
+ def do_button_press_event(self, event):
+ if event.button == 1:
+ self.emit('activated')
+ return True
+ else:
+ return False
+
def create_palette(self):
return None