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>>From 14b03a73bb0603fabeeb2e2640dbef7419fa549c Mon Sep 17 00:00:00 2001<br>
From: Gonzalo Odiard <<a href="mailto:godiard@gmail.com">godiard@gmail.com</a>><br>Date: Tue, 25 May 2010 06:36:26 -0300<br>Subject: [PATCH] use standard cursors<br><br>---<br> Area.py | 15 ++++++++++++---<br> 1 files changed, 12 insertions(+), 3 deletions(-)<br>
<br>diff --git a/Area.py b/Area.py<br>index 611f944..44edebb 100644<br>--- a/Area.py<br>+++ b/Area.py<br>@@ -1057,11 +1057,20 @@ class Area(gtk.DrawingArea):<br> <br> # Setting the cursor<br> try:<br>
- pixbuf = gtk.gdk.pixbuf_new_from_file('./images/' + tool['name'] + '.png')<br>- cursor = gtk.gdk.Cursor(gtk.gdk.display_get_default() , pixbuf, 6, 21)<br>+ if (self.tool['name'] is 'pencil'):<br>
+ cursor = gtk.gdk.cursor_new_from_name(gtk.gdk.display_get_default(), 'pencil')<br>+ elif (self.tool['name'] is 'brush'):<br>+ cursor = gtk.gdk.cursor_new_from_name(gtk.gdk.display_get_default(), 'paintbrush')<br>
+ elif (self.tool['name'] is 'eraser'):<br>+ cursor = gtk.gdk.cursor_new_from_name(gtk.gdk.display_get_default(), 'eraser')<br>+ elif (self.tool['name'] is 'bucket'):<br>
+ cursor = gtk.gdk.cursor_new_from_name(gtk.gdk.display_get_default(), 'paint-bucket')<br>+ else: <br>+ pixbuf = gtk.gdk.pixbuf_new_from_file('./images/' + tool['name'] + '.png')<br>
+ cursor = gtk.gdk.Cursor(gtk.gdk.display_get_default() , pixbuf, 6, 21)<br> except gobject.GError:<br> cursor = None<br>- <br>+<br> self.window.set_cursor(cursor)<br> <br>
def getout(self,undo=False,widget=None):<br>-- <br>1.6.6.1<br><br><br>Gonzalo<br>