Re: How to filter a treeview?



[ CCing Kristian Rietveld as he seems to be the treeview maintainer ]

Hello,

I asked for a way to filter what was displayed in a treeview.

Peeter Vois answered:

I have to explore the same problem. Right now I know that all(?) renderers
have an attribute "visible". If this is not set the cell will not be drawn
on screen. I have to figure out the answer to following question: What
happens when "visible" is FALSE for all cells in row? Does this row
disappear or does there be an empty space as high as a row?
(...)
I do not know if there is another way. I would like to keep this info
separated from model.

Actually some digging turned up a treemodelfilter object in libegg;
which from a quick glance seems to be usable for what I need.

I have two questions for Kristian:

* When is that supposed to get into GTK+? I checked the 2.1.0 and 2.1.1
  release notes and there was no mention of it.
* How stable is it? Not the API, but for actually using it? Is it used
  already, somewhere? Are we putting our lives (or at least, our
  programs) in danger by using it? Is added testing welcome?

I'm especially curious about this because the files in question haven't
been modified in CVS anymore since 9th of july, according to LXR. That
makes it look fairly stable to me.

Removing rows from tree model is very bad idea for this purpose, because
there can be 2 or more treeviews displaying same model. One view might
want to display one set of rows and another might want to show another set
of rows.

Indeed, that's what I thought too - even if I only mentioned performance
as the primary reason for me not to go down that road. (I'm not really
using multiple views anyway, right now)


Regards,

Filip

-- 
"Wat zo fantastisch is aan Linux is dat je al die grafische rommel niet eens
 nodig hebt en dat je je computer met een paar commando's kan laten doen wat
 je wil (het God-gevoel)"
        -- onbekende bron



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