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
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()