John Ralls
b361582cf2
Ensure option UI is sorted: Tabs by names, items by keys.
2021-08-18 15:42:29 -07:00
John Ralls
10381d42e0
Fix color option handling.
...
Read and write color options the way legacy code does. Pass only values
with no alpha to gdk_rgba_parse because it fails if a hex-string has
alpha.
2021-08-18 13:38:06 -07:00
John Ralls
97a317b50c
Ensure that alpha values in colors aren't passed to html.
...
html color tags don't like them.
2021-08-17 15:47:11 -07:00
John Ralls
3d1812aacd
Explicitly cast a value to the decltype of get_value().
...
Can't always rely on implicit conversion working.
2021-08-17 15:41:26 -07:00
John Ralls
bbe8ebbc15
Reserve space for the accounts in their vector.
...
Instead of creating an empty vector and then adding the accounts to the
end of it.
2021-08-17 15:38:07 -07:00
John Ralls
42b4755aea
Set the initial value on Relative Date combo boxes.
2021-08-17 15:36:51 -07:00
John Ralls
c06924622c
Null-value protection for GUID and account values.
2021-08-17 15:34:45 -07:00
John Ralls
53fac914c0
Re-enable connecting the buttons on the Stylesheet Edit select dialog.
2021-08-17 15:30:44 -07:00
John Ralls
e77b5ec03b
Fix RelativeDateValue GtkListModel spec: No tooltips anymore.
2021-08-15 14:27:59 -07:00
John Ralls
474bc360f4
Improve converting vectors to SCM lists.
2021-08-15 14:25:52 -07:00
John Ralls
1cd2cf211c
Specialize QofInstance* options set_value, catch validation exceptions.
...
GncOptionValue<const QofInstance*>.get_value() returns a QofInstance* but
reports store them as strings, either commodity mnemonics or GUIDs.
Specialize set_value/set_default_value from scheme to handle those
possibilities.
GncOptionValidatedValue throws an invalid_argument exception if it's
fed an invalid argument. Catch that so that it doesn't crash the program.
2021-08-13 14:06:47 -07:00
John Ralls
852b2ffc2e
Handle bare currency mnemonics, catch invalid GUID string exceptions.
2021-08-13 14:06:47 -07:00
John Ralls
e43ff93279
Fix some overly-long lines.
2021-08-13 14:06:47 -07:00
John Ralls
1af97ebb9a
Implement registering/unregistering/calling change callbacks.
...
Drives reloading the report when the Apply or OK button is pressed.
2021-08-13 14:06:47 -07:00
John Ralls
86da12d844
Use RGB instead of RGBA for color set for color
2021-08-12 14:28:44 -07:00
John Ralls
a7f0476af9
GncMultichoiceUIItem: Cast the selection index to a size_t.
...
To get correct match with template type.
2021-08-08 15:25:09 -07:00
John Ralls
e8f855e604
Oops, bailed on failure when finding the dialog box buttons.
2021-08-08 15:24:08 -07:00
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