[PATCH] use standard cursors
Gonzalo Odiard
godiard at gmail.com
Tue May 25 05:36:26 EDT 2010
---
Area.py | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/Area.py b/Area.py
index 611f944..44edebb 100644
--- a/Area.py
+++ b/Area.py
@@ -1057,11 +1057,20 @@ class Area(gtk.DrawingArea):
# Setting the cursor
try:
- pixbuf = gtk.gdk.pixbuf_new_from_file('./images/' +
tool['name'] + '.png')
- cursor = gtk.gdk.Cursor(gtk.gdk.display_get_default() , pixbuf,
6, 21)
+ if (self.tool['name'] is 'pencil'):
+ cursor =
gtk.gdk.cursor_new_from_name(gtk.gdk.display_get_default(), 'pencil')
+ elif (self.tool['name'] is 'brush'):
+ cursor =
gtk.gdk.cursor_new_from_name(gtk.gdk.display_get_default(), 'paintbrush')
+ elif (self.tool['name'] is 'eraser'):
+ cursor =
gtk.gdk.cursor_new_from_name(gtk.gdk.display_get_default(), 'eraser')
+ elif (self.tool['name'] is 'bucket'):
+ cursor =
gtk.gdk.cursor_new_from_name(gtk.gdk.display_get_default(), 'paint-bucket')
+ else:
+ pixbuf = gtk.gdk.pixbuf_new_from_file('./images/' +
tool['name'] + '.png')
+ cursor = gtk.gdk.Cursor(gtk.gdk.display_get_default() ,
pixbuf, 6, 21)
except gobject.GError:
cursor = None
-
+
self.window.set_cursor(cursor)
def getout(self,undo=False,widget=None):
--
1.6.6.1
Gonzalo
--000e0cdf0f0290d544048767f366
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Use standard cursors for pencil, brush, eraser and paint-bucket. The other =
tools need a custom cursor.<br>Bugs #40, #296 and OLPC #4316, #8864<br><br>=
More information about the Sugar-devel
mailing list