filechooser: Improve "Open in File Manager"
authorMatthias Clasen <mclasen@redhat.com>
Wed, 19 Oct 2022 05:51:19 +0000 (01:51 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 19 Oct 2022 19:01:21 +0000 (15:01 -0400)
commit17819ad4f63f58537a7263c0cf95189059fed1e8
treee72b36e7bb00d52f1fa27902236f3a2ac5defae9
parent8a3f1a1fa1ba23e2d75400146360f5eaa45b97c7
filechooser: Improve "Open in File Manager"

Just relying on GAppInfo leads to suboptimal
results. Instead, call either the OpenURI portal
or the org.freedesktop.FileManager1 interface
directly, and only fall back to GAppInfo.

The wrapper code for the OpenURI portal is taken
from gio, with small adjustments.

Fixes: #5260
gtk/gopenuriportal.c [new file with mode: 0644]
gtk/gopenuriportal.h [new file with mode: 0644]
gtk/gtkfilechooserwidget.c
gtk/meson.build
gtk/org.freedesktop.portal.OpenURI.xml [new file with mode: 0644]