]> granicus.if.org Git - python/commitdiff
Without this patch CMD-W won't close EditorWindows on MacOS X. This solves
authorRonald Oussoren <ronaldoussoren@mac.com>
Sun, 23 Jul 2006 09:41:09 +0000 (09:41 +0000)
committerRonald Oussoren <ronaldoussoren@mac.com>
Sun, 23 Jul 2006 09:41:09 +0000 (09:41 +0000)
part of bug #1517990.

Lib/idlelib/EditorWindow.py

index 5dca4c1f8288eb3fd0f50519d61832081993e286..442d7187f5271494b426281a0ecbed75a9d76ec3 100644 (file)
@@ -121,6 +121,9 @@ class EditorWindow(object):
 
         self.top.protocol("WM_DELETE_WINDOW", self.close)
         self.top.bind("<<close-window>>", self.close_event)
+        if macosxSupport.runningAsOSXApp():
+            # Command-W on editorwindows doesn't work without this.
+            text.bind('<<close-window', self.close_event)
         text.bind("<<cut>>", self.cut)
         text.bind("<<copy>>", self.copy)
         text.bind("<<paste>>", self.paste)