Windows ships with GTK2 in which the default font styles are named
"Sans" "Sans Bold" "Sans Normal" etc. There is no "Sans" font in
Windows; I vote to add a default "Sans-Serif" font-family which is
valid CSS. This ensures exported reports are shown as intended.
This commit prevents report crashing when either Account or
Transaction Matcher strings are invalid POSIX regular expressions and
called with make-regexp.
Treat empty amount fields as 0. This is necessary for example in the case the
csv import file has both a deposit and a withdrawal column.
Note this issue was masked by the bug fixed in the previus commit.
When the scrollbar appears for the reconcile windows it can float above
the reconcile toggle button which make it difficult to toggle. Move this
column to the start which has the advantage of aligning the amount
column above the Total value.
When you select the File/Properties dialog, in the construction of that
a 'Date Format' dialog flashes up while the date component is moved to
the properties dialog. Can mainly be seen on Windows so remove the
visible setting in glade file.
An odd corner case: BST apparently came off of DST at 23:00 26 Oct 2014,
so midnight that day was ambiguous about being DST or not; that causes
the local_date_time constructor to throw in spite of the tm.is_dst element
being 0 (meaning pick standard time).
Instead of just failing in that case, try constructing a local_date_time
three hours later then adjust it back three hours. If *that* doesn't work
then throw a std::invalid argument.
When dialog transfer is used between two commodities and there are no
prices in the db a critical error is logged. Test for price object
being NULL before retrieving the price for the error message.
After much thrashing this turned out to be caused by a date string
with a 3-digit year and that caused an unexpected boost::bad_cast
exception from boost::posix_time::time_from_string().
To prevent that and anything like it, pre-parse the string with
regular expressions to classify them and split out the timezone
if there is one. If neither (perhaps eventually none) of the
regexes match throw std::invalid_argument. The C function will
catch this and return 0.
This is a bit brittle because it depends on Martin Preuss applying our
patch (already applied to borrowed/gwen-gtk3) before releasing 4.20.1,
but creating a proper test for the changes proved to be too difficult.