RE: gtk_selection_get_selected()



GtkListStore *list;

NOTE - this is a LIST not a TREE.

GtkTreeView *view;
GtkTreeSelection *selection;
GtkTreeIter iter;
GValue *value;
...
selection = gtk_tree_view_get_selection(view);
gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
if((gtk_tree_selection_get_selected(GTK_TREE_SELECTION(selection),
              GTK_TREE_MODEL(&list),
              &iter))

This should be GTK_LIST_MODEL(&list)

Regards,
Martyn



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