aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/ChangeLog6
-rw-r--r--widgets/menus/gal-view-menus.c12
2 files changed, 18 insertions, 0 deletions
diff --git a/widgets/ChangeLog b/widgets/ChangeLog
index 73fcbf355e..bc77dbb576 100644
--- a/widgets/ChangeLog
+++ b/widgets/ChangeLog
@@ -1,3 +1,9 @@
+2001-10-24 Jon Trowbridge <trow@ximian.com>
+
+ * menus/gal-view-menus.c (gal_view_menus_apply): Ref the
+ BonoboUIComponent that we are holding.
+ (gvm_destroy): Unref our BonoboUIComponent.
+
2001-10-21 Christopher James Lahey <clahey@ximian.com>
* menus/gal-view-menus.c: Make this not be a radio button, but
diff --git a/widgets/menus/gal-view-menus.c b/widgets/menus/gal-view-menus.c
index 353b3560ed..2b2677a5bd 100644
--- a/widgets/menus/gal-view-menus.c
+++ b/widgets/menus/gal-view-menus.c
@@ -87,6 +87,12 @@ gvm_destroy (GtkObject *object)
free_verbs(gvm);
remove_xml(gvm);
+
+ if (gvm->priv->component) {
+ bonobo_object_unref (BONOBO_OBJECT (gvm->priv->component));
+ gvm->priv->component = NULL;
+ }
+
g_free(gvm->priv);
gvm->priv = NULL;
@@ -300,6 +306,12 @@ gal_view_menus_apply (GalViewMenus *gvm,
BonoboUIComponent *component,
CORBA_Environment *ev)
{
+ if (component)
+ bonobo_object_ref (BONOBO_OBJECT (component));
+
+ if (gvm->priv->component)
+ bonobo_object_unref (BONOBO_OBJECT (gvm->priv->component));
+
gvm->priv->component = component;
build_stuff (gvm, ev);