From ec9cccd36f161d7111053402b60c20d2d1a95013 Mon Sep 17 00:00:00 2001 From: Jens Finke Date: Wed, 30 Jan 2002 20:49:05 +0000 Subject: [PATCH] Removed 'Beware:' comment together with it's related bonobo_object_unref 2002-01-30 Jens Finke * eog-control.c (eog_control_destroy): Removed 'Beware:' comment together with it's related bonobo_object_unref calls. It's true these aren't neccessary. (eog_control_construct): Re-enabled the adding of the property_control interface. * eog-image-view.c (eog_image_view_get_property_control): Use bonobo_property_control_new_full to set the BonoboEventSource explictly. [This is very strange: If we only use bonobo_property_control_new here the component hangs on shut down!?!?]. (eog_iamge_view_destroy): Removed 'Beware' comment and related bonobo_object_unref call. --- viewer/ChangeLog | 16 ++++++++++++++++ viewer/eog-control.c | 13 ++----------- viewer/eog-image-view.c | 11 ++++++----- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/viewer/ChangeLog b/viewer/ChangeLog index 1999e9c4..1ce3abd9 100644 --- a/viewer/ChangeLog +++ b/viewer/ChangeLog @@ -1,3 +1,19 @@ +2002-01-30 Jens Finke + + * eog-control.c (eog_control_destroy): Removed 'Beware:' comment + together with it's related bonobo_object_unref calls. It's true + these aren't neccessary. + (eog_control_construct): Re-enabled the adding of the + property_control interface. + + * eog-image-view.c (eog_image_view_get_property_control): Use + bonobo_property_control_new_full to set the BonoboEventSource + explictly. [This is very strange: If we only use + bonobo_property_control_new here the component hangs on shut + down!?!?]. + (eog_image_view_destroy): Removed 'Beware' comment and related + bonobo_object_unref call. + 2002-01-30 Jens Finke * eog-control.c (eog_control_construct): Re-enabled the properties diff --git a/viewer/eog-control.c b/viewer/eog-control.c index d6938d45..db69c595 100644 --- a/viewer/eog-control.c +++ b/viewer/eog-control.c @@ -41,13 +41,6 @@ eog_control_destroy (BonoboObject *object) if (getenv ("DEBUG_EOG")) g_message ("Destroying EogControl..."); - control = EOG_CONTROL (object); - -//BEWARE: After this has been added by bonobo_object_add_interface, -// we don't own this anymore. Therefore, we cannot touch it. -// bonobo_object_unref (BONOBO_OBJECT (control->priv->image_view)); -// bonobo_object_unref (BONOBO_OBJECT (control->priv->zoomable)); - BONOBO_OBJECT_CLASS (eog_control_parent_class)->destroy (object); } @@ -389,7 +382,6 @@ eog_control_construct (EogControl *control, EogImage *image) { GtkWidget *widget; - BonoboControl *retval; BonoboPropertyBag *pb; BonoboPropertyControl *pc; EogControlPrivate *priv; @@ -414,7 +406,7 @@ eog_control_construct (EogControl *control, gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); - retval = bonobo_control_construct (BONOBO_CONTROL (control), widget); + bonobo_control_construct (BONOBO_CONTROL (control), widget); bonobo_object_add_interface (BONOBO_OBJECT (control), BONOBO_OBJECT (priv->image_view)); @@ -463,11 +455,10 @@ eog_control_construct (EogControl *control, bonobo_control_set_properties (BONOBO_CONTROL (control), BONOBO_OBJREF (pb), NULL); -#if 0 + pc = eog_image_view_get_property_control (priv->image_view); bonobo_object_add_interface (BONOBO_OBJECT (control), BONOBO_OBJECT (pc)); -#endif return control; } diff --git a/viewer/eog-image-view.c b/viewer/eog-image-view.c index 1f25e863..4fc06492 100644 --- a/viewer/eog-image-view.c +++ b/viewer/eog-image-view.c @@ -1537,11 +1537,15 @@ eog_image_view_get_property_bag (EogImageView *image_view) BonoboPropertyControl * eog_image_view_get_property_control (EogImageView *image_view) { + BonoboEventSource *es; + g_return_val_if_fail (image_view != NULL, NULL); g_return_val_if_fail (EOG_IS_IMAGE_VIEW (image_view), NULL); - return bonobo_property_control_new (property_control_get_cb, - 1, image_view); + es = bonobo_event_source_new (); + + return bonobo_property_control_new_full (property_control_get_cb, + 1, es, image_view); } void @@ -1802,9 +1806,6 @@ eog_image_view_destroy (BonoboObject *object) gtk_object_unref (GTK_OBJECT (priv->client)); bonobo_object_unref (BONOBO_OBJECT (priv->property_bag)); -//BEWARE: After this has been added somewhere by bonobo_object_add_interface, -// we don't own this anymore. Therefore, we cannot touch it. -// bonobo_object_unref (BONOBO_OBJECT (priv->property_control)); bonobo_object_unref (BONOBO_OBJECT (priv->image)); bonobo_object_unref (BONOBO_OBJECT (priv->uic));