docs: Update deprecations for gtk_show_uri
authorMatthias Clasen <mclasen@redhat.com>
Sat, 14 Jan 2023 19:00:56 +0000 (14:00 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 14 Jan 2023 22:39:28 +0000 (17:39 -0500)
We have a better replacement now.

docs/reference/gtk/migrating-4to5.md
gtk/deprecated/gtkshow.c

index a6bf2262d87d0dc93cad5a8bfa32d4f6b055fac0..04a8b19c5fe90a792307cba58f2ede1ed38a5be2 100644 (file)
@@ -105,3 +105,7 @@ retire it. If you need such a widget, it is relatively trivial to create one
 using a [class@Gtk.Revealer] with labels and buttons.
 
 Other libraries, such as libadwaita, may provide replacements as well.
+
+## gtk_show_uri is being replaced
+
+Instead of gtk_show_uri(), you should use GtkUriLauncher or GtkFileLauncher.
index ff57a27550934da16dbb1fe8cf21a35b879fd820..cd37905cf0f7eef697beeac5d85f9c5883ea52b2 100644 (file)
@@ -99,7 +99,8 @@ window_handle_exported (GtkWindow  *window,
  * This is the recommended call to be used as it passes information
  * necessary for sandbox helpers to parent their dialogs properly.
  *
- * Deprecated: 4.10: Use [method@Gtk.FileLauncher.launch] instead
+ * Deprecated: 4.10: Use [method@Gtk.FileLauncher.launch] or
+ *   [method@Gtk.UriLauncher.launch] instead
  */
 void
 gtk_show_uri_full (GtkWindow           *parent,
@@ -147,7 +148,8 @@ gtk_show_uri_full (GtkWindow           *parent,
  * Returns: %TRUE if the URI was shown successfully.
  *   Otherwise, %FALSE is returned and @error is set
  *
- * Deprecated: 4.10: Use [method@Gtk.FileLauncher.launch_finish] instead
+ * Deprecated: 4.10: Use [method@Gtk.FileLauncher.launch_finish] or
+ *   [method@Gtk.UriLauncher.launch_finish] instead
  */
 gboolean
 gtk_show_uri_full_finish (GtkWindow     *parent,
@@ -191,7 +193,8 @@ show_uri_done (GObject      *object,
  * This function launches the default application for showing
  * a given uri, or shows an error dialog if that fails.
  *
- * Deprecated: 4.10: Use [method@Gtk.FileLauncher.launch] instead
+ * Deprecated: 4.10: Use [method@Gtk.FileLauncher.launch] or
+ *   [method@Gtk.UriLauncher.launch] instead
  */
 void
 gtk_show_uri (GtkWindow  *parent,