diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2010-12-07 15:31:07 (GMT) |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2010-12-07 15:31:07 (GMT) |
commit | a85b671cb6f71b7c80f4d4cf5e08d14c2c52a235 (patch) | |
tree | af894e0214baa465d2f93acc1cb284b78f95fccc /Lib | |
parent | 269a881d9a59c115d08ede122bf0f97a63b417ac (diff) | |
download | cpython-a85b671cb6f71b7c80f4d4cf5e08d14c2c52a235.zip cpython-a85b671cb6f71b7c80f4d4cf5e08d14c2c52a235.tar.gz cpython-a85b671cb6f71b7c80f4d4cf5e08d14c2c52a235.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')
-rw-r--r-- | Lib/idlelib/FileList.py | 2 | ||||
-rw-r--r-- | Lib/idlelib/macosxSupport.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Lib/idlelib/FileList.py b/Lib/idlelib/FileList.py index 4c0076d..37a337e 100644 --- a/Lib/idlelib/FileList.py +++ b/Lib/idlelib/FileList.py @@ -48,7 +48,7 @@ class FileList: def new(self, filename=None): return self.EditorWindow(self, filename) - def close_all_callback(self, event): + def close_all_callback(self, *args, **kwds): for edit in list(self.inversedict): reply = edit.close() if reply == "cancel": diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py index d270530..9b677e1 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') |