Re: how to remove a CanvasWidget from a canvas and put it on another
- From: u07ih abdn ac uk
- To: thomas linuxpro org
- Cc: u07ih abdn ac uk, gnome-devel-list gnome org
- Subject: Re: how to remove a CanvasWidget from a canvas and put it on another
- Date: Sat, 10 Jun 2000 00:55:15 +0100 (BST)
> I've tried your suggestion however when the canvas is destroyed the canvasitem
> that is associated with the gtkwidget is destroyed and subsequently performs a
> gtk_widget_destroy() on the gtkwidget. Calling gtk_widget_ref() before destroying
> the canvas doesn't seem to keep the widget from being destroyed along with the
> canvasitem.
This sounds like a bug. A widget should not be destroyed if there is a ref held
on it.
> The only thing so far that I have found to work is setting the
> gnomecanvasitem->widget to NULL before destroying the canvas. From looking at the
> code for gnome_canvas_widget_destroy() this will work. What I haven't determined
> yet is if there are any side effects from doing this.
If it works, fair enough.
You might have some problems if the canvas attaches any signals that aren't
removed, but I don'tknow if it does or not.
iain
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]