Change recommended replacement for gtk_show_uri()
authorMichael Catanzaro <mcatanzaro@redhat.com>
Tue, 13 Jun 2023 18:00:15 +0000 (13:00 -0500)
committerMichael Catanzaro <mcatanzaro@redhat.com>
Tue, 13 Jun 2023 18:03:04 +0000 (13:03 -0500)
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.

gtk/deprecated/gtkshow.h

index a174808ce90cb3cb5ce8c04dc01927eb061665b0..6aa6321d90cf193cb517514d39b513634cd5129c 100644 (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);