resend of bonobo patch
- From: Darin Adler <darin eazel com>
- To: gnome-components-list gnome org
- Cc: michael ximian com, miguel ximian com
- Subject: resend of bonobo patch
- Date: Thu, 8 Mar 2001 12:20:31 -0800
Sorry that the patch got garbled before. Here it is:
Index: bonobo/bonobo-control-frame.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-control-frame.c,v
retrieving revision 1.59
diff -p -u -r1.59 bonobo-control-frame.c
--- bonobo/bonobo-control-frame.c 2001/02/21 10:19:27 1.59
+++ bonobo/bonobo-control-frame.c 2001/03/07 22:48:11
@@ -336,8 +336,15 @@ bonobo_control_frame_destroy (GtkObject
gtk_widget_destroy (control_frame->priv->container);
- if (control_frame->priv->control != CORBA_OBJECT_NIL)
+ if (control_frame->priv->control != CORBA_OBJECT_NIL) {
+ CORBA_Environment ev;
+
+ CORBA_exception_init (&ev);
+ Bonobo_Control_setFrame (control_frame->priv->control,
+ CORBA_OBJECT_NIL,&ev);
+ CORBA_exception_free (&ev);
bonobo_object_release_unref (control_frame->priv->control, NULL);
+ }
control_frame->priv->control = CORBA_OBJECT_NIL;
if (control_frame->priv->socket) {
Index: bonobo/bonobo-control.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-control.c,v
retrieving revision 1.71
diff -p -u -r1.71 bonobo-control.c
--- bonobo/bonobo-control.c 2001/02/23 21:25:17 1.71
+++ bonobo/bonobo-control.c 2001/03/07 22:48:12
@@ -635,11 +635,13 @@ bonobo_control_destroy (GtkObject *objec
bonobo_object_unref (BONOBO_OBJECT (control->priv->propbag));
control->priv->propbag = NULL;
- if (control->priv->active)
- Bonobo_ControlFrame_activated (control->priv->control_frame,
- FALSE, &ev);
-
- CORBA_Object_release (control->priv->control_frame, &ev);
+ if (control->priv->control_frame != CORBA_OBJECT_NIL) {
+ if (control->priv->active)
+ Bonobo_ControlFrame_activated (control->priv->control_frame,
+ FALSE, &ev);
+
+ CORBA_Object_release (control->priv->control_frame, &ev);
+ }
CORBA_exception_free (&ev);
@@ -704,7 +706,10 @@ bonobo_control_set_control_frame (Bonobo
if (control->priv->control_frame != CORBA_OBJECT_NIL)
CORBA_Object_release (control->priv->control_frame, &ev);
- control->priv->control_frame = CORBA_Object_duplicate (control_frame, &ev);
+ if (control_frame == CORBA_OBJECT_NIL)
+ control->priv->control_frame = CORBA_OBJECT_NIL;
+ else
+ control->priv->control_frame = CORBA_Object_duplicate (control_frame, &ev);
CORBA_exception_free (&ev);
@@ -717,7 +722,7 @@ bonobo_control_set_control_frame (Bonobo
* being retrieved.
*
* Returns: The Bonobo_ControlFrame CORBA object associated with @control, this is
- * a CORBA_object_duplicated object. You need to CORBA_free it when you are
+ * a CORBA_Object_duplicated object. You need to CORBA_Object_release it when you are
* done with it.
*/
Bonobo_ControlFrame
===================================================================
-- Darin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]