gnucash maint: Bug 745101 - No warning when quitting with unsaved file
Geert Janssens
gjanssens at code.gnucash.org
Thu Dec 10 12:45:06 EST 2015
Updated via https://github.com/Gnucash/gnucash/commit/568bfa02 (commit)
from https://github.com/Gnucash/gnucash/commit/243bfd1e (commit)
commit 568bfa0282ca9c8d196f69df7dfa98982530214d
Author: Geert Janssens <janssens-geert at telenet.be>
Date: Thu Dec 10 18:44:51 2015 +0100
Bug 745101 - No warning when quitting with unsaved file
Current workaround is to force-use a default backend on new sessions.
This works pretty well as the backend to use is retested when a file
is opened anyway, dropping the default backend. The default backend
should be able to handle the case where no real file/db is specified yet.
I think so far only the xml backend can do this, so I have chosen that one
as default.
For this to work I also had to prevent the python integration from querying
the current root account at startup. This query does create a root account
if it doesn't exist yet in the new session, triggering a dirty state. As
a result gnucash would ask to save the new session right before loading the
real file/db (the one that was open in the previous gnucash session).
This will probably still happen when python is initialized with the 'noisy'
flag (which is when --debug is set).
Summary of changes:
src/libqof/qof/qofsession.c | 42 +++++++++++++++++++++++++++++-------------
src/python/init.py | 6 ++----
2 files changed, 31 insertions(+), 17 deletions(-)
More information about the gnucash-patches
mailing list