diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2023-12-11 14:22:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-11 14:22:36 (GMT) |
commit | 3251ba8f1af535bf28e31a6832511ba19e96b262 (patch) | |
tree | 80a2bd398ec579726beba176cd78fc6a65a6fce9 /Lib/idlelib | |
parent | c27e9d5d17abf468ea10081e177ba673316b1b98 (diff) | |
download | cpython-3251ba8f1af535bf28e31a6832511ba19e96b262.zip cpython-3251ba8f1af535bf28e31a6832511ba19e96b262.tar.gz cpython-3251ba8f1af535bf28e31a6832511ba19e96b262.tar.bz2 |
gh-112898: warn about unsaved files when quitting IDLE on macOS (#112939)
* gh-112898: warn about unsaved files when quitting IDLE on macOS
Implement the TK function ``::tk::mac::Quit`` on macOS to
ensure that IDLE asks about saving unsaved files when
quitting IDLE.
Co-authored-by: Christopher Chavez chrischavez@gmx.us
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/macosx.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/idlelib/macosx.py b/Lib/idlelib/macosx.py index 2ea02ec..332952f 100644 --- a/Lib/idlelib/macosx.py +++ b/Lib/idlelib/macosx.py @@ -221,7 +221,7 @@ def overrideRootMenu(root, flist): # The binding above doesn't reliably work on all versions of Tk # on macOS. Adding command definition below does seem to do the # right thing for now. - root.createcommand('exit', flist.close_all_callback) + root.createcommand('::tk::mac::Quit', flist.close_all_callback) if isCarbonTk(): # for Carbon AquaTk, replace the default Tk apple menu |