From eec8cf1309667d64056ef72056b0e66b1b00d112 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 27 Nov 2022 21:16:42 -0500 Subject: [PATCH] Deprecate gtk_widget_show/hide gtk_widget_set_visible does the same job. --- gtk/gtkwidget.c | 4 ++++ gtk/gtkwidget.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 2c5974954d..667b0d107f 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -2660,6 +2660,8 @@ gtk_widget_pop_paintables (GtkWidget *widget) * When a toplevel container is shown, it is immediately realized and * mapped; other shown widgets are realized and mapped when their * toplevel container is realized and mapped. + * + * Deprecated: 4.10: Use [method@Gtk.Widget.set_visible] instead */ void gtk_widget_show (GtkWidget *widget) @@ -2726,6 +2728,8 @@ gtk_widget_real_show (GtkWidget *widget) * Reverses the effects of gtk_widget_show(). * * This is causing the widget to be hidden (invisible to the user). + * + * Deprecated: 4.10: Use [method@Gtk.Widget.set_visible] instead */ void gtk_widget_hide (GtkWidget *widget) diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index ffcab268c6..a7bade8db0 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -269,9 +269,9 @@ GDK_AVAILABLE_IN_ALL GType gtk_widget_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL void gtk_widget_unparent (GtkWidget *widget); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_4_10_FOR(gtk_widget_set_visible or gtk_window_present) void gtk_widget_show (GtkWidget *widget); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_4_10_FOR(gtk_widget_set_visible) void gtk_widget_hide (GtkWidget *widget); GDK_AVAILABLE_IN_ALL void gtk_widget_map (GtkWidget *widget);