rfd
rfd copied to clipboard
starting directory support with XDG Desktop Portal backend
https://github.com/PolyMeilex/rfd/blob/e331eff49a95b095e2e82750af114cf0c81c3dfd/src/backend/xdg_desktop_portal.rs#L199
This was fixed in ashpd 0.3 btw
But it is still not supported for OpenFileOptions
But it is still not supported for OpenFileOptions
That needs to be implemented in the portals themselves, so in https://github.com/flatpak/xdg-desktop-portal/. ashpd is just a rust wrapper for the dbus interfaces.
Issue was opened at https://github.com/flatpak/xdg-desktop-portal/issues/796, i will look into fixing it in the upcoming days
Waiting on https://github.com/bilelmoussaoui/ashpd/pull/90 to get merged.
The replacement PR https://github.com/bilelmoussaoui/ashpd/pull/173 was merged, so this is waiting on a new release of ashpd
now.
https://docs.rs/ashpd/latest/ashpd/desktop/file_chooser/struct.OpenFileRequest.html#method.current_folder
Support for default directories has been added in ashpd 0.7.0
I'll try to create a PR for this since it would be nice to have feature parity, and especially since xdg is now the default.
Yep, just copy and paste this line: https://github.com/PolyMeilex/rfd/blob/8646b508e9c85c29e1865e83d2f7f444595d98ac/src/backend/xdg_desktop_portal.rs#L211C18-L211C32 to all dialog types
Support for default directories has been added in
ashpd 0.7.0
According to https://github.com/bilelmoussaoui/ashpd/releases current_folder
support has been added to OpenFile
in ashpd 0.6.8, just in case that is relevant in terms of compatibility.
Thanks for contributing to this functionality!
~Hmm I can't compile zbus_names 2.6.0
on linux because zvariant::Str<'_>: From<Cow<'_, str>> is not satisfied
, is this a known issue? Also occurs with the rfd 0.14.0
crates.io release, no problems on 0.13
~
Sorry for the false alarm, it seems to be an issue with a different dependency I have.
Edit: I can reproduce the compilation error by using both rfd 0.14.0
and dark-light 1.0.0
in an empty project. rfd uses zbus v4 through ashpd but dark-light seems to use zbus v3, I believe some sort of clash between these two is what is causing the error.
Doesn't seem to work. No errors or anything, the picker just doesn't open the given directory.
Edit: FileDialog.save_file()
somehow still works despite using the same code
Doesn't seem to work. No errors or anything, the picker just doesn't open the given directory.
Edit:
FileDialog.save_file()
somehow still works despite using the same code
Sounds like a KDE portal implementation error/issue
Yup I can confirm it works on GNOME. Although it's weird that the save file works properly, because that means it's still partially implemented elsewhere.
Would be great to get a new version with this fix, as it currently is a regression when running rfd version 0.14.0 with default features:
- with versions < 0.14.0 the the
set_directory
function is working correctly - with version 0.14.0 the
set_directory
function is not working - with master the
set_directory
function is working correctly again