comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Closing a program with GTK
Date: Thu, 22 Sep 2011 15:48:03 +0200
Date: 2011-09-22T15:48:03+02:00	[thread overview]
Message-ID: <79iy1peuceu9$.bzuvizc9yuhz.dlg@40tude.net> (raw)
In-Reply-To: 4e7b2b6d$0$2601$703f8584@news.kpn.nl

On Thu, 22 Sep 2011 14:36:36 +0200, ldries46 wrote:

> The routine On_Window_Destroy is the 
> one that closes the window and ends the program.

According to the code you posted On_Window_Destroy is a signal handler
connected to the "destroy" event. The intended use of such handler in Gtk
is to free all resources associated with the widget which are not managed
by Gtk.

In Gtk you shall never call any handlers explicitly.

> I need that routine carried out. I don't think it is a good idea to alter 
> the gtk.object.destroy routine so what can I do?

Destroy emits the "destroy" event, which in turn notifies all handlers of
the signal, all reference holders release the reference which then lead to
deallocation of the widget.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2011-09-22 13:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-22  1:21 Closing a program with GTK ldries46
2011-09-22  7:20 ` Dmitry A. Kazakov
2011-09-22 10:24   ` ldries46
2011-09-22 12:07     ` Dmitry A. Kazakov
2011-09-22 12:36       ` ldries46
2011-09-22 13:48         ` Dmitry A. Kazakov [this message]
2012-07-26 21:59           ` Jack Mitchell
2011-09-22 23:06         ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox