No subject


Mon Mar 15 02:42:15 EDT 2010


e brush when mouse leave area<br>
<br>---<br>=A0Area.py |=A0=A0 15 ++++++++++++++-<br>=A01 files changed, 14 =
insertions(+), 1 deletions(-)<br><br>diff --git a/Area.py b/Area.py<br>inde=
x 8a5e523..c83f38f 100644<br>--- a/Area.py<br>+++ b/Area.py<br>@@ -97,11 +9=
7,15 @@ class Area(gtk.DrawingArea):<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 gtk.gdk.BUTTON_PRESS_MASK =
|<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 gtk.gdk.BUTTON_RELEAS=
E_MASK|<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 gtk.gdk.EXPOSUR=
E_MASK |<br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 gtk.gdk.LEAVE_NO=
TIFY_MASK|<br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 gtk.gdk.ENTER_=
NOTIFY_MASK|<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 gtk.gdk.KEY_PRESS_MASK) <b=
r>=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.connect(&quot;expose_event&quot;,sel=
f.expose)<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.connect(&quot;motion_notify_even=
t&quot;, self.mousemove)<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.connect(&quot;but=
ton_press_event&quot;, self.mousedown)<br>
+=A0=A0=A0=A0=A0=A0=A0 self.connect(&quot;leave_notify_event&quot;, self.mo=
useleave)<br>+=A0=A0=A0=A0=A0=A0=A0 self.connect(&quot;enter_notify_event&q=
uot;, self.mouseenter)<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.connect(&quot;butto=
n_release_event&quot;, self.mouseup)<br>
=A0=A0=A0=A0=A0=A0=A0=A0 self.connect(&quot;key_press_event&quot;, self.key=
_press)<br>=A0<br>@@ -353,8 +357,17 @@ class Area(gtk.DrawingArea):<br>=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 self.desenha =3D True<br>=A0=A0=A0=A0=A0=
=A0=A0=A0 widget.queue_draw()<br>=A0<br>-<br>+=A0=A0=A0 def mouseleave(self=
,widget,event):<br>
+=A0=A0=A0=A0=A0=A0=A0 if self.tool[&#39;name&#39;] in [&#39;pencil&#39;,&#=
39;eraser&#39;,&#39;brush&#39;,&#39;rainbow&#39;]:<br>+=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0 self.drawing =3D True<br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
 widget.queue_draw_area(self.x_cursor-size, self.y_cursor-size, size*2, siz=
e*2)<br>
=A0<br>+=A0=A0=A0 def mouseenter(self,widget,event):<br>+=A0=A0=A0=A0=A0=A0=
=A0 if self.tool[&#39;name&#39;] in [&#39;pencil&#39;,&#39;eraser&#39;,&#39=
;brush&#39;,&#39;rainbow&#39;]:<br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 self.=
drawing =3D False<br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 widget.queue_draw_a=
rea(self.x_cursor-size, self.y_cursor-size, size*2, size*2)<br>
+<br>+<br>=A0=A0=A0=A0 def mousemove(self,widget,event):<br>=A0=A0=A0=A0=A0=
=A0=A0=A0 &quot;&quot;&quot;Make the Area object (GtkDrawingArea) recognize=
 that the mouse is moving.<br>=A0<br>-- <br>1.6.6.1<br><br clear=3D"all"><b=
r>-- <br>Gonzalo Odiard<br>
Responsable de Desarrollo<br>Sistemas Australes<br><br>

--000e0cdf193c24be7a0488141962--
--000e0cdf193c24be840488141964
Content-Type: application/octet-stream; 
	name="0001-hide-brush-when-mouse-leave-area.patch"
Content-Disposition: attachment; 
	filename="0001-hide-brush-when-mouse-le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HJhd2luZyA9
IEZhbHNlCisgICAgICAgICAgICB3aWRnZXQucXVldWVfZHJhd19hcmVhKHNlbGYueF9jdXJzb3It
c2l6ZSwgc2VsZi55X2N1cnNvci1zaXplLCBzaXplKjIsIHNpemUqMikKKworCiAgICAgZGVmIG1v
dXNlbW92ZShzZWxmLHdpZGdldCxldmVudCk6CiAgICAgICAgICIiIk1ha2UgdGhlIEFyZWEgb2Jq
ZWN0IChHdGtEcmF3aW5nQXJlYSkgcmVjb2duaXplIHRoYXQgdGhlIG1vdXNlIGlzIG1vdmluZy4K
IAotLSAKMS42LjYuMQoK
--000e0cdf193c24be840488141964--


More information about the Sugar-devel mailing list