mirror of
https://github.com/python/cpython.git
synced 2025-08-09 11:29:45 +00:00
[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 3251ba8f1a
)
Co-authored-by: Christopher Chavez chrischavez@gmx.us
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
This commit is contained in:
parent
e4d2fb242a
commit
ceabbeaca3
2 changed files with 2 additions and 1 deletions
|
@ -221,7 +221,7 @@ def overrideRootMenu(root, flist):
|
||||||
# The binding above doesn't reliably work on all versions of Tk
|
# The binding above doesn't reliably work on all versions of Tk
|
||||||
# on macOS. Adding command definition below does seem to do the
|
# on macOS. Adding command definition below does seem to do the
|
||||||
# right thing for now.
|
# right thing for now.
|
||||||
root.createcommand('exit', flist.close_all_callback)
|
root.createcommand('::tk::mac::Quit', flist.close_all_callback)
|
||||||
|
|
||||||
if isCarbonTk():
|
if isCarbonTk():
|
||||||
# for Carbon AquaTk, replace the default Tk apple menu
|
# for Carbon AquaTk, replace the default Tk apple menu
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fix processing unsaved files when quitting IDLE on macOS.
|
Loading…
Add table
Add a link
Reference in a new issue