Skip to content

Commit ceabbea

Browse files
[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 3251ba8) Co-authored-by: Christopher Chavez chrischavez@gmx.us Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
1 parent e4d2fb2 commit ceabbea

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/idlelib/macosx.py

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

226226
if isCarbonTk():
227227
# for Carbon AquaTk, replace the default Tk apple menu
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)