summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/idlelib/FileList.py2
-rw-r--r--Lib/idlelib/macosxSupport.py5
-rw-r--r--Misc/NEWS2
3 files changed, 8 insertions, 1 deletions
diff --git a/Lib/idlelib/FileList.py b/Lib/idlelib/FileList.py
index 475cd3d301..8318ff17b2 100644
--- a/Lib/idlelib/FileList.py
+++ b/Lib/idlelib/FileList.py
@@ -43,7 +43,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 self.inversedict.keys():
reply = edit.close()
if reply == "cancel":
diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py
index 7d3d57b415..909856e359 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')
diff --git a/Misc/NEWS b/Misc/NEWS
index 6ca939a1c9..8058a2ff4b 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -16,6 +16,8 @@ Core and Builtins
Library
-------
+- Issue #10107: Warn about unsaved files in IDLE on OSX.
+
- Issue #10478: Reentrant calls inside buffered IO objects (for example by
way of a signal handler) now raise a RuntimeError instead of freezing the
current process.