Any operation that can overflow will throw an underflow if it's a
negative number. The C interface needs to catch both to prevent
unhandled exception crashes,
"Time to wait for answer" is set 0.
Set minimum value of 1 for the save_on_close_adj.
Disable the associated spinner if the timeout is disabled.
Protect secs_to_save from rolling over if it's already 0.
argument 2 of type 'gint32' on gnucash.gnucash_core.QueryInt32Predicate
Add gint32 to typemap.
Also replace a couple of PyString_ calls leftover from Py2.
This aims, but does not completely fixes bug 430259 or 742086 which
would require data model changes. It upgrades invoice.scm to add the
customer/vendor/employee internal ID. Job invoices will display the
job owner's ID.
This commit will marginally speed up this function when
include-children? is #t. The original code would create a new query
for each descendant. This commit will create one query only for all
accounts when include-children? is #t. Unfortunately there is no
actual live code whereby include-children? is enabled. Anyway this
code is cleaned up.
This improves (gnc:account-get-comm-balance-at-date) to
use (xaccAccountBalanceAsOfDate) instead of cycling through a split
list.
This function is used in numerous charts and should speed them up
tremendously.
An html render containing a <script>...</script> tag will not
typically be parsable by sxml. This augmentation will strip an html
tag from the render. Therefore we can use
(gnc:options->sxml ... #:strip-tag "script")
which will strip off the whole <script> section from the render, which
should usually then be parsable. Note: this is not foolproof, and does
not support nested <script> tags, and it will strip quoted "</script>"
tags too, but should cover common cases.
That is let the percentage increase gradually. The current granularity is still
very rough, but at least it gives an indication of getting closer to fully
loading the data. The previous configuration on the other hand only suggested
something was happening but with no indication where in the load process
gnucash was.
This prevents calling xaccAccountRecomputeBalanceInCurrency on each split that gets added,
which was exponentially increasing load times. On a huge test book the
load time dropped from 53 minutes to 1m20s.
The core issue was that the delete visitor was never called because its parameter
type (char *) didn't match the boost::variant type (const char *).
Fixing the visitor's parameter type also require a const_cast
back to char * because that's what g_free takes as argument.
The rest of this commit is merely fixing KvpValue instantiations that
tried to create a char* KvpValue from a stack based const string instead
of a heap allocated one. That would bomb out on calling the
delete visitor.
Splits were not marked for deletion if the transaction is read-only
and the account is not marked for deletion yet. The net result is
that split will not be freed later on.
However xaccSplitDestroy is also called from a Transaction's do_destroy.
At that point accounts are not necessarily marked for deletion yet (like
is the case when a datafile is closed). This turned out to be a problem
for invoice post transactions (which are also read only) and hence
would cause memory to leak.
1. LC_ALL should set default-report-currency to USD
2. change test monetary output from list-of-strings '("$25.00") to
monetary pairs '(("USD" . 25)) which should be locale independent.
Always use absolute paths for configured directories (BINDIR etc.)
Abstract out the guts of gnc_gbr_find_foo_dir for foo in lib, bin, and data.
etc requires special handling because of the way it's treated if prefix
begins with /opt.
Always fall back on the configured directory if binreloc is disabled and
no default is passed in.
The table storing cell dimensions was never freed. The size of this table is
directly proportional to the number of cells in the register. So the more
transactions/splits in a register, the more memory was leaked - each time
a register was opened and closed. With my huge test book I saw leaks of
4Mb-10Mb per page that was opened/closed.