linkbutton: Use GtkFileLauncher for file URI
authorEmmanuele Bassi <ebassi@gnome.org>
Thu, 16 Mar 2023 12:09:55 +0000 (12:09 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 21 Apr 2023 06:16:55 +0000 (08:16 +0200)
commit6a797f6b1a52a68eebd29521f9e020101774c86e
treef0ac9d20557f5eb3995e78860b6dac600fa2e12d
parent6b5baefd75a5ba72217bbf41ec7a147f021a8d50
linkbutton: Use GtkFileLauncher for file URI

The GtkUriLauncher calls into the openuri portal, which distinguishes
between files, directories, and URI. The GtkFileLauncher contains logic
to deal with this, because it can already handle the file and folder
differences.

If we have a file:// URI it's easier to create a GFile out of it, and
use the GtkFileLauncher API, while leaving the GtkUriLauncher API for
every other URI scheme.

Fixes: #5671
gtk/gtklinkbutton.c