summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2018-12-26 08:20:34 +0100
committerMatthias Clasen <mclasen@redhat.com>2019-01-23 19:30:46 -0500
commitbd71e744d2e5dbd853f0c719dd3ebe6abb2f72b6 (patch)
tree6478bd038c42a535caacf65f948892a9d0dfe5e9 /gtk
parent09361e76659bd1951a222cd64537abacc6a6f44a (diff)
downloadgtk+-bd71e744d2e5dbd853f0c719dd3ebe6abb2f72b6.tar.gz
Stop using gtk_box_pack_end
It might soon go away!
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkactionbar.c6
-rw-r--r--gtk/gtkappchooserdialog.c6
-rw-r--r--gtk/gtkassistant.c8
-rw-r--r--gtk/gtkbbox.c8
-rw-r--r--gtk/gtkcolorchooserwidget.c10
-rw-r--r--gtk/gtkcontainer.c10
-rw-r--r--gtk/gtkcustompaperunixdialog.c24
-rw-r--r--gtk/gtkemojicompletion.c4
-rw-r--r--gtk/gtkentrycompletion.c2
-rw-r--r--gtk/gtkfilechooserwidget.c10
-rw-r--r--gtk/gtkheaderbar.c12
-rw-r--r--gtk/gtkinfobar.c3
-rw-r--r--gtk/gtkmenusectionbox.c16
-rw-r--r--gtk/gtkmenutoolbutton.c4
-rw-r--r--gtk/gtkmountoperation.c28
-rw-r--r--gtk/gtkpathbar.c4
-rw-r--r--gtk/gtkprintbackend.c16
-rw-r--r--gtk/gtkprinteroptionwidget.c18
-rw-r--r--gtk/gtkprintunixdialog.c14
-rw-r--r--gtk/gtkradiobutton.c4
-rw-r--r--gtk/gtktoolbutton.c14
-rw-r--r--gtk/gtktreeviewcolumn.c8
-rw-r--r--gtk/inspector/general.c8
-rw-r--r--gtk/inspector/prop-editor.c7
-rw-r--r--gtk/inspector/recorder.c8
-rw-r--r--gtk/inspector/size-groups.c4
-rw-r--r--gtk/inspector/strv-editor.c10
27 files changed, 133 insertions, 133 deletions
diff --git a/gtk/gtkactionbar.c b/gtk/gtkactionbar.c
index edf1b49ada..039e22ddd0 100644
--- a/gtk/gtkactionbar.c
+++ b/gtk/gtkactionbar.c
@@ -210,7 +210,8 @@ gtk_action_bar_set_child_property (GtkContainer *container,
{
g_object_ref (child);
gtk_container_remove (GTK_CONTAINER (priv->start_box), child);
- gtk_box_pack_end (GTK_BOX (priv->end_box), child);
+ gtk_container_add (GTK_CONTAINER (priv->end_box), child);
+ gtk_box_reorder_child (GTK_BOX (priv->end_box), child, 0);
g_object_unref (child);
}
}
@@ -478,7 +479,8 @@ gtk_action_bar_pack_end (GtkActionBar *action_bar,
{
GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (action_bar);
- gtk_box_pack_end (GTK_BOX (priv->end_box), child);
+ gtk_container_add (GTK_CONTAINER (priv->end_box), child);
+ gtk_box_reorder_child (GTK_BOX (priv->end_box), child, 0);
}
/**
diff --git a/gtk/gtkappchooserdialog.c b/gtk/gtkappchooserdialog.c
index 5abf961fec..ab382e9d02 100644
--- a/gtk/gtkappchooserdialog.c
+++ b/gtk/gtkappchooserdialog.c
@@ -338,7 +338,7 @@ construct_appchooser_widget (GtkAppChooserDialog *self)
/* Need to build the appchooser widget after, because of the content-type construct-only property */
self->priv->app_chooser_widget = gtk_app_chooser_widget_new (self->priv->content_type);
gtk_widget_set_vexpand (self->priv->app_chooser_widget, TRUE);
- gtk_box_pack_start (GTK_BOX (self->priv->inner_box), self->priv->app_chooser_widget);
+ gtk_container_add (GTK_CONTAINER (self->priv->inner_box), self->priv->app_chooser_widget);
g_signal_connect (self->priv->app_chooser_widget, "application-selected",
@@ -351,10 +351,10 @@ construct_appchooser_widget (GtkAppChooserDialog *self)
G_CALLBACK (widget_populate_popup_cb), self);
/* Add the custom button to the new appchooser */
- gtk_box_pack_start (GTK_BOX (self->priv->inner_box),
+ gtk_container_add (GTK_CONTAINER (self->priv->inner_box),
self->priv->show_more_button);
- gtk_box_pack_start (GTK_BOX (self->priv->inner_box),
+ gtk_container_add (GTK_CONTAINER (self->priv->inner_box),
self->priv->software_button);
info = gtk_app_chooser_get_app_info (GTK_APP_CHOOSER (self->priv->app_chooser_widget));
diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c
index 91c0e2d9c5..39b0a6ccbd 100644
--- a/gtk/gtkassistant.c
+++ b/gtk/gtkassistant.c
@@ -1686,14 +1686,14 @@ gtk_assistant_insert_page (GtkAssistant *assistant,
priv->pages = g_list_insert (priv->pages, page_info, position);
- gtk_box_pack_start (GTK_BOX (priv->sidebar), page_info->regular_title);
- gtk_box_pack_start (GTK_BOX (priv->sidebar), page_info->current_title);
+ gtk_container_add (GTK_CONTAINER (priv->sidebar), page_info->regular_title);
+ gtk_container_add (GTK_CONTAINER (priv->sidebar), page_info->current_title);
gtk_box_reorder_child (GTK_BOX (priv->sidebar), page_info->regular_title, 2 * position);
gtk_box_reorder_child (GTK_BOX (priv->sidebar), page_info->current_title, 2 * position + 1);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_show (box);
- gtk_box_pack_start (GTK_BOX (box), page);
+ gtk_container_add (GTK_CONTAINER (box), page);
g_object_set (box, "margin", 12, NULL);
g_signal_connect (box, "remove", G_CALLBACK (assistant_remove_page_cb), assistant);
@@ -1792,7 +1792,7 @@ add_to_action_area (GtkAssistant *assistant,
gtk_widget_set_valign (child, GTK_ALIGN_BASELINE);
- gtk_box_pack_end (GTK_BOX (priv->action_area), child);
+ gtk_container_add (GTK_CONTAINER (priv->action_area), child);
}
/**
diff --git a/gtk/gtkbbox.c b/gtk/gtkbbox.c
index 4addf8ae5a..fb3400675c 100644
--- a/gtk/gtkbbox.c
+++ b/gtk/gtkbbox.c
@@ -119,13 +119,6 @@ static void gtk_button_box_get_child_property (GtkContainer *container,
G_DEFINE_TYPE_WITH_PRIVATE (GtkButtonBox, gtk_button_box, GTK_TYPE_BOX)
static void
-gtk_button_box_add (GtkContainer *container,
- GtkWidget *widget)
-{
- gtk_box_pack_start (GTK_BOX (container), widget);
-}
-
-static void
gtk_button_box_class_init (GtkButtonBoxClass *class)
{
GtkWidgetClass *widget_class;
@@ -143,7 +136,6 @@ gtk_button_box_class_init (GtkButtonBoxClass *class)
widget_class->size_allocate = gtk_button_box_size_allocate;
container_class->remove = gtk_button_box_remove;
- container_class->add = gtk_button_box_add;
container_class->set_child_property = gtk_button_box_set_child_property;
container_class->get_child_property = gtk_button_box_get_child_property;
diff --git a/gtk/gtkcolorchooserwidget.c b/gtk/gtkcolorchooserwidget.c
index f3216d5b8e..2afc0187cd 100644
--- a/gtk/gtkcolorchooserwidget.c
+++ b/gtk/gtkcolorchooserwidget.c
@@ -531,14 +531,14 @@ gtk_color_chooser_widget_init (GtkColorChooserWidget *cc)
add_default_palette (cc);
- cc->priv->custom = box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
- g_object_set (box, "margin-top", 12, NULL);
- gtk_box_pack_end (GTK_BOX (cc->priv->palette), box);
-
/* translators: label for the custom section in the color chooser */
cc->priv->custom_label = label = gtk_label_new (_("Custom"));
gtk_widget_set_halign (label, GTK_ALIGN_START);
- gtk_box_pack_end (GTK_BOX (cc->priv->palette), label);
+ gtk_container_add (GTK_CONTAINER (cc->priv->palette), label);
+
+ cc->priv->custom = box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
+ g_object_set (box, "margin-top", 12, NULL);
+ gtk_container_add (GTK_CONTAINER (cc->priv->palette), box);
cc->priv->button = button = gtk_color_swatch_new ();
gtk_widget_set_name (button, "add-color-button");
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 20f75f4ca7..d4a3b9b589 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -1286,12 +1286,12 @@ gtk_container_destroy (GtkWidget *widget)
*
* Adds @widget to @container. Typically used for simple containers
* such as #GtkWindow, #GtkFrame, or #GtkButton; for more complicated
- * layout containers such as #GtkBox or #GtkGrid, this function will
+ * layout containers such #GtkGrid, this function will
* pick default packing parameters that may not be correct. So
- * consider functions such as gtk_box_pack_start() and
- * gtk_grid_attach() as an alternative to gtk_container_add() in
- * those cases. A widget may be added to only one container at a time;
- * you can’t place the same widget inside two different containers.
+ * consider functions such as gtk_grid_attach() as an alternative
+ * to gtk_container_add() in those cases. A widget may be added to
+ * only one container at a time; you can’t place the same widget
+ * inside two different containers.
*
* Note that some containers, such as #GtkScrolledWindow or #GtkListBox,
* may add intermediate children between the added widget and the
diff --git a/gtk/gtkcustompaperunixdialog.c b/gtk/gtkcustompaperunixdialog.c
index 5ee93e255e..a2d4cf6469 100644
--- a/gtk/gtkcustompaperunixdialog.c
+++ b/gtk/gtkcustompaperunixdialog.c
@@ -553,7 +553,7 @@ new_unit_widget (GtkCustomPaperUnixDialog *dialog,
else
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (button), 1);
- gtk_box_pack_start (GTK_BOX (hbox), button);
+ gtk_container_add (GTK_CONTAINER (hbox), button);
gtk_widget_show (button);
data->spin_button = button;
@@ -567,7 +567,7 @@ new_unit_widget (GtkCustomPaperUnixDialog *dialog,
label = gtk_label_new (_("mm"));
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
- gtk_box_pack_start (GTK_BOX (hbox), label);
+ gtk_container_add (GTK_CONTAINER (hbox), label);
gtk_widget_show (label);
gtk_label_set_mnemonic_widget (GTK_LABEL (mnemonic_label), button);
@@ -977,13 +977,13 @@ wrap_in_frame (const gchar *label,
g_free (bold_text);
frame = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
- gtk_box_pack_start (GTK_BOX (frame), label_widget);
+ gtk_container_add (GTK_CONTAINER (frame), label_widget);
gtk_widget_set_margin_start (child, 12);
gtk_widget_set_halign (child, GTK_ALIGN_FILL);
gtk_widget_set_valign (child, GTK_ALIGN_FILL);
- gtk_box_pack_start (GTK_BOX (frame), child);
+ gtk_container_add (GTK_CONTAINER (frame), child);
gtk_widget_show (frame);
@@ -1034,11 +1034,11 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 18);
- gtk_box_pack_start (GTK_BOX (content_area), hbox);
+ gtk_container_add (GTK_CONTAINER (content_area), hbox);
gtk_widget_show (hbox);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
- gtk_box_pack_start (GTK_BOX (hbox), vbox);
+ gtk_container_add (GTK_CONTAINER (hbox), vbox);
gtk_widget_show (vbox);
scrolled = gtk_scrolled_window_new (NULL, NULL);
@@ -1046,7 +1046,7 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled),
GTK_SHADOW_IN);
- gtk_box_pack_start (GTK_BOX (vbox), scrolled);
+ gtk_container_add (GTK_CONTAINER (vbox), scrolled);
gtk_widget_show (scrolled);
treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (priv->custom_paper_list));
@@ -1076,7 +1076,7 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
context = gtk_widget_get_style_context (toolbar);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_INLINE_TOOLBAR);
- gtk_box_pack_start (GTK_BOX (vbox), toolbar);
+ gtk_container_add (GTK_CONTAINER (vbox), toolbar);
gtk_widget_show (toolbar);
icon = g_themed_icon_new_with_default_fallbacks ("list-add-symbolic");
@@ -1095,7 +1095,7 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
priv->values_box = vbox;
- gtk_box_pack_start (GTK_BOX (hbox), vbox);
+ gtk_container_add (GTK_CONTAINER (hbox), vbox);
gtk_widget_show (vbox);
grid = gtk_grid_new ();
@@ -1127,7 +1127,7 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
frame = wrap_in_frame (_("Paper Size"), grid);
gtk_widget_show (grid);
- gtk_box_pack_start (GTK_BOX (vbox), frame);
+ gtk_container_add (GTK_CONTAINER (vbox), frame);
gtk_widget_show (frame);
grid = gtk_grid_new ();
@@ -1200,7 +1200,7 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
NULL, NULL);
gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
- gtk_box_pack_start (GTK_BOX (hbox), combo);
+ gtk_container_add (GTK_CONTAINER (hbox), combo);
gtk_widget_show (combo);
g_signal_connect_swapped (combo, "changed",
@@ -1208,7 +1208,7 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
frame = wrap_in_frame (_("Paper Margins"), grid);
gtk_widget_show (grid);
- gtk_box_pack_start (GTK_BOX (vbox), frame);
+ gtk_container_add (GTK_CONTAINER (vbox), frame);
gtk_widget_show (frame);
update_custom_widgets_from_list (dialog);
diff --git a/gtk/gtkemojicompletion.c b/gtk/gtkemojicompletion.c
index 058e1867e2..b3c62278e8 100644
--- a/gtk/gtkemojicompletion.c
+++ b/gtk/gtkemojicompletion.c
@@ -514,13 +514,13 @@ add_emoji (GtkWidget *list,
gtk_widget_set_focus_on_click (child, FALSE);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (child), box);
- gtk_box_pack_start (GTK_BOX (box), label);
+ gtk_container_add (GTK_CONTAINER (box), label);
g_object_set_data (G_OBJECT (child), "base", label);
stack = gtk_stack_new ();
gtk_stack_set_homogeneous (GTK_STACK (stack), TRUE);
gtk_stack_set_transition_type (GTK_STACK (stack), GTK_STACK_TRANSITION_TYPE_OVER_RIGHT_LEFT);
- gtk_box_pack_start (GTK_BOX (box), stack);
+ gtk_container_add (GTK_CONTAINER (box), stack);
g_object_set_data (G_OBJECT (child), "stack", stack);
g_variant_get_child (emoji_data, 2, "&s", &shortname);
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index 0919deae78..d010d9e5f5 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -1219,7 +1219,7 @@ gtk_entry_completion_insert_action (GtkEntryCompletion *completion,
path, NULL, FALSE);
gtk_tree_path_free (path);
- gtk_box_pack_start (GTK_BOX (completion->priv->vbox),
+ gtk_container_add (GTK_CONTAINER (completion->priv->vbox),
completion->priv->action_view);
gtk_widget_show (completion->priv->action_view);
}
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 609e20e6aa..d7ccf53e1d 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -916,7 +916,7 @@ update_preview_widget_visibility (GtkFileChooserWidget *impl)
if (!priv->preview_label)
{
priv->preview_label = gtk_label_new (priv->preview_display_name);
- gtk_box_pack_start (GTK_BOX (priv->preview_box), priv->preview_label);
+ gtk_container_add (GTK_CONTAINER (priv->preview_box), priv->preview_label);
gtk_box_reorder_child (GTK_BOX (priv->preview_box), priv->preview_label, 0);
gtk_label_set_ellipsize (GTK_LABEL (priv->preview_label), PANGO_ELLIPSIZE_MIDDLE);
gtk_widget_show (priv->preview_label);
@@ -957,7 +957,7 @@ set_preview_widget (GtkFileChooserWidget *impl,
if (priv->preview_widget)
{
gtk_widget_show (priv->preview_widget);
- gtk_box_pack_start (GTK_BOX (priv->preview_box), priv->preview_widget);
+ gtk_container_add (GTK_CONTAINER (priv->preview_box), priv->preview_widget);
gtk_box_reorder_child (GTK_BOX (priv->preview_box),
priv->preview_widget,
(priv->use_preview_label && priv->preview_label) ? 1 : 0);
@@ -2587,7 +2587,7 @@ save_widgets_create (GtkFileChooserWidget *impl)
gtk_style_context_add_class (gtk_widget_get_style_context (vbox), "search-bar");
priv->save_widgets_table = gtk_grid_new ();
- gtk_box_pack_start (GTK_BOX (vbox), priv->save_widgets_table);
+ gtk_container_add (GTK_CONTAINER (vbox), priv->save_widgets_table);
gtk_grid_set_row_spacing (GTK_GRID (priv->save_widgets_table), 12);
gtk_grid_set_column_spacing (GTK_GRID (priv->save_widgets_table), 12);
@@ -2607,7 +2607,7 @@ save_widgets_create (GtkFileChooserWidget *impl)
gtk_label_set_mnemonic_widget (GTK_LABEL (widget), priv->location_entry);
priv->save_widgets = vbox;
- gtk_box_pack_start (GTK_BOX (priv->box), priv->save_widgets);
+ gtk_container_add (GTK_CONTAINER (priv->box), priv->save_widgets);
gtk_box_reorder_child (GTK_BOX (priv->box), priv->save_widgets, 0);
gtk_widget_show (priv->save_widgets);
}
@@ -2675,7 +2675,7 @@ location_switch_to_filename_entry (GtkFileChooserWidget *impl)
if (!priv->location_entry)
{
location_entry_create (impl);
- gtk_box_pack_start (GTK_BOX (priv->location_entry_box), priv->location_entry);
+ gtk_container_add (GTK_CONTAINER (priv->location_entry_box), priv->location_entry);
}
_gtk_file_chooser_entry_set_base_folder (GTK_FILE_CHOOSER_ENTRY (priv->location_entry), priv->current_folder);
diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c
index 257c8a697c..c86ea2757e 100644
--- a/gtk/gtkheaderbar.c
+++ b/gtk/gtkheaderbar.c
@@ -152,7 +152,7 @@ init_sizing_box (GtkHeaderBar *bar)
w = gtk_label_new (NULL);
context = gtk_widget_get_style_context (w);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_TITLE);
- gtk_box_pack_start (GTK_BOX (priv->label_sizing_box), w);
+ gtk_container_add (GTK_CONTAINER (priv->label_sizing_box), w);
gtk_label_set_line_wrap (GTK_LABEL (w), FALSE);
gtk_label_set_single_line_mode (GTK_LABEL (w), TRUE);
gtk_label_set_ellipsize (GTK_LABEL (w), PANGO_ELLIPSIZE_END);
@@ -161,7 +161,7 @@ init_sizing_box (GtkHeaderBar *bar)
w = gtk_label_new (NULL);
context = gtk_widget_get_style_context (w);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SUBTITLE);
- gtk_box_pack_start (GTK_BOX (priv->label_sizing_box), w);
+ gtk_container_add (GTK_CONTAINER (priv->label_sizing_box), w);
gtk_label_set_line_wrap (GTK_LABEL (w), FALSE);
gtk_label_set_single_line_mode (GTK_LABEL (w), TRUE);
gtk_label_set_ellipsize (GTK_LABEL (w), PANGO_ELLIPSIZE_END);
@@ -189,7 +189,7 @@ create_title_box (const char *title,
gtk_label_set_line_wrap (GTK_LABEL (title_label), FALSE);
gtk_label_set_single_line_mode (GTK_LABEL (title_label), TRUE);
gtk_label_set_ellipsize (GTK_LABEL (title_label), PANGO_ELLIPSIZE_END);
- gtk_box_pack_start (GTK_BOX (label_box), title_label);
+ gtk_container_add (GTK_CONTAINER (label_box), title_label);
gtk_label_set_width_chars (GTK_LABEL (title_label), MIN_TITLE_CHARS);
subtitle_label = gtk_label_new (subtitle);
@@ -198,7 +198,7 @@ create_title_box (const char *title,
gtk_label_set_line_wrap (GTK_LABEL (subtitle_label), FALSE);
gtk_label_set_single_line_mode (GTK_LABEL (subtitle_label), TRUE);
gtk_label_set_ellipsize (GTK_LABEL (subtitle_label), PANGO_ELLIPSIZE_END);
- gtk_box_pack_start (GTK_BOX (label_box), subtitle_label);
+ gtk_container_add (GTK_CONTAINER (label_box), subtitle_label);
gtk_widget_set_visible (subtitle_label, subtitle && subtitle[0]);
if (ret_title_label)
@@ -453,7 +453,7 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
if (button)
{
- gtk_box_pack_start (GTK_BOX (box), button);
+ gtk_container_add (GTK_CONTAINER (box), button);
n_children ++;
}
}
@@ -468,7 +468,7 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
continue;
}
- gtk_box_pack_start (GTK_BOX (box), separator);
+ gtk_container_add (GTK_CONTAINER (box), separator);
if (i == 1)
gtk_box_reorder_child (GTK_BOX (box), separator, 0);
diff --git a/gtk/gtkinfobar.c b/gtk/gtkinfobar.c
index 5f3f0e99c3..faf1e6af4d 100644
--- a/gtk/gtkinfobar.c
+++ b/gtk/gtkinfobar.c
@@ -490,6 +490,7 @@ gtk_info_bar_add_action_widget (GtkInfoBar *info_bar,
ad = get_response_data (child, TRUE);
+ G_DEBUG_HERE();
ad->response_id = response_id;
if (GTK_IS_BUTTON (child))
@@ -508,7 +509,7 @@ gtk_info_bar_add_action_widget (GtkInfoBar *info_bar,
else
g_warning ("Only 'activatable' widgets can be packed into the action area of a GtkInfoBar");
- gtk_box_pack_end (GTK_BOX (priv->action_area), child);
+ gtk_container_add (GTK_CONTAINER (priv->action_area), child);
if (response_id == GTK_RESPONSE_HELP)
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (priv->action_area),
child, TRUE);
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
{
diff --git a/gtk/gtkmenutoolbutton.c b/gtk/gtkmenutoolbutton.c
index 097b4c1e98..48491e7663 100644
--- a/gtk/gtkmenutoolbutton.c
+++ b/gtk/gtkmenutoolbutton.c
@@ -140,7 +140,7 @@ gtk_menu_tool_button_construct_contents (GtkMenuToolButton *button)
g_object_ref (priv->arrow_button);
gtk_container_remove (GTK_CONTAINER (parent),
priv->arrow_button);
- gtk_box_pack_end (GTK_BOX (box), priv->arrow_button);
+ gtk_container_add (GTK_CONTAINER (box), priv->arrow_button);
g_object_unref (priv->arrow_button);
}
@@ -284,7 +284,7 @@ gtk_menu_tool_button_init (GtkMenuToolButton *button)
g_object_unref (real_button);
arrow_button = gtk_menu_button_new ();
- gtk_box_pack_end (GTK_BOX (box), arrow_button);
+ gtk_container_add (GTK_CONTAINER (box), arrow_button);
/* the arrow button is insentive until we set a menu */
gtk_widget_set_sensitive (arrow_button, FALSE);
diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c
index e03c565f24..9adca1b176 100644
--- a/gtk/gtkmountoperation.c
+++ b/gtk/gtkmountoperation.c
@@ -548,17 +548,17 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
/* Build contents */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
- gtk_box_pack_start (GTK_BOX (content_area), hbox);
+ gtk_container_add (GTK_CONTAINER (content_area), hbox);
icon = gtk_image_new_from_icon_name ("dialog-password");
gtk_image_set_icon_size (GTK_IMAGE (icon), GTK_ICON_SIZE_LARGE);
gtk_widget_set_halign (icon, GTK_ALIGN_CENTER);
gtk_widget_set_valign (icon, GTK_ALIGN_START);
- gtk_box_pack_start (GTK_BOX (hbox), icon);
+ gtk_container_add (GTK_CONTAINER (hbox), icon);
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
- gtk_box_pack_start (GTK_BOX (hbox), main_vbox);
+ gtk_container_add (GTK_CONTAINER (hbox), main_vbox);
secondary = strstr (message, "\n");
if (secondary != NULL)
@@ -574,7 +574,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET (label));
+ gtk_container_add (GTK_CONTAINER (main_vbox), GTK_WIDGET (label));
g_free (primary);
attrs = pango_attr_list_new ();
pango_attr_list_insert (attrs, pango_attr_weight_new (PANGO_WEIGHT_BOLD));
@@ -587,7 +587,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET (label));
+ gtk_container_add (GTK_CONTAINER (main_vbox), GTK_WIDGET (label));
}
grid = gtk_grid_new ();
@@ -595,7 +595,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
gtk_grid_set_row_spacing (GTK_GRID (grid), 12);
gtk_grid_set_column_spacing (GTK_GRID (grid), 12);
gtk_widget_set_margin_bottom (grid, 12);
- gtk_box_pack_start (GTK_BOX (main_vbox), grid);
+ gtk_container_add (GTK_CONTAINER (main_vbox), grid);
can_anonymous = priv->ask_flags & G_ASK_PASSWORD_ANONYMOUS_SUPPORTED;
@@ -618,7 +618,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
gtk_grid_attach (GTK_GRID (grid), anon_box, 1, rows++, 1, 1);
choice = gtk_radio_button_new_with_mnemonic (NULL, _("_Anonymous"));
- gtk_box_pack_start (GTK_BOX (anon_box),
+ gtk_container_add (GTK_CONTAINER (anon_box),
choice);
g_signal_connect (choice, "toggled",
G_CALLBACK (pw_dialog_anonymous_toggled), operation);
@@ -626,7 +626,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (choice));
choice = gtk_radio_button_new_with_mnemonic (group, _("Registered U_ser"));
- gtk_box_pack_start (GTK_BOX (anon_box),
+ gtk_container_add (GTK_CONTAINER (anon_box),
choice);
g_signal_connect (choice, "toggled",
G_CALLBACK (pw_dialog_anonymous_toggled), operation);
@@ -675,7 +675,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
GINT_TO_POINTER (G_PASSWORD_SAVE_NEVER));
g_signal_connect (choice, "toggled",
G_CALLBACK (remember_button_toggled), operation);
- gtk_box_pack_start (GTK_BOX (remember_box), choice);
+ gtk_container_add (GTK_CONTAINER (remember_box), choice);
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (choice));
choice = gtk_radio_button_new_with_mnemonic (group, _("Remember password until you _logout"));
@@ -685,7 +685,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
GINT_TO_POINTER (G_PASSWORD_SAVE_FOR_SESSION));
g_signal_connect (choice, "toggled",
G_CALLBACK (remember_button_toggled), operation);
- gtk_box_pack_start (GTK_BOX (remember_box), choice);
+ gtk_container_add (GTK_CONTAINER (remember_box), choice);
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (choice));
choice = gtk_radio_button_new_with_mnemonic (group, _("Remember _forever"));
@@ -695,7 +695,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
GINT_TO_POINTER (G_PASSWORD_SAVE_PERMANENTLY));
g_signal_connect (choice, "toggled",
G_CALLBACK (remember_button_toggled), operation);
- gtk_box_pack_start (GTK_BOX (remember_box), choice);
+ gtk_container_add (GTK_CONTAINER (remember_box), choice);
}
g_signal_connect (G_OBJECT (dialog), "response",
@@ -1403,7 +1403,7 @@ create_show_processes_dialog (GtkMountOperation *op,
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
- gtk_box_pack_start (GTK_BOX (content_area), vbox);
+ gtk_container_add (GTK_CONTAINER (content_area), vbox);
if (secondary != NULL)
s = g_strdup_printf ("<big><b>%s</b></big>\n\n%s", primary, secondary);
@@ -1414,7 +1414,7 @@ create_show_processes_dialog (GtkMountOperation *op,
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), s);
g_free (s);
- gtk_box_pack_start (GTK_BOX (vbox), label);
+ gtk_container_add (GTK_CONTAINER (vbox), label);
/* First count the items in the list then
* add the buttons in reverse order
@@ -1464,7 +1464,7 @@ create_show_processes_dialog (GtkMountOperation *op,
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_IN);
gtk_container_add (GTK_CONTAINER (scrolled_window), tree_view);
- gtk_box_pack_start (GTK_BOX (vbox), scrolled_window);
+ gtk_container_add (GTK_CONTAINER (vbox), scrolled_window);
g_signal_connect (tree_view, "popup-menu",
G_CALLBACK (on_popup_menu_for_process_tree_view),
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index e3e91a21a9..a9ff9a58a4 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -1362,8 +1362,8 @@ make_directory_button (GtkPathBar *path_bar,
button_data->image = gtk_image_new ();
button_data->label = gtk_label_new (NULL);
child = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
- gtk_box_pack_start (GTK_BOX (child), button_data->image);
- gtk_box_pack_start (GTK_BOX (child), button_data->label);
+ gtk_container_add (GTK_CONTAINER (child), button_data->image);
+ gtk_container_add (GTK_CONTAINER (child), button_data->label);
break;
case NORMAL_BUTTON:
default:
diff --git a/gtk/gtkprintbackend.c b/gtk/gtkprintbackend.c
index 3651d79996..1dd0284329 100644
--- a/gtk/gtkprintbackend.c
+++ b/gtk/gtkprintbackend.c
@@ -684,12 +684,12 @@ request_password (GtkPrintBackend *backend,
/* Packing */
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
- gtk_box_pack_start (GTK_BOX (content_area), main_box);
+ gtk_container_add (GTK_CONTAINER (content_area), main_box);
- gtk_box_pack_start (GTK_BOX (main_box), icon);
- gtk_box_pack_start (GTK_BOX (main_box), vbox);
+ gtk_container_add (GTK_CONTAINER (main_box), icon);
+ gtk_container_add (GTK_CONTAINER (main_box), vbox);
- gtk_box_pack_start (GTK_BOX (vbox), label);
+ gtk_container_add (GTK_CONTAINER (vbox), label);
/* Right - 2. */
for (i = 0; i < length; i++)
@@ -715,10 +715,10 @@ request_password (GtkPrintBackend *backend,
gtk_entry_set_visibility (GTK_ENTRY (entry), ai_visible[i]);
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
- gtk_box_pack_start (GTK_BOX (vbox), box);
+ gtk_container_add (GTK_CONTAINER (vbox), box);
- gtk_box_pack_start (GTK_BOX (box), label);
- gtk_box_pack_start (GTK_BOX (box), entry);
+ gtk_container_add (GTK_CONTAINER (box), label);
+ gtk_container_add (GTK_CONTAINER (box), entry);
g_signal_connect (entry, "changed",
G_CALLBACK (store_entry), &(priv->auth_info[i]));
@@ -731,7 +731,7 @@ request_password (GtkPrintBackend *backend,
gtk_widget_set_margin_top (chkbtn, 6);
gtk_widget_set_margin_bottom (chkbtn, 6);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (chkbtn), FALSE);
- gtk_box_pack_start (GTK_BOX (vbox), chkbtn);
+ gtk_container_add (GTK_CONTAINER (vbox), chkbtn);
g_signal_connect (chkbtn, "toggled",
G_CALLBACK (store_auth_info_toggled),
&(priv->store_auth_info));
diff --git a/gtk/gtkprinteroptionwidget.c b/gtk/gtkprinteroptionwidget.c
index 89c563a30f..a81168247b 100644
--- a/gtk/gtkprinteroptionwidget.c
+++ b/gtk/gtkprinteroptionwidget.c
@@ -745,7 +745,7 @@ alternative_append (GtkWidget *box,
button = gtk_radio_button_new_with_label (group, label);
gtk_widget_show (button);
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE);
- gtk_box_pack_start (GTK_BOX (box), button);
+ gtk_container_add (GTK_CONTAINER (box), button);
g_object_set_data (G_OBJECT (button), "value", (gpointer)value);
g_signal_connect (button, "toggled",
@@ -776,7 +776,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->combo), 0);
gtk_widget_set_sensitive (GTK_WIDGET (widget), FALSE);
gtk_widget_show (priv->combo);
- gtk_box_pack_start (GTK_BOX (widget), priv->combo);
+ gtk_container_add (GTK_CONTAINER (widget), priv->combo);
}
else switch (source->type)
{
@@ -784,7 +784,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
priv->check = gtk_check_button_new_with_mnemonic (source->display_text);
g_signal_connect (priv->check, "toggled", G_CALLBACK (check_toggled_cb), widget);
gtk_widget_show (priv->check);
- gtk_box_pack_start (GTK_BOX (widget), priv->check);
+ gtk_container_add (GTK_CONTAINER (widget), priv->check);
break;
case GTK_PRINTER_OPTION_TYPE_PICKONE:
case GTK_PRINTER_OPTION_TYPE_PICKONE_PASSWORD:
@@ -816,7 +816,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
source->choices_display[i],
source->choices[i]);
gtk_widget_show (priv->combo);
- gtk_box_pack_start (GTK_BOX (widget), priv->combo);
+ gtk_container_add (GTK_CONTAINER (widget), priv->combo);
g_signal_connect (priv->combo, "changed", G_CALLBACK (combo_changed_cb), widget);
text = g_strdup_printf ("%s:", source->display_text);
@@ -830,7 +830,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
priv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_widget_set_valign (priv->box, GTK_ALIGN_BASELINE);
gtk_widget_show (priv->box);
- gtk_box_pack_start (GTK_BOX (widget), priv->box);
+ gtk_container_add (GTK_CONTAINER (widget), priv->box);
for (i = 0; i < source->num_choices; i++)
{
group = alternative_append (priv->box,
@@ -858,7 +858,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
gtk_entry_set_activates_default (GTK_ENTRY (priv->entry),
gtk_printer_option_get_activates_default (source));
gtk_widget_show (priv->entry);
- gtk_box_pack_start (GTK_BOX (widget), priv->entry);
+ gtk_container_add (GTK_CONTAINER (widget), priv->entry);
g_signal_connect (priv->entry, "changed", G_CALLBACK (entry_changed_cb), widget);
text = g_strdup_printf ("%s:", source->display_text);
@@ -871,7 +871,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
case GTK_PRINTER_OPTION_TYPE_FILESAVE:
priv->button = gtk_button_new ();
gtk_widget_show (priv->button);
- gtk_box_pack_start (GTK_BOX (widget), priv->button);
+ gtk_container_add (GTK_CONTAINER (widget), priv->button);
g_signal_connect (priv->button, "clicked", G_CALLBACK (filesave_choose_cb), widget);
text = g_strdup_printf ("%s:", source->display_text);
@@ -884,7 +884,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
case GTK_PRINTER_OPTION_TYPE_INFO:
priv->info_label = gtk_label_new (NULL);
gtk_label_set_selectable (GTK_LABEL (priv->info_label), TRUE);
- gtk_box_pack_start (GTK_BOX (widget), priv->info_label);
+ gtk_container_add (GTK_CONTAINER (widget), priv->info_label);
text = g_strdup_printf ("%s:", source->display_text);
priv->label = gtk_label_new_with_mnemonic (text);
@@ -897,7 +897,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
}
priv->image = gtk_image_new_from_icon_name ("dialog-warning");
- gtk_box_pack_start (GTK_BOX (widget), priv->image);
+ gtk_container_add (GTK_CONTAINER (widget), priv->image);
}
/*
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index 6fcd208588..589fc4ebd4 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -1295,13 +1295,13 @@ wrap_in_frame (const gchar *label,
g_free (bold_text);
frame = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
- gtk_box_pack_start (GTK_BOX (frame), label_widget);
+ gtk_container_add (GTK_CONTAINER (frame), label_widget);
gtk_widget_set_margin_start (child, 12);
gtk_widget_set_halign (child, GTK_ALIGN_FILL);
gtk_widget_set_valign (child, GTK_ALIGN_FILL);
- gtk_box_pack_start (GTK_BOX (frame), child);
+ gtk_container_add (GTK_CONTAINER (frame), child);
gtk_widget_show (frame);
@@ -1346,14 +1346,14 @@ add_option_to_extension_point (GtkPrinterOption *option,
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_widget_set_valign (hbox, GTK_ALIGN_BASELINE);
- gtk_box_pack_start (GTK_BOX (hbox), label);
- gtk_box_pack_start (GTK_BOX (hbox), widget);
+ gtk_container_add (GTK_CONTAINER (hbox), label);
+ gtk_container_add (GTK_CONTAINER (hbox), widget);
gtk_widget_show (hbox);
- gtk_box_pack_start (GTK_BOX (extension_point), hbox);
+ gtk_container_add (GTK_CONTAINER (extension_point), hbox);
}
else
- gtk_box_pack_start (GTK_BOX (extension_point), widget);
+ gtk_container_add (GTK_CONTAINER (extension_point), widget);
}
static gint
@@ -1631,7 +1631,7 @@ update_dialog_from_settings (GtkPrintUnixDialog *dialog)
gtk_widget_show (table);
gtk_widget_show (frame);
- gtk_box_pack_start (GTK_BOX (priv->advanced_vbox),
+ gtk_container_add (GTK_CONTAINER (priv->advanced_vbox),
frame);
}
}
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c
index fa40d83f76..e87c0d7d49 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -113,8 +113,8 @@
* "I’m the second radio button.");
*
* // Pack them into a box, then show all the widgets
- * gtk_box_pack_start (GTK_BOX (box), radio1);
- * gtk_box_pack_start (GTK_BOX (box), radio2);
+ * gtk_container_add (GTK_CONTAINER (box), radio1);
+ * gtk_container_add (GTK_CONTAINER (box), radio2);
* gtk_container_add (GTK_CONTAINER (window), box);
* gtk_widget_show (window);
* return;
diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c
index 6232043f10..dca1aa288d 100644
--- a/gtk/gtktoolbutton.c
+++ b/gtk/gtktoolbutton.c
@@ -503,9 +503,11 @@ gtk_tool_button_construct_contents (GtkToolItem *tool_item)
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
else
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL,0);
+
if (icon)
- gtk_box_pack_start (GTK_BOX (box), icon);
- gtk_box_pack_end (GTK_BOX (box), label);
+ gtk_container_add (GTK_CONTAINER (box), icon);
+
+ gtk_container_add (GTK_CONTAINER (box), label);
gtk_container_add (GTK_CONTAINER (button->priv->button), box);
gtk_style_context_add_class (gtk_widget_get_style_context (button->priv->button), "image-button");
gtk_style_context_add_class (gtk_widget_get_style_context (button->priv->button), "text-button");
@@ -517,24 +519,24 @@ gtk_tool_button_construct_contents (GtkToolItem *tool_item)
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
if (icon)
{
- gtk_box_pack_start (GTK_BOX (box), icon);
+ gtk_container_add (GTK_CONTAINER (box), icon);
if (!label)
gtk_widget_set_hexpand (icon, TRUE);
}
if (label)
- gtk_box_pack_end (GTK_BOX (box), label);
+ gtk_container_add (GTK_CONTAINER (box), label);
}
else
{
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
if (icon)
{
- gtk_box_pack_end (GTK_BOX (box), icon);
+ gtk_container_add (GTK_CONTAINER (box), icon);
if (!label)
gtk_widget_set_vexpand (icon, TRUE);
}
if (label)
- gtk_box_pack_start (GTK_BOX (box), label);
+ gtk_container_add (GTK_CONTAINER (box), label);
}
gtk_container_add (GTK_CONTAINER (button->priv->button), box);
gtk_style_context_add_class (gtk_widget_get_style_context (button->priv->button), "image-button");
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index 0d7a3140a1..338d691d38 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -859,13 +859,13 @@ gtk_tree_view_column_create_button (GtkTreeViewColumn *tree_column)
if (priv->xalign <= 0.5)
{
- gtk_box_pack_start (GTK_BOX (hbox), priv->frame);
- gtk_box_pack_start (GTK_BOX (hbox), priv->arrow);
+ gtk_container_add (GTK_CONTAINER (hbox), priv->frame);
+ gtk_container_add (GTK_CONTAINER (hbox), priv->arrow);
}
else
{
- gtk_box_pack_start (GTK_BOX (hbox), priv->arrow);
- gtk_box_pack_start (GTK_BOX (hbox), priv->frame);
+ gtk_container_add (GTK_CONTAINER (hbox), priv->arrow);
+ gtk_container_add (GTK_CONTAINER (hbox), priv->frame);
}
gtk_container_add (GTK_CONTAINER (priv->frame), child);
diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c
index bf297d9b53..d4d7857455 100644
--- a/gtk/inspector/general.c
+++ b/gtk/inspector/general.c
@@ -168,13 +168,13 @@ add_check_row (GtkInspectorGeneral *gen,
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_widget_set_hexpand (label, TRUE);
- gtk_box_pack_start (GTK_BOX (box), label);
+ gtk_container_add (GTK_CONTAINER (box), label);
check = gtk_image_new_from_icon_name ("object-select-symbolic");
gtk_widget_set_halign (check, GTK_ALIGN_END);
gtk_widget_set_valign (check, GTK_ALIGN_BASELINE);
gtk_widget_set_opacity (check, value ? 1.0 : 0.0);
- gtk_box_pack_start (GTK_BOX (box), check);
+ gtk_container_add (GTK_CONTAINER (box), check);
row = gtk_list_box_row_new ();
gtk_container_add (GTK_CONTAINER (row), box);
@@ -208,14 +208,14 @@ add_label_row (GtkInspectorGeneral *gen,
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_widget_set_hexpand (label, TRUE);
- gtk_box_pack_start (GTK_BOX (box), label);
+ gtk_container_add (GTK_CONTAINER (box), label);
label = gtk_label_new (value);
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
gtk_widget_set_halign (label, GTK_ALIGN_END);
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
gtk_label_set_xalign (GTK_LABEL (label), 1.0);
- gtk_box_pack_start (GTK_BOX (box), label);
+ gtk_container_add (GTK_CONTAINER (box), label);
row = gtk_list_box_row_new ();
gtk_container_add (GTK_CONTAINER (row), box);
diff --git a/gtk/inspector/prop-editor.c b/gtk/inspector/prop-editor.c
index c963a8d276..8895db6818 100644
--- a/gtk/inspector/prop-editor.c
+++ b/gtk/inspector/prop-editor.c
@@ -938,7 +938,7 @@ property_editor (GObject *object,
first = b;
g_object_set_data (G_OBJECT (b), "index", GINT_TO_POINTER (j));
gtk_widget_show (b);
- gtk_box_pack_start (GTK_BOX (box), b);
+ gtk_container_add (GTK_CONTAINER (box), b);
connect_controller (G_OBJECT (b), "toggled",
object, spec, G_CALLBACK (enum_modified));
++j;
@@ -980,7 +980,7 @@ property_editor (GObject *object,
b = gtk_check_button_new_with_label (fclass->values[j].value_name);
g_object_set_data (G_OBJECT (b), "index", GINT_TO_POINTER (j));
gtk_widget_show (b);
- gtk_box_pack_start (GTK_BOX (box), b);
+ gtk_container_add (GTK_CONTAINER (box), b);
connect_controller (G_OBJECT (b), "toggled",
object, spec, G_CALLBACK (flags_modified));
}
@@ -1603,9 +1603,8 @@ add_gtk_settings_info (GtkInspectorPropEditor *editor)
g_signal_connect_swapped (button, "clicked", G_CALLBACK (reset_setting), editor);
gtk_widget_set_halign (button, GTK_ALIGN_END);
- gtk_widget_show (button);
gtk_widget_set_sensitive (button, FALSE);
- gtk_box_pack_end (GTK_BOX (row), button);
+ gtk_container_add (GTK_CONTAINER (row), button);
switch (_gtk_settings_get_setting_source (GTK_SETTINGS (object), name))
{
diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c
index aa7f2cd1d8..c9053f89c3 100644
--- a/gtk/inspector/recorder.c
+++ b/gtk/inspector/recorder.c
@@ -1065,7 +1065,7 @@ gtk_inspector_recorder_recordings_list_create_widget (gpointer item,
widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
- gtk_box_pack_start (GTK_BOX (widget), hbox);
+ gtk_container_add (GTK_CONTAINER (widget), hbox);
for (i = 0; i < g_list_model_get_n_items (priv->recordings); i++)
{
@@ -1106,17 +1106,17 @@ gtk_inspector_recorder_recordings_list_create_widget (gpointer item,
label = gtk_label_new (str);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
g_free (str);
- gtk_box_pack_start (GTK_BOX (hbox), label);
+ gtk_container_add (GTK_CONTAINER (hbox), label);
button = gtk_toggle_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
gtk_button_set_icon_name (GTK_BUTTON (button), "view-more-symbolic");
- gtk_box_pack_end (GTK_BOX (hbox), button);
+ gtk_container_add (GTK_CONTAINER (hbox), button);
label = gtk_label_new (gtk_inspector_render_recording_get_profiler_info (GTK_INSPECTOR_RENDER_RECORDING (recording)));
gtk_widget_hide (label);
- gtk_box_pack_end (GTK_BOX (widget), label);
+ gtk_container_add (GTK_CONTAINER (widget), label);
g_object_bind_property (button, "active", label, "visible", 0);
}
else
diff --git a/gtk/inspector/size-groups.c b/gtk/inspector/size-groups.c
index b039eeeb59..59ef51e7e6 100644
--- a/gtk/inspector/size-groups.c
+++ b/gtk/inspector/size-groups.c
@@ -236,7 +236,7 @@ add_size_group (GtkInspectorSizeGroups *sl,
g_object_set (label, "margin", 10, NULL);
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
- gtk_box_pack_start (GTK_BOX (box2), label);
+ gtk_container_add (GTK_CONTAINER (box2), label);
combo = gtk_combo_box_text_new ();
g_object_set (combo, "margin", 10, NULL);
@@ -249,7 +249,7 @@ add_size_group (GtkInspectorSizeGroups *sl,
g_object_bind_property (group, "mode",
combo, "active",
G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
- gtk_box_pack_start (GTK_BOX (box2), combo);
+ gtk_container_add (GTK_CONTAINER (box2), combo);
listbox = gtk_list_box_new ();
gtk_container_add (GTK_CONTAINER (box), listbox);
diff --git a/gtk/inspector/strv-editor.c b/gtk/inspector/strv-editor.c
index cc5fad6d35..071518d1ec 100644
--- a/gtk/inspector/strv-editor.c
+++ b/gtk/inspector/strv-editor.c
@@ -68,17 +68,17 @@ add_string (GtkInspectorStrvEditor *editor,
entry = gtk_entry_new ();
gtk_entry_set_text (GTK_ENTRY (entry), str);
gtk_widget_show (entry);
- gtk_box_pack_start (GTK_BOX (box), entry);
+ gtk_container_add (GTK_CONTAINER (box), entry);
g_object_set_data (G_OBJECT (box), "entry", entry);
g_signal_connect_swapped (entry, "notify::text", G_CALLBACK (emit_changed), editor);
button = gtk_button_new_from_icon_name ("user-trash-symbolic");
gtk_style_context_add_class (gtk_widget_get_style_context (button), "image-button");
gtk_widget_show (button);
- gtk_box_pack_start (GTK_BOX (box), button);
+ gtk_container_add (GTK_CONTAINER (box), button);
g_signal_connect (button, "clicked", G_CALLBACK (remove_string), editor);
- gtk_box_pack_start (GTK_BOX (editor->box), box);
+ gtk_container_add (GTK_CONTAINER (editor->box), box);
gtk_widget_grab_focus (entry);
@@ -107,8 +107,8 @@ gtk_inspector_strv_editor_init (GtkInspectorStrvEditor *editor)
gtk_widget_show (editor->button);
g_signal_connect (editor->button, "clicked", G_CALLBACK (add_cb), editor);
- gtk_box_pack_start (GTK_BOX (editor), editor->box);
- gtk_box_pack_start (GTK_BOX (editor), editor->button);
+ gtk_container_add (GTK_CONTAINER (editor), editor->box);
+ gtk_container_add (GTK_CONTAINER (editor), editor->button);
}
static void