Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.12] gh-88516: show file proxy icon in IDLE editor windows on macOS (GH-112894) #115840

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Lib/idlelib/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,9 @@ def open_recent_file(fn_closure=file_name):
def saved_change_hook(self):
short = self.short_title()
long = self.long_title()
if short and long:
if short and long and not macosx.isCocoaTk():
# Don't use both values on macOS because
# that doesn't match platform conventions.
title = short + " - " + long + _py_version
elif short:
title = short
Expand All @@ -1059,6 +1061,13 @@ def saved_change_hook(self):
self.top.wm_title(title)
self.top.wm_iconname(icon)

if macosx.isCocoaTk():
# Add a proxy icon to the window title
self.top.wm_attributes("-titlepath", long)

# Maintain the modification status for the window
self.top.wm_attributes("-modified", not self.get_saved())

def get_saved(self):
return self.undo.get_saved()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
On macOS show a proxy icon in the title bar of editor windows to match
platform behaviour.
Loading