Re: How to get the event in a g_signal_connect treeview callback ??



segv-tomate freesurf fr wrote:

hi,

i have a treeview, and when a click on it, a call back is called and i
receive  a GtkTreeSelection pointer

i have defined like this :

store = gtk_tree_store_new (N_COLUMNS,
                              G_TYPE_STRING, G_TYPE_STRING, GDK_TYPE_PIXBUF,
                              G_TYPE_STRING, GDK_TYPE_PIXBUF);
gtk_object_set_data (GTK_OBJECT(win), "store_tree", store);
tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));

select = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree));
g_signal_connect (G_OBJECT (select), "changed",
                    G_CALLBACK (tree_selection_changed_cb),
                    NULL);

the callback is defined :
void
tree_selection_changed_cb (GtkTreeSelection *selection, gpointer data)


so when i click on the tree, i know which one was, but i don't know which
button was pressed

how can i know it???
You want button_press_event or button_release_event for the widget, not the treeview.


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]