Re: GtkTreeModelFilter



On Thu, Dec 31, 2009 at 02:08:03AM -0500, Vikram Noel Ambrose wrote:
> - Filter Method 2.
> Using the "visible column" approach it becomes possible, but not very  
> plausible.
>
> One can call gtk_tree_model_foreach() and walk through all the  
> G_TYPE_BOOLEAN fields of the corresponding rows and mark them TRUE/FALSE  
> and look up parents of nodes (like C1) and mark them TRUE even if they  
> did no match the search criteria. However looking up parents  
> continuously like this takes a massive performance hit when you have  
> large stores.

I don't know if there is a better way at Gtk+ level, but if you keep the
number of visible children the performance hit should be relatively
small.  You still need to walk up the tree when a child changes, but
that should be just a handful of lookups/updates, and you never have to
scan a subtree to see if there's anything visible in it.

Yeti



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