summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/idlelib/editor.py11
-rw-r--r--Misc/NEWS.d/next/IDLE/2023-12-09-11-04-26.gh-issue-88516.SIIvfs.rst2
2 files changed, 12 insertions, 1 deletions
diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py
index 8ee8eba..7bfa093 100644
--- a/Lib/idlelib/editor.py
+++ b/Lib/idlelib/editor.py
@@ -1044,7 +1044,9 @@ class EditorWindow:
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
@@ -1059,6 +1061,13 @@ class EditorWindow:
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()
diff --git a/Misc/NEWS.d/next/IDLE/2023-12-09-11-04-26.gh-issue-88516.SIIvfs.rst b/Misc/NEWS.d/next/IDLE/2023-12-09-11-04-26.gh-issue-88516.SIIvfs.rst
new file mode 100644
index 0000000..b6dea50
--- /dev/null
+++ b/Misc/NEWS.d/next/IDLE/2023-12-09-11-04-26.gh-issue-88516.SIIvfs.rst
@@ -0,0 +1,2 @@
+On macOS show a proxy icon in the title bar of editor windows to match
+platform behaviour.