-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
IDLE: support Command-click on window title on macOS #88516
Comments
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 |
In short: window.wm_attributes("-titlepath", stringContainingTheAbsolutePathOfTheDocument) Passing empty string as the second argument turned the feature off. |
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 Ned or Ronald, is this worth it? Is there any downside to this? |
The platform standard on macOS is to show a proxy icon for open files in the titlebar of Windows. Make sure IDLE matches this behaviour.
Another thing I ran into is that IDLE will close without warning when there are open unsaved files. I've filed #112898 for that. |
Ronald, thank you for the images. For once, they are more helpful than text. The phrase 'file-proxy icon' seems macOS specific. Windows has clickable app icons at the left end of the title bar. I had not noticed before the little icons next to some titles on macOS. IDLE on macOS not having them can be seen as a bug, even though clicking will not do the same. I will experiment with the PR I hope tomorrow. A couple of thoughts: first, there is a tension between cross-platform behavior, which I am in favor of as much as sensibly possible, and platform-specific customization. Second, I hope to eventually switch to a multi-tabbed editor. At that time, tabs will only have short names. Notepad++ on Windows puts the path for the currently active tab on the window title bar. And third, IDLE has (underused) hover tips. I should see if hovering over the title bar can trigger anything. Or ditto for hovering over tabs. |
To be clearer than I was before, I support adding mac specific things, but I am opposed to removing cross-platform features when that makes IDLE on mac harder to use by a non-Mac user, such as me. My memory of looking at file-proxy icons on other Mac Catalina apps is that there was hardly consistent behavior, but TextEdit and Script Editor both show the path components after control- or command-click. The problem is discoverability. The IDLE doc should gain an IDLE on Mac section, or maybe 'OS Differences'. Save state: Neither TextEdit nor Script Editor put a dot in the upper left red close circle. Both add |
I've reverted that part of the change, I agree that keeping them is nicer for cross platform consistency. Long term it might be nicer to look into using some other way to indicate change (such as one of the unicode bullet characters like ●, possibly with a different colour), but that's for a different issue and would require cross platform testing. |
The platform standard on macOS is to show a proxy icon for open files in the titlebar of Windows. Make sure IDLE matches this behaviour. Don't use both the long and short names in the window title. The behaviour of other editors (such as Text Editor) is to show only the short name with the proxy icon. Co-authored-by: Terry Jan Reedy <[email protected]>
…ythonGH-112894) The platform standard on macOS is to show a proxy icon for open files in the titlebar of Windows. Make sure IDLE matches this behaviour. Don't use both the long and short names in the window title. The behaviour of other editors (such as Text Editor) is to show only the short name with the proxy icon. (cherry picked from commit b481018) Co-authored-by: Ronald Oussoren <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
…ythonGH-112894) The platform standard on macOS is to show a proxy icon for open files in the titlebar of Windows. Make sure IDLE matches this behaviour. Don't use both the long and short names in the window title. The behaviour of other editors (such as Text Editor) is to show only the short name with the proxy icon. (cherry picked from commit b481018) Co-authored-by: Ronald Oussoren <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
…GH-112894) (#115840) The platform standard on macOS is to show a proxy icon for open files in the titlebar of Windows. Make sure IDLE matches this behaviour. Don't use both the long and short names in the window title. The behaviour of other editors (such as Text Editor) is to show only the short name with the proxy icon. (cherry picked from commit b481018) Co-authored-by: Ronald Oussoren <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
…GH-112894) (#115841) The platform standard on macOS is to show a proxy icon for open files in the titlebar of Windows. Make sure IDLE matches this behaviour. Don't use both the long and short names in the window title. The behaviour of other editors (such as Text Editor) is to show only the short name with the proxy icon. (cherry picked from commit b481018) Co-authored-by: Ronald Oussoren <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
… macOS (pythonGH-112894) The platform standard on macOS is to show a proxy icon for open files in the titlebar of Windows. Make sure IDLE matches this behaviour. Don't use both the long and short names in the window title. The behaviour of other editors (such as Text Editor) is to show only the short name with the proxy icon. (cherry picked from commit b481018) Co-authored-by: Ronald Oussoren <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
…ython#112894) The platform standard on macOS is to show a proxy icon for open files in the titlebar of Windows. Make sure IDLE matches this behaviour. Don't use both the long and short names in the window title. The behaviour of other editors (such as Text Editor) is to show only the short name with the proxy icon. Co-authored-by: Terry Jan Reedy <[email protected]>
…ython#112894) The platform standard on macOS is to show a proxy icon for open files in the titlebar of Windows. Make sure IDLE matches this behaviour. Don't use both the long and short names in the window title. The behaviour of other editors (such as Text Editor) is to show only the short name with the proxy icon. Co-authored-by: Terry Jan Reedy <[email protected]>
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs
The text was updated successfully, but these errors were encountered: