Start a new log file after a save. Fixes #173056.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13895 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton
2006-05-02 02:32:49 +00:00
parent 014a0bf8a2
commit 5d031b2203
4 changed files with 20 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
2006-05-01 David Hampton <hampton@employees.org>
* src/gnome-utils/gnc-file.c:
* src/engine/TransLog.[ch]: Start a new log file after a save.
Fixes #173056.
2006-05-01 Joshua Sled <jsled@asynchronous.org>
* src/register/register-gnome/pricecell-gnome.c

View File

@@ -93,6 +93,16 @@ void xaccLogEnable (void) { gen_logs = 1; }
/********************************************************************\
\********************************************************************/
void
xaccReopenLog (void)
{
if (trans_log) {
xaccCloseLog();
xaccOpenLog();
}
}
void
xaccLogSetBaseName (const char *basepath)
{

View File

@@ -48,6 +48,8 @@
void xaccOpenLog (void);
void xaccCloseLog (void);
void xaccReopenLog (void);
/**
* @param trans The transaction to write out to the log
* @param flag The engine currently uses the log mechanism with flag char set as

View File

@@ -981,6 +981,7 @@ gnc_file_save (void)
return;
}
xaccReopenLog();
gnc_add_history (session);
gnc_hook_run(HOOK_BOOK_SAVED, session);
LEAVE (" ");
@@ -1035,6 +1036,7 @@ gnc_file_save_as (void)
/* -- this session code is NOT identical in FileOpen and FileSaveAs -- */
xaccLogSetBaseName(newfile);
save_in_progress++;
new_session = qof_session_new ();
qof_session_begin (new_session, newfile, FALSE, FALSE);