Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar3/graphics/icon.py
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2011-10-30 22:06:13 (GMT)
committer Simon Schampijer <simon@schampijer.de>2011-12-13 20:19:53 (GMT)
commit1b9af6f6d56c5f045a7fc02e0be8d9eda349645c (patch)
treea6b64c89e4b892bef898e691ba396e024e97ab83 /src/sugar3/graphics/icon.py
parent157124af5bde22f0c6e04d9ca1cdb84a77ac82c3 (diff)
Replace "expose-event" signal by a new "draw" signal
GtkWidget "expose-event" signal has been replaced by a new "draw" signal [1]. The context is already clipped [2], so do not base it on the values returned by get_allocation like before. [1] http://developer.gnome.org/gtk3/3.0/ch25s02.html#id1467092 [2] http://developer.gnome.org/gtk3/3.0/GtkWidget.html#GtkWidget-draw Signed-off-by: Simon Schampijer <simon@schampijer.de> [squashed with a patch by Benjamin Berg <benjamin@sipsolutions.net>; removed useless additions] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Diffstat (limited to 'src/sugar3/graphics/icon.py')
-rw-r--r--src/sugar3/graphics/icon.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
index 2bd5106..c96e6f3 100644
--- a/src/sugar3/graphics/icon.py
+++ b/src/sugar3/graphics/icon.py
@@ -385,7 +385,7 @@ class Icon(Gtk.Image):
width = 0
return (width, width)
- def do_expose_event(self, event):
+ def do_draw(self, cr):
"""
Parameters
----------
@@ -414,8 +414,6 @@ class Icon(Gtk.Image):
y = math.floor(ypad +
(allocation.height - requisition.height) * yalign)
- cr = self.get_window().cairo_create()
-
if self._scale != 1.0:
cr.scale(self._scale, self._scale)