[Pkg-sugar-commit] [sugar-toolkit] 19/118: Add activate signal to CellRendererIcon

Jonas Smedegaard dr at jones.dk
Thu Apr 16 18:49:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.84.10-1
in repository sugar-toolkit.

commit b1dfd17014d459ef2a2d525f9d457dadb9d43dc8
Author: Tomeu Vizoso <tomeu at sugarlabs.org>
Date:   Sat Jun 6 16:24:49 2009 +0200

    Add activate signal to CellRendererIcon
---
 src/sugar/graphics/icon.py | 7 +++++++
 1 file changed, 7 insertions(+)

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()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sugar/sugar-toolkit.git



More information about the pkg-sugar-commit mailing list