Deprecate gtk_widget_show/hide

gtk_widget_set_visible does the same job.
This commit is contained in:
Matthias Clasen 2022-11-27 21:16:42 -05:00
parent 18e0eaa9d6
commit eec8cf1309
2 changed files with 6 additions and 2 deletions

View File

@ -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)

View File

@ -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);