[Gtk-sharp-list] Close button and "Really Quit" dialog?

Ian Finlayson finlaysoni at gmail.com
Mon Feb 8 12:17:32 EST 2010


Hello,

I am writing a GTK# application and would like to prevent users from
quitting without saving their work.  If they select the "Quit" option
from the menu, I give them a dialog box offering to save, cancel or
quit without saving.  This works well, but I can't figure out how to
make it happen if they click on the close button on the upper right of
the window.  I tried handling the "Destroyed" event, but it is getting
called after the window has closed, so there's no way for them to
cancel the quit.  Is there some way to do this?

On a related note, is their a standard dialog for this kind of
question?  Because most Gnome applications seem to use the same
dialog, but I couldn't find any info on it.  For now I am just using
my own, but it looks a little different and standards are always good.

Thanks for your time!
 - Ian


More information about the Gtk-sharp-list mailing list