From af6e0ee2b38e08dffadfee64c4731ae510df6bf7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 2 May 2020 03:05:19 -0400 Subject: Use gtk_button_set_child throughout Replace all uses of gtk_container_add on buttons by gtk_button_set_child. --- gtk/gtkwindowcontrols.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gtk/gtkwindowcontrols.c') diff --git a/gtk/gtkwindowcontrols.c b/gtk/gtkwindowcontrols.c index 797a24cff3..8d6fce978f 100644 --- a/gtk/gtkwindowcontrols.c +++ b/gtk/gtkwindowcontrols.c @@ -301,7 +301,7 @@ update_window_buttons (GtkWindowControls *self) gtk_widget_add_css_class (button, "minimize"); image = gtk_image_new_from_icon_name ("window-minimize-symbolic"); g_object_set (image, "use-fallback", TRUE, NULL); - gtk_container_add (GTK_CONTAINER (button), image); + gtk_button_set_child (GTK_BUTTON (button), image); gtk_widget_set_can_focus (button, FALSE); gtk_actionable_set_action_name (GTK_ACTIONABLE (button), "window.minimize"); @@ -322,7 +322,7 @@ update_window_buttons (GtkWindowControls *self) gtk_widget_add_css_class (button, "maximize"); image = gtk_image_new_from_icon_name (icon_name); g_object_set (image, "use-fallback", TRUE, NULL); - gtk_container_add (GTK_CONTAINER (button), image); + gtk_button_set_child (GTK_BUTTON (button), image); gtk_widget_set_can_focus (button, FALSE); gtk_actionable_set_action_name (GTK_ACTIONABLE (button), "window.toggle-maximized"); @@ -339,7 +339,7 @@ update_window_buttons (GtkWindowControls *self) image = gtk_image_new_from_icon_name ("window-close-symbolic"); gtk_widget_add_css_class (button, "close"); g_object_set (image, "use-fallback", TRUE, NULL); - gtk_container_add (GTK_CONTAINER (button), image); + gtk_button_set_child (GTK_BUTTON (button), image); gtk_widget_set_can_focus (button, FALSE); gtk_actionable_set_action_name (GTK_ACTIONABLE (button), "window.close"); -- cgit v1.2.1