From 10e05e17a3e7657ecdc4c7986d35275d76c6d603 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Tue, 7 Dec 2010 15:28:10 +0000 Subject: Fix for issue #10107: Without this patch IDLE on OSX doesn't warn about unsaved files when quitting. --- Lib/idlelib/macosxSupport.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Lib/idlelib/macosxSupport.py') diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py index 346f04d1a3b..f5e30407152 100644 --- a/Lib/idlelib/macosxSupport.py +++ b/Lib/idlelib/macosxSupport.py @@ -103,6 +103,11 @@ def overrideRootMenu(root, flist): if flist: root.bind('<>', 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') -- cgit v1.2.3