Removing a view (fwd)



Hi,

I played around a bit with Bonobo, with no application in mind, only some
`research' projects: a component and a container. The component part
went relatively easy so far, but testing it was a real hassle since I had
to use bonobo/samples/compound-doc/sample-container which proved to be
very unstable. So I began cutting and pasting code around to first make it
more pleasant to me, and working my way gradually. The current package of
both the container and the component is at
	http://cactus.rulez.org/files/bonobo-hello-0.1.tar.gz
. If you have a look at the container code, it tries to remove views by
removing its BonoboWrapper widget from the container:
(hello-component.c, line 111)
    gtk_container_remove (GTK_CONTAINER (component->views_hbox),
			  bonobo_view_frame_get_wrapper (last_view));
This removes the view, but some weird widget stays there (my guess is this
is the overlay thingie for blocking Gdk events from unactivated
components), thus producing artifacts on the screen and warnings whenever
it gets events. I tried destroying the BonoboViewFrame instead, see the
line above:
    bonobo_object_unref (BONOBO_OBJECT (last_view));
however, this seems to do nothing at all.

So, how do I destroy a View properly?

-- 
   .--= ULLA! =----------------------------.  finger cactus@cactus.rulez.org
   \      http://cactus.rulez.org           \   for PGP public key
    `----------= cactus@cactus.rulez.org =--'
Sok kicsi sokat kicsinál.




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