r20805 - gnucash/branches/2.4/src/gnome-utils - [20804]Bug #653056: Fix menu accelerators not working, crash on save-while-quitting.

John Ralls jralls at code.gnucash.org
Mon Jun 27 14:17:16 EDT 2011


Author: jralls
Date: 2011-06-27 14:17:16 -0400 (Mon, 27 Jun 2011)
New Revision: 20805
Trac: http://svn.gnucash.org/trac/changeset/20805

Modified:
   gnucash/branches/2.4/src/gnome-utils/gnc-main-window.c
Log:
[20804]Bug #653056: Fix menu accelerators not working, crash on save-while-quitting.

Modified: gnucash/branches/2.4/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/branches/2.4/src/gnome-utils/gnc-main-window.c	2011-06-27 18:12:17 UTC (rev 20804)
+++ gnucash/branches/2.4/src/gnome-utils/gnc-main-window.c	2011-06-27 18:17:16 UTC (rev 20805)
@@ -3399,18 +3399,20 @@
 gtk_quartz_should_quit (GtkOSXApplication *theApp, GncMainWindow *window)
 {
     QofSession *session;
-    gboolean needs_save, do_shutdown;
+    gboolean needs_save;
 
-    gboolean finished = gnc_main_window_all_finish_pending();
-    if (!finished)
+    if (!gnc_main_window_all_finish_pending() ||
+	gnc_file_save_in_progress())
+    {
         return TRUE;
+    }
     session = gnc_get_current_session();
     needs_save = qof_book_not_saved(qof_session_get_book(session)) &&
                  !gnc_file_save_in_progress();
     if (needs_save && gnc_main_window_prompt_for_save(GTK_WIDGET(window)))
         return TRUE;
 
-    g_idle_add((GSourceFunc)gnc_shutdown, 0);
+    g_timeout_add(250, gnc_main_window_timed_quit, NULL);
     return TRUE;
 }
 



More information about the gnucash-changes mailing list