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.
Handle drawing translations properly
- take empty checks into account on first page both when printing
one check only (bug 693342) and when printing multiple
checks
- fix page level translations, should only be called once
- draw debug grid once for each page instead of for each check
To be mentioned in release notes:
A few bugs in the calculation of check positions while printing checks have been corrected. If you manually edited the check formats to compensate for these positioning errors in previous versions of gnucash, you may have to undo these changes. Please check this before printing your next check.
- rework formula to calculate number of pages so it's easier to understand by a human
- add comments to clarify relations between position, position_max, first_page_count and so on