diff options
author | Benjamin Otte <otte@redhat.com> | 2011-09-27 21:04:26 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-09-28 05:29:49 +0200 |
commit | 60eede3db332b8f2eb7d1710d128656570bfc752 (patch) | |
tree | c17dff2dc32a4b1f7e9c065755858552f9295f96 /tests/print-editor.c | |
parent | afc56461dea6919cc81eface24991f1c689733c9 (diff) | |
download | gtk+-60eede3db332b8f2eb7d1710d128656570bfc752.tar.gz |
tests: Convert print-editor from GtkTable to GtkBox
Diffstat (limited to 'tests/print-editor.c')
-rw-r--r-- | tests/print-editor.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/tests/print-editor.c b/tests/print-editor.c index 3f6af6666a..e8399ceb6d 100644 --- a/tests/print-editor.c +++ b/tests/print-editor.c @@ -822,7 +822,7 @@ static void create_window (void) { GtkWidget *bar; - GtkWidget *table; + GtkWidget *box; GtkWidget *contents; GtkUIManager *ui; GtkWidget *sw; @@ -858,17 +858,12 @@ create_window (void) g_error_free (error); } - table = gtk_table_new (1, 3, FALSE); - gtk_container_add (GTK_CONTAINER (main_window), table); + box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + gtk_container_add (GTK_CONTAINER (main_window), box); bar = gtk_ui_manager_get_widget (ui, "/MenuBar"); gtk_widget_show (bar); - gtk_table_attach (GTK_TABLE (table), - bar, - /* X direction */ /* Y direction */ - 0, 1, 0, 1, - GTK_EXPAND | GTK_FILL, 0, - 0, 0); + gtk_container_add (GTK_CONTAINER (box), bar); /* Create document */ sw = gtk_scrolled_window_new (NULL, NULL); @@ -880,12 +875,8 @@ create_window (void) gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN); - gtk_table_attach (GTK_TABLE (table), - sw, - /* X direction */ /* Y direction */ - 0, 1, 1, 2, - GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, - 0, 0); + gtk_widget_set_vexpand (sw, TRUE); + gtk_container_add (GTK_CONTAINER (box), sw); contents = gtk_text_view_new (); gtk_widget_grab_focus (contents); @@ -896,12 +887,7 @@ create_window (void) /* Create statusbar */ statusbar = gtk_statusbar_new (); - gtk_table_attach (GTK_TABLE (table), - statusbar, - /* X direction */ /* Y direction */ - 0, 1, 2, 3, - GTK_EXPAND | GTK_FILL, 0, - 0, 0); + gtk_container_add (GTK_CONTAINER (box), statusbar); /* Show text widget info in the statusbar */ buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (contents)); |