[Gnucash-changes] r13080 - gnucash/trunk - Re-enable events before processing the book-opened hook. Solves some

David Hampton hampton at cvs.gnucash.org
Thu Feb 2 19:24:26 EST 2006


Author: hampton
Date: 2006-02-02 19:24:26 -0500 (Thu, 02 Feb 2006)
New Revision: 13080
Trac: http://svn.gnucash.org/trac/changeset/13080

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/gnome-utils/gnc-file.c
Log:
Re-enable events before processing the book-opened hook.  Solves some
strange problems in the account


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-02-02 18:47:34 UTC (rev 13079)
+++ gnucash/trunk/ChangeLog	2006-02-03 00:24:26 UTC (rev 13080)
@@ -1,3 +1,10 @@
+2006-02-02  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/gnc-file.c: Re-enable events before processing
+	the book-opened hook.  Solves some strange problems in the account
+	tree which were caused by the Orphan account being created during
+	the callbacks, but no event being sent to the account tree model.
+
 2006-02-02  Derek Atkins  <derek at ihtfp.com>
 
 	* src/backend/file/io-gncxml-v2.c:

Modified: gnucash/trunk/src/gnome-utils/gnc-file.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-file.c	2006-02-02 18:47:34 UTC (rev 13079)
+++ gnucash/trunk/src/gnome-utils/gnc-file.c	2006-02-03 00:24:26 UTC (rev 13080)
@@ -519,10 +519,11 @@
 
   gnc_hook_run(HOOK_NEW_BOOK, NULL);
 
-  gnc_book_opened ();
-
   gnc_engine_resume_events ();
   gnc_gui_refresh_all ();
+
+  /* Call this after re-enabling events. */
+  gnc_book_opened ();
 }
 
 gboolean
@@ -773,6 +774,7 @@
     gnc_engine_resume_events ();
     gnc_gui_refresh_all ();
 
+    /* Call this after re-enabling events. */
     gnc_book_opened ();
 
     return FALSE;
@@ -782,8 +784,6 @@
   /* close up the old file session (if any) */
   qof_session_set_current_session(new_session);
 
-  gnc_book_opened ();
-
   /* --------------- END CORE SESSION CODE -------------- */
 
   /* clean up old stuff, and then we're outta here. */
@@ -794,6 +794,9 @@
   gnc_engine_resume_events ();
   gnc_gui_refresh_all ();
 
+  /* Call this after re-enabling events. */
+  gnc_book_opened ();
+
   return TRUE;
 }
 



More information about the gnucash-changes mailing list