forked from AuroraMiddleware/gtk
tests: Use gtk_box_new() instead v/h subclasses
This commit is contained in:
parent
bf41392861
commit
ac4c12ff60
@ -187,7 +187,7 @@ simple_cell_area (void)
|
||||
|
||||
scaffold = simple_scaffold ();
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_widget_show (hbox);
|
||||
gtk_widget_show (frame);
|
||||
@ -200,7 +200,7 @@ simple_cell_area (void)
|
||||
gtk_box_pack_end (GTK_BOX (hbox), frame, TRUE, TRUE, 0);
|
||||
|
||||
/* Now add some controls */
|
||||
vbox = gtk_vbox_new (FALSE, 4);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
|
||||
gtk_widget_show (vbox);
|
||||
gtk_box_pack_end (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
|
||||
|
||||
@ -426,7 +426,7 @@ focus_cell_area (void)
|
||||
GtkWidget *scaffold, *frame, *vbox, *hbox;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Focus and editable cells");
|
||||
@ -444,7 +444,7 @@ focus_cell_area (void)
|
||||
gtk_box_pack_end (GTK_BOX (hbox), frame, TRUE, TRUE, 0);
|
||||
|
||||
/* Now add some controls */
|
||||
vbox = gtk_vbox_new (FALSE, 4);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
|
||||
gtk_widget_show (vbox);
|
||||
gtk_box_pack_end (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
|
||||
|
||||
@ -517,8 +517,8 @@ background_area (void)
|
||||
GtkWidget *scaffold, *frame, *vbox, *hbox;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
main_vbox = gtk_vbox_new (FALSE, 4);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
|
||||
gtk_widget_show (hbox);
|
||||
gtk_widget_show (main_vbox);
|
||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||
@ -546,7 +546,7 @@ background_area (void)
|
||||
gtk_box_pack_end (GTK_BOX (hbox), frame, TRUE, TRUE, 0);
|
||||
|
||||
/* Now add some controls */
|
||||
vbox = gtk_vbox_new (FALSE, 4);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
|
||||
gtk_widget_show (vbox);
|
||||
gtk_box_pack_end (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
|
||||
@ -563,7 +563,7 @@ background_area (void)
|
||||
|
||||
widget = gtk_spin_button_new_with_range (0, 10, 1);
|
||||
label = gtk_label_new ("Cell spacing");
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_widget_show (hbox);
|
||||
gtk_widget_show (label);
|
||||
gtk_widget_show (widget);
|
||||
@ -577,7 +577,7 @@ background_area (void)
|
||||
|
||||
widget = gtk_spin_button_new_with_range (0, 10, 1);
|
||||
label = gtk_label_new ("Row spacing");
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_widget_show (hbox);
|
||||
gtk_widget_show (label);
|
||||
gtk_widget_show (widget);
|
||||
@ -590,7 +590,7 @@ background_area (void)
|
||||
|
||||
widget = gtk_spin_button_new_with_range (0, 30, 1);
|
||||
label = gtk_label_new ("Intentation");
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_widget_show (hbox);
|
||||
gtk_widget_show (label);
|
||||
gtk_widget_show (widget);
|
||||
|
@ -2632,7 +2632,8 @@ create_saved_position (GtkWidget *widget)
|
||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||
|
||||
vbox =
|
||||
g_object_new (gtk_vbox_get_type (),
|
||||
g_object_new (GTK_TYPE_BOX,
|
||||
"GtkOrientable::orientation", GTK_ORIENTATION_VERTICAL,
|
||||
"GtkBox::homogeneous", FALSE,
|
||||
"GtkBox::spacing", 5,
|
||||
"GtkContainer::border_width", 10,
|
||||
@ -2835,7 +2836,8 @@ create_tooltips (GtkWidget *widget)
|
||||
gtk_widget_set_tooltip_text (toggle, "Toggle TipsQuery view.");
|
||||
|
||||
box3 =
|
||||
g_object_new (gtk_vbox_get_type (),
|
||||
g_object_new (GTK_TYPE_BOX,
|
||||
"GtkOrientable::orientation", GTK_ORIENTATION_VERTICAL,
|
||||
"homogeneous", FALSE,
|
||||
"spacing", 5,
|
||||
"border_width", 5,
|
||||
@ -4960,7 +4962,8 @@ create_cursors (GtkWidget *widget)
|
||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||
|
||||
vbox =
|
||||
g_object_new (gtk_vbox_get_type (),
|
||||
g_object_new (GTK_TYPE_BOX,
|
||||
"GtkOrientable::orientation", GTK_ORIENTATION_VERTICAL,
|
||||
"GtkBox::homogeneous", FALSE,
|
||||
"GtkBox::spacing", 5,
|
||||
"GtkContainer::border_width", 10,
|
||||
|
@ -15,7 +15,7 @@ remove_notebook_page (GtkWidget *button,
|
||||
GtkWidget *
|
||||
create_tab_label (GtkWidget *toplevel)
|
||||
{
|
||||
GtkWidget *box = gtk_hbox_new (FALSE, 2);
|
||||
GtkWidget *box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
||||
GtkWidget *label = gtk_label_new (G_OBJECT_TYPE_NAME (toplevel));
|
||||
GtkWidget *button = gtk_button_new ();
|
||||
GtkWidget *image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
|
||||
|
@ -247,7 +247,7 @@ main (gint argc, gchar **argv)
|
||||
gtk_window_set_title (GTK_WINDOW (window), "GtkTreeView editing sample");
|
||||
g_signal_connect (window, "destroy", gtk_main_quit, NULL);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 6);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||
gtk_widget_show (vbox);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@ -352,12 +352,12 @@ main (gint argc, gchar **argv)
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
800, 250);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 6);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_widget_show (hbox);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
/* Alignment controls */
|
||||
cntl_vbox = gtk_vbox_new (FALSE, 2);
|
||||
cntl_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
||||
gtk_widget_show (cntl_vbox);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), cntl_vbox, FALSE, FALSE, 0);
|
||||
|
||||
@ -367,7 +367,7 @@ main (gint argc, gchar **argv)
|
||||
create_control (cntl_vbox, 4, CNTL_ALIGN, &callback[3]);
|
||||
|
||||
/* Expand controls */
|
||||
cntl_vbox = gtk_vbox_new (FALSE, 2);
|
||||
cntl_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
||||
gtk_widget_show (cntl_vbox);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), cntl_vbox, FALSE, FALSE, 0);
|
||||
|
||||
@ -377,7 +377,7 @@ main (gint argc, gchar **argv)
|
||||
create_control (cntl_vbox, 4, CNTL_EXPAND, &callback[3]);
|
||||
|
||||
/* Fixed controls */
|
||||
cntl_vbox = gtk_vbox_new (FALSE, 2);
|
||||
cntl_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
||||
gtk_widget_show (cntl_vbox);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), cntl_vbox, FALSE, FALSE, 0);
|
||||
|
||||
|
@ -433,7 +433,7 @@ tree_menu (void)
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "GtkTreeMenu");
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 4);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
menubar = gtk_menu_bar_new ();
|
||||
|
Loading…
Reference in New Issue
Block a user