Skip to content

Commit

Permalink
pythongh-112898: warn about unsaved files when quitting IDLE on macOS (
Browse files Browse the repository at this point in the history
…python#112939)

* pythongh-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
  • Loading branch information
ronaldoussoren authored Dec 11, 2023
1 parent c27e9d5 commit 3251ba8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/idlelib/macosx.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def help_dialog(event=None):
# 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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix processing unsaved files when quitting IDLE on macOS.

0 comments on commit 3251ba8

Please sign in to comment.