GNOME Bugzilla – Bug 779602
Don't close the window without confirmation with unsaved changes
Last modified: 2017-03-11 05:01:07 UTC
When a new recipe is unsaved, or an existing recipe has unsaved edits, clicking the window close button or using Quit from the app menu should ask for confirmation before closing the window. To do this, you need to connect to the ::delete-event signal for the toplevel window, and return TRUE if the window should remain open. If you return FALSE, the default behavior is to destroy the window.
this depends on us keeping track of the unsaved status in the first place, of course.