Re: gtk_widget_unparent



On Thu, 21 Mar 2002 15:05:18 -0800, "Norman Black"
<stonybrk ix netcom com> wrote:

According to the docs, you are not supposed to use
gtk_widget_unparent.

This is what the GTK+1.2 docs say about gtk_widget_unparent:

|gtk_widget_unparent ()
| void        gtk_widget_unparent             (GtkWidget *widget);
|         widget :

That's all there is. Secondary literature tells me it is supposed to
be
used in derived widgets. There is nothing fundamental about this
statement;
and it won't be there if it weren't supposed to be used at all.

Damn. My bad. I have both the 2.0 and 1.2 docs on my machine and in this
instance I looked at the 2.0. This is what it said.

This function is only for use in widget implementations. Should be
called by implementations of the remove method on GtkContainer, to
dissociate a child from the container.

Best Regards,
Norman Black
Stony Brook Software

----- Original Message -----
From: "Dr.Peter Rottengatter" <peter rottengatter de>
To: "Norman Black" <stonybrk ix netcom com>
Cc: <gtk-app-devel-list gnome org>
Sent: Friday, March 22, 2002 7:21 AM
Subject: Re: gtk_widget_unparent




You should probably use gtk_container_remove to remove a widget from
a
container widget, unless the contain widget has a specific removal
API
call. For example the notebook widget has its own API for removing a
page. Things like the packing boxes do not.

I'll check gtk_container_remove, thinks for the hint, but from the
wording of the function name I suspect it does pretty much the same as
gtk_notebook_remove_page, i.e. removing and *discarding* the sub-tree,
leaving the notebook with one page less behind. I want it exactly the
other way round.


Cheers  Peter
--
---------------------------------------------------------------------
      Dr. Peter Rottengatter       peter rottengatter de
                                   http://www.rottengatter.de
---------------------------------------------------------------------
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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