diff options
author | Jonathan Blandford <jrb@redhat.com> | 2000-10-27 23:34:58 +0000 |
---|---|---|
committer | Jonathan Blandford <jrb@src.gnome.org> | 2000-10-27 23:34:58 +0000 |
commit | 0ccb3e9aed43a9c2a8b77f7af5c29f4e23b4698d (patch) | |
tree | a01d83d5374da6025125c53fd36aefb4396a2556 /demos | |
parent | 2bf87de4cb334a850aa2226b9118b302140f71e2 (diff) | |
download | gdk-pixbuf-0ccb3e9aed43a9c2a8b77f7af5c29f4e23b4698d.tar.gz |
Not sure how this ever worked. Fixed it to use new iter stuff, and added
Fri Oct 27 17:56:26 2000 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkliststore.c: Not sure how this ever worked. Fixed it to
use new iter stuff, and added all the appropriate signals et al.
* gtk/gtktreedatalist.h: s/gtk/_gtk to further reinforce that this
code is internal to gtk only.
Diffstat (limited to 'demos')
-rw-r--r-- | demos/gtk-demo/main.c | 40 | ||||
-rw-r--r-- | demos/testgtk/main.c | 40 |
2 files changed, 42 insertions, 38 deletions
diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c index df207085c..656aeec4c 100644 --- a/demos/gtk-demo/main.c +++ b/demos/gtk-demo/main.c @@ -214,14 +214,16 @@ button_press_event_cb (GtkTreeView *tree_view, GVoidFunc func; gtk_tree_model_get_iter (model, &iter, path); - gtk_tree_store_iter_get (model, &iter, - FUNC_COLUMN, &func, - ITALIC_COLUMN, &italic, - -1); + gtk_tree_store_get (GTK_TREE_STORE (model), + &iter, + FUNC_COLUMN, &func, + ITALIC_COLUMN, &italic, + -1); (func) (); - gtk_tree_store_iter_set (model, &iter, - ITALIC_COLUMN, !italic, - -1); + gtk_tree_store_set (GTK_TREE_STORE (model), + &iter, + ITALIC_COLUMN, !italic, + -1); gtk_tree_path_free (path); } @@ -243,9 +245,9 @@ selection_cb (GtkTreeSelection *selection, if (! gtk_tree_selection_get_selected (selection, &iter)) return; - gtk_tree_model_iter_get_value (model, &iter, - FILENAME_COLUMN, - &value); + gtk_tree_model_get_value (model, &iter, + FILENAME_COLUMN, + &value); load_file (g_value_get_string (&value)); g_value_unset (&value); } @@ -307,15 +309,15 @@ create_tree (void) for (i=0; i < G_N_ELEMENTS (testgtk_demos); i++) { - gtk_tree_store_iter_append (GTK_TREE_STORE (model), &iter, NULL); - - gtk_tree_store_iter_set (GTK_TREE_STORE (model), - &iter, - TITLE_COLUMN, testgtk_demos[i].title, - FILENAME_COLUMN, testgtk_demos[i].filename, - FUNC_COLUMN, testgtk_demos[i].func, - ITALIC_COLUMN, FALSE, - -1); + gtk_tree_store_append (GTK_TREE_STORE (model), &iter, NULL); + + gtk_tree_store_set (GTK_TREE_STORE (model), + &iter, + TITLE_COLUMN, testgtk_demos[i].title, + FILENAME_COLUMN, testgtk_demos[i].filename, + FUNC_COLUMN, testgtk_demos[i].func, + ITALIC_COLUMN, FALSE, + -1); } cell = gtk_cell_renderer_text_new (); diff --git a/demos/testgtk/main.c b/demos/testgtk/main.c index df207085c..656aeec4c 100644 --- a/demos/testgtk/main.c +++ b/demos/testgtk/main.c @@ -214,14 +214,16 @@ button_press_event_cb (GtkTreeView *tree_view, GVoidFunc func; gtk_tree_model_get_iter (model, &iter, path); - gtk_tree_store_iter_get (model, &iter, - FUNC_COLUMN, &func, - ITALIC_COLUMN, &italic, - -1); + gtk_tree_store_get (GTK_TREE_STORE (model), + &iter, + FUNC_COLUMN, &func, + ITALIC_COLUMN, &italic, + -1); (func) (); - gtk_tree_store_iter_set (model, &iter, - ITALIC_COLUMN, !italic, - -1); + gtk_tree_store_set (GTK_TREE_STORE (model), + &iter, + ITALIC_COLUMN, !italic, + -1); gtk_tree_path_free (path); } @@ -243,9 +245,9 @@ selection_cb (GtkTreeSelection *selection, if (! gtk_tree_selection_get_selected (selection, &iter)) return; - gtk_tree_model_iter_get_value (model, &iter, - FILENAME_COLUMN, - &value); + gtk_tree_model_get_value (model, &iter, + FILENAME_COLUMN, + &value); load_file (g_value_get_string (&value)); g_value_unset (&value); } @@ -307,15 +309,15 @@ create_tree (void) for (i=0; i < G_N_ELEMENTS (testgtk_demos); i++) { - gtk_tree_store_iter_append (GTK_TREE_STORE (model), &iter, NULL); - - gtk_tree_store_iter_set (GTK_TREE_STORE (model), - &iter, - TITLE_COLUMN, testgtk_demos[i].title, - FILENAME_COLUMN, testgtk_demos[i].filename, - FUNC_COLUMN, testgtk_demos[i].func, - ITALIC_COLUMN, FALSE, - -1); + gtk_tree_store_append (GTK_TREE_STORE (model), &iter, NULL); + + gtk_tree_store_set (GTK_TREE_STORE (model), + &iter, + TITLE_COLUMN, testgtk_demos[i].title, + FILENAME_COLUMN, testgtk_demos[i].filename, + FUNC_COLUMN, testgtk_demos[i].func, + ITALIC_COLUMN, FALSE, + -1); } cell = gtk_cell_renderer_text_new (); |