gtk_container_remove() and the new toolbar



There is a problem with gtk_container_remove() when used the new toolbar
in the old API mode. 

The old toolbar was a regular container that cuuld contain any widget,
but the new toolbar can only contain GtkToolItems. So when the new
toolbar remove handler is in old API mode it finds the corresponding
toolitem and removes it.

Unfortunately gtk_container_remove() itself contains this line:

  g_return_if_fail (widget->parent == GTK_WIDGET (container));

which is always going to fail in the old API mode.

I'll suggest to just change that line into

  g_return_if_fail (GTK_IS_TOOLBAR (container) || widget->parent ==
GTK_WIDGET (container));

It looks like the other functions in gtkcontainer.c that have the same
assertions all have to do with child properties, which are not relevant
to the old toolbar.


Soeren



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