diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-12-11 16:14:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-11 16:14:15 (GMT) |
commit | ceabbeaca3d1a95ec7f52d552d9b36146bf78e7c (patch) | |
tree | b2b509cf1a07fec03d760964bff33f3e0ce486c3 /Lib/idlelib | |
parent | e4d2fb242a5049ae1a2b80fd56ec2c877a19c12f (diff) | |
download | cpython-ceabbeaca3d1a95ec7f52d552d9b36146bf78e7c.zip cpython-ceabbeaca3d1a95ec7f52d552d9b36146bf78e7c.tar.gz cpython-ceabbeaca3d1a95ec7f52d552d9b36146bf78e7c.tar.bz2 |
[3.12] gh-112898: warn about unsaved files when quitting IDLE on macOS (GH-112939) (#112960)
gh-112898: warn about unsaved files when quitting IDLE on macOS (GH-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.
(cherry picked from commit 3251ba8f1af535bf28e31a6832511ba19e96b262)
Co-authored-by: Christopher Chavez chrischavez@gmx.us
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
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 |