summaryrefslogtreecommitdiff
path: root/gtk/gtkmenusectionbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtkmenusectionbox.c')
-rw-r--r--gtk/gtkmenusectionbox.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gtk/gtkmenusectionbox.c b/gtk/gtkmenusectionbox.c
index 2e56e0157c..81aa08638d 100644
--- a/gtk/gtkmenusectionbox.c
+++ b/gtk/gtkmenusectionbox.c
@@ -134,7 +134,10 @@ gtk_menu_section_box_sync_separators (GtkMenuSectionBox *box,
return;
if (should_have_separator)
- gtk_box_pack_start (GTK_BOX (box), box->separator);
+ {
+ gtk_container_add (GTK_CONTAINER (box), box->separator);
+ gtk_box_reorder_child (GTK_BOX (box), box->separator, 0);
+ }
else
gtk_container_remove (GTK_CONTAINER (box), box->separator);
}
@@ -346,7 +349,7 @@ gtk_menu_section_box_init (GtkMenuSectionBox *box)
item_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
box->item_box = GTK_BOX (item_box);
- gtk_box_pack_end (GTK_BOX (box), item_box);
+ gtk_container_add (GTK_CONTAINER (box), item_box);
gtk_widget_set_halign (GTK_WIDGET (item_box), GTK_ALIGN_FILL);
gtk_widget_set_halign (GTK_WIDGET (box), GTK_ALIGN_FILL);
@@ -454,7 +457,8 @@ gtk_menu_section_box_new_submenu (GtkMenuTrackerItem *item,
g_object_set_data (G_OBJECT (button), "focus", focus);
g_object_set_data (G_OBJECT (focus), "focus", button);
- gtk_box_pack_start (GTK_BOX (box), button);
+ gtk_container_add (GTK_CONTAINER (box), button);
+ gtk_box_reorder_child (GTK_BOX (box), button, 0);
g_signal_connect (focus, "clicked", G_CALLBACK (open_submenu), item);
g_signal_connect (button, "clicked", G_CALLBACK (close_submenu), item);
@@ -515,17 +519,17 @@ gtk_menu_section_box_new_section (GtkMenuTrackerItem *item,
separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
gtk_widget_set_valign (separator, GTK_ALIGN_CENTER);
- gtk_box_pack_start (GTK_BOX (box->separator), separator);
+ gtk_container_add (GTK_CONTAINER (box->separator), separator);
title = gtk_label_new (label);
g_object_bind_property (item, "label", title, "label", G_BINDING_SYNC_CREATE);
gtk_style_context_add_class (gtk_widget_get_style_context (title), GTK_STYLE_CLASS_SEPARATOR);
gtk_widget_set_halign (title, GTK_ALIGN_START);
- gtk_box_pack_start (GTK_BOX (box->separator), title);
+ gtk_container_add (GTK_CONTAINER (box->separator), title);
separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
gtk_widget_set_valign (separator, GTK_ALIGN_CENTER);
- gtk_box_pack_start (GTK_BOX (box->separator), separator);
+ gtk_container_add (GTK_CONTAINER (box->separator), separator);
}
else
{