bonobo-control - finalization



Hi!

I don't understand how finalization of bonobo-controls work. From
bonobo/bonobo-control.c:

static void
bonobo_control_finalize (GtkObject *object)
{
        BonoboControl *control = BONOBO_CONTROL (object);

        /*
         * Destroy the control's top-level widget.
         */
        if (control->priv->widget)
                gtk_object_unref (GTK_OBJECT (control->priv->widget));

Now, insert a picture into gnumeric using EOG. Delete this picture (right
click on it and select "Delete"). Gnumeric will destroy the widget and
unref everything related to it (i.e. the Embeddable). EOG reacts as
can be seen below.

Eog-Message: Destroying EogImageView...
Eog-Message: EogImageView destroyed.
Eog-Message: Destroying EogEmbeddableView...
Eog-Message: EogEmbeddableView destroyed.

Gtk-WARNING **: invalid class type `void' in cast to `GtkObject'

Gtk-CRITICAL **: file gtkobject.c: line 1172 (gtk_object_unref): assertion
`GTK_IS_OBJECT (object)' failed.
Eog-Message: Destroying EogEmbeddable...


The warnings result from bonobo trying to unref the top-level widget which
has already been destroyed by gnumeric.

How am I supposed to cleanly shut down an embeddable?

Lutz

                                                        \|||/
+------------------------------------------------+      (o o)
| Lutz Müller            +49 (7156) 34837        +---ooO-(_)-Ooo---+
|                                                                  |
| Hans-Sachs-Straße 5                                              |
| 71254 Ditzingen        http://www.uni-karlsruhe.de/~Lutz.Mueller |
| Germany                urc8 rz uni-karlsruhe de                  |
+------------------------------------------------------------------+





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]