No subject
James
James
Mon Mar 15 02:42:15 EDT 2010
g</a>><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=3D"http://dev.laptop.org/ticket/4316" target=3D"_blank">http://dev.=
laptop.org/ticket/4316</a><br>
---<br>
=A0Area.py | =A0 14 ++++++++++++--<br>
<div class=3D"im">=A01 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=3D"im">--- a/Area.py<br>
+++ b/Area.py<br>
</div>@@ -1057,8 +1057,18 @@ class Area(gtk.DrawingArea):<br>
<div class=3D"im"><br>
=A0 =A0 =A0 =A0 # Setting the cursor<br>
=A0 =A0 =A0 =A0 try:<br>
- =A0 =A0 =A0 =A0 =A0 =A0pixbuf =3D gtk.gdk.pixbuf_new_from_file('./ima=
ges/' + tool['name'] + '.png')<br>
- =A0 =A0 =A0 =A0 =A0 =A0cursor =3D gtk.gdk.Cursor(gtk.gdk.display_get_defa=
ult() , pixbuf, 6, 21)<br>
</div>+ =A0 =A0 =A0 =A0 =A0 =A0cursors =3D { 'pencil': 'pencil&=
#39;,<br>
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0'brush': 'pain=
tbrush',<br>
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0'eraser': 'era=
ser',<br>
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0'bucket': 'pai=
nt-bucket' }<br>
+ =A0 =A0 =A0 =A0 =A0 =A0display =3D gtk.gdk.display_get_default()<br>
+ =A0 =A0 =A0 =A0 =A0 =A0if self.tool['name'] in cursors:<br>
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0name =3D cursors[self.tool['name']=
]<br>
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cursor =3D gtk.gdk.cursor_new_from_name(di=
splay, name)<br>
+ =A0 =A0 =A0 =A0 =A0 =A0else:<br>
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0filename =3D os.path.join('images'=
, tool['name'] + '.png')<br>
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pixbuf =3D gtk.gdk.pixbuf_new_from_file(fi=
lename)<br>
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cursor =3D gtk.gdk.Cursor(display, pixbuf,=
6, 21)<br>
<div class=3D"im"> =A0 =A0 =A0 =A0 except gobject.GError:<br>
=A0 =A0 =A0 =A0 =A0 =A0 cursor =3D None<br>
<br>
</div>--<br>
1.7.1<br>
<br>
<br>
> _______________________________________________<br>
> Sugar-devel mailing list<br>
> <a href=3D"mailto:Sugar-devel at lists.sugarlabs.org">Sugar-devel at lists.s=
ugarlabs.org</a><br>
> <a href=3D"http://lists.sugarlabs.org/listinfo/sugar-devel" target=3D"=
_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<font color=3D"#888888"><br>
<br>
--<br>
James Cameron<br>
<a href=3D"http://quozl.linux.org.au/" target=3D"_blank">http://quozl.linux=
.org.au/</a><br>
</font></blockquote></div><br><br>
--000e0cd707f22e433504877ce5f9--
More information about the Sugar-devel
mailing list