John Ralls
cd6ccbe331
Fix account-tree double-free in scheme test when built with gcc.
...
Oddly when built with clang it doesn't exhibit the crash.
2021-07-10 17:24:58 -07:00
John Ralls
691cb0992e
Follow change in loading method for engine's guile bindings.
2021-07-10 17:24:58 -07:00
John Ralls
4b997cd025
Fixups for GncOptionDateValue better design.
2021-07-10 17:24:57 -07:00
John Ralls
b95ea2c4aa
Add Account-list options.
2021-07-10 17:24:57 -07:00
John Ralls
12c5b94430
New scheme function gnc_option_default_value.
2021-07-10 17:24:57 -07:00
John Ralls
3f576671aa
Adapt GncOptionMultiChoiceValue to support list options.
...
Main change adds a value field to the constructor to set the value and
default value.
2021-07-10 17:24:57 -07:00
John Ralls
2f2ac99944
Replace the direct wrapping of GncOptionDB-set-option-string-foo.
...
With a simple type-free function gnc_option_set. This mirrors the current
(gnc:option-set(gnc:lookup-option... and takes care of SCM type conversion.
2021-07-10 17:24:57 -07:00
John Ralls
252ba9b477
Change GncOptionDB::lookup_option to gnc_option_value().
...
The old gnc:lookup-option returned the option object so that it could be
manipulated rather than getting its value; gnc_option_value replicates
the behavior of (gnc:option-value (gnc:lookup-option)).
2021-07-10 17:24:57 -07:00
John Ralls
ff7b263a5f
Fix up and test the int specialization of GncOptionRangeValue.
...
Not sure yet that a double one is really needed.
2021-07-10 17:24:57 -07:00
John Ralls
3dc4bc2377
Implement GncOptionDateValue.
2021-07-10 17:24:57 -07:00
John Ralls
435667e8fe
Implement GncOptionMultichoiceValue
...
Replaces GncOptionValue<GncMultiChoiceOptionChoices> because having the
vector as the value obviously wouldn't work and besides it needs
additional functions.
2021-07-10 17:24:57 -07:00
John Ralls
cee3cdaff9
Instantiate GncOption::set_option for guile, initial types string and int.
...
For proof-of-concept. Guile obviously doesn't know about templates.
2021-07-10 17:24:57 -07:00
John Ralls
0a13b4c518
Fix up the SWIG wrapper for GncOptionDBPtr.
...
Thanks to Flexo@stackoverflow for
https://stackoverflow.com/questions/27693812/how-to-handle-unique-ptrs-with-swig
5 years later, why isn't this in SWIG yet?
2021-07-10 17:24:56 -07:00
John Ralls
ade7fc8b6e
Initial SWIG of GncOptionDB and Scheme tests.
...
This class will be heavily used by reports so we need to ensure SWIG and
Scheme compatibility from the start.
2021-07-10 17:24:56 -07:00