Fwd: TreeModelFilter as LIST_ONLY



2008/10/22 José Alburquerque <jaalburquerque cox net>:
> Jorge Cardona said the following:
>>
>> Hi, recently i ask something about to set the model of a iconview from
>> a treemodelfilter with a filter and a path that only has 1 depth
>> children, so it look like a list, but iconview complain for the
>> LIST_ONLY flag, how can i create a new treemodelfilter class but that
>> return a LIST_ONLY flag and define a filter that only show the
>> children with no childrens.
>>
>> I need some help on this, i was trying to solve it myself, but i need
>> more experience on c++ and gtk.
>>
>>
>
> The problem is that a Gtk::TreeModelFilter only "wraps over" the actual
> Gtk::TreeModel, but it is still only the underlying Gtk::TreeModel
> underneath.  Getting the flags of the Gtk::TreeModelFilter is equivalent to
> getting the flags of the underlying Gtk::TreeModel.
>
> A Gtk::TreeStore's rows can have children and is therefore not usable by a
> Gtk::IconView.  You really need to use a Gtk::ListStore with the
> Gtk::IconView.
>

Yes, I know that, but i don't want to duplicate data, and i need to
store all my data on an treestore, it should be easy to create a
filter that let show only the elements with no children, with that a
treemodelfilter works like it has a liststore as model, but it is also
needed the LIST_ONLY flag for the iconview.

I was thinking in create a new class that inherits from a
Gtk::TreeModelFilter, but i can't override the get_flags method

> --
> José Alburquerque
>
>



--
Jorge Eduardo Cardona
jorgeecardona gmail com
jorgeecardona.blogspot.com
------------------------------------------------
Linux registered user  #391186
Registered machine    #291871
------------------------------------------------


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