Deprecate gtk_show_uri

This API has been superseded by GtkFileLauncher.
This commit is contained in:
Matthias Clasen
2022-12-09 11:11:04 -05:00
parent 8ff3217712
commit 00bdad23b0
6 changed files with 15 additions and 7 deletions

View File

@@ -27,6 +27,8 @@
#include "gtkalertdialog.h"
#include <glib/gi18n-lib.h>
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
typedef struct {
GtkWindow *parent;
GAppLaunchContext *context;
@@ -96,6 +98,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
*/
void
gtk_show_uri_full (GtkWindow *parent,
@@ -142,6 +146,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
*/
gboolean
gtk_show_uri_full_finish (GtkWindow *parent,
@@ -184,6 +190,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
*/
void
gtk_show_uri (GtkWindow *parent,

View File

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

View File

@@ -32,6 +32,7 @@ gtk_deprecated_sources = [
'deprecated/gtkinfobar.c',
'deprecated/gtkliststore.c',
'deprecated/gtkrender.c',
'deprecated/gtkshow.c',
'deprecated/gtkstylecontext.c',
'deprecated/gtktreedatalist.c',
'deprecated/gtktreednd.c',
@@ -88,6 +89,7 @@ gtk_deprecated_headers = [
'deprecated/gtkliststore.h',
'deprecated/gtkmessagedialog.h',
'deprecated/gtkrender.h',
'deprecated/gtkshow.h',
'deprecated/gtkstylecontext.h',
'deprecated/gtktreednd.h',
'deprecated/gtktreemodel.h',

View File

@@ -238,7 +238,7 @@
#include <gtk/gtkshortcutsshortcut.h>
#include <gtk/gtkshortcutswindow.h>
#include <gtk/gtkshortcuttrigger.h>
#include <gtk/gtkshow.h>
#include <gtk/deprecated/gtkshow.h>
#include <gtk/gtksignallistitemfactory.h>
#include <gtk/gtksingleselection.h>
#include <gtk/gtkslicelistmodel.h>

View File

@@ -346,7 +346,6 @@ gtk_public_sources = files([
'gtkshortcutsshortcut.c',
'gtkshortcutswindow.c',
'gtkshortcuttrigger.c',
'gtkshow.c',
'gtksidebarrow.c',
'gtksignallistitemfactory.c',
'gtksingleselection.c',
@@ -580,7 +579,6 @@ gtk_public_headers = files([
'gtkshortcutsshortcut.h',
'gtkshortcutswindow.h',
'gtkshortcuttrigger.h',
'gtkshow.h',
'gtksignallistitemfactory.h',
'gtksingleselection.h',
'gtksizegroup.h',

View File

@@ -88,6 +88,7 @@ gtk/deprecated/gtkfontbutton.c
gtk/deprecated/gtkfontchooser.c
gtk/deprecated/gtkiconview.c
gtk/deprecated/gtkliststore.c
gtk/deprecated/gtkshow.c
gtk/deprecated/gtkstylecontext.c
gtk/deprecated/gtktreednd.c
gtk/deprecated/gtktreemodel.c
@@ -299,7 +300,6 @@ gtk/gtkshortcutssection.c
gtk/gtkshortcutsshortcut.c
gtk/gtkshortcutswindow.c
gtk/gtkshortcuttrigger.c
gtk/gtkshow.c
gtk/gtksidebarrow.c
gtk/gtksignallistitemfactory.c
gtk/gtksingleselection.c