lutris / agora

Public discussion space for the community
11 stars 0 forks source link

Use native file chooser #87

Closed ObserverOfTime closed 1 year ago

ObserverOfTime commented 3 years ago

This is related to lutris/lutris#336 but the implementation should be much simpler.

GTK>=3.20 can use the native file chooser via Gtk.FileChooserNative. For example, on Linux with KDE and GTK_USE_PORTAL=1 this will use KDialog.

You can check the version and fall back to Gtk.FileChooserDialog on GTK<3.20.

soredake commented 3 years ago

https://github.com/lutris/lutris/issues/2924

soredake commented 1 year ago

Can i ask why is this closed? Lutris from flathub-beta is still using gtk file picker by default.

ObserverOfTime commented 1 year ago

I was going through my issues and noticed this was implemented in lutris/lutris@907f63704a164807afd7cbf7fa88e0ac0d7b0033.

Lutris from flathub-beta is still using gtk file picker by default.

It should use the native file chooser with GTK_USE_PORTAL=1.

soredake commented 1 year ago

I was going through my issues and noticed this was implemented in lutris/lutris@907f637.

But for some reason, it does not work for me with rpm and flathub version. Does it work for you?

It should use the native file chooser with GTK_USE_PORTAL=1.

Even with this env, it's still gtk picker.

ObserverOfTime commented 1 year ago

It works on Arch. Maybe your packages are outdated?

soredake commented 1 year ago

It works on Arch. Maybe your packages are outdated?

I've tested in opensuse with latest kde software.

ObserverOfTime commented 1 year ago

You might also need to install xdg-desktop-portal and/or xdg-desktop-portal-kde.

soredake commented 1 year ago

You might also need to install xdg-desktop-portal and/or xdg-desktop-portal-kde.

I have them installed, the -gtk one is installed too.