Commit 9016fcf4 authored by Guido van Rossum's avatar Guido van Rossum

Bind ESC to close-window.

parent dc5066ee
...@@ -18,7 +18,7 @@ class Debugger(bdb.Bdb): ...@@ -18,7 +18,7 @@ class Debugger(bdb.Bdb):
self.pyshell = pyshell self.pyshell = pyshell
self.make_gui() self.make_gui()
def close(self): def close(self, event=None):
if self.interacting: if self.interacting:
self.top.bell() self.top.bell()
return return
...@@ -51,6 +51,7 @@ class Debugger(bdb.Bdb): ...@@ -51,6 +51,7 @@ class Debugger(bdb.Bdb):
self.top.wm_title("Debug Control") self.top.wm_title("Debug Control")
self.top.wm_iconname("Debug") self.top.wm_iconname("Debug")
top.wm_protocol("WM_DELETE_WINDOW", self.close) top.wm_protocol("WM_DELETE_WINDOW", self.close)
self.top.bind("<Escape>", self.close)
# #
self.bframe = bframe = Frame(top) self.bframe = bframe = Frame(top)
self.bframe.pack(anchor="w") self.bframe.pack(anchor="w")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment