diff options
author | Jonathan Blandford <jrb@redhat.com> | 2001-06-07 22:33:14 +0000 |
---|---|---|
committer | Jonathan Blandford <jrb@src.gnome.org> | 2001-06-07 22:33:14 +0000 |
commit | 59444d85e3abd3c9f8b1c1c27fdd67c4b716e723 (patch) | |
tree | 6ed58080028180d36b7d400f95795b630a91099f /tests | |
parent | 10b868ebaea6ec4599e8fa7649b887fc329fcd1b (diff) | |
download | gtk+-59444d85e3abd3c9f8b1c1c27fdd67c4b716e723.tar.gz |
Now it's a GObject instead of a GtkObject. The
Thu Jun 7 18:25:42 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeselection.c: Now it's a GObject instead of a
GtkObject. The GtkTreeSelection::selection_changed signal is now
the GtkTreeSelection::changed signal.
* gtk/gtktreeview.c: Modified to deal with new GtkTreeSelection
object.
* tests/gtktree*.c: Modified to deal with new GtkTreeSelection
object.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testselection.c | 2 | ||||
-rw-r--r-- | tests/testsocket_child.c | 1 | ||||
-rw-r--r-- | tests/testtreecolumns.c | 16 | ||||
-rw-r--r-- | tests/testtreefocus.c | 22 | ||||
-rw-r--r-- | tests/testtreeview.c | 2 | ||||
-rw-r--r-- | tests/treestoretest.c | 8 |
6 files changed, 26 insertions, 25 deletions
diff --git a/tests/testselection.c b/tests/testselection.c index 99d68f06c7..73345435b9 100644 --- a/tests/testselection.c +++ b/tests/testselection.c @@ -357,7 +357,7 @@ selection_received (GtkWidget *widget, GtkSelectionData *data) void paste (GtkWidget *widget, GtkWidget *entry) { - char *name; + const char *name; GdkAtom atom; name = gtk_entry_get_text (GTK_ENTRY(entry)); diff --git a/tests/testsocket_child.c b/tests/testsocket_child.c index 8848cf96ea..084e71a917 100644 --- a/tests/testsocket_child.c +++ b/tests/testsocket_child.c @@ -15,7 +15,6 @@ add_buttons (GtkWidget *widget, GtkWidget *box) { GtkWidget *add_button; GtkWidget *remove_button; - GtkWidget *toplevel = gtk_widget_get_toplevel (box); add_button = gtk_button_new_with_mnemonic ("_Add"); gtk_box_pack_start (GTK_BOX (box), add_button, TRUE, TRUE, 0); diff --git a/tests/testtreecolumns.c b/tests/testtreecolumns.c index 7c9c788307..f61208b812 100644 --- a/tests/testtreecolumns.c +++ b/tests/testtreecolumns.c @@ -603,15 +603,15 @@ main (int argc, char *argv[]) button = gtk_button_new_with_label ("<<"); gtk_widget_set_sensitive (button, FALSE); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (add_left_clicked), top_right_tree_view); - gtk_signal_connect (GTK_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (top_right_tree_view))), - "selection-changed", GTK_SIGNAL_FUNC (selection_changed), button); + g_signal_connectc (G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (top_right_tree_view))), + "changed", GTK_SIGNAL_FUNC (selection_changed), button, FALSE); gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 0); button = gtk_button_new_with_label (">>"); gtk_widget_set_sensitive (button, FALSE); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (add_right_clicked), top_right_tree_view); - gtk_signal_connect (GTK_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (left_tree_view))), - "selection-changed", GTK_SIGNAL_FUNC (selection_changed), button); + g_signal_connectc (G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (left_tree_view))), + "changed", GTK_SIGNAL_FUNC (selection_changed), button, FALSE); gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 0); bbox = gtk_vbutton_box_new (); @@ -622,15 +622,15 @@ main (int argc, char *argv[]) button = gtk_button_new_with_label ("<<"); gtk_widget_set_sensitive (button, FALSE); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (add_left_clicked), bottom_right_tree_view); - gtk_signal_connect (GTK_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (bottom_right_tree_view))), - "selection-changed", GTK_SIGNAL_FUNC (selection_changed), button); + g_signal_connectc (G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (bottom_right_tree_view))), + "changed", GTK_SIGNAL_FUNC (selection_changed), button, FALSE); gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 0); button = gtk_button_new_with_label (">>"); gtk_widget_set_sensitive (button, FALSE); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (add_right_clicked), bottom_right_tree_view); - gtk_signal_connect (GTK_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (left_tree_view))), - "selection-changed", GTK_SIGNAL_FUNC (selection_changed), button); + g_signal_connectc (G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (left_tree_view))), + "changed", GTK_SIGNAL_FUNC (selection_changed), button, FALSE); gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 0); diff --git a/tests/testtreefocus.c b/tests/testtreefocus.c index 1368aa1a38..5d3bf49d84 100644 --- a/tests/testtreefocus.c +++ b/tests/testtreefocus.c @@ -309,6 +309,7 @@ main (int argc, char *argv[]) GtkCellRenderer *renderer; gint col_offset; GtkTreeViewColumn *column; + GtkTreeSelection *selection; gtk_init (&argc, &argv); @@ -328,19 +329,20 @@ main (int argc, char *argv[]) model = make_model (); tree_view = gtk_tree_view_new_with_model (model); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (tree_view), TRUE); - + gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)), + GTK_TREE_SELECTION_MULTI); renderer = gtk_cell_renderer_text_new (); - gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), - -1, "Holiday", - renderer, - "text", HOLIDAY_COLUMN, NULL); + col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), + -1, "Holiday", + renderer, + "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 (); - g_signal_connect_data (G_OBJECT (renderer), "toggled", alex_toggled, model, NULL, FALSE, FALSE); + g_signal_connect_data (G_OBJECT (renderer), "toggled", G_CALLBACK (alex_toggled), model, NULL, FALSE, FALSE); g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL); col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), @@ -358,7 +360,7 @@ main (int argc, char *argv[]) /* Havoc Column */ renderer = gtk_cell_renderer_toggle_new (); - g_signal_connect_data (G_OBJECT (renderer), "toggled", havoc_toggled, model, NULL, FALSE, FALSE); + g_signal_connect_data (G_OBJECT (renderer), "toggled", G_CALLBACK (havoc_toggled), model, NULL, FALSE, FALSE); g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL); col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), @@ -375,7 +377,7 @@ main (int argc, char *argv[]) /* Tim Column */ renderer = gtk_cell_renderer_toggle_new (); - g_signal_connect_data (G_OBJECT (renderer), "toggled", tim_toggled, model, NULL, FALSE, FALSE); + g_signal_connect_data (G_OBJECT (renderer), "toggled", G_CALLBACK (tim_toggled), model, NULL, FALSE, FALSE); g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL); col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), @@ -393,7 +395,7 @@ main (int argc, char *argv[]) /* Owen Column */ renderer = gtk_cell_renderer_toggle_new (); - g_signal_connect_data (G_OBJECT (renderer), "toggled", owen_toggled, model, NULL, FALSE, FALSE); + g_signal_connect_data (G_OBJECT (renderer), "toggled", G_CALLBACK (owen_toggled), model, NULL, FALSE, FALSE); g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL); col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), -1, "Owen", @@ -409,7 +411,7 @@ main (int argc, char *argv[]) /* Owen Column */ renderer = gtk_cell_renderer_toggle_new (); - g_signal_connect_data (G_OBJECT (renderer), "toggled", dave_toggled, model, NULL, FALSE, FALSE); + g_signal_connect_data (G_OBJECT (renderer), "toggled", G_CALLBACK (dave_toggled), model, NULL, FALSE, FALSE); g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL); col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree_view), -1, "Dave", diff --git a/tests/testtreeview.c b/tests/testtreeview.c index ee582c9561..7bf2c0636c 100644 --- a/tests/testtreeview.c +++ b/tests/testtreeview.c @@ -315,7 +315,7 @@ set_columns_type (GtkTreeView *tree_view, ColumnsType type) gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), col); - pixbuf = gdk_pixbuf_new_from_xpm_data ((char **)book_closed_xpm); + pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **)book_closed_xpm); image = gtk_image_new_from_pixbuf (pixbuf); diff --git a/tests/treestoretest.c b/tests/treestoretest.c index 710954ba5a..9ede2222b5 100644 --- a/tests/treestoretest.c +++ b/tests/treestoretest.c @@ -274,7 +274,7 @@ make_window (gint view_type) button = gtk_button_new_with_label ("gtk_tree_store_remove"); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); g_signal_connectc (G_OBJECT (selection), - "selection_changed", + "changed", selection_changed, button, FALSE); gtk_signal_connect (GTK_OBJECT (button), "clicked", iter_remove, tree_view); @@ -294,7 +294,7 @@ make_window (gint view_type) gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (button), "clicked", iter_insert_before, tree_view); g_signal_connectc (G_OBJECT (selection), - "selection_changed", + "changed", selection_changed, button, FALSE); gtk_widget_set_sensitive (button, FALSE); @@ -302,8 +302,8 @@ make_window (gint view_type) button = gtk_button_new_with_label ("gtk_tree_store_insert_after"); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (button), "clicked", iter_insert_after, tree_view); - g_signal_connectc (GTK_OBJECT (selection), - "selection_changed", + g_signal_connectc (G_OBJECT (selection), + "changed", selection_changed, button, FALSE); gtk_widget_set_sensitive (button, FALSE); |