There hasn't been a clist to iterate through since 2002, calling
gnc_import_TransInfo_refresh_destacc immediately after
gnc_import_TransInfo_set_destacc(...TRUE) is a no-op, and refresh_model_row
gets called immediately after run_account_picker_dialog_returns.
As a side benefit this might fix bug 757078.
Prevent re-entrance by checking that the static pointers, the second
freeing of which caused the crash. Set said pointers to NULL after
freeing them to make the dialog ready for the next invocation.
Save a default gain/loss account in a book KVP and clean up some other book-currency items.
The changes made are:
app-utils/gnc-ui-util.c & h - define new functions:
gnc_book_get_book_currency_name,
gnc_book_get_default_gain_loss_acct;
reflect changed function names: qof_book_get_book_currency_name,
gnc_valid_policy_name
app-utils/options.scm - reflect changed function name: gnc-valid-policy-name
app-utils/test/test-gnc-ui-util.c - include tests for gnc_book_get_default_gain_loss_acct;
reflect changed function name: gnc_book_get_book_currency_name
engine/policy-p.h - add policy name, description and hint to policy structure
engine/policy.c & h - simplify gnc_get_valid_policy_list & define new functions:
gnc_valid_policy, PolicyGetName, PolicyGetDescription,
PolicyGetHint, xaccGetLIFOPolicy
gnome-utils/dialog-options.c - conform to changes to gnc_get_valid_policy_list
and use new function gnc_cost_policy_select_new
gnome-utils/dialog-utils.c & h - define new function: gnc_cost_policy_select_new
libqof/qof/qofbook.cpp & h - define new property: PROP_OPT_DEFAULT_GAINS_ACCOUNT_GUID
and new function: qof_book_get_default_gain_loss_acct_guid
changed function name: qof_book_get_book_currency_name
libqof/qof/qofbookslots.h - define new option: OPTION_NAME_DEFAULT_GAINS_LOSS_ACCT_GUID
libqof/qof/test/test-qofbook.c - reflect changed function names: qof_book_get_book_currency_name,
gnc_valid_policy_name; add test for qof_book_get_default_gain_loss_acct_guid
Now that there is a subclass of boost::uuids::uuid, that subclass can be
used for GncGUID implementation. This removes the need for the untidy
casts to/from bost::uuids::uuid, and simplifies the logic in many areas.
Although we test libgtest_main, we don't test for libgmock_main. This
shouldn't be necessary since gmock was absorbed by gtest in upstream,
so I'm not planning on working hard to correct this problem robustly.
We'll just check for the source files in the other location where they
might be.
Fix date formatting for UK and locale choices.
The fix works around what's most likely a bug in jqplot
that it poorly interprets UK formatted date strings. To avoid
the bug this patch will always pass ISO formatted date
strings to jqplot for line charts. This is only applied to
the liability chart for now and should be done for all other
line charts as well.