Hi,
this is needed for improving the experience when dragging icons around.
Thanks,
Tomeu
From c800a033b3047d63aa6fc4bcefee74255eb4c6b4 Mon Sep 17 00:00:00 2001
From: Tomeu Vizoso <[EMAIL PROTECTED]>
Date: Mon, 23 Jun 2008 12:52:22 +0200
Subject: [PATCH] Expose the cairo surface in CanvasIcon
---
src/sugar/graphics/icon.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/sugar/graphics/icon.py b/src/sugar/graphics/icon.py
index d22b412..fccef2e 100644
--- a/src/sugar/graphics/icon.py
+++ b/src/sugar/graphics/icon.py
@@ -580,6 +580,11 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
palette = property(get_palette, set_palette)
+ def get_surface(self):
+ return self._buffer.get_surface()
+
+ surface = property(get_surface, None)
+
def get_icon_state(base_name, perc):
step = 5
strength = round(perc / step) * step
--
1.5.4.3
_______________________________________________
Sugar mailing list
[email protected]
http://lists.laptop.org/listinfo/sugar