Change recommended replacement for gtk_show_uri()

Problem is GtkFileLauncher is unable to handle all the types of URIs
that are supported by gtk_show_uri(), e.g. help: URIs. GtkUriLauncher
avoids this problem.

Another problem is that GtkUriLauncher is just generally a better choice
for launching URIs, since you don't have to create a GFile in order to
use it. Porting code is slightly simpler.

The documentation still mentions both GtkFileLauncher and GtkUriLauncher
as options, but most people will use whatever the compiler recommends
when it prints the deprecation warning.
This commit is contained in:
Michael Catanzaro 2023-06-13 13:00:15 -05:00
parent f381cdef5b
commit bef1c69254

View File

@ -28,7 +28,7 @@
G_BEGIN_DECLS
GDK_DEPRECATED_IN_4_10_FOR(gtk_file_launcher_launch)
GDK_DEPRECATED_IN_4_10_FOR(gtk_uri_launcher_launch)
void gtk_show_uri_full (GtkWindow *parent,
const char *uri,
guint32 timestamp,
@ -36,12 +36,12 @@ void gtk_show_uri_full (GtkWindow *parent,
GAsyncReadyCallback callback,
gpointer user_data);
GDK_DEPRECATED_IN_4_10_FOR(gtk_file_launcher_launch)
GDK_DEPRECATED_IN_4_10_FOR(gtk_uri_launcher_launch)
gboolean gtk_show_uri_full_finish (GtkWindow *parent,
GAsyncResult *result,
GError **error);
GDK_DEPRECATED_IN_4_10_FOR(gtk_file_launcher_launch)
GDK_DEPRECATED_IN_4_10_FOR(gtk_uri_launcher_launch)
void gtk_show_uri (GtkWindow *parent,
const char *uri,
guint32 timestamp);