From f63a527a63c389a6cf8efb2e6c91736cf423ab6c Mon Sep 17 00:00:00 2001 From: Peter Harvey Date: Fri, 24 Feb 2006 13:27:22 +0000 Subject: lib/egg/egg-editable-toolbar.c 2006-02-24 Peter Harvey * lib/egg/egg-editable-toolbar.c Fix a bug where the visibility_paths were deleted on deconstruct rather than dispose. --- lib/egg/egg-editable-toolbar.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'lib/egg') diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c index d56a9047a..2f49b42f5 100755 --- a/lib/egg/egg-editable-toolbar.c +++ b/lib/egg/egg-editable-toolbar.c @@ -1262,10 +1262,6 @@ egg_editable_toolbar_deconstruct (EggEditableToolbar *toolbar) children = gtk_container_get_children (GTK_CONTAINER (toolbar)); g_list_foreach (children, (GFunc) gtk_widget_destroy, NULL); g_list_free (children); - - children = toolbar->priv->visibility_paths; - g_list_foreach (children, (GFunc) g_free, NULL); - g_list_free (children); } void @@ -1320,6 +1316,7 @@ egg_editable_toolbar_dispose (GObject *object) { EggEditableToolbar *etoolbar = EGG_EDITABLE_TOOLBAR (object); EggEditableToolbarPrivate *priv = etoolbar->priv; + GList *children; if (priv->fixed_toolbar != NULL) { @@ -1327,8 +1324,22 @@ egg_editable_toolbar_dispose (GObject *object) priv->fixed_toolbar = NULL; } + if (priv->visibility_paths) + { + children = priv->visibility_paths; + g_list_foreach (children, (GFunc) g_free, NULL); + g_list_free (children); + priv->visibility_paths = NULL; + } + if (priv->manager != NULL) { + if (priv->visibility_id) + { + gtk_ui_manager_remove_ui (priv->manager, priv->visibility_id); + priv->visibility_id = 0; + } + g_object_unref (priv->manager); priv->manager = NULL; } -- cgit v1.2.3