I am trying to use the keys with the circles with diferent sizes to change the size of the tool, but didn't see any event.<br>Can anybody help me?<br><br>[gonzalo@aronax tmp]$ diff -u /home/gonzalo/sugar-devel/paint.git/Area.py Area.py <br>
--- /home/gonzalo/sugar-devel/paint.git/Area.py 2010-05-31 00:54:19.000000000 -0300<br>+++ Area.py 2010-06-01 00:43:57.275948846 -0300<br>@@ -1123,6 +1123,7 @@<br> logging.debug('Unexpected error: %s', message)<br>
<br> def key_press(self,widget,event):<br>+ print "code",event.keyval<br> if event.keyval == gtk.keysyms.BackSpace:<br> if self.selmove:<br> self.selmove = False<br>
@@ -1162,6 +1163,21 @@<br> if self.tool['name'] == 'marquee-rectangular':<br> self.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.TCROSS))<br> widget.queue_draw()<br>+ elif (event.keyval >= 65474) and (event.keyval <= 65477):<br>
+ print "codigo",event.keyval <br>+ if self.tool['name'] in ['pencil','eraser','brush','rainbow']:<br>+ if event.keyval == 65474:<br>+ self.tool['line size'] = self.tool['line size'] - 5<br>
+ elif event.keyval == 65475:<br>+ self.tool['line size'] = self.tool['line size'] - 1<br>+ elif event.keyval == 65476:<br>+ self.tool['line size'] = self.tool['line size'] + 1<br>
+ elif event.keyval == 65477:<br>+ self.tool['line size'] = self.tool['line size'] + 5<br>+ widget.queue_draw()<br>+ else:<br>+ print "codigo no manejado",event.keyval <br>
+<br> <br> def key_release(self,widget,event):<br> pass<br><br clear="all">Gonzalo<br>