Re: [gtk-list] Re: gtk_main_quit() and destruction
- From: Hrvoje Niksic <hniksic srce hr>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: gtk_main_quit() and destruction
- Date: 19 Feb 1999 20:25:16 +0100
Tim Janik <timj@gtk.org> writes:
> > How do I make sure my "destroy" handler is invoked even in the
> > face of gtk_main_quit()? I need it to make sure that some
> > cleanups are done (e.g. processes killed) when the windows
> > associated to them get destroyed.
>
> for automated window destruction after gtk_main_quit() you can use:
> gtk_quit_add_destroy (1, window);
Thanks; this was exactly what I needed; I'm now using the following
idiom for top-level windows:
self.connect ("destroy", self.destroy_hook)
quit_add_destroy (1, self)
With this, the `destroy_hook()' method is called when I either delete
the window from the window manager, or call the `.destroy()' method
explicitly, or call gtk_main_quit().
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]