Closing a gtk app from a menu
- From: Ian Thompson-Bell <ian ruffrecords worldonline co uk>
- To: gtk-list gnome org
- Subject: Closing a gtk app from a menu
- Date: Sat, 05 Aug 2000 13:22:09 +0100
In a simple App it is easy to exit a programme either via the window
close button or a menu option named quit which is connected to
gtk-main-quit(). However, in most apps it is desirable to check the
user actually wants to exit before shutting down the programme. Via the
window close button this is straightforward - you just connect a
callback to the delete event and return true or false as appropriate.
gtk_main_quit can then be connected to the destroy event which I
understand is sent if the delete event callback returns FALSE. The
question I have is how to achieve the same behaviour from a menu
selection. I cannot connect it directly to the dlelete event callback
because the event has not happened and the subsequent destroy event does
not occur.
Ian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]