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.
These functions are not actually exported in report-system.scm so they
are not generally available to external reports. It should mean
they're safe to remove.
collectors are accumulator-type objects, being mutated with each call,
rather than functional objects. (map) is meant for functional
constructs, returning a list to current continuation. We're not using
the (map) output, so, change it to (for-each) to emphasise this.
The last three commits fix the main part of Bug 796137. An inconvenience
with GSList remains as for the moment qof_query_add_boolean_match only
accepts bytes as parameter and no strings. This still needs to be fixed.
Patch by David Osguthorpe to provide typemaps so that SWIG doesn't
free buffers mem when buffer is saved as part of query struct leading
to garbage content. See https://bugs.gnucash.org/show_bug.cgi?id=796137
In the previous update the changes to 'double_line mode' and 'register
style' were not catered for so this commit fixes that by using a stored
value 'enable_refresh' in the GncPluginPageRegister. This value is used
to enable/disable the triggering of gnc_ledger_display_refresh command
instead of passing a parameter as these settings are triggered by call
backs. The value is set to FALSE in ...recreate_page before restoring
all settings and subsequently set to TRUE after so normal refreshing
can occur. This reduces the potential number of refreshes on load from
7 to 2.
The results of the find are displayed in a search_ledger but with reset
filter settings. As part of the initial setup of the filter, the
SPLIT_RECONCILE and TRANS_DATE_POSTED parameters are purged from the
query and so if 'Date Posted' was used, all transactions were displayed
so this commit tests for a search_ledger and stops the purge along with
saving the query for subsequent use in the filter dialogue.
for incremental entry.
Because the Quartz Input Method module (imquartz.c) messes with the
selected text, so we cache it in the gnucash_sheet object and restore it
after the input module is done with the keypress.
And make the icon small to recover some vertical screen estate.
The motivation for this is that Gtk has dropped the ability for users
to change a toolbar's appearance. And as our icons are often less
than descriptive many users benefit from having textual descriptions
as well. This is the best compromise we can make until the gui
gets an in-depth redesign.
Casting a char* to a struct containing a uint32_t is not universally safe
due to alignment constraints on reads on some platforms. Copy our possibly
unaligned source data into an aligned area of memory to avoid SIGBUS on
armhf.
Reported by vorlonofportland in PR#403. This commit the John's optimized
version of Vorlon's proposed fix.
- add -Wno-deprecated-declarations to CXX_FLAGS as well. This was
reported by vorlonofportland in PR#401 to become necessary for glib 2.58
as that has deprecated g_type_class_add_private which appears in our
c++ code.
- change -Wno-deprecated-register into -Wregister. The former appeared to
be a clang dialect and alias for the latter (see
https://github.com/Barro/compiler-warnings for an overview of clang
and gcc warnings). It was moved to global CXX_FLAGS as it can only be
added for g++.
While debugging for bug 796054 I found cases where an invoice was unposted, but the toolbar
buttons and menu items were configured for a posted invoice. This should now be solved.