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

feat: Open files/folder in the file explorer #1089

Closed
wants to merge 15 commits into from

Conversation

Doublonmousse
Copy link
Contributor

To fix #1053.

This is a PR that's very similar to #868, using a slightly different crate (opener) that has a reveal call and a MIT OR Apache-2.0 license.

The implementation detail for this is here https://docs.rs/opener/latest/opener/fn.reveal.html
The open crate doesn't have this option afaik but having two crates doing very similar things is slightly redundant

Tested only on linux aarch64 for now (but should be supported on all platforms)

this adds an option that will open a file explorer highlighting the file/folder selected.

Still needs to be a little more careful on error handling
@Doublonmousse
Copy link
Contributor Author

Tested on mac os (apple silicon) and windows as well. I haven't tested remote folders though.

@Doublonmousse Doublonmousse marked this pull request as ready for review May 5, 2024 10:35
@flxzt
Copy link
Owner

flxzt commented May 9, 2024

We should probably only use one of open or opener, reads like opener is a bit more capable without adding many dependencies, so we could switch to it entirely.

You implemented it a bit differently than expected - the alternative would be that the feature is an additional action in the folder menu at the top that opens the current workspace folder, not an action on every list item. But I guess we could have even both?

The advantage of your implementation is that when opening a file/folder, it it already selected.

@Doublonmousse Doublonmousse marked this pull request as draft June 7, 2024 16:12
@Doublonmousse
Copy link
Contributor Author

I switched to opener and added the action to open the workspace folder in the folder submenu.

image

One thing to verify is that opener does not have the same open::that_detached option, only opener::open and I don't know if that makes a difference or not

@Doublonmousse Doublonmousse marked this pull request as ready for review June 7, 2024 16:53
- force down state when the element is a stylus with a pressure value that is not zero. This way when a button is pressed before the pen is on the screen, this triggers proximity mode as rnote expects a left click when the pen touches the screen

- forces a pen state to up upon a button release as once again we have our button as a buttonrelease instead of the left click or BUTTON_PRIMARY release
@Doublonmousse Doublonmousse changed the title Open files/folder in the file explorer feat: Open files/folder in the file explorer Jun 7, 2024
this allows for the filepicker to stay as the native one on windows and, this makes the extension automatically apply on both windows and linux even if the file name doesn't include the extension.
new options for the vertical space tool (wip)
remove workaround for macos and don't save current size for maximized…
This reverts commit 922a690, reversing
changes made to 0272d10.
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.

Option to open Workspace in file manager
2 participants