summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/testtreefocus.c10
-rw-r--r--tests/testtreeview.c14
2 files changed, 13 insertions, 11 deletions
diff --git a/tests/testtreefocus.c b/tests/testtreefocus.c
index 59a2200b67..08a3207c4f 100644
--- a/tests/testtreefocus.c
+++ b/tests/testtreefocus.c
@@ -352,7 +352,7 @@ main (int argc, char *argv[])
NULL);
column = gtk_tree_view_get_column (GTK_TREE_VIEW (tree_view), col_offset - 1);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_FIXED);
- gtk_tree_view_column_set_width (GTK_TREE_VIEW_COLUMN (column), 50);
+ gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
/* Havoc Column */
@@ -368,7 +368,7 @@ main (int argc, char *argv[])
NULL);
column = gtk_tree_view_get_column (GTK_TREE_VIEW (tree_view), col_offset - 1);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_FIXED);
- gtk_tree_view_column_set_width (GTK_TREE_VIEW_COLUMN (column), 50);
+ gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
/* Tim Column */
@@ -386,7 +386,7 @@ main (int argc, char *argv[])
column = gtk_tree_view_get_column (GTK_TREE_VIEW (tree_view), col_offset - 1);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
- gtk_tree_view_column_set_width (GTK_TREE_VIEW_COLUMN (column), 50);
+ gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
/* Owen Column */
renderer = gtk_cell_renderer_toggle_new ();
@@ -401,7 +401,7 @@ main (int argc, char *argv[])
column = gtk_tree_view_get_column (GTK_TREE_VIEW (tree_view), col_offset - 1);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
- gtk_tree_view_column_set_width (GTK_TREE_VIEW_COLUMN (column), 50);
+ gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
/* Owen Column */
renderer = gtk_cell_renderer_toggle_new ();
@@ -415,7 +415,7 @@ main (int argc, char *argv[])
NULL);
column = gtk_tree_view_get_column (GTK_TREE_VIEW (tree_view), col_offset - 1);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column), GTK_TREE_VIEW_COLUMN_FIXED);
- gtk_tree_view_column_set_width (GTK_TREE_VIEW_COLUMN (column), 50);
+ gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
gtk_container_add (GTK_CONTAINER (scrolled_window), tree_view);
diff --git a/tests/testtreeview.c b/tests/testtreeview.c
index 79de1bbd0d..6367a5f320 100644
--- a/tests/testtreeview.c
+++ b/tests/testtreeview.c
@@ -279,13 +279,15 @@ set_columns_type (GtkTreeView *tree_view, ColumnsType type)
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), col);
- rend = gtk_cell_renderer_text_pixbuf_new ();
+ col = gtk_tree_view_column_new();
+ gtk_tree_view_column_set_title (col, "Column 2");
- col = gtk_tree_view_column_new_with_attributes ("Column 2",
- rend,
- "text", 0,
- "pixbuf", 2,
- NULL);
+ rend = gtk_cell_renderer_pixbuf_new ();
+ gtk_tree_view_column_pack_start (col, rend, FALSE);
+ gtk_tree_view_column_add_attribute (col, rend, "pixbuf", 2);
+ rend = gtk_cell_renderer_text_new ();
+ gtk_tree_view_column_pack_start (col, rend, TRUE);
+ gtk_tree_view_column_add_attribute (col, rend, "text", 0);
setup_column (col);