Removed 'Beware:' comment together with it's related bonobo_object_unref

2002-01-30  Jens Finke <jens@triq.net>

	* 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.
This commit is contained in:
Jens Finke 2002-01-30 20:49:05 +00:00 committed by Jens Finke
parent f18c301cd7
commit ec9cccd36f
3 changed files with 24 additions and 16 deletions

View file

@ -1,3 +1,19 @@
2002-01-30 Jens Finke <jens@triq.net>
* 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 <jens@triq.net>
* eog-control.c (eog_control_construct): Re-enabled the properties

View file

@ -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;
}

View file

@ -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));