After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779602 - Don't close the window without confirmation with unsaved changes
Don't close the window without confirmation with unsaved changes
Status: RESOLVED FIXED
Product: recipes
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Recipes maintainer(s)
Recipes maintainer(s)
Depends on: 778201
Blocks:
 
 
Reported: 2017-03-05 06:01 UTC by Matthias Clasen
Modified: 2017-03-11 05:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Clasen 2017-03-05 06:01:23 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.
Comment 1 Matthias Clasen 2017-03-05 06:10:43 UTC
this depends on us keeping track of the unsaved status in the first place, of course.