summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2010-12-07 15:28:10 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2010-12-07 15:28:10 (GMT)
commit10e05e17a3e7657ecdc4c7986d35275d76c6d603 (patch)
treefa8aed305c766c9acae68e250f0ddffb88a7b3da
parent0499d0b03ac934e767daf2a8170fa27ff4a1e397 (diff)
downloadcpython-10e05e17a3e7657ecdc4c7986d35275d76c6d603.zip
cpython-10e05e17a3e7657ecdc4c7986d35275d76c6d603.tar.gz
cpython-10e05e17a3e7657ecdc4c7986d35275d76c6d603.tar.bz2
Fix for issue #10107: Without this patch IDLE on OSX doesn't warn about unsaved files when quitting.
-rw-r--r--Lib/idlelib/FileList.py2
-rw-r--r--Lib/idlelib/macosxSupport.py5
-rw-r--r--Misc/NEWS12
3 files changed, 18 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 346f04d..f5e3040 100644
--- a/Lib/idlelib/macosxSupport.py
+++ b/Lib/idlelib/macosxSupport.py
@@ -103,6 +103,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')
diff --git a/Misc/NEWS b/Misc/NEWS
index 8a8a7f1..52784a1 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -2,6 +2,18 @@
Python News
+++++++++++
+What's New in Python 3.2 Beta 2?
+================================
+
+*Release date: XXXX-XX-XX*
+
+
+Library
+-------
+
+* Issue #10107: Warn about unsaved files in IDLE on OSX.
+
+
What's New in Python 3.2 Beta 1?
================================