summaryrefslogtreecommitdiff
path: root/tests/testtreeview.c
diff options
context:
space:
mode:
authorWilliam Jon McCann <jmccann@redhat.com>2013-01-18 00:08:26 -0500
committerWilliam Jon McCann <jmccann@redhat.com>2013-01-20 16:49:30 -0500
commita84f244dc01e3fa54a35654715c774849647c759 (patch)
tree8817345ab376b7747c3df9d7549424841d65fad1 /tests/testtreeview.c
parentdcc412c88ecbc16ee07d02b7677826182489c714 (diff)
downloadgtk+-a84f244dc01e3fa54a35654715c774849647c759.tar.gz
Add a simple test for activate on single click
https://bugzilla.gnome.org/show_bug.cgi?id=345023
Diffstat (limited to 'tests/testtreeview.c')
-rw-r--r--tests/testtreeview.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/testtreeview.c b/tests/testtreeview.c
index 0f3bdffb58..9816540de4 100644
--- a/tests/testtreeview.c
+++ b/tests/testtreeview.c
@@ -679,6 +679,14 @@ columns_selected (GtkComboBox *combo_box, gpointer data)
}
}
+void
+on_row_activated (GtkTreeView *tree_view,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ gpointer user_data)
+{
+ g_print ("Row activated\n");
+}
enum
{
@@ -739,7 +747,8 @@ main (int argc,
gtk_container_add (GTK_CONTAINER (window), box);
tv = gtk_tree_view_new_with_model (models[0]);
-
+ g_signal_connect (tv, "row-activated", G_CALLBACK (on_row_activated), NULL);
+
gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (tv),
GDK_BUTTON1_MASK,
row_targets,