[gimp] app: don't unparent the menu_button in gimp_dockbook_dispose()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: don't unparent the menu_button in gimp_dockbook_dispose()
- Date: Wed, 16 Nov 2011 23:19:09 +0000 (UTC)
commit ca17c91d9e168619e7b129a8a25d1fac6454fd71
Author: Michael Natterer <mitch gimp org>
Date: Thu Nov 17 00:17:46 2011 +0100
app: don't unparent the menu_button in gimp_dockbook_dispose()
because we don't own it. GTK+ failing to destroy it is no reason, this
needs to be fixed in GtkNotebook.
app/widgets/gimpdockbook.c | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/app/widgets/gimpdockbook.c b/app/widgets/gimpdockbook.c
index b15be5c..dae3013 100644
--- a/app/widgets/gimpdockbook.c
+++ b/app/widgets/gimpdockbook.c
@@ -283,6 +283,9 @@ gimp_dockbook_init (GimpDockbook *dockbook)
gtk_widget_set_can_focus (dockbook->p->menu_button, FALSE);
gtk_button_set_relief (GTK_BUTTON (dockbook->p->menu_button),
GTK_RELIEF_NONE);
+ gtk_notebook_set_action_widget (notebook,
+ dockbook->p->menu_button,
+ GTK_PACK_END);
gtk_widget_show (dockbook->p->menu_button);
image = gtk_image_new_from_stock (GIMP_STOCK_MENU_LEFT, GTK_ICON_SIZE_MENU);
@@ -295,11 +298,6 @@ gimp_dockbook_init (GimpDockbook *dockbook)
g_signal_connect_swapped (dockbook->p->menu_button, "button-press-event",
G_CALLBACK (gimp_dockbook_menu_button_press),
dockbook);
-
- gtk_notebook_set_action_widget (notebook,
- dockbook->p->menu_button,
- GTK_PACK_END);
- gtk_widget_show (dockbook->p->menu_button);
}
static void
@@ -312,12 +310,6 @@ gimp_dockbook_dispose (GObject *object)
while (dockbook->p->dockables)
gimp_dockbook_remove (dockbook, dockbook->p->dockables->data);
- if (dockbook->p->menu_button)
- {
- gtk_widget_unparent (dockbook->p->menu_button);
- dockbook->p->menu_button = NULL;
- }
-
G_OBJECT_CLASS (parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]