aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPeter Harvey <peter.a.harvey@gmail.com>2006-02-24 21:27:22 +0800
committerPeter Anthony Harvey <paharvey@src.gnome.org>2006-02-24 21:27:22 +0800
commitf63a527a63c389a6cf8efb2e6c91736cf423ab6c (patch)
treebf0b2e658e41c1bc464d5f1ea510934209cf3376 /lib
parent911c3d33e3f1c699ca9d7ed46a2ec2352a6aa1e5 (diff)
downloadgsoc2013-epiphany-f63a527a63c389a6cf8efb2e6c91736cf423ab6c.tar
gsoc2013-epiphany-f63a527a63c389a6cf8efb2e6c91736cf423ab6c.tar.gz
gsoc2013-epiphany-f63a527a63c389a6cf8efb2e6c91736cf423ab6c.tar.bz2
gsoc2013-epiphany-f63a527a63c389a6cf8efb2e6c91736cf423ab6c.tar.lz
gsoc2013-epiphany-f63a527a63c389a6cf8efb2e6c91736cf423ab6c.tar.xz
gsoc2013-epiphany-f63a527a63c389a6cf8efb2e6c91736cf423ab6c.tar.zst
gsoc2013-epiphany-f63a527a63c389a6cf8efb2e6c91736cf423ab6c.zip
lib/egg/egg-editable-toolbar.c
2006-02-24 Peter Harvey <peter.a.harvey@gmail.com> * lib/egg/egg-editable-toolbar.c Fix a bug where the visibility_paths were deleted on deconstruct rather than dispose.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/egg/egg-editable-toolbar.c19
1 files changed, 15 insertions, 4 deletions
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;
}