Commit 79f0f563 authored by Michael Natterer's avatar Michael Natterer

Don't use gtk_container_add() for adding to GtkBoxes

because the packing options are different for GtkH/VBox and GtkBox
itself which is now instantiable. Instead, always use
gtk_box_pack_start() and specify expanding explicitely.
parent bdd1cea9
......@@ -482,8 +482,8 @@ gradient_editor_replicate_cmd_callback (GtkAction *action,
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
/* Instructions */
......@@ -585,8 +585,8 @@ gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
/* The main vbox */
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
/* Instructions */
......
......@@ -88,7 +88,8 @@ window_open_display_cmd_callback (GtkAction *action,
entry = gtk_entry_new ();
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
gtk_container_add (GTK_CONTAINER (GIMP_MESSAGE_DIALOG (dialog)->box), entry);
gtk_box_pack_start (GTK_BOX (GIMP_MESSAGE_DIALOG (dialog)->box), entry,
TRUE, TRUE, 0);
gtk_widget_grab_focus (entry);
gtk_widget_show_all (dialog);
......
......@@ -124,8 +124,8 @@ channel_options_dialog_new (GimpImage *image,
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (options->dialog))),
hbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (options->dialog))),
hbox, TRUE, TRUE, 0);
gtk_widget_show (hbox);
vbox = gtk_vbox_new (FALSE, 6);
......
......@@ -158,8 +158,8 @@ convert_dialog_new (GimpImage *image,
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
main_vbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
main_vbox, TRUE, TRUE, 0);
gtk_widget_show (main_vbox);
......
......@@ -140,8 +140,8 @@ fade_dialog_new (GimpImage *image,
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox, TRUE, TRUE, 0);
gtk_widget_show (main_vbox);
table = gtk_table_new (3, 3, FALSE);
......
......@@ -108,8 +108,8 @@ grid_dialog_new (GimpImage *image,
editor = gimp_grid_editor_new (grid, context, xres, yres);
gtk_container_set_border_width (GTK_CONTAINER (editor), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
editor);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
editor, TRUE, TRUE, 0);
gtk_widget_show (editor);
......
......@@ -85,8 +85,8 @@ image_merge_layers_dialog_new (GimpImage *image,
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
vbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
frame = gimp_int_radio_group_new (TRUE, _("Final, Merged Layer should be:"),
......
......@@ -76,7 +76,7 @@ input_devices_dialog_new (Gimp *gimp)
editor = gimp_device_editor_new (gimp);
gtk_container_set_border_width (GTK_CONTAINER (editor), 12);
gtk_container_add (GTK_CONTAINER (content_area), editor);
gtk_box_pack_start (GTK_BOX (content_area), editor, TRUE, TRUE, 0);
gtk_widget_show (editor);
return dialog;
......
......@@ -61,8 +61,8 @@ keyboard_shortcuts_dialog_new (Gimp *gimp)
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
editor = gimp_action_editor_new (gimp_ui_managers_from_name ("<Image>")->data,
......
......@@ -103,8 +103,8 @@ layer_add_mask_dialog_new (GimpLayer *layer,
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
vbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
frame =
......
......@@ -109,8 +109,8 @@ layer_options_dialog_new (GimpImage *image,
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (options->dialog))),
vbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (options->dialog))),
vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
table = gtk_table_new (layer ? 1 : 3, 2, FALSE);
......
......@@ -108,7 +108,7 @@ module_dialog_new (Gimp *gimp)
{
GtkWidget *shell;
GtkWidget *vbox;
GtkWidget *listbox;
GtkWidget *sw;
GtkWidget *view;
GtkWidget *image;
ModuleDialog *dialog;
......@@ -143,8 +143,8 @@ module_dialog_new (Gimp *gimp)
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (shell))),
vbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (shell))),
vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
dialog->hint = gimp_hint_box_new (_("You will have to restart GIMP "
......@@ -154,15 +154,15 @@ module_dialog_new (Gimp *gimp)
if (gimp->write_modulerc)
gtk_widget_show (dialog->hint);
listbox = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (listbox),
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
GTK_SHADOW_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (listbox),
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX (vbox), listbox, TRUE, TRUE, 0);
gtk_widget_set_size_request (listbox, 124, 100);
gtk_widget_show (listbox);
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
gtk_widget_set_size_request (sw, 124, 100);
gtk_widget_show (sw);
dialog->list = gtk_list_store_new (N_COLUMNS,
G_TYPE_STRING,
......@@ -193,7 +193,7 @@ module_dialog_new (Gimp *gimp)
"text", COLUMN_NAME,
NULL);
gtk_container_add (GTK_CONTAINER (listbox), view);
gtk_container_add (GTK_CONTAINER (sw), view);
gtk_widget_show (view);
dialog->table = gtk_table_new (2, N_INFOS, FALSE);
......
......@@ -144,8 +144,8 @@ offset_dialog_new (GimpDrawable *drawable,
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
main_vbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
main_vbox, TRUE, TRUE, 0);
gtk_widget_show (main_vbox);
/* The offset frame */
......
......@@ -189,8 +189,8 @@ palette_import_dialog_new (GimpContext *context)
main_hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_hbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
main_hbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
main_hbox, TRUE, TRUE, 0);
gtk_widget_show (main_hbox);
vbox = gtk_vbox_new (FALSE, 12);
......
......@@ -1415,8 +1415,8 @@ prefs_dialog_new (Gimp *gimp,
/* The main hbox */
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
hbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
hbox, TRUE, TRUE, 0);
gtk_widget_show (hbox);
/* The categories tree */
......@@ -2041,8 +2041,7 @@ prefs_dialog_new (Gimp *gimp,
gimp_get_user_context (gimp),
core_config->default_image->xresolution,
core_config->default_image->yresolution);
gtk_container_add (GTK_CONTAINER (vbox), editor);
gtk_box_pack_start (GTK_BOX (vbox), editor, TRUE, TRUE, 0);
gtk_widget_show (editor);
......@@ -2786,7 +2785,7 @@ prefs_dialog_new (Gimp *gimp,
paths[i].path_property_name,
paths[i].writable_property_name,
gettext (paths[i].fs_label));
gtk_container_add (GTK_CONTAINER (vbox), editor);
gtk_box_pack_start (GTK_BOX (vbox), editor, TRUE, TRUE, 0);
gtk_widget_show (editor);
}
}
......
......@@ -184,8 +184,8 @@ resize_dialog_new (GimpViewable *viewable,
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox, TRUE, TRUE, 0);
gtk_widget_show (main_vbox);
frame = gimp_frame_new (text);
......
......@@ -92,8 +92,8 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
table = gtk_table_new (4, 4, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
table);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
table, TRUE, TRUE, 0);
gtk_widget_show (table);
if (pixbuf)
......
......@@ -162,8 +162,8 @@ scale_dialog_new (GimpViewable *viewable,
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
frame = gimp_frame_new (text);
......
......@@ -123,8 +123,8 @@ stroke_dialog_new (GimpItem *item,
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox, TRUE, TRUE, 0);
gtk_widget_show (main_vbox);
radio_box = gimp_prop_enum_radio_box_new (G_OBJECT (options), "method",
......
......@@ -103,8 +103,8 @@ template_options_dialog_new (GimpTemplate *template,
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (options->dialog))),
vbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (options->dialog))),
vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
options->editor = gimp_template_editor_new (template, options->gimp, TRUE);
......
......@@ -101,8 +101,8 @@ vectors_options_dialog_new (GimpImage *image,
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (options->dialog))),
hbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (options->dialog))),
hbox, TRUE, TRUE, 0);
gtk_widget_show (hbox);
vbox = gtk_vbox_new (FALSE, 6);
......
......@@ -174,8 +174,8 @@ gui_abort (const gchar *abort_message)
gimp_message_box_set_text (GIMP_MESSAGE_BOX (box), "%s", abort_message);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
box);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
box, TRUE, TRUE, 0);
gtk_widget_show (box);
gimp_dialog_run (GIMP_DIALOG (dialog));
......
......@@ -350,8 +350,8 @@ gimp_image_map_tool_initialize (GimpTool *tool,
image_map_tool->main_vbox = vbox = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (shell))),
vbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (shell))),
vbox, TRUE, TRUE, 0);
}
g_signal_connect_object (shell, "response",
......
......@@ -1011,8 +1011,8 @@ gimp_measure_tool_dialog_new (GimpMeasureTool *measure)
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_container_set_border_width (GTK_CONTAINER (table), 6);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
table);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
table, TRUE, TRUE, 0);
gtk_widget_show (table);
......
......@@ -446,8 +446,8 @@ confirm_save_dialog (const gchar *message,
gimp_window_set_transient (GTK_WINDOW (dialog));
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
hbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
hbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_widget_show (hbox);
......@@ -529,8 +529,8 @@ export_dialog (GSList *actions,
gimp_window_set_transient (GTK_WINDOW (dialog));
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
hbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
hbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_widget_show (hbox);
......
......@@ -439,7 +439,7 @@ gimp_menu_add_item (GtkWidget *menu,
preview = gimp_menu_make_preview (any_ID, drawable_name == NULL,
MENU_THUMBNAIL_WIDTH,
MENU_THUMBNAIL_HEIGHT);
gtk_container_add (GTK_CONTAINER (vbox), preview);
gtk_box_pack_start (GTK_BOX (vbox), preview, TRUE, TRUE, 0);
gtk_widget_show (preview);
label = gtk_label_new (str);
......
......@@ -155,8 +155,8 @@ gimp_proc_browser_dialog_init (GimpProcBrowserDialog *dialog)
_("by type"), SEARCH_TYPE_PROC_TYPE,
NULL);
gtk_container_set_border_width (GTK_CONTAINER (dialog->browser), 12);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
dialog->browser);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
dialog->browser, TRUE, TRUE, 0);
gtk_widget_show (dialog->browser);
g_signal_connect (dialog->browser, "search",
......
......@@ -519,8 +519,8 @@ gimp_color_button_clicked (GtkButton *button)
gimp_color_selection_set_color (GIMP_COLOR_SELECTION (selection), &color);
gimp_color_selection_set_old_color (GIMP_COLOR_SELECTION (selection),
&color);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
selection);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
selection, TRUE, TRUE, 0);
gtk_widget_show (selection);
g_signal_connect (selection, "color-changed",
......
......@@ -186,7 +186,7 @@ create_query_box (const gchar *title,
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_container_add (GTK_CONTAINER (content_area), hbox);
gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 0);
gtk_widget_show (hbox);
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_DIALOG);
......@@ -211,7 +211,8 @@ create_query_box (const gchar *title,
content_area = gtk_dialog_get_content_area (GTK_DIALOG (query_box->qbox));
gtk_container_set_border_width (GTK_CONTAINER (query_box->vbox), 12);
gtk_container_add (GTK_CONTAINER (content_area), query_box->vbox);
gtk_box_pack_start (GTK_BOX (content_area), query_box->vbox,
TRUE, TRUE, 0);
}
gtk_widget_show (query_box->vbox);
......
......@@ -631,8 +631,8 @@ gimp_unit_menu_create_selection (GimpUnitMenu *menu)
/* the main vbox */
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (menu->selection))),
vbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (menu->selection))),
vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
/* the selection list */
......@@ -642,7 +642,7 @@ gimp_unit_menu_create_selection (GimpUnitMenu *menu)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
GTK_POLICY_NEVER,
GTK_POLICY_ALWAYS);
gtk_container_add (GTK_CONTAINER (vbox), scrolled_win);
gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0);
gtk_widget_show (scrolled_win);
list = gtk_list_store_new (NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment