--- a/demo_menu.py Wed Dec 26 01:00:31 2012 +0100
+++ b/demo_menu.py Sat Dec 29 12:16:06 2012 +0100
@@ -10,7 +10,7 @@
class MyApplication(Application):
def __init__(self):
Application.__init__(self)
- self.top.connect('keypress', self.globalkeypress)
+ self.top.connect('keypress', self.on_top_keypress)
menubar = MenuBar()
self.top.add(menubar)
@@ -64,8 +64,8 @@
#win.add(subwin)
- def globalkeypress(self, keyname, char):
- if keyname == 'escape':
+ def on_top_keypress(self, ev):
+ if ev.keyname == 'escape':
self.terminate()