[gimp/metadata-browser] app: unparent GimpDockBook's menu button in dispose() not finalize()
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] app: unparent GimpDockBook's menu button in dispose() not finalize()
- Date: Fri, 2 Dec 2011 02:07:10 +0000 (UTC)
commit 384bfa155082bf6b5288e10c9be5be4bd8ff57cc
Author: Michael Natterer <mitch gimp org>
Date: Tue Oct 4 23:51:54 2011 +0200
app: unparent GimpDockBook's menu button in dispose() not finalize()
because unparenting requires a fully functional object that can
be used as signal parameter. I have no clue why this doesn't
trigger criticals on X11.
app/widgets/gimpdockbook.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/app/widgets/gimpdockbook.c b/app/widgets/gimpdockbook.c
index bf47c16..b15be5c 100644
--- a/app/widgets/gimpdockbook.c
+++ b/app/widgets/gimpdockbook.c
@@ -312,6 +312,12 @@ 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);
}
@@ -326,12 +332,6 @@ gimp_dockbook_finalize (GObject *object)
dockbook->p->ui_manager = NULL;
}
- if (dockbook->p->menu_button)
- {
- gtk_widget_unparent (dockbook->p->menu_button);
- dockbook->p->menu_button = NULL;
- }
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]