Re: GtkTree*
- From: Jonathan Blandford <jrb redhat com>
- To: Tim Janik <timj gtk org>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: GtkTree*
- Date: 17 Aug 2001 14:10:52 -0400
Tim Janik <timj gtk org> writes:
> On Wed, 15 Aug 2001, Tim Janik wrote:
>
> > setting up a static model for a treeview, then adding columns, then doing
> > gtk_tree_selection_select_path (tsel, path); doesn't result in a selection
> > because gtk_tree_view_setup_model() aborts on tree_view->priv->columns == NULL.
> > i guess you should setup tree_view->priv->tree as soon as the first column is
> > added (and you have a model). (though, i'm not sure why you can't setup the
> > rbtree right when you have a model and no columns yet).
>
> investigating this further showed that gtk_tree_view_setup_model() and
> gtk_tree_view_set_model() don't sanely maintain tree_view<->model relationship
> state (e.g. gtk_tree_view_setup_model() could setup the signal handlers,
> but not update GTK_TREE_VIEW_MODEL_SETUP, no handling at destruction time etc.).
Those are bugs that need fixing. I'll see what I can do about them.
> appended is a patch that i intend to commit soon, it fixes the above selection
> probelm and also gets rid of tree_view signal handlers connected to the model
> being executed after the tree_view got destroyed.
Actually, we don't want to connect to the signals until we actually
care about the model. I really don't want there to be a substantial
speed difference between:
model = gtk_tree_model_new ();
add_ten_thousand_rows (model);
view = gtk_tree_view_new_with_model (model);
and
model = gtk_tree_model_new ();
view = gtk_tree_view_new_with_model (model);
add_ten_thousand_rows (model);
That is why I delay building the model until size_request. I'm going to
revert that part of your patch and try to fix the bugs above.
-Jonathan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]