Running trep-options-generator directly from transaction.scm seems to
set the report title properly. The previous code aimed to create a new
options object using transaction report's uuid and reportname, and I
do not anticipate any material change to the report output.
Remove old (non-SEPA) online transaction code, because now in 2019
the banks will only offer SEPA transactions and no others. This
in turn means we don't need the old ktoblzcheck checking functions
at all, hence I remove this dependency completely.
exiting "Loan Repayment Options" page.
Because libstdc++ on Windows doesn't support any C++ locales besides
"C" and throws an exception if you try.
To work around this use GetNumberFormatW (not GetCurrencyFormatW,
that includes the currency symbol) to create a formatted number string
with the right separators, grouping, and precision.
Date format selection on Windows relies on Windows National Language
functions and those are unaffected by the POSIX setlocale(). We have
in the past relied upon gtk initialization to handle this but it has
not been reliable since the move to Gtk3. Note that this applies only
when the locale is set via a Unix-style environment variable (typically
LANG) or in the environment file; it's unnecessary and ignored when
using the localization settings in Region & Language.
There's no way to change the environment locale on Windows so calling
setlocale(LC_ALL, ""), as guile does in its init routine, reads the
user's Language and Region settings instead of the environment
variables. We save the discovered environment locale and call setlocale
with it again after Guile has initialized.
Revert using boost::locale to generate std::locales as boost::locale-
generated locales don't implement std::locale::facet and there was
a bug in the boost::locale ICU wrapper code that caused the wrong year
to be output for the last 3 days of December.
GCC's libstdc++ supports only the "C" locale on Windows and throws if
one attempts to create any other kind. For dates we work around this
by using wstrftime() to format according to locale and then convert
the UTF16 string to UTF8. wstrftime() interprets the time zone flags
%z, %Z, and %ZP differently so we process those first before calling
strftime. This will have the unfortunate effect of not localizing
timezone names but it's as close as we can get.
Use built-in glib functions to retrieve the list of per-currency price
lists, concatenate them into a single list, instead of doing it all in
hand-rolled loops.
Sorting is preformed by the calling GncTreeViewPrice so this removes
sorting from gnc_pricedb_nth_price.
There's no concurrency concern because gnc_pricedb_nth_price is a
GUI callback and so must run in the GUI thread.
Re-introducing the fgets() call in e4836f3c that has been removed in
bf55c30 triggers the "ignoring return value of fgets, declared with
attribute warn_unused_result" error. The even better way is to actually
use the return value and check it for non-NULL because only then
we did a successful fgets call where we can use its result.
These functions allow the saving and restoring of the GncTreeViewAccount
filter settings to the state file. Currently they are only saved if the
page is left open when Gnucash is closed.
It seems that std::locales created by boost::locale::generator are
not entirely compatible: If used to create a new locale with a facet
for boost::date_time one ends up with the C locale and the facet.
For the time being avoid the problem by using boost::locale to format
dates and times. std::chrono gets calendar functions in C++20 so we
can switch date-time backends once we can adopt it.