--- a/demos/04_texteditor.py Sun Feb 15 12:48:23 2015 +0100
+++ b/demos/04_texteditor.py Sun Feb 15 12:52:46 2015 +0100
@@ -11,6 +11,7 @@
def __init__(self):
Application.__init__(self)
+ self.window_manager.sig_keypress.connect(self.on_wm_keypress)
#self.top.add_handler('keypress', self.on_top_keypress)
t = open('../tuikit/core/widget.py').read()
@@ -22,9 +23,9 @@
self.root_window.add(editbox)
#self.root_window.add(scroll, halign='fill', valign='fill')
- def on_top_keypress(self, ev):
+ def on_wm_keypress(self, ev):
if ev.keyname == 'escape':
- self.terminate()
+ self.stop()
return True