diff options
author | Owen Taylor <otaylor@redhat.com> | 2005-02-03 23:29:02 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2005-02-03 23:29:02 +0000 |
commit | 93344f6dfee0d21e5e9aa750b5a91ed10980cd24 (patch) | |
tree | 71978aa4f489edd13c2d71b55344921f0fdaab5b /tests/testtreeflow.c | |
parent | 8a5d05e253490a5851b7e142f4090971153c1178 (diff) | |
download | gtk+-93344f6dfee0d21e5e9aa750b5a91ed10980cd24.tar.gz |
Add gdk_drawable_set_cairo_target().
2005-02-03 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdrawable.[ch] gdkpixmap.c gdkwindow.c: Add
gdk_drawable_set_cairo_target().
* tests/testtreeflow.c (enum): Use grand not rand as a variable
name because one of the cairo headers is pulling in stdlib.h.
* tests/testcairo.c tests/Makefile.am: Add a simple cairo based
example.
* configure.in: Bump release to 2.7.0, gtk_binary_version to 2.7.0.
* Require libpangocairo for all backends.
Diffstat (limited to 'tests/testtreeflow.c')
-rw-r--r-- | tests/testtreeflow.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/testtreeflow.c b/tests/testtreeflow.c index 6f87df0cba..979e1c8a8d 100644 --- a/tests/testtreeflow.c +++ b/tests/testtreeflow.c @@ -2,7 +2,7 @@ #include <gtk/gtk.h> GtkTreeModel *model = NULL; -static GRand *rand = NULL; +static GRand *grand = NULL; GtkTreeSelection *selection = NULL; enum { @@ -32,12 +32,12 @@ initialize_model (void) GtkTreeIter iter; model = (GtkTreeModel *) gtk_list_store_new (NUM_COLUMNS, G_TYPE_STRING); - rand = g_rand_new (); + grand = g_rand_new (); for (i = 0; i < NUM_ROWS; i++) { gtk_list_store_append (GTK_LIST_STORE (model), &iter); gtk_list_store_set (GTK_LIST_STORE (model), &iter, - TEXT_COLUMN, words[g_rand_int_range (rand, 0, NUM_WORDS)], + TEXT_COLUMN, words[g_rand_int_range (grand, 0, NUM_WORDS)], -1); } } @@ -50,7 +50,7 @@ futz_row (void) GtkTreeIter iter; GtkTreeIter iter2; - i = g_rand_int_range (rand, 0, + i = g_rand_int_range (grand, 0, gtk_tree_model_iter_n_children (model, NULL)); path = gtk_tree_path_new (); gtk_tree_path_append_index (path, i); @@ -59,14 +59,14 @@ futz_row (void) if (gtk_tree_selection_iter_is_selected (selection, &iter)) return; - switch (g_rand_int_range (rand, 0, 3)) + switch (g_rand_int_range (grand, 0, 3)) { case 0: /* insert */ gtk_list_store_insert_after (GTK_LIST_STORE (model), &iter2, &iter); gtk_list_store_set (GTK_LIST_STORE (model), &iter2, - TEXT_COLUMN, words[g_rand_int_range (rand, 0, NUM_WORDS)], + TEXT_COLUMN, words[g_rand_int_range (grand, 0, NUM_WORDS)], -1); break; case 1: @@ -81,7 +81,7 @@ futz_row (void) if (gtk_tree_model_iter_n_children (model, NULL) == 0) return; gtk_list_store_set (GTK_LIST_STORE (model), &iter, - TEXT_COLUMN, words[g_rand_int_range (rand, 0, NUM_WORDS)], + TEXT_COLUMN, words[g_rand_int_range (grand, 0, NUM_WORDS)], -1); break; } |