See the Zulip conversation.
There is a new Rust library which implements file dialogs using zenity and kdialog:
https://github.com/balthild/native-dialog-rs
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.
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.
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.
https://github.com/x42/sofd bindings of this c library could be useful, so the wheel is not rewritten.
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.
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.
Most likely you "missed" it because it was only just written :)
Most helpful comment
The
zenity/kdialogvs 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.