Commit 83eb6fdc authored by Michael Natterer's avatar Michael Natterer 😴

libgimpwidgets: use gtk_box_new()

parent 030413b9
......@@ -99,13 +99,13 @@ gimp_browser_init (GimpBrowser *browser)
browser->search_type = -1;
browser->left_vbox = gtk_vbox_new (FALSE, 6);
browser->left_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_paned_pack1 (GTK_PANED (browser), browser->left_vbox, FALSE, TRUE);
gtk_widget_show (browser->left_vbox);
/* search entry */
hbox = gtk_hbox_new (FALSE, 6);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start (GTK_BOX (browser->left_vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
......@@ -154,7 +154,7 @@ gimp_browser_init (GimpBrowser *browser)
gtk_paned_pack2 (GTK_PANED (browser), scrolled_window, TRUE, TRUE);
gtk_widget_show (scrolled_window);
browser->right_vbox = gtk_vbox_new (FALSE, 0);
browser->right_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_set_border_width (GTK_CONTAINER (browser->right_vbox), 12);
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_window),
browser->right_vbox);
......
......@@ -33,6 +33,7 @@
#include "gimpcolornotebook.h"
#include "gimpcolorscales.h"
#include "gimpwidgetsmarshal.h"
#include "gimp3migration.h"
#include "libgimp/libgimp-intl.h"
......@@ -401,7 +402,7 @@ gimp_color_notebook_add_page (GimpColorNotebook *notebook,
gimp_color_selector_set_show_alpha (GIMP_COLOR_SELECTOR (page),
GIMP_COLOR_SELECTOR (notebook)->show_alpha);
menu_widget = gtk_hbox_new (FALSE, 4);
menu_widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
image = gtk_image_new_from_stock (selector_class->stock_id,
GTK_ICON_SIZE_MENU);
......
......@@ -37,6 +37,7 @@
#include "gimphelpui.h"
#include "gimppreviewarea.h"
#include "gimpstock.h"
#include "gimp3migration.h"
#include "libgimp/libgimp-intl.h"
......@@ -253,7 +254,7 @@ gimp_color_select_init (GimpColorSelect *select)
select->xy_color_fill = COLOR_SELECT_SATURATION_VALUE;
select->drag_mode = DRAG_NONE;
hbox = gtk_hbox_new (FALSE, 4);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_box_pack_start (GTK_BOX (select), hbox, TRUE, TRUE, 0);
gtk_widget_show (hbox);
......@@ -309,7 +310,7 @@ gimp_color_select_init (GimpColorSelect *select)
G_CALLBACK (gimp_color_select_z_events),
select);
select->toggle_box = gtk_vbox_new (FALSE, 2);
select->toggle_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
gtk_box_pack_start (GTK_BOX (hbox), select->toggle_box, FALSE, FALSE, 0);
gtk_widget_show (select->toggle_box);
......
......@@ -169,12 +169,12 @@ gimp_color_selection_init (GimpColorSelection *selection)
selection->channel = GIMP_COLOR_SELECTOR_HUE;
main_hbox = gtk_hbox_new (FALSE, 6);
main_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_container_add (GTK_CONTAINER (selection), main_hbox);
gtk_widget_show (main_hbox);
/* The left vbox with the notebook */
selection->left_vbox = gtk_vbox_new (FALSE, 6);
selection->left_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (main_hbox), selection->left_vbox,
TRUE, TRUE, 0);
gtk_widget_show (selection->left_vbox);
......@@ -208,12 +208,12 @@ gimp_color_selection_init (GimpColorSelection *selection)
selection);
/* The hbox for the color_areas */
hbox = gtk_hbox_new (FALSE, 6);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_end (GTK_BOX (selection->left_vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
/* The labels */
vbox = gtk_vbox_new (FALSE, 0);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
gtk_widget_show (vbox);
......@@ -241,7 +241,7 @@ gimp_color_selection_init (GimpColorSelection *selection)
gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
vbox = gtk_vbox_new (FALSE, 0);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);
......@@ -271,7 +271,7 @@ gimp_color_selection_init (GimpColorSelection *selection)
gtk_widget_show (selection->old_color);
/* The right vbox with color scales */
selection->right_vbox = gtk_vbox_new (FALSE, 6);
selection->right_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (main_hbox), selection->right_vbox,
TRUE, TRUE, 0);
gtk_widget_show (selection->right_vbox);
......@@ -295,7 +295,7 @@ gimp_color_selection_init (GimpColorSelection *selection)
G_CALLBACK (gimp_color_selection_scales_changed),
selection);
hbox = gtk_hbox_new (FALSE, 6);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start (GTK_BOX (selection->right_vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
......
......@@ -30,6 +30,7 @@
#include "gimpenumwidgets.h"
#include "gimpframe.h"
#include "gimphelpui.h"
#include "gimp3migration.h"
/**
......@@ -119,7 +120,7 @@ gimp_enum_radio_box_new_with_range (GType enum_type,
enum_class = g_type_class_ref (enum_type);
vbox = gtk_vbox_new (FALSE, 1);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 1);
g_object_weak_ref (G_OBJECT (vbox),
(GWeakNotify) g_type_class_unref, enum_class);
......@@ -346,7 +347,7 @@ gimp_enum_stock_box_new_with_range (GType enum_type,
enum_class = g_type_class_ref (enum_type);
hbox = gtk_hbox_new (FALSE, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
g_object_weak_ref (G_OBJECT (hbox),
(GWeakNotify) g_type_class_unref, enum_class);
......
......@@ -418,7 +418,7 @@ gimp_help_menu_item_query_tooltip (GtkWidget *widget,
if (! text)
return FALSE;
vbox = gtk_vbox_new (FALSE, 12);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
label = gtk_label_new (text);
gtk_label_set_use_markup (GTK_LABEL (label), use_markup);
......
......@@ -35,6 +35,7 @@
#include "gimpoldwidgets.h"
#include "gimppixmap.h"
#include "gimpunitmenu.h"
#include "gimp3migration.h"
/**
......@@ -585,7 +586,7 @@ gimp_pixmap_button_new (gchar **xpm_data,
gtk_container_add (GTK_CONTAINER (button), abox);
gtk_widget_show (abox);
hbox = gtk_hbox_new (FALSE, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (abox), hbox);
gtk_widget_show (hbox);
......
......@@ -242,7 +242,7 @@ gimp_page_selector_init (GimpPageSelector *selector)
/* Pages */
vbox = gtk_vbox_new (FALSE, 2);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
gtk_box_pack_start (GTK_BOX (selector), vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
......@@ -288,7 +288,7 @@ gimp_page_selector_init (GimpPageSelector *selector)
/* Select all button & range entry */
hbox = gtk_hbox_new (FALSE, 6);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start (GTK_BOX (selector), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
......@@ -324,7 +324,7 @@ gimp_page_selector_init (GimpPageSelector *selector)
/* Target combo */
hbox = gtk_hbox_new (FALSE, 6);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start (GTK_BOX (selector), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
......
......@@ -33,6 +33,7 @@
#include "gimpfileentry.h"
#include "gimppatheditor.h"
#include "gimp3migration.h"
#include "libgimp/libgimp-intl.h"
......@@ -152,11 +153,12 @@ gimp_path_editor_init (GimpPathEditor *editor)
gtk_orientable_set_orientation (GTK_ORIENTABLE (editor),
GTK_ORIENTATION_VERTICAL);
editor->upper_hbox = gtk_hbox_new (FALSE, 2);
editor->upper_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
gtk_box_pack_start (GTK_BOX (editor), editor->upper_hbox, FALSE, TRUE, 0);
gtk_widget_show (editor->upper_hbox);
button_box = gtk_hbox_new (TRUE, 0);
button_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous (GTK_BOX (button_box), TRUE);
gtk_box_pack_start (GTK_BOX (editor->upper_hbox), button_box, FALSE, TRUE, 0);
gtk_widget_show (button_box);
......
......@@ -281,7 +281,7 @@ gimp_preview_init (GimpPreview *preview)
G_CALLBACK (gimp_preview_area_set_cursor),
preview, NULL, G_CONNECT_AFTER | G_CONNECT_SWAPPED);
priv->controls = gtk_hbox_new (FALSE, 6);
priv->controls = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_table_attach (GTK_TABLE (preview->table), priv->controls, 0, 2, 2, 3,
GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
gtk_widget_show (priv->controls);
......
......@@ -184,7 +184,7 @@ create_query_box (const gchar *title,
content_area = gtk_dialog_get_content_area (GTK_DIALOG (query_box->qbox));
hbox = gtk_hbox_new (FALSE, 12);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 0);
gtk_widget_show (hbox);
......@@ -195,7 +195,7 @@ create_query_box (const gchar *title,
gtk_widget_show (image);
}
query_box->vbox = gtk_vbox_new (FALSE, 12);
query_box->vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
g_object_set_data (G_OBJECT (query_box->qbox), "gimp-query-box-vbox",
query_box->vbox);
......
......@@ -514,7 +514,7 @@ gimp_unit_menu_create_selection (GimpUnitMenu *menu)
menu->selection, G_CONNECT_SWAPPED);
/* the main vbox */
vbox = gtk_vbox_new (FALSE, 0);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (menu->selection))),
vbox, TRUE, TRUE, 0);
......
......@@ -87,7 +87,7 @@ gimp_radio_group_new (gboolean in_frame,
va_list args;
vbox = gtk_vbox_new (FALSE, 2);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
group = NULL;
......@@ -193,7 +193,7 @@ gimp_radio_group_new2 (gboolean in_frame,
va_list args;
vbox = gtk_vbox_new (FALSE, 2);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
group = NULL;
......@@ -301,7 +301,7 @@ gimp_int_radio_group_new (gboolean in_frame,
va_list args;
vbox = gtk_vbox_new (FALSE, 2);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
group = NULL;
......@@ -497,7 +497,7 @@ gimp_random_seed_new (guint *seed,
g_return_val_if_fail (seed != NULL, NULL);
g_return_val_if_fail (random_seed != NULL, NULL);
hbox = gtk_hbox_new (FALSE, 4);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
/* If we're being asked to generate a random seed, generate one. */
if (*random_seed)
......@@ -1089,7 +1089,7 @@ gimp_table_attach_aligned (GtkTable *table,
if (left_align)
{
GtkWidget *hbox = gtk_hbox_new (FALSE, 0);
GtkWidget *hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
......
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