summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2000-12-21 05:27:06 +0000
committerJonathan Blandford <jrb@src.gnome.org>2000-12-21 05:27:06 +0000
commitdadf966b3b82a10bf5ae81e3eebae63a6df14003 (patch)
treec1d35d821defa7f8eae44734a87263fd2bbef3b7 /tests
parentf00175cf07395d9f05f8c98efb203ee3c74a31cd (diff)
downloadgdk-pixbuf-dadf966b3b82a10bf5ae81e3eebae63a6df14003.tar.gz
:get_property): remove g_value_init calls, as they are no longer needed.
2000-12-20 Jonathan Blandford <jrb@redhat.com> * gtk/gtkcellrenderer*.c (::get_property): remove g_value_init calls, as they are no longer needed. * gtk/gtktreemodelsort.c: Fix up the comparison code. * gtk/gtktreemodel.h: Start work on ::reordered signal. Need to figure out how to emit a signal on an interface.
Diffstat (limited to 'tests')
-rw-r--r--tests/treestoretest.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/tests/treestoretest.c b/tests/treestoretest.c
index 2aa1c3484..0601922ec 100644
--- a/tests/treestoretest.c
+++ b/tests/treestoretest.c
@@ -18,14 +18,18 @@ static void
node_set (GtkTreeIter *iter)
{
static gint i = 0;
-
+ gint n;
gchar *str;
- str = g_strdup_printf ("FOO: %d", i++);
+ str = g_strdup_printf ("Row (%d)", i++);
gtk_tree_store_set (base_model, iter, 0, str, -1);
g_free (str);
- str = g_strdup_printf ("%d", g_random_int ());
+ n = g_random_int ();
+ if (n < 0)
+ n *= -1;
+ str = g_strdup_printf ("%d", n);
+
gtk_tree_store_set (base_model, iter, 1, str, -1);
g_free (str);
}
@@ -133,7 +137,7 @@ iter_insert_after (GtkWidget *button, GtkTreeView *tree_view)
gtk_tree_store_insert_after (model,
&iter,
NULL,
- &selected);
+ NULL);
node_set (&iter);
}
}
@@ -303,12 +307,12 @@ make_window (gboolean use_sort)
/* A few to start */
if (!use_sort)
{
- iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
- iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
- iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
- iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
- iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
- iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
+ iter_append (NULL, GTK_TREE_VIEW (tree_view));
+ iter_append (NULL, GTK_TREE_VIEW (tree_view));
+ iter_append (NULL, GTK_TREE_VIEW (tree_view));
+ iter_append (NULL, GTK_TREE_VIEW (tree_view));
+ iter_append (NULL, GTK_TREE_VIEW (tree_view));
+ iter_append (NULL, GTK_TREE_VIEW (tree_view));
}
/* Show it all */
gtk_widget_show_all (window);