Re: gtk.TreeModel.iter_children() method, how often should it be called?

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

 



Hi.
> 1. Is this normal (I hope not!) behavior?
I'm not sure about 1000, but calling this function a lot is normal ifyou make major changes to your model while attached to GtkTreeView.
> 2. What tells the TreeModel to stop calling> gtk.TreeModel.iter_children()?  How does the TM know that it has done> everything it needs to do before displaying the tree?
Try detaching model from tree view before doing any major change.Sample code would look something like this (in C):------------ CODE -----------model = gtk_tree_view_get_model( GTK_TREE_VIEW( tree ) );g_object_ref( G_OBJECT( model ) );gtk_tree_view_set_model( GTK_TREE_VIEW( tree ), NULL );
/* Make changes */
gtk_tree_view_set_model( GTK_TREE_VIEW( tree ), model );g_object_unref( G_OBJECT( model ) );------------ /CODE -------------
Hope this helps.
-- Tadej Borovšaktadeboro.blogspot.comtadeboro@xxxxxxxxxxxxxxxxxxxxxxx@gmail.com_______________________________________________gtk-list mailing listgtk-list@xxxxxxxxxxxxx://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux