Re: Unable to instantiate GtkTreeModelSort with g_object_new.
- From: Tim Janik <timj gtk org>
- To: Owen Taylor <otaylor redhat com>
- Cc: Jeff Franks <jcf tpg com au>, Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: Unable to instantiate GtkTreeModelSort with g_object_new.
- Date: Sun, 18 Nov 2001 15:16:22 +0100 (CET)
On 18 Nov 2001, Owen Taylor wrote:
>
> 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.
then there needs to be a ::model property that is flagged as
CONSTRUCT_ONLY.
>
> Regards,
> Owen
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]