This is a first rudimentary separation of gnc-module tests
based on whether they require guile or not. Needs plenty of refinement
which will be applied in followup commits.
1. Instead of creating a C wrapper around gettext to then wrap in
guile, use guile's builtin gettext support directly.
The code still defines the _ and N_ shorthands. However it doesn't
really warant a separate module just for these two shorthands.
Instead define them in core-utils. So all code wanting to use
_ or N_ in guile should now use the (gnucash core-utils) module.
The bulk of this commit is actually deleting the scm-gettext
target and using (gnucash core-utils) instead of (gnucash gettext).
2. As the definition of _ and N_ is removed from app-utils.scm,
the app-utils test for a functional N_ macro has been moved to a
new test file in the guile bindinds tests.
3. The (gnucash gettext) module has been deprecated. Use
(gnucash core-utils) from now on.
This is just a cosmetic. This way the scm targets in the CMakeLists.txt
file are ordered according to their dependencies (targets later in the
file can depend on targets earlier in the file).
This commit tries to do the minimum necessary to move the guile bits from engine
to bindings/guile. As engine is a very central piece in the software, this unfortunately
still touches many other source files:
- A few helper objects have been squashed together:
* engine-helpers-guile.[ch] (of which the c part is extracted from engine-helpers.c)
* gncBusGuile.[ch]
* gnc-hooks-scm.[ch]
- The initialization function of gncmod-engine no longer initializes the scm bits.
Any scm code that wants to interact with the engine code now has to load
the (gnucash engine) scm module, or sometimes (gnucash business-core).
The bulk of changes in this commit actually is updating all the scm consumers to do so.
- scm-scm target has been removed. Instead (gnucash utilities) is part
of scm-engine. A few dependency graphs have been updated for this.
More refinements will be in followup commits.
That should trigger a regeneration of these swig sources if
any of the header files change.
This is done via a small macro that can be reused for other wrappers as well.
Note
cmake 3.15 introduces a 'FILTER' generator expression
that might allow us to do something like the following:
$<FILTER:$<TARGET_PROPERTY:baselib,SOURCES>,INCLUDE,"*.h[pp]?$">
I toyed briefly with that idea but it currently has two issues:
1. 3.15 is newer than our current minimum cmake requirement, so we can't
depend in that feature yet.
2. the sources are relative to *their* source directory, which
is different from the one in which the wrappers are generated
So they should still be properly transformed into absolute paths
By properly marking certain parameters as private or public
we can have cmake work out most of the link_libraries and
include_directoris for other targets dependent on core-utils
- first all rules and variables for libgnc-core-utils
- then the rules to generate additional files (like
gncla-dir.h or gnc-vcs-info.h)
- next rules for the python bindings
- finally rules for the dist targets
Note this commit also eliminates variable
core_utils_ALL_SOURCES, replacing its two
uses directly with its value.
* Eliminate redundant variables (core_utils_ALL_INCLUDES, core_utils_ALL_LIBRARIES)
Their values are used directly in target_include_directories and
target_link_libraries respectively.
They have been eliminated from the python target because target_include_directories
and target_link_libraries will correctly propagate these values.
* Use generator expressions for a few conditional compile defines and options
Note core-utils.i is used by both the guile and the python bindings so
it is moved up to the common bindings directory, while guile
specific changes are in bindings/guile.
This is done with minimal interpretation, to be able to easily
compare with the original scheme code.
It will most likely be optimized in future commits
When an account is selected for matching the incoming source, at the
moment any account can be selected apart from a place holder account.
If the required commodity is passed in, display a warning if the
selected account is a different commodity and disable the OK button.
On first load the Description and Memo columns are set to the width of
the longest piece of text which can force the Info column out of site
so add the 'ellipsize end' to the memo column which will help keep the
info column in view.
The Info column has a cell_render_pixbuf and a cell_render_text aligned
to the left. If the info column is made larger, the text does not keep
to the left so split them into there own columns.
When change a row to skipping it, a pixbuf is created with just a
vertical black line and looks odd. There is no reason to create a
pixbuf so change the value in the store to NULL. Do the same when
the 'match missing' is displayed.
Previous would call gnc:account-get-balances-at-dates and
gnc:account-accumulate-at-dates to retrieve balances and
last-split. This commit reduces the O(2*N) operation to O(N) which
becomes significant with accounts with large number of splits.
Maybe we can reduce other account splitlist scans in the future; these
will be easier and would only require augmenting the record.