John Ralls
a44b3664e2
[c++options] Implement GncOptionGncOwnerValue class.
...
GncOwners aren't QofInstances and have limited lifetimes so an option
must hold its own, wrapped in std::unique_ptr for memory management.
2023-03-14 16:11:39 -07:00
John Ralls
1eecb9f5c0
[c++ options] Fix locale dependency in test-gnc-option-scheme-output.
...
Created by using std::to_string() in GncOptionRangeValue::serialize.
It wraps sprintf that reads the locale. Use ostringstream instead.
2023-03-02 12:22:55 -08:00
John Ralls
408b5ec216
[c++ options] Restore forward & backward compatibility, fix crash.
...
Store Number Range option values as a pair '(percentage . value) or '(pixels .
value) depending on the size of value as 4.x and earlier expect. When reading a
stored number range option handle the possibility that value is fixed
point (e.g. 50.0) as 4.x and earlier emit, avoiding a crash.
2023-02-25 16:25:36 -08:00
Richard Cohen
bddb4468fa
Import GLIB2 as a target, and use it to simplify the CMakeLists
2023-02-21 12:59:42 +00:00
Richard Cohen
1cec0cb3f3
Use internal extern "C" { ... } for C++
...
- removes warnings compiling swig engine
...
[ 10%] Generating swig-engine.cpp
.../libgnucash/engine/engine-helpers.h:31: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gnc-date.h:83: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/qofquery.h:90: Warning 302: Identifier 'QofQuery' redefined (ignored),
.../libgnucash/engine/gnc-option.hpp:55: Warning 302: previous definition of 'QofQuery'.
.../libgnucash/engine/gnc-commodity.h:56: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncBusiness.h:40: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncEntry.h:37: Warning 313: Unrecognized extern type "C++".
2023-01-23 18:40:01 +00:00
Frank H. Ellenberger
d039e65aca
Merge branch 'maint'
2023-01-22 11:25:44 +01:00
Christopher Lam
645cc9461d
[core-utils] modify gnc:format to accept -
...
this allows use of varnames such as ${report-title}
2023-01-17 00:24:08 +08:00
John Ralls
b8c0673526
Merge branch 'maint'
2022-12-19 12:11:32 -08:00
John Ralls
b4bab92da2
Bug 798664 - Result of 'gnucash --nofile' is marked dirty
...
Don't create a new book in the new-user dialog unless the user says to.
Don't automatically create a new book when retrieving default commodities
because the retrieve might be requested in a context like the Preferences
dialog when there is no book.
Some report tests relied on requesting the default commodity creating
the book, so in those tests ensure that the book is created first.
2022-12-12 11:30:59 -08:00
Christopher Lam
c78bb3c22c
[test-gnc-option-scheme-output.scm] more scheme typos
...
Addendum to 11d395185
2022-09-27 21:36:05 +08:00
John Ralls
11d395185c
Fix spelling of xaccAccountGetType.
2022-09-26 09:31:47 -07:00
John Ralls
95361ad060
[options] Move gnc-options test to engine/test/CMakeLists.txt.
2022-08-29 17:05:33 -07:00
John Ralls
4ae17d12c7
[options] Move options from app-utils to engine.
...
Options is required for book options that are stored as part of the data
file and so belongs in engine.
2022-08-25 22:09:56 -07:00
John Ralls
3d275a3715
[options] Improve Scheme API consistency
2022-08-06 17:13:16 -07:00
John Ralls
f4c27d4494
Move gnc_ui_account_get_tax_info_string to gnc-locale-tax.c
...
To prevent a circular dependency between libgnc-app-utils and
libgnucash-guile.
2022-07-17 10:00:23 -07:00
John Ralls
95487eb4a0
Merge branch 'maint'
...
# Conflicts:
# gnucash/gnome/window-reconcile2.c
# libgnucash/app-utils/options.scm
# libgnucash/engine/gnc-numeric.cpp
2022-04-14 18:02:17 -07:00
Christopher Lam
40d5db43e6
Bug 797163 - qof_book_get_option segfaults when retrieving a non-leaf frame
...
returns a KvpFrame into a nested list of pairs
returns a KvpValue GLIST into a list
2022-04-10 11:46:12 +08:00
John Ralls
c1c75e8f81
Revert "Revert "Merge Stefan Bayer's 'SepaInternalTransfer' into maint.""
...
The original merge was of a PR based on master into maint, bringing
along all of the development changes in master along with it. We don't
want that so the merge was reverted and the PR's two changes
cherry-picked in. That fixed maint, but then the next regular merge of
maint into master naturally included that revert commit undoing the
changes in master. Not so good. Reverting the revert, this commit,
restores the changes, albeit with messed up history.
2022-01-08 15:10:53 -08:00
John Ralls
5c7967c4a5
Revert "Merge Stefan Bayer's 'SepaInternalTransfer' into maint."
...
This reverts commit 17a3f7fef2
, reversing
changes made to b8458d0732
.
2021-12-03 13:58:07 -08:00
John Ralls
17a3f7fef2
Merge Stefan Bayer's 'SepaInternalTransfer' into maint.
2021-12-03 13:11:28 -08:00
Christopher Lam
d861c65020
[test-engine-extras] don't create splits of opposing amt/value signs
...
Splits' value and amount should never be of opposite signs. Fix
test book which had created this incorrect value/amount
pair. Strengthen env-create-multisplit-transaction to disallow
test book errors.
2021-11-21 23:34:39 +08:00
Christopher Lam
9eaa3eb23a
Merge branch 'maint'
2021-10-14 09:34:28 +08:00
Christopher Lam
0bce6a1d56
[core-utils] introduce gnc:format
...
(gnc:format str [binding value]...)
str will contain ${binding} which will be replaced to value.
2021-10-09 10:25:53 +08:00
Christopher Lam
3ff5bd8246
[test-core-utils] uses srfi-64
2021-10-09 10:25:49 +08:00
Christopher Lam
ad7bffaae1
Run test-core-utils and test-create-account properly
2021-10-07 19:21:00 +08:00
Christopher Lam
34a4b652c1
[test-core-utils.scm] fix - N_ is no longer a macro
2021-10-07 19:20:32 +08:00
Christopher Lam
c6d8333811
Merge branch 'maint'
2021-08-27 20:33:31 +08:00
Christopher Lam
c4a0fb468b
[srfi64-extras.scm] exit instead of return #t if no failures
...
due to change in guile-3.0.7 to fix srfi64 bug
2021-08-19 20:56:13 +08:00
Christopher Lam
1b4d30b3b1
Merge branch 'maint'
2021-06-22 23:30:20 +08:00
John Ralls
da3bd8ec0e
[bindings/guile/test] add SRFI64 test sources to the dist.
2021-06-13 15:25:23 -07:00
Christopher Lam
b25a444140
Merge branch 'maint'
2021-05-14 21:16:48 +08:00
Christopher Lam
14c523e4f1
[test-engine-extras] augment book data generators
...
* txn-currency can be specified explicitly instead of currency of
first split
* split memos can be specified
Note test-register.scm gets some changes because the Trans Num field
was erroneously saved into Split Action fields. Now the num field is
only copied into the TransNum field.
2021-04-30 08:55:26 +08:00
Christopher Lam
e6355be755
[test-scm-engine] remove support for functions deprecated in 4.x
2021-04-24 23:34:58 +08:00
Christopher Lam
5ce8f78f77
Merge branch 'maint'
2021-04-24 23:16:22 +08:00
Christopher Lam
5957b3c256
Add scheme backward compatibility functions renamed in #979
2021-04-23 21:20:42 +08:00
Christopher Lam
d28ff20ff7
Merge branch 'maint'
2021-03-29 17:29:19 +08:00
Geert Janssens
1dd426e314
Potentially fix CI test on Arch related to glib and c++
2021-03-22 12:37:24 +01:00
Christopher Lam
165ca498ad
Add explanatory note for gnc_add_scheme_deprecated_module test code
...
The immediate parent commit removes old deprecated scheme
modules. Link to the old modules for example code.
2021-01-30 00:42:42 +08:00
Christopher Lam
bbcffa3eca
Remove deprecated scheme modules
2021-01-30 00:42:20 +08:00
Christopher Lam
a9ec496ba9
[utilities] Remove deprecated functions
2021-01-25 22:25:54 +08:00
Christopher Lam
2fa5cba250
Merge branch 'maint'
2021-01-25 22:25:20 +08:00
Christopher Lam
a754289daa
[test-scm-utilities] test-end properly
...
otherwise test failures do not set exit code correctly
2021-01-25 22:24:51 +08:00
Christopher Lam
ebcb0bc478
[master] remove deprecated scheme functions
2021-01-04 08:46:09 +08:00
Christopher Lam
cbbca47013
[test-engine-extras] Use more efficient gnc:list-flatten
2020-08-19 07:19:38 +08:00
John Ralls
8ff5af4c19
Decouple QofBook creation from QofSession.
...
So that we don't create two books when loading a session.
Step 1 to not having a dirty book when we think we should have no
book at all.
2020-05-08 15:59:41 -07:00
Geert Janssens
bbeb9a2b62
Drop all gnc-module dependencies and includes from compilation units that no longer use it
...
This also drops the python wrapper for gnc-module. As for the guile wrappers,
python should use other means of loading our shared libraries.
This commit required a few tweaks to the dependency chain as some units
inherited dependency information from gnc-module's public dependency
interface.
2020-04-24 22:16:24 +02:00
Geert Janssens
abf29aa196
Drop the gnc-module wrapper around the test-engine library
...
It's not adding anything
2020-04-24 21:29:20 +02:00
Geert Janssens
e78313147c
Cmake - rework gnc_add_scheme_deprecated_module to use keyword parameters
...
Update all invocations accordingly
2020-03-30 08:41:29 +02:00
Geert Janssens
06ff8a292d
Use new keyword parameters for all calls to gnc_add_scheme_test_targets
2020-03-30 08:41:29 +02:00
Geert Janssens
ab5b7155af
CMake - remove parameter repetition in else() and endif() statements
...
Fix leftovers after the maint branch merge
2020-02-06 17:01:26 +01:00