I have drawed cursors for the other tools.<br>What do you think?<br>If the patch its bad, I can send you the images.<br><br>Gonzalo<br><br><div class="gmail_quote">On Wed, May 26, 2010 at 1:42 AM, James Cameron <span dir="ltr">&lt;<a href="mailto:quozl@laptop.org">quozl@laptop.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Tue, May 25, 2010 at 06:40:44AM -0300, Gonzalo Odiard wrote:<br>
&gt; Use standard cursors for pencil, brush, eraser and paint-bucket. The<br>
&gt; other tools need a custom cursor.<br>
&gt; Bugs #40, #296 and OLPC #4316, #8864<br>
<br>
</div>Reviewed and tested ...<br>
<br>
1.  does fix <a href="http://dev.laptop.org" target="_blank">dev.laptop.org</a> #4316,<br>
<br>
2.  doesn&#39;t properly fix <a href="http://sugarlabs.org" target="_blank">sugarlabs.org</a> #296, some additional tuning of<br>
coordinates may be needed; drawing effect still appears at an offset,<br>
<br>
3.  doesn&#39;t fix <a href="http://sugarlabs.org" target="_blank">sugarlabs.org</a> #40, in that the other cursors continue to<br>
be invisible against similar backgrounds,<br>
<br>
4.  doesn&#39;t remove images/{pencil,brush,bucket,eraser}.png<br>
<br>
The coding style was a bit repetitive, here&#39;s an alternate method which<br>
uses a dictionary and wraps the code better:<br>
<br>
>From e430f2742f910d16a59318060bd39fc80e37822b Mon Sep 17 00:00:00 2001<br>
From: James Cameron &lt;<a href="mailto:quozl@laptop.org">quozl@laptop.org</a>&gt;<br>
Date: Wed, 26 May 2010 14:36:13 +1000<br>
Subject: [PATCH] use cursors from Sugar theme<br>
<br>
Use Sugar theme cursors for pencil, brush, eraser and paint-bucket.<br>
<a href="http://dev.laptop.org/ticket/4316" target="_blank">http://dev.laptop.org/ticket/4316</a><br>
---<br>
 Area.py |   14 ++++++++++++--<br>
<div class="im"> 1 files changed, 12 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/Area.py b/Area.py<br>
</div>index 611f944..8af2b9b 100644<br>
<div class="im">--- a/Area.py<br>
+++ b/Area.py<br>
</div>@@ -1057,8 +1057,18 @@ class Area(gtk.DrawingArea):<br>
<div class="im"><br>
         # Setting the cursor<br>
         try:<br>
-            pixbuf = gtk.gdk.pixbuf_new_from_file(&#39;./images/&#39; + tool[&#39;name&#39;] + &#39;.png&#39;)<br>
-            cursor = gtk.gdk.Cursor(gtk.gdk.display_get_default() , pixbuf, 6, 21)<br>
</div>+            cursors = { &#39;pencil&#39;: &#39;pencil&#39;,<br>
+                        &#39;brush&#39;: &#39;paintbrush&#39;,<br>
+                        &#39;eraser&#39;: &#39;eraser&#39;,<br>
+                        &#39;bucket&#39;: &#39;paint-bucket&#39; }<br>
+            display = gtk.gdk.display_get_default()<br>
+            if self.tool[&#39;name&#39;] in cursors:<br>
+                name = cursors[self.tool[&#39;name&#39;]]<br>
+                cursor = gtk.gdk.cursor_new_from_name(display, name)<br>
+            else:<br>
+                filename = os.path.join(&#39;images&#39;, tool[&#39;name&#39;] + &#39;.png&#39;)<br>
+                pixbuf = gtk.gdk.pixbuf_new_from_file(filename)<br>
+                cursor = gtk.gdk.Cursor(display, pixbuf, 6, 21)<br>
<div class="im">         except gobject.GError:<br>
             cursor = None<br>
<br>
</div>--<br>
1.7.1<br>
<br>
<br>
&gt; _______________________________________________<br>
&gt; Sugar-devel mailing list<br>
&gt; <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
&gt; <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<font color="#888888"><br>
<br>
--<br>
James Cameron<br>
<a href="http://quozl.linux.org.au/" target="_blank">http://quozl.linux.org.au/</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Gonzalo Odiard<br>Responsable de Desarrollo<br>Sistemas Australes<br><br>