This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE: support Command-click on window title on macOS
Type: Stage:
Components: IDLE, macOS Versions: Python 3.11
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: Aivar.Annamaa, ned.deily, ronaldoussoren, terry.reedy
Priority: normal Keywords:

Created on 2021-06-08 18:13 by Aivar.Annamaa, last changed 2022-04-11 14:59 by admin.

Messages (3)
msg395348 - (view) Author: Aivar Annamaa (Aivar.Annamaa) * Date: 2021-06-08 18:15
Many macOS apps show location info about current document on command-clicking on window title.

I just found out how to do it in Tkinter, so I wanted to share it in case someone wants to add it for IDLE: https://sourceforge.net/p/tcl/mailman/tcl-mac/thread/CAEbkakfc%2B5hUGMyWpjGF2DO7dWOX-3AyR8UOjGfbP8djWWtG-A%40mail.gmail.com/#msg37298382
msg395349 - (view) Author: Aivar Annamaa (Aivar.Annamaa) * Date: 2021-06-08 18:27
In short:

window.wm_attributes("-titlepath", stringContainingTheAbsolutePathOfTheDocument)


Passing empty string as the second argument turned the feature off.
msg395363 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-06-08 21:25
Documented as macOS specific at https://www.tcl.tk/man/tcl8.6/TkCmd/wm.htm.  But I would not know about C-click from "Specifies the path of the file referenced as the window proxy icon (which can be dragged and dropped in lieu of the file's finder icon). "

IDLE document windows already have the absolute path in the title.  There is only an issue if it is too long for the space, such as when editing installed idlelib test files.  I don't know what will happen if/when you use tabbed windows.

In the meanwhile, it would be easy to add
    if long and sys.platform == 'darwin':
        # Only valid as long as 'long' is absolute path.
        self.top.wm_attributes("-titlepath", long)
to the end of editor.EditorWindow.saved_change_hook.

Ned or Ronald, is this worth it?  Is there any downside to this?
History
Date User Action Args
2022-04-11 14:59:46adminsetgithub: 88516
2021-06-08 21:25:08terry.reedysetmessages: + msg395363
2021-06-08 20:58:32terry.reedysetnosy: + ned.deily, ronaldoussoren
title: Make IDLE support Command-click on window title on macOS -> IDLE: support Command-click on window title on macOS

components: + macOS
versions: + Python 3.11
2021-06-08 18:30:36Aivar.Annamaasettitle: Support Command-click on window title on macOS -> Make IDLE support Command-click on window title on macOS
2021-06-08 18:27:21Aivar.Annamaasetmessages: + msg395349
2021-06-08 18:15:49Aivar.Annamaasettitle: Support -> Support Command-click on window title on macOS
nosy: + terry.reedy

messages: + msg395348

assignee: terry.reedy
components: + IDLE
2021-06-08 18:13:50Aivar.Annamaacreate