Re: Goo::Canvas, how to delete an item
- From: muppet <scott asofyet org>
- To: "gtk-perl-list gnome org List" <gtk-perl-list gnome org>
- Subject: Re: Goo::Canvas, how to delete an item
- Date: Sun, 3 Aug 2008 18:01:11 -0400
On Aug 3, 2008, at 3:10 PM, Torsten Schoenfeld wrote:
zentara wrote:
I admit, that a Gnome2::Canvas::Item inherits from Gtk2::Object,
which
also contains a destroy method, but shouldn't the Glib::Object
destroy
be found?
Since I don't know much about either canvas, I can't really help.
But:
Glib::Object has no destroy method.
GtkObject adds the destroy signal to GObject, and GtkWidgets use that
destroy signal.
GnomeCanvas was created before GObject was split out in the 2.x stuff,
so it uses GtkObject as its base, and therefore has the destroy signal.
It looks like GooCanvas is trying to be a good GObject citizen.
GooCanvasItem is just an interface, and the implementors of that
interface are just GObjects. So, in theory, when you get rid of the
last reference to a canvas item, it should go away. That would
require removing it from its parent.
In fact, the documentation for goo_canvas_group_new() says:
the parent item, or NULL. If a parent is specified, it will assume
ownership of the item, and the item will automatically be freed when
it is removed from the parent. Otherwise call g_object_unref() to
free it.
--
So this new album took us quite a while, to get it together, to find a
title and things like that - and we were travelling quite a bit - we
made a few sort of gestures in the East, and a few gestures in the
West, and then we got thrown out because of our gestures - this is
something that we decided was an apt title for a thing that's called
'The Song Remains The Same'.
-- Robert Plant, rambling to introduce a song
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]