PolyMeilex / rfd

Rusty File Dialog
MIT License
524 stars 60 forks source link

regression on 0.14.x? #201

Closed 0323pin closed 3 weeks ago

0323pin commented 3 weeks ago

Hi, I'm using simp, https://github.com/Kl4rry/simp which uses rfd to provide Gtk file chooser to, e.g. open files using File -> Open or, save files using File -> Save as

simp-v3.5.2 used rfd-v0.13.0 and the referred actions were working as expected. simp-v3.5.3 use rfd-v0.14.x and using Ctrl+O of File -> Open don't bring-up the Gtk file chooser, nothing happens on these actions.

Is this a known regression? Apparently, it doesn't seem to affect builds where features = ["xdg-portal"] is used, i.e. Linux.

Additional information: OS: NetBSD current Rust: 1.78.0 source build.

PolyMeilex commented 3 weeks ago

xdg-portal is the default in 0.14, gtk backend will be removed, as it's a horible unsafe and broken mess. Perhaps try to install zenity if such a thing exists on bsd. RFD will try to call zenity whenever the portal is not avalible or broken.

0323pin commented 3 weeks ago

We do have zenity, albeit at v3.41

When is the gtk backend removal planned?

0323pin commented 3 weeks ago

@PolyMeilex Ok, let's close this for now, I've temporarily fixed the issue with simp apllying the following patch:

$NetBSD: patch-Cargo.toml,v 1.1 2024/06/11 08:36:49 pin Exp $

RFD crate changed the default features from Gtk to xdg-desktop-portal.
This breaks functionality on NetBSD. Restore the Gtk feature for now.

--- Cargo.toml.orig 2024-06-11 06:29:01.483993198 +0000
+++ Cargo.toml
@@ -48,7 +48,7 @@ wgpu = { version = "0.19.1", features = 
 winit = { version = "0.29.10", features = ["rwh_05"] }

 [target.'cfg(not(linux))'.dependencies]
-rfd = "0.14.0"
+rfd = { version = "0.14.0", default-features = false, features = ["gtk3"] }

 [target.'cfg(linux)'.dependencies]
 rfd = { version = "0.14.0", default-features = false, features = ["xdg-portal"] }

I would still appreciate any info as of when you intend to fully drop Gtk support, This gives us time to work on xdg-desktop-portal package and hopefully be able to support that, Thanks!

PolyMeilex commented 3 weeks ago

As long as you have zenity on the system, xdg-portal build should fallback to it, if it does not, please oppen an issue.

When is the gtk backend removal planned?

Not sure, it's existence does not cause much burden for now, so there is no concreate date.

0323pin commented 3 weeks ago

Thanks. I'll test zenity and let you know.