Re: gtk_container_remove




Ronald Roth wrote:
does gtk_container_remove destroy the widget that is being removed?

A widget will be automagically destroyed if it's refcount goes to 0. Generally a widget in a container is in such a case. Thus if you don't want it destroyed, you should ref it before removing it just to be safe... Otherwise, the ref counting mechanism should take care of it for you, as long as someone isn't holding onto a ref by mistake.




In my program, I have a
gtk_container_remove(container, widget);
gtk_widget_destroy(widget);

but each time, gtk_widget_destroy complains that assertion
GTK_IS_WIDGET(widget) fails.  What is gtk_container_remove doing that
causes this?

thanks
-Ron

btw, tristan, thanks for the pointer to gtk_container_remove.  Except
for the above, it works beautifully.
_______________________________________________
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]