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

Implement D-Bus portal backend #48

Merged
merged 3 commits into from
Jan 28, 2022
Merged

Implement D-Bus portal backend #48

merged 3 commits into from
Jan 28, 2022

Conversation

btzy
Copy link
Owner

@btzy btzy commented Dec 19, 2021

This PR is an alternative implementation for Linux, that uses xdg-desktop-portal so that the "native" file dialog is displayed. (In practice, this is either GTK or KDE; xfce doesn't have a portal backend implementation.) It makes D-Bus API calls directly. This should work if the user has xdg-desktop-portal and a suitable backend (either xdg-desktop-portal-gtk or xdg-desktop-portal-kde) installed (which apparently is the case for all common desktop Linux distributions), but will fail with NFD_ERROR otherwise.

This implementation links with D-Bus (dbus-1) instead of of GTK (gtk+-3.0).

Closes #24. Also refer to mlabbe/nativefiledialog#40.

@btzy btzy force-pushed the xdg-desktop-portal branch 3 times, most recently from b08a8cd to 7028e89 Compare January 9, 2022 10:32
@btzy btzy marked this pull request as ready for review January 9, 2022 11:28
@btzy btzy force-pushed the xdg-desktop-portal branch 3 times, most recently from 8b63457 to a946328 Compare January 10, 2022 12:51
@btzy btzy merged commit 6c06a0e into master Jan 28, 2022
@btzy btzy deleted the xdg-desktop-portal branch April 13, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GTK4 Support
1 participant