Re: Unable to instantiate GtkTreeModelSort with g_object_new.



Jeff Franks <jcf tpg com au> writes:

> Hi,
> 
> I've noticed that you can't instantiate GtkTreeModelSort with
> g_object_new as there is no way the set the child_model. This wouldn't
> be an problem if the gtk_tree_model_sort_set_model() function declared
> in gtktreemodelsort.c were exported.

 g_object_new (GTK_TYPE_TREE_MODEL_SORT, "model", model, NULL);

The reason that there is no set_model() is that the model can't
be changed after construction... there would be lots of problems
if you had a ModelSort added to a tree view and then changed
the model of the ModelSort.

Regards,
                                        Owen



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