Re: [gtkmm] Trapping/cancelling window close events



On Mon, 2003-01-20 at 09:45, jyasskin mail utexas edu wrote:
> I'm wondering how to trap window close events in order to, for example,
> present a typical 'Save, Discard, or Cancel' dialog to the user.
> Application generated events are, of course, easy to handle, since I can
> just put code before the hide() call. I'm more concerned with when the
> user uses a window decoration to close the window. The documentation
> doesn't even mention this as a possibility. I think I could provide Save
> or Discard by connecting to signal_hide, but since it returns void,
> there's no way to cancel the close. Is there a way to do this? 

You can override on_delete_event(). See Bakery for an example.

-- 
Murray Cumming
murray usa net
www.murrayc.com




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