diff options
author | Jonathan Blandford <jrb@src.gnome.org> | 2001-08-19 06:58:11 +0000 |
---|---|---|
committer | Jonathan Blandford <jrb@src.gnome.org> | 2001-08-19 06:58:11 +0000 |
commit | 112eb9b2e52a139c842588ed45baa38faf1e7fb3 (patch) | |
tree | 410731bf8362a945a034a2041e8039df0e18733b /tests/testtreefocus.c | |
parent | 6ffd507deabb9e5b4445c8ff1e99910716d9cad0 (diff) | |
download | gtk+-112eb9b2e52a139c842588ed45baa38faf1e7fb3.tar.gz |
Sun Aug 19 01:44:44 2001 Jonathan Blandford <jrb@redhat.com>>
* gtk/gtktreeviewcolumn.c
(gtk_tree_view_column_pack_{start,end}_cell_renderer): sink cell.
* gtk/gtktreeview.c (gtk_tree_view_insert_column): sink column.
(_gtk_tree_view_find_node): If *node is NULL,
*tree should be NULL too.
* demos/gtk-demo/stock_browser.c (do_stock_browser): don't unref
column/renderers.
* tests/testtreecolumns.c: ditto
* tests/testtreefocus.c: ditto
* tests/testtreesort.c: ditto
* tests/testtreeview.c: ditto
* tests/treestoretest.c: ditto
Diffstat (limited to 'tests/testtreefocus.c')
-rw-r--r-- | tests/testtreefocus.c | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/tests/testtreefocus.c b/tests/testtreefocus.c index 705468e1ea..75c177a698 100644 --- a/tests/testtreefocus.c +++ b/tests/testtreefocus.c @@ -337,7 +337,6 @@ main (int argc, char *argv[]) "text", HOLIDAY_COLUMN, NULL); column = gtk_tree_view_get_column (GTK_TREE_VIEW (tree_view), col_offset - 1); gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE); - g_object_unref (renderer); /* Alex Column */ renderer = gtk_cell_renderer_toggle_new (); @@ -355,7 +354,6 @@ main (int argc, char *argv[]) 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_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE); - g_object_unref (renderer); /* Havoc Column */ renderer = gtk_cell_renderer_toggle_new (); @@ -372,7 +370,6 @@ main (int argc, char *argv[]) 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_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE); - g_object_unref (renderer); /* Tim Column */ renderer = gtk_cell_renderer_toggle_new (); @@ -390,7 +387,6 @@ main (int argc, char *argv[]) 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); - g_object_unref (renderer); /* Owen Column */ renderer = gtk_cell_renderer_toggle_new (); @@ -406,7 +402,6 @@ main (int argc, char *argv[]) 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); - g_object_unref (renderer); /* Owen Column */ renderer = gtk_cell_renderer_toggle_new (); @@ -422,7 +417,6 @@ main (int argc, char *argv[]) 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_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE); - g_object_unref (renderer); gtk_container_add (GTK_CONTAINER (scrolled_window), tree_view); @@ -451,61 +445,45 @@ main (int argc, char *argv[]) g_object_unref (G_OBJECT (model)); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (tree_view), TRUE); - renderer = gtk_cell_renderer_text_new (); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), -1, "Holiday Column", - renderer, + gtk_cell_renderer_text_new (), "text", 0, NULL); - g_object_unref (renderer); - renderer = gtk_cell_renderer_text_new (); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), -1, "Alex Column", - renderer, + gtk_cell_renderer_text_new (), "text", 1, NULL); - g_object_unref (renderer); - renderer = gtk_cell_renderer_text_new (); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), -1, "Havoc Column", - renderer, + gtk_cell_renderer_text_new (), "text", 2, NULL); - g_object_unref (renderer); - renderer = gtk_cell_renderer_text_new (); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), -1, "Tim Column", - renderer, + gtk_cell_renderer_text_new (), "text", 3, NULL); - g_object_unref (renderer); - renderer = gtk_cell_renderer_text_new (); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), -1, "Owen Column", - renderer, + gtk_cell_renderer_text_new (), "text", 4, NULL); - g_object_unref (renderer); - renderer = gtk_cell_renderer_text_new (); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), -1, "Dave Column", - renderer, + gtk_cell_renderer_text_new (), "text", 5, NULL); - g_object_unref (renderer); - renderer = gtk_cell_renderer_text_new (); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), -1, "Visible Column", - renderer, + gtk_cell_renderer_text_new (), "text", 6, NULL); - g_object_unref (renderer); - renderer = gtk_cell_renderer_text_new (); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), -1, "World Holiday", - renderer, + gtk_cell_renderer_text_new (), "text", 7, NULL); - g_object_unref (renderer); gtk_signal_connect (GTK_OBJECT (tree_view), "realize", GTK_SIGNAL_FUNC (gtk_tree_view_expand_all), |