[gtk+/gtk-3-2] notebook: don't leak the action widgets
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-2] notebook: don't leak the action widgets
- Date: Thu, 17 Nov 2011 00:06:22 +0000 (UTC)
commit 87ebfb19fd9422de1d778396770c02e91e6481e8
Author: Michael Natterer <mitch gimp org>
Date: Thu Nov 17 00:49:42 2011 +0100
notebook: don't leak the action widgets
The notebook owns them, so it must destroy them in destroy().
(cherry picked from commit 4c35d987dfe3b169f0448d5c27e5ebad06f91cab)
gtk/gtknotebook.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index afc51d3..23e49be 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]