RE: gtk_selection_get_selected()
- From: John Palmieri <johnp martianrock com>
- To: martyn 2 russell bt com
- Cc: gtk-app-devel-list gnome org
- Subject: RE: gtk_selection_get_selected()
- Date: 08 Apr 2003 11:03:59 -0400
On Tue, 2003-04-08 at 10:44, martyn 2 russell bt com wrote:
GtkListStore *list;
NOTE - this is a LIST not a TREE.
ListStores are TreeModels in Gtk+
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)
GTK_TREE_MODEL is correct. I don't think there is a GTK_LIST_MODEL.
GtkListStores implement the GtkTreeModel interface which allows
GtkTreeViews to display them. The whole new GtkTree code is very well
thought out and very flexable.
--
J5
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]