summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/macosxSupport.py
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2010-12-07 16:02:59 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2010-12-07 16:02:59 (GMT)
commit8ec374cc93aed86c270dd3729295748683744d19 (patch)
treef328ec9946509998ec2635de2b4a9f47ba1ffd0c /Lib/idlelib/macosxSupport.py
parentd8e4edd5d2ece5e7016a7c3c35831e860c5c2039 (diff)
downloadcpython-8ec374cc93aed86c270dd3729295748683744d19.zip
cpython-8ec374cc93aed86c270dd3729295748683744d19.tar.gz
cpython-8ec374cc93aed86c270dd3729295748683744d19.tar.bz2
Merged revisions 87119 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87119 | ronald.oussoren | 2010-12-07 16:28:10 +0100 (Tue, 07 Dec 2010) | 2 lines Fix for issue #10107: Without this patch IDLE on OSX doesn't warn about unsaved files when quitting. ........
Diffstat (limited to 'Lib/idlelib/macosxSupport.py')
-rw-r--r--Lib/idlelib/macosxSupport.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py
index 7d3d57b..909856e 100644
--- a/Lib/idlelib/macosxSupport.py
+++ b/Lib/idlelib/macosxSupport.py
@@ -97,6 +97,11 @@ def overrideRootMenu(root, flist):
if flist:
root.bind('<<close-all-windows>>', flist.close_all_callback)
+ # The binding above doesn't reliably work on all versions of Tk
+ # on MacOSX. Adding command definition below does seem to do the
+ # right thing for now.
+ root.createcommand('exit', flist.close_all_callback)
+
###check if Tk version >= 8.4.14; if so, use hard-coded showprefs binding
tkversion = root.tk.eval('info patchlevel')