Open Bug 1694445 Opened 2 years ago Updated 10 months ago

Use GtkFileChooserNative for open/save dialogs

Categories

(Core :: Widget: Gtk, enhancement)

enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: ndrzj1gbo, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0

Steps to reproduce:

https://github.com/electron/electron/pull/19159
https://bugs.webkit.org/show_bug.cgi?id=169278
https://bugzilla.mozilla.org/show_bug.cgi?id=1490186

Actual results:

Firefox uses GTK open/save dialogues.

Expected results:

Firefox uses Plasma/QT open/save dialogues.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

I think we have code for this if you run firefox with GTK_USE_PORTAL=1 in the environment.

Ah, you might need widget.use-xdg-desktop-portal=true in about:config too, looking at the source (or using Wayland)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)

I think we have code for this if you run firefox with GTK_USE_PORTAL=1 in the environment.

Yes, i know about this option, but i want firefox to use kde file picker by default.

I don't know what's blocking that, probably Martin or Jan know?

Jan, any idea?

Flags: needinfo?(jhorak)

With GTK_USE_PORTAL=1 you won't get the same experience, for example download Save/Open dialog does use the "System handler" instead of list of applications which can be used to open the file for download. The 'localhost' location will have some problems too:
https://bugzilla.mozilla.org/show_bug.cgi?id=1669282

Also the print dialog is the portal one, lesser configuration options available.

In general I cannot recommend using it unless you really have to (ie. in the flatpak environment).

Flags: needinfo?(jhorak)

Can firefox just have native file dialogues without this portal stuff?

Chrome for example have native KDE dialogues through kdialog for many years https://bugs.chromium.org/p/chromium/issues/detail?id=40060

No, Firefox is based on GTK in Linux, so it uses GTK dialogs to all the stuff. There's no QT port at this moment AFAIK. The native dialogs slowly goes away (see the preferences or new print dialog in Nightly for example). I don't know if the same is planned for the file dialog (I doubt it)

So, GtkFileChooserNative will not be used for file dialogues by default (or as an option) like in earlier versions of firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1490186 ?

We're open to accept any patch which will work fine. Looking at kdialog as potential problem I see that it's not possible to make it a modal dialog. You need to make sure the not working modality does not harm the saving pages or other stuff.

Version: Firefox 85 → unspecified

Well for me the file picker works even without the env. variable exported. There is this issue that the first time i try to open the file chooser dialog it takes about 4-5 seconds to do so, but next times open instantaneously.

You need to log in before you can comment on or make changes to this bug.