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

[Feature] Geting rid of xdg-desktop-portal #882

Closed
1 task done
KorespondentAda opened this issue Jan 13, 2023 · 3 comments
Closed
1 task done

[Feature] Geting rid of xdg-desktop-portal #882

KorespondentAda opened this issue Jan 13, 2023 · 3 comments

Comments

@KorespondentAda
Copy link

What feature would you like to see?

Compiling on Linux without portals support.

How will this feature be useful to you and others?

After long troubleshooting of problems similar to #723 I ended up in removing portal stuff and searching ways to build ImHex without it.
As I realized, portals used only in NFD and it provides option to use GTK by default, that you override in not obvious way.
But install GTK is a way more easier than a setting up buggy portals (maybe I'm wrong of cource).

Request Type

  • I can provide a PoC for this feature or am willing to work on it myself and submit a PR

Additional context?

I do not understand why here is forced usage of portals, maybe because of way that interface draws (as I see it is not redrawing while gtk file dialog open), but I want to know.
Anyway, I think it's more preferable to have somehow-working app instead of "LOL your portals not working". Or at least getting usable errors on logs.

@WerWolv
Copy link
Owner

WerWolv commented Jan 13, 2023

The reason why I chose portals is because of the Flatpak and AppImage build. There you have no choice but to use portals, otherwise the file picker can't be used at all.

I'm open for a compile time flag to switch over to GTK if needed. However, release builds should probably still use portals since packaging GTK is both pretty difficult and increases the build sizes by a lot

@KorespondentAda
Copy link
Author

Okay, for self-packed versions it is must have, got it.
For compilation it will be cool to be able e.g. find in readme that I can pass -D NFD_PORTAL=OFF to cmake and get it works without portals. Currently if USE_SYSTEM_NFD is not set, cmake force portals to ON, so passing arguments useless.
Maybe it can be just PORTAL flag in case of something else will use its in future.

@WerWolv
Copy link
Owner

WerWolv commented Jan 13, 2023

Added an option for it. You can now set IMHEX_USE_GTK_FILE_PICKER to ON at configuration time to make ImHex use the GTK file picker instead

Zapeth added a commit to Zapeth/void-packages that referenced this issue Jul 15, 2023
Some xdg-desktop-portal environments dont support a file picker (eg wlroots based ones), so use gtk file picker by default.

See also WerWolv/ImHex#882 (comment)
Zapeth added a commit to Zapeth/void-packages that referenced this issue Jul 15, 2023
Some xdg-desktop-portal environments dont support a file picker (eg wlroots based ones), so use gtk file picker by default.

See also WerWolv/ImHex#882 (comment)
Zapeth added a commit to Zapeth/void-packages that referenced this issue Jul 15, 2023
Some xdg-desktop-portal environments dont support a file picker (eg wlroots based ones), so use gtk file picker by default.

See also WerWolv/ImHex#882 (comment)
Zapeth added a commit to Zapeth/void-packages that referenced this issue Jul 15, 2023
Some xdg-desktop-portal environments dont support a file picker (eg wlroots based ones), so use gtk file picker by default.

See also WerWolv/ImHex#882 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants