From: Matthias Clasen Date: Sat, 14 Jan 2023 19:00:56 +0000 (-0500) Subject: docs: Update deprecations for gtk_show_uri X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~8^2~62^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bf4b40f17e20dfc40dbb9045e265f29de6c20bdc;p=gtk4.git docs: Update deprecations for gtk_show_uri We have a better replacement now. --- diff --git a/docs/reference/gtk/migrating-4to5.md b/docs/reference/gtk/migrating-4to5.md index a6bf2262d8..04a8b19c5f 100644 --- a/docs/reference/gtk/migrating-4to5.md +++ b/docs/reference/gtk/migrating-4to5.md @@ -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. diff --git a/gtk/deprecated/gtkshow.c b/gtk/deprecated/gtkshow.c index ff57a27550..cd37905cf0 100644 --- a/gtk/deprecated/gtkshow.c +++ b/gtk/deprecated/gtkshow.c @@ -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,