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.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sugar/graphics/icon.py b/src/sugar/graphics/icon.py
index 7bbeea5..5d47fc5 100644
--- a/src/sugar/graphics/icon.py
+++ b/src/sugar/graphics/icon.py
@@ -922,6 +922,10 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
class CellRendererIcon(gtk.CellRendererPixbuf):
__gtype_name__ = 'SugarCellRendererIcon'
+ __gsignals__ = {
+ 'activate': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, [object])
+ }
+
def __init__(self):
gobject.GObject.__init__(self)
self._buffer = _IconBuffer()
@@ -983,6 +987,9 @@ class CellRendererIcon(gtk.CellRendererPixbuf):
gtk.CellRendererPixbuf.do_render(self, window, widget, background_area, cell_area, expose_area, flags)
+ def do_activate(self, event, widget, path, background_area, cell_area, flags):
+ self.emit('activate', path)
+
def get_icon_state(base_name, perc, step=5):
strength = round(perc / step) * step
icon_theme = gtk.icon_theme_get_default()