Re: Using GLists



On Thu, Sep 22, 2011 at 01:31:41PM -0700, sirthunder516 wrote:
> I have a gtkiconview that contains both text and images. I know that I can
> get a GList from the selected item with gtk_icon_view_get_selected_items(),
> but how do I get the that information from the GList? I don't need to get
> the icon of the currently selected item, just the text. Or is there a better
> way to get the text from the currently selected item?

The items of the list returned by gtk_icon_view_get_selected_items()
are, according to

    http://developer.gnome.org/gtk3/stable/GtkIconView.html#gtk-icon-view-get-selected-items

GtkTreePaths.  So to obtain the items you normally use
gtk_tree_model_get_iter() to convert the paths to iterators and then
gtk_tree_model_get(), using these iterators, to obtain data from the
underlying tree model.

What you can obtain from the tree model and how depends how the model
looks like.

Yeti



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