This replaces the 'account_name' key in the same state. Keys should only be used
data that's actually parsed when reading the state. Using a key for account_name here
can create the false impression this data can be modified. A comment makes it much more
clear the name is only informational while keeping the convenience.
One for the reconcile cell which displays the reconciled date when
reconciled or the void reason if voided. Also for the association cell
to display the uri.
Turns out that the on-the-fly conversion from const char* (the KVP_OPTION_PATH
constants) to std::string with their immediate deletion afterwards is
a quite costly operation. Avoiding this is surprisingly easy: Just keep
local std::string objects at hand, and they don't have to be created
and deleted anymore.
The more optimized solution might be to turn the std::vector<std::string>
into a std::vector<GQuark>, but this commit at least improves the picture for now.
Fixes the crash and also pauses after loading if there are load errors.
The load "protection" catches exceptions other than bad-date so that it's
real protection.
Check for unbalanced transactions (i.e. with only one account) and don't
try to match if there is; report the error in the error log space in the
assistant.
Don't proceed to finding duplicates if the new account tree hasn't been
created, there aren't any.
gnucash has historically supported storing passwords for database
backends with libsecret when HAVE_LIBSECRET is defined. The code is
still present, but support for detecting libsecret's availablity was not
ported over when the build system was converted to cmake. This change
restores the missing detection.
An extra XaccTransBeginEdit, never committed, for transactions that
the backend tried to load when they were already there. That made
the register think that something else had it open.
Instead of reporting an error and declining to load the file (XML)
or failing to enter a value (SQL) when a bad date is found in the
database, use a 0 time stamp (1970-01-01 00:00:00 UTC). Adds a warning
in SQL backends; there was one already in XML.
Unfortunately it turns out that we can't use filestreams because
they can't take path arguments containing Unicode on Windows.
Replace the filestream code with g_file_get_contents(), which
takes care of all of that Windows compatibility noise for us.
Note there is a debugging display which unexpectedly causes test
failure. Calling gncEntryGetDocValue for each entry, with any
combination of booleans, would cause the amounts to change slightly.
Previously whitespace was encoded onto SXML, but it seems to make
travis complain, i.e. on my branch no errors, however, on main Gnucash
branch would occasionally strip whitespace. This change will parse
XHTML and strip whitespace, which means some tests need amending.