]> granicus.if.org Git - python/commitdiff
Merged revisions 87119 via svnmerge from
authorRonald Oussoren <ronaldoussoren@mac.com>
Tue, 7 Dec 2010 15:31:07 +0000 (15:31 +0000)
committerRonald Oussoren <ronaldoussoren@mac.com>
Tue, 7 Dec 2010 15:31:07 +0000 (15:31 +0000)
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.
........

Lib/idlelib/FileList.py
Lib/idlelib/macosxSupport.py
Misc/NEWS

index 4c0076d3b6f5e05f035d1ad32712db1d0d1d57f1..37a337ed9a6d362748c522c64c9ff728c01d8f05 100644 (file)
@@ -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":
index d2705300d756468c4cd0cc3537aea17f1fb4003b..9b677e1d3b567dc9a30cbc5a144f01eb625fc5f5 100644 (file)
@@ -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')
index fc3b9a0391cebc8fc31621b8097f456b2055c216..7eac6445c149fc1aa3ec0c8a4f7b98d468c70df2 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -17,6 +17,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #10107: Warn about unsaved files in IDLE on OSX.
+
 - Issue #7904: Changes to urllib.parse.urlsplit to handle schemes as defined by
   RFC3986. Anything before :// is considered a scheme and is followed by an
   authority (or netloc) and by '/' led path, which is optional.