[yelp/wip/patches: 1/4] tests: Port from GtkVBox and GtkHBox to GtkBox



commit d6e6e60362f1681be81c05cf846c21855b68dc42
Author: David King <amigadave amigadave com>
Date:   Fri Aug 1 18:00:59 2014 +0100

    tests: Port from GtkVBox and GtkHBox to GtkBox
    
    https://bugzilla.gnome.org/show_bug.cgi?id=670180

 tests/test-settings.c |    9 +++++----
 tests/test-view.c     |    2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/tests/test-settings.c b/tests/test-settings.c
index 11dc0ca..cb74a60 100644
--- a/tests/test-settings.c
+++ b/tests/test-settings.c
@@ -213,11 +213,11 @@ main (int argc, char **argv)
     gtk_window_set_default_size (GTK_WINDOW (window), 1024, 600);
     g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
 
-    hbox = gtk_hbox_new (FALSE, 12);
+    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
     g_object_set (hbox, "border-width", 6, NULL);
     gtk_container_add (GTK_CONTAINER (window), hbox);
 
-    vbox = gtk_vbox_new (FALSE, 6);
+    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
     gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
 
     widget = gtk_check_button_new_with_label ("Use GtkSettings");
@@ -257,7 +257,7 @@ main (int argc, char **argv)
     websettings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (webview));
     gtk_container_add (GTK_CONTAINER (scroll), webview);
 
-    vbox = gtk_vbox_new (FALSE, 6);
+    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
     gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
 
     table = gtk_table_new (2, 2, FALSE);
@@ -311,7 +311,8 @@ main (int argc, char **argv)
        g_signal_connect (icon_choosers[i], "file-set", G_CALLBACK (icon_file_set), NULL);
     }
 
-    hbox = gtk_hbox_new (TRUE, 6);
+    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+    gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
     gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
     for (i = 0; i < YELP_SETTINGS_NUM_ICONS; i++) {
        icon_images[i] = gtk_image_new ();
diff --git a/tests/test-view.c b/tests/test-view.c
index 76c48a3..bab71dc 100644
--- a/tests/test-view.c
+++ b/tests/test-view.c
@@ -73,7 +73,7 @@ main (int argc, char **argv)
     gtk_window_set_default_size (GTK_WINDOW (window), 520, 580);
     g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
 
-    vbox = gtk_vbox_new (FALSE, 0);
+    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
     gtk_container_add (GTK_CONTAINER (window), vbox);
 
     entry = gtk_entry_new ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]