I am quite new with GtkTreeView. I am creating one single column with multiple rows, and I am detecting when the user is clicking on each row (or cell in this case).
I am able to retrieve the label from the cell but it is not merely enough for what I need to do. I have a struct that contains a few extra parameters that I would like to pass along. I am currently using a callback on the whole tree, as follows:
GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(list));
g_signal_connect(selection, "changed", G_CALLBACK(on_changed), selection);
I append rows in my TreeView. Would it be possible to create a unique signal per row where I could pass my struct as the parameter please? Otherwise, is there another way to pass data for the function? The problem is that each row has a unique struct that contains different information.
Thank you very much.
EDIT:
I had not understood all the power of the TreeView. I've put everything in my model now and it works just fine. Sorry guys, I now understand the model a lot better.