5 ms·
Call the right D-Bus API (https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.FileChooser https://flatpak.github.io/xdg-desktop-portal/#g
by mixedCase 5y ago
Call the right D-Bus API (https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.FileChooser https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.free...) and fall back to the Gtk file picker if this specific portal is not implemented or there's no D-Bus server.
With a regular window manager it's up to the user to choose an xdg-desktop-portal implementation of their liking, so you always need to fall back if nothing's available.
- pjmlp 5y agoTo fall back into the Gtk file picker it must still be part of the Gtk source tree. > "...ideally the file chooser should become part of GNOME’s core rather than part of GTK."
- mixedCase 5y agoThere will always be a file-picker in Gtk's tree, or the current/an alternative file picker will become the de-facto fallback. Needing a fallback is one of the nuisances of dealing with the Linux desktop, so there will always be an obvious fallback option one way or another.