Re: GtkTree*



Tim Janik <timj gtk org> writes:
> > > if the treeview doesn't come with freeze/thaw APIs, you basically force
> > > users that need to code around long model update periods after realization
> > > time to implement hacks like:
> > > /* emulate freeze */
> > > gtk_tree_view_set_model (tree_view, NULL);
> > > update_mdoel (model);
> > > /* emulate thaw */
> > > gtk_tree_view_set_model (tree_view, model);
> > > which would be a pity API wise.
> > 
> > A better idea is to add incremental reflow.  *Sigh*.  That should go in
> > bugzilla somewhere.
> 
> hm, i'm not sure what you mean with incremental reflow, am i right
> in assuming that you mean any signal from the model should just
> "queue" an update in the tree view via idle handler and that
> way multiple updates get coalesced?
> that still can have subtle issues with thing like the selection
> API, e.g. you'd basically need something like:

Only the size gets updated in the idle handler.  The idea is that
generating the tree (and walking the tree) is relatively quick, but
measuring text can be slow.  So nodes are added with a height of 0 (so
they appear to not be there momentarily).  However, functions like
find_node, selection, etc will still work.

Thanks,
-Jonathan




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