notebook: don't leak the action widgets

The notebook owns them, so it must destroy them in destroy().
(cherry picked from commit 4c35d987df)
This commit is contained in:
Michael Natterer 2011-11-17 00:49:42 +01:00
parent 1842b87465
commit 87ebfb19fd

View File

@ -1685,6 +1685,18 @@ gtk_notebook_destroy (GtkWidget *widget)
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
GtkNotebookPrivate *priv = notebook->priv;
if (priv->action_widget[GTK_PACK_START])
{
gtk_widget_unparent (priv->action_widget[GTK_PACK_START]);
priv->action_widget[GTK_PACK_START] = NULL;
}
if (priv->action_widget[GTK_PACK_END])
{
gtk_widget_unparent (priv->action_widget[GTK_PACK_END]);
priv->action_widget[GTK_PACK_END] = NULL;
}
if (priv->menu)
gtk_notebook_popup_disable (notebook);