Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/graphics/iconbutton.py
diff options
context:
space:
mode:
Diffstat (limited to 'sugar/graphics/iconbutton.py')
-rw-r--r--sugar/graphics/iconbutton.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/sugar/graphics/iconbutton.py b/sugar/graphics/iconbutton.py
index 5c807a7..be08ead 100644
--- a/sugar/graphics/iconbutton.py
+++ b/sugar/graphics/iconbutton.py
@@ -27,7 +27,7 @@ from sugar.graphics import color
STANDARD_SIZE = 0
SMALL_SIZE = 1
-class IconButton(CanvasIcon):
+class IconButton(CanvasIcon, hippo.CanvasItem):
__gtype_name__ = 'SugarIconButton'
__gproperties__ = {
@@ -45,9 +45,6 @@ class IconButton(CanvasIcon):
self._set_size(STANDARD_SIZE)
- self.connect_after('button-press-event',
- self._icon_button_button_press_event_cb)
-
def _set_size(self, size):
if size == SMALL_SIZE:
self.props.box_width = -1
@@ -72,7 +69,7 @@ class IconButton(CanvasIcon):
else:
return CanvasIcon.do_get_property(self, pspec)
- def _icon_button_button_press_event_cb(self, widget, event):
+ def do_button_press_event(self, event):
if self._active:
self.emit_activated()
return True