diff options
author | Javier Jardón <jjardon@gnome.org> | 2011-04-22 14:38:40 +0100 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2011-04-22 14:44:02 +0100 |
commit | ac4c12ff60374e77d88f8e65fc9cb3b5603a193e (patch) | |
tree | f8ef4996b2bc99b7c65a3272ae46604ecaf9939f | |
parent | bf413928611e004ae3b5a9f73ff9c777cb7e8e70 (diff) | |
download | gtk+-ac4c12ff60374e77d88f8e65fc9cb3b5603a193e.tar.gz |
tests: Use gtk_box_new() instead v/h subclasses
-rw-r--r-- | tests/testcellarea.c | 20 | ||||
-rw-r--r-- | tests/testgtk.c | 9 | ||||
-rw-r--r-- | tests/testtoplevelembed.c | 2 | ||||
-rw-r--r-- | tests/testtreeedit.c | 10 | ||||
-rw-r--r-- | tests/testtreemenu.c | 2 |
5 files changed, 23 insertions, 20 deletions
diff --git a/tests/testcellarea.c b/tests/testcellarea.c index be54c79b3f..7064637efc 100644 --- a/tests/testcellarea.c +++ b/tests/testcellarea.c @@ -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); diff --git a/tests/testgtk.c b/tests/testgtk.c index 74f7dddd4b..fac0c3a8d3 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -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, diff --git a/tests/testtoplevelembed.c b/tests/testtoplevelembed.c index c698252acb..862a0bd4dd 100644 --- a/tests/testtoplevelembed.c +++ b/tests/testtoplevelembed.c @@ -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); diff --git a/tests/testtreeedit.c b/tests/testtreeedit.c index 8e0cc32682..a3d5b16b69 100644 --- a/tests/testtreeedit.c +++ b/tests/testtreeedit.c @@ -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); diff --git a/tests/testtreemenu.c b/tests/testtreemenu.c index 7701b9dd0d..1abab01bd1 100644 --- a/tests/testtreemenu.c +++ b/tests/testtreemenu.c @@ -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 (); |