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

X11 shell does not support file dialogs. #936

Closed
luleyleo opened this issue May 15, 2020 · 9 comments
Closed

X11 shell does not support file dialogs. #936

luleyleo opened this issue May 15, 2020 · 9 comments
Labels
help wanted has no one working on it yet missing a feature is missing on a specific platform shell/x11 concerns the X11 backend

Comments

@luleyleo
Copy link
Collaborator

See the Zulip conversation.

@luleyleo luleyleo added help wanted has no one working on it yet shell/x11 concerns the X11 backend missing a feature is missing on a specific platform labels May 15, 2020
@luleyleo
Copy link
Collaborator Author

There is a new Rust library which implements file dialogs using zenity and kdialog:
https://github.com/balthild/native-dialog-rs

@xStrom
Copy link
Member

xStrom commented Jun 16, 2020

I noticed that library too and checked its alert code, as I've been working in that area recently. The implementation is super naive and simple. More power to them and great for little toy projects, but I don't think there's anything there for us.

@raphlinus
Copy link
Contributor

This is of course a known limitation of using a low level library. My personal feeling is that the best way going forward is to write a file dialog in druid, but that's a nontrivial undertaking of course.

@xStrom
Copy link
Member

xStrom commented Jun 16, 2020

The zenity/kdialog vs custom druid implmentation question comes up with X11 alerts as well. I've been going back and forth in my mind, but lately leaning towards custom alerts. Alerts are easier to implement than file dialogs, so this could serve as a test case of sorts to see how the effort/result compares to just using the binaries.

In the alert case the custom alerts can be useful on Windows/macOS too for more complex cases, because it would be easy to embed custom widgets into the alert dialog for some advanced functionality.

@saucesaft
Copy link

https://github.com/x42/sofd bindings of this c library could be useful, so the wheel is not rewritten.

@jplatte
Copy link
Member

jplatte commented Sep 15, 2020

On Linux, it would be useful to use the desktop portal DBus protocol for this. See https://belmoussaoui.com/article/13-oxidizing-portals :)

In addition to not requiring a druid file dialog implementation (though I would love to eventually see one), this would allow flatpak-sandboxed applications to open files that aren't otherwise accessible to them AFAIK.

@luleyleo
Copy link
Collaborator Author

That post is a nice overview, not sure how I missed it…

I haven't brought up portals so far because they used to have no support for opening directories for whatever reason, but looks like they finally fixed that with the last edition. Definitely worth a try.

@jneem
Copy link
Collaborator

jneem commented Sep 15, 2020

Most likely you "missed" it because it was only just written :)

@maan2003
Copy link
Collaborator

maan2003 commented May 8, 2022

Fixed by #2153

@maan2003 maan2003 closed this as completed May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted has no one working on it yet missing a feature is missing on a specific platform shell/x11 concerns the X11 backend
Projects
None yet
Development

No branches or pull requests

7 participants