/[ascend]/branches/adrian/pygtk/canvas/contextmenutool.py
ViewVC logotype

Diff of /branches/adrian/pygtk/canvas/contextmenutool.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2003 by jpye, Tue Dec 2 07:40:59 2008 UTC revision 2004 by jpye, Wed Apr 15 08:59:46 2009 UTC
# Line 43  class ContextMenuTool(Tool): Line 43  class ContextMenuTool(Tool):
43              dia.set_default_response(gtk.RESPONSE_OK)              dia.set_default_response(gtk.RESPONSE_OK)
44              ent = gtk.Entry()              ent = gtk.Entry()
45              ent.set_text(bi.name)              ent.set_text(bi.name)
46                def key_press(ent,event):
47                    key = gtk.gdk.keyval_name(event.keyval)
48                    if key == 'Return':
49                        dia.response(gtk.RESPONSE_OK)
50                        return True
51                    return False
52                ent.connect("key-press-event",key_press)
53              dia.vbox.add(ent)              dia.vbox.add(ent)
54              dia.show_all()              dia.show_all()
55              res = dia.run()              res = dia.run()

Legend:
Removed from v.2003  
changed lines
  Added in v.2004

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22