Re: Reparenting problem in the GnomeDock.
- From: Nat Friedman <nat helixcode com>
- To: Federico Mena Quintero <federico helixcode com>
- Cc: nat helixcode com, ettore helixcode com, otaylor redhat com, gnome-components-list gnome org
- Subject: Re: Reparenting problem in the GnomeDock.
- Date: Wed, 16 Feb 2000 03:06:17 -0500 (EST)
Federico Mena Quintero writes:
> > [2] I don't know why it was impossible. I tried doing stuff like:
> > gtk_object_ref (GTK_OBJECT (control->priv->widget));
> > gtk_widget_unparent (control->priv->widget);
> > gtk_object_unref (GTK_OBJECT (control->priv->widget));
> > gtk_container_add (GTK_CONTAINER (control->priv->plug),
> > control->priv->widget);
> >
> > where control->priv->widget is the GtkLabel, but this failed
> > pretty horribly, and I never found out why.
>
> Move the unref() after the add(), otherwise the object will be
> destroyed. Here unparent() will remove the but-last reference of the
> control->priv->widget.
Oops, thanks for catching that. Ok, I just tried it that way, and
it doesn't work. I don't know why. The widget's parent gets set, but
it never draws itself. I did make sure it was shown.
Nat
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]