summaryrefslogtreecommitdiff
path: root/gtk/gtkwindowcontrols.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-05-02 03:05:19 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-05-04 22:53:07 -0400
commitaf6e0ee2b38e08dffadfee64c4731ae510df6bf7 (patch)
tree55d6029c4bcef285bbfddb637e2e7be068bf6b54 /gtk/gtkwindowcontrols.c
parent04e4a02cd01106ffbe620ea582c47b1adaec2bee (diff)
downloadgtk+-af6e0ee2b38e08dffadfee64c4731ae510df6bf7.tar.gz
Use gtk_button_set_child throughout
Replace all uses of gtk_container_add on buttons by gtk_button_set_child.
Diffstat (limited to 'gtk/gtkwindowcontrols.c')
-rw-r--r--gtk/gtkwindowcontrols.c6
1 files changed, 3 insertions, 3 deletions
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");