Re: bonobo: howto remove a view?
- From: Dietmar Maurer <dm vlsivie tuwien ac at>
- To: Mathieu Lacage <lacage email enst fr>, "gnome-components-list gnome org" <gnome-components-list gnome org>
- Subject: Re: bonobo: howto remove a view?
- Date: Wed, 17 Nov 1999 14:46:36 +0100
Mathieu Lacage wrote:
> Dietmar Maurer <dm@vlsivie.tuwien.ac.at> writes:
>
> > Nat Friedman wrote:
> >
> > > Dietmar Maurer writes:
> > > > Can someone tell me whats the right way to remove a view? By simply
> > > > destroying the wrapper widget?
> > >
> > > In theory unref'ing the ViewFrame is supposed to do this, but
> > > currently the ViewFrame destroy handler does not notify the
> > > corresponding View that it should go away. This should be easy to
> > > correct.
> > >
> >
> > When I call gnome_object_destroy(view_frame) it unref the remote view -
> > right?
>
> /**
> * gnome_object_destroy
> * @object: A GnomeObject you want to destroy.
> *
> * Destroys an object. Ignores all reference count. Used when you want
> * to force the destruction of the composite object (use only if you know
> * what you are doing).
> */
>
> Obviously, no...
object destroy calls gnome_view_frame_destroy which does the job.
static void
gnome_view_frame_destroy (GtkObject *object)
{
GnomeViewFrame *view_frame = GNOME_VIEW_FRAME (object);
if (view_frame->priv->view != CORBA_OBJECT_NIL){
CORBA_Environment ev;
CORBA_exception_init (&ev);
CORBA_Object_release (view_frame->priv->view, &ev);
CORBA_exception_free (&ev);
}
gtk_object_destroy (GTK_OBJECT (view_frame->priv->wrapper));
g_free (view_frame->priv);
GTK_OBJECT_CLASS (gnome_view_frame_parent_class)->destroy (object);
}
>
> use gnome_object_unref.
>
thats another point.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]