diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2006-07-23 09:41:09 (GMT) |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2006-07-23 09:41:09 (GMT) |
commit | 17db495445ba1f6c9d360ade62471d49ceb05cfe (patch) | |
tree | 24fb140c6e682c5832ceb919e08f3057df162e3e /Lib/idlelib/EditorWindow.py | |
parent | dce937f32c323be92844185e0db768dc91f0a728 (diff) | |
download | cpython-17db495445ba1f6c9d360ade62471d49ceb05cfe.zip cpython-17db495445ba1f6c9d360ade62471d49ceb05cfe.tar.gz cpython-17db495445ba1f6c9d360ade62471d49ceb05cfe.tar.bz2 |
Without this patch CMD-W won't close EditorWindows on MacOS X. This solves
part of bug #1517990.
Diffstat (limited to 'Lib/idlelib/EditorWindow.py')
-rw-r--r-- | Lib/idlelib/EditorWindow.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 5dca4c1..442d718 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -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) |