John Ralls
86d7637160
Handle GncOptionMultichoiceValue::set_value parameters
...
that don't match the get_value return type.
2021-08-08 15:22:53 -07:00
John Ralls
8acf52a69b
Clean up variable declarations in create_list_widget.
2021-08-05 18:22:37 -07:00
John Ralls
e4c9900c9e
Avoid infinite recursion in toggle buttons.
...
Calling activate on a toggle button toggles it again. No need for that.
2021-08-05 18:21:53 -07:00
John Ralls
3c95ad8a00
Create and use renderer for multichoice option widgets.
2021-08-05 18:20:19 -07:00
John Ralls
8079470c8a
Fix Color chooser option value setting and getting.
2021-08-05 17:26:04 -07:00
John Ralls
c83a3f44dd
Fix paste error. Call get, not set, when we want to get.
2021-08-05 15:52:13 -07:00
John Ralls
f0ecc0e2eb
std::string(char*) crashes if it's given a nullptr.
2021-08-05 15:52:13 -07:00
John Ralls
b6622a386b
Pick up option aliases recently added in maint.
2021-08-05 15:52:13 -07:00
John Ralls
26946d792c
Configure the book options before trying to load them.
2021-08-05 15:52:13 -07:00
John Ralls
914f5f359b
Don't unref option UI elements.
...
They're wrapped in unique_ptr and will take care of themselves.
2021-08-05 15:52:13 -07:00
John Ralls
71955cc326
Correctly terminate gtk_list_store_set().
2021-08-05 15:52:13 -07:00
John Ralls
a97b3e0c6d
Don't let C code destroy the ODB, it's owned by Guile.
2021-08-05 15:52:13 -07:00
John Ralls
58d090ff32
Protect strncmp from empty string. It crashes if given one.
2021-08-05 15:52:13 -07:00
John Ralls
a2e1a3e1b8
Extract the GncOptionDB* from the Scheme dispatch function closure.
...
Scheme code keeps the GncOptionDB in a closure. Extract it for C/C++
use. Ownership remains with the closure, don't free the GncOptionDB*.
2021-08-05 15:46:56 -07:00
John Ralls
99eaa81a28
Fix parse of commodity namespace from scheme istream.
...
Just ignore 2 instead of ignoring 1 twice. No ifdef required.
2021-08-04 10:04:47 -07:00
John Ralls
0bd9033bb3
Move includes of glib and gtk out or extern C in new cpp files.
2021-08-01 11:11:20 -07:00
John Ralls
0f02236ebe
Fix gcc warnings.
2021-08-01 10:27:50 -07:00
John Ralls
18997db720
Separate GncOptionAccountValue into GncOptionAccountListValue and GncOptionAccountSelValue.
...
They have different get_value() return types so can't cohabit comfortably.
2021-07-31 18:22:46 -07:00
John Ralls
dd8e8b4efa
Evaluate the getter for making invoice options.
2021-07-31 18:22:45 -07:00
John Ralls
05ac056449
Make separate option type for GncOwner.
...
GncOwner is not a QofInstance subclass.
2021-07-31 18:22:45 -07:00
John Ralls
9d150b1ae7
Always set budget option to default budget.
2021-07-31 18:18:05 -07:00
John Ralls
f5d8d508ee
Create the GncOptionVariant's GncOptionValue in place.
...
Saves a temporary, prevents premature unprotecting of Scheme objects.
2021-07-31 18:18:05 -07:00
John Ralls
c034a26ae7
Protect stored scheme option values from the garbage collector.
2021-07-31 18:18:05 -07:00
John Ralls
67dab6b320
Remove business-options.scm and business-prefs.scm.
...
Their functions have been reimplemented elsewhere.
2021-07-31 18:18:04 -07:00
John Ralls
a1af86ed40
Implement gnc:generate-restore-forms, gnc-optiondb-save-to-scheme.
2021-07-31 17:54:30 -07:00
John Ralls
c34986dad4
Change gnc:new-options to return a fake dispatch function.
...
To placate test-report.scm
2021-07-31 17:54:30 -07:00
John Ralls
3f89d063eb
Evaluate default function in gnc:make-account-sel-limited-option.
2021-07-31 17:54:30 -07:00
John Ralls
6eb5dfed51
make-internal fail if there is a ui_item, not if there isn't.
2021-07-31 17:54:30 -07:00
John Ralls
29a2365fdf
Avoid infinite recursion when the alias changes only the section name.
2021-07-31 17:54:30 -07:00
John Ralls
7885353fe3
Bring option aliases up to date.
2021-07-31 17:54:30 -07:00
John Ralls
bbe74aa086
Remove tooltips from multichoice option values.
...
This is the c++options equivalent to 02a6a0ae
and e1525721
.
2021-07-31 17:54:30 -07:00
John Ralls
5a2ba091a3
Fix compilation error from latest rebase.
2021-07-31 17:54:30 -07:00
John Ralls
7c6ecafd61
Rewrite options.scm to wrap options.hpp functions where needed.
2021-07-31 17:54:30 -07:00
John Ralls
ce5fe577bf
Fix failure to pass accounts list to gnc:make-account-list-option
...
The Scheme way of generating options is somehow able to obtain the
account-list even when running the generator before creating the account
tree. The C++ options object doesn't have that ability so one must make
sure to run the account creation first in a let* statement.
2021-07-31 17:54:30 -07:00
John Ralls
52ef53a405
Implement multichoice selection options.
2021-07-31 17:54:30 -07:00
John Ralls
7239eb809a
Test more natural way of designating relative dates.
2021-07-31 17:54:30 -07:00
John Ralls
23461f1d6c
The value of a list-option is a list. Duh.
2021-07-31 17:54:30 -07:00
John Ralls
12f8df1eab
Fix test failure: Clear the stream before reusing it.
2021-07-31 17:54:30 -07:00
John Ralls
be322a0d7c
Group GncOptionMultChoiceValue::set_multiple with set_default_multiple.
...
Better readability.
2021-07-31 17:54:30 -07:00
John Ralls
27670a6e98
Make the 'pixel and 'percent SCM symbols C++ constants.
...
Improves efficiency and conciseness.
2021-07-31 17:54:30 -07:00
John Ralls
a94f69d6e0
Pretty up some SFINAE formatting for easier reading.
2021-07-31 17:54:30 -07:00
John Ralls
0f8446a1bb
Remove some no longer needed diagnostics.
2021-07-31 17:54:30 -07:00
John Ralls
f66a918be4
Implement GncOptionValue<const QofQuery*>
...
QofQuery isn't a QofInstance and doesn't have a GUID.
2021-07-31 17:54:30 -07:00
John Ralls
0a8f66ee90
Fold GncOptionGncOwnerValue into GncOptionValue<const QofQuery*>.
...
Reflecting the way Scheme options handles it.
2021-07-31 17:54:30 -07:00
John Ralls
418eb06620
Remove GncOptionDateValue::set_default_value(size_t)
...
Because it's ambiguous with set_default_value(time64).
2021-07-31 17:54:30 -07:00
John Ralls
7d0cdf7c94
Handle #f input to option typemap(in)s.
2021-07-31 17:54:30 -07:00
John Ralls
86a2f1551f
Implement gnc-make-date-option.
2021-07-31 17:54:30 -07:00
John Ralls
693e966bf9
Extract Scheme date handling functions and apply them.
...
Including in RelativeDatePeriodVec typemap, making it work correctly.
2021-07-31 17:54:30 -07:00
John Ralls
63502900f3
Permit GncOptionAccountValue to have a nil default value.
2021-07-31 17:54:30 -07:00
John Ralls
42185c0ec8
typemap for std::size_t
...
Unaccountably missing from swig_guile.
2021-07-31 17:54:30 -07:00