r15169 - gnucash/trunk/src/gnome-utils - Factor out some quiting code from gnc_main_window_delete_event() and

Chris Shoemaker chris at cvs.gnucash.org
Sat Dec 2 19:56:03 EST 2006


Author: chris
Date: 2006-12-02 19:56:01 -0500 (Sat, 02 Dec 2006)
New Revision: 15169
Trac: http://svn.gnucash.org/trac/changeset/15169

Modified:
   gnucash/trunk/src/gnome-utils/gnc-main-window.c
Log:
Factor out some quiting code from gnc_main_window_delete_event() and 
gnc_main_window_cmd_file_quit().  The new implementation fixes two bugs -
one in each of the previous implementations.  

The bug in the gnc_main_window_cmd_file_quit() code was a race condition 
whereby one could quit the application without finishing pending changes in 
pages.  This would happen if the began a save, modified the page during the 
save, and then triggered the File->Quit command before the save completed.  
For the register page, this sequence was possible, even though most of the UI 
controls are disabled during save.

The bug in the gnc_main_window_delete_event() code was that it didn't check 
for an in-progress save before prompting the user to save a dirty book.





More information about the gnucash-patches mailing list