get selection and do something



Hi,
im bloody new to GTK Programming and working on an example from my book.
I wanna select a row from a gtk_tree_view and show a different picture for
each selected row.
I found the command to get the selection and know how to do an action if one
is selected,
so my question is how can I pass the selected row to my function(simple
output)?
I think the info is in "selected" itself, but i havent been able to extract
it.

selected = gtk_tree_view_get_selection(GTK_TREE_VIEW(ansicht));

    if(selected)
    g_signal_connect(G_OBJECT(selected), "changed",G_CALLBACK(sagwas),
NULL);


void sagwas(GtkWidget *widget, gpointer daten){

g_print("Hallo\n");
}

thx



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