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

Add tab context menu items for easier access to (file) resources #2993

Merged
merged 12 commits into from
Apr 5, 2024

Conversation

georgweiss
Copy link
Collaborator

@georgweiss georgweiss commented Apr 3, 2024

Users often launch the modal Info dialog for the purpose of copying the file path to an OPI. To better support this use case I've added two context menu items, see screen shot:

  1. Copy resource string to clipboard
  2. Open launch the File Browser in the resource's parent directory and highlight the resource. This context menu item is added only for file resources.

Had to add some new functionality in FileBrowserController to support highlight of resource.

Note that this applies only to DockItemWithInput instances.

Screenshot 2024-04-03 at 15 02 13

@georgweiss georgweiss requested a review from kasemir April 5, 2024 12:24
@georgweiss georgweiss merged commit 0dfc323 into master Apr 5, 2024
2 checks passed
@georgweiss georgweiss deleted the CSSTUDIO-1881-tab-context-menu branch April 5, 2024 14:11
@kasemir
Copy link
Collaborator

kasemir commented Apr 5, 2024

For what it's worth, good news is that this handles 'unexpected' paths.
For example, assume that the default file browser root is user.home.
You can interactively change the root of a file browser instance to say /tmp and open a file there.
When "Show in File Browser app" is invoked, it will not start with a root of user.home and then fail to locate /tmp/whatever.xyz in there. It will instead open a file browser with /tmp as a root and find the file in there.

Again that's good, but a side effect may be that every time "Show in File Browser app" is invoked, it opens a new file browser.

@georgweiss
Copy link
Collaborator Author

That is intentional as I could not really determine whether users would be annoyed or grateful for not changing the view of an existing File Browser instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants