Re: [gtk-list] default signals Q




On Wed, 12 May 1999, pavel wrote:
> 
> When I create a window it comes with defined behavior for the "destroy"
> signal. (It destroys all the widgets inside it, correct?)
> How does one disable that? (I'm guessing I'll gave to run
> gtk_signal_disconnect(, ) but with what second argument?
> 

Containers destroy their children when the container is destroyed; the
only way around that is to remove the children before you destroy the
container (with gtk_container_remove()). You will need to _ref() any
children before you remove them, or they will be destroyed on removal.

You can't disconnect or block this signal handler because it's the default
signal handler; you could gtk_signal_emit_stop() in a signal handler you
connect yourself, but then you wouldn't be able to destroy the container,
which might be kind of bad. That is, you need the container's default
destroy handler to run because it doesn't only destroy children, it also
destroys the container, and presumably you want that to happen if you 
are calling gtk_widget_destroy() on the container.

Havoc






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