8000 [3.11] gh-112898: warn about unsaved files when quitting IDLE on macO… · python/cpython@a37e147 · GitHub
[go: up one dir, main page]

Skip to content

Commit a37e147

Browse files
[3.11] gh-112898: warn about unsaved files when quitting IDLE on macOS (GH-112939) (#112961)
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 3251ba8) Co-authored-by: Christopher Chavez chrischavez@gmx.us Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
1 parent 449fdfc commit a37e147

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/idlelib/macosx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def help_dialog(event=None):
222222
# The binding above doesn't reliably work on all versions of Tk
223223
# on macOS. Adding command definition below does seem to do the
224224
# right thing for now.
225-
root.createcommand('exit', flist.close_all_callback)
225+
root.createcommand('::tk::mac::Quit', flist.close_all_callback)
226226

227227
if isCarbonTk():
228228
# for Carbon AquaTk, replace the default Tk apple menu
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix processing unsaved files when quitting IDLE on macOS.

0 commit comments

Comments
 (0)
0