gnucash master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sat Aug 6 20:18:02 EDT 2022


Updated	 via  https://github.com/Gnucash/gnucash/commit/8b07ac88 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/e29ab533 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/6faaf3b4 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/1ff844c1 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/aa0b0921 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/da0eff2c (commit)
	 via  https://github.com/Gnucash/gnucash/commit/552aa438 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/0e9ed8cf (commit)
	 via  https://github.com/Gnucash/gnucash/commit/3d275a37 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/418bb7d0 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/0213787a (commit)
	 via  https://github.com/Gnucash/gnucash/commit/cf2870b7 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/0b2d14ee (commit)
	 via  https://github.com/Gnucash/gnucash/commit/b94440b1 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/ea56d677 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/a98e4abb (commit)
	from  https://github.com/Gnucash/gnucash/commit/0ef6967a (commit)



commit 8b07ac88cd22eacb8c2f626734290573e21d924d
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Aug 6 10:57:26 2022 -0700

    [options] Add "key" to the register-option documentation blocks.

diff --git a/libgnucash/app-utils/gnc-optiondb.hpp b/libgnucash/app-utils/gnc-optiondb.hpp
index d771eb05e..bc3401089 100644
--- a/libgnucash/app-utils/gnc-optiondb.hpp
+++ b/libgnucash/app-utils/gnc-optiondb.hpp
@@ -86,6 +86,7 @@ gnc_account_list_from_types(QofBook *book,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  */
@@ -111,6 +112,7 @@ inline void gnc_register_string_option(const GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  */
@@ -135,6 +137,7 @@ inline void gnc_register_text_option(const GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  */
@@ -159,6 +162,7 @@ inline void gnc_register_font_option(const GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  */
@@ -183,6 +187,7 @@ inline void gnc_register_budget_option(const GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  */
@@ -232,6 +237,7 @@ inline void gnc_register_commodity_option(const GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  */
@@ -260,6 +266,7 @@ inline void gnc_register_simple_boolean_option(const GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  */
@@ -284,6 +291,7 @@ inline void gnc_register_pixmap_option(GncOptionDBPtr& db, const char* section,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default values for the option.
  * @param allowed The accounts which are available for selection.
@@ -316,6 +324,7 @@ inline void gnc_register_account_list_limited_option(GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default values for the option.
  */
@@ -344,6 +353,7 @@ inline void gnc_register_account_list_option(GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  * @param allowed The accounts which are available for selection.
@@ -376,6 +386,7 @@ inline void gnc_register_account_sel_limited_option(GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The set of possible values for the option. Only one can be selected. Note that the value will be moved from the parameter and using the parameter after this call will result in undefined behavior.
  */
@@ -405,6 +416,7 @@ inline void gnc_register_multichoice_option(GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  * @param list The values available for selection. Note that this parameter will be moved from so using it after this call will result in undefined behavior.
@@ -434,6 +446,7 @@ inline void gnc_register_list_option(GncOptionDBPtr& db, const char* section,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  * @param min The minimum value for the spin control.
@@ -468,6 +481,7 @@ void gnc_register_number_range_option(GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  */
@@ -542,6 +556,7 @@ inline void gnc_register_query_option(GncOptionDBPtr& db, const char* section,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  * @param type The type of owner, determines the UI type.
@@ -569,6 +584,7 @@ inline void gnc_register_owner_option(GncOptionDBPtr& db, const char* section,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  */
@@ -604,6 +620,7 @@ void gnc_register_report_placement_option(GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option. It is checked with gnc_commodity_is_currency.
  */
@@ -650,6 +667,7 @@ inline void gnc_register_currency_option(const GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  */
@@ -676,6 +694,7 @@ inline void gnc_register_invoice_option(const GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  */
@@ -702,6 +721,7 @@ inline void gnc_register_taxtable_option(const GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  */
@@ -727,6 +747,7 @@ inline void gnc_register_counter_option(const GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  */
@@ -755,6 +776,7 @@ inline void gnc_register_counter_format_option(GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  */
@@ -789,6 +811,7 @@ enum RelativeDateUI : uint8_t
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param period The default/starting relative date value for the option.
  * @param ui What UI to display, relative, absolute, or both.
@@ -820,6 +843,7 @@ inline void gnc_register_date_option(GncOptionDBPtr& db, const char* section,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param time The initial time to set in the option.
  * @param ui What UI to display, relative, absolute, or both.
@@ -847,6 +871,7 @@ inline void gnc_register_date_option(GncOptionDBPtr& db, const char* section,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param period_set A vector of relative date periods to display in the relative control.
  * @param both Whether to display both a relative and absolute control or a onla a relative control.
@@ -876,6 +901,7 @@ inline void gnc_register_date_option(GncOptionDBPtr& db, const char* section,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param both Whether to display both a relative and absolute control or a onla a relative control.
  */
@@ -902,6 +928,7 @@ inline void gnc_register_start_date_option(GncOptionDBPtr& db,
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
+ * @param key A short tag used to sort the controls in the dialog.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param both Whether to display both a relative and absolute control or a onla a relative control.
  */

commit e29ab5336f4351b852e173b1dd3e40b3893c0019
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Aug 6 10:40:04 2022 -0700

    [options] Remove key and doc_string from gnc_register_query_option.
    
    It's always used as an internal option with no UI component so it doesn't
    use them.

diff --git a/bindings/guile/gnc-optiondb.i b/bindings/guile/gnc-optiondb.i
index a0c80ee54..bba8caf2a 100644
--- a/bindings/guile/gnc-optiondb.i
+++ b/bindings/guile/gnc-optiondb.i
@@ -759,7 +759,7 @@ wrap_unique_ptr(GncOptionDBPtr, GncOptionDB);
 %ignore gnc_register_multichoice_option(GncOptionDB*, const char*, const char*, const char*, const char*, const char*, GncMultichoiceOptionChoices&&);
 %ignore gnc_register_list_option(GncOptionDB*, const char*, const char*, const char*, const char*, const char*, GncMultichoiceOptionChoices&&);
 %ignore gnc_register_number_Plot_size_option(GncOptionDB*, const char*, const char*, const char*, const char*, int);
-%ignore gnc_register_query_option(GncOptionDB*, const char*, const char*, const char*, const char*, QofQuery*);
+%ignore gnc_register_query_option(GncOptionDB*, const char*, const char*, const QofQuery*);
 %ignore gnc_register_color_option(GncOptionDB*, const char*, const char*, const char*, const char*, std::string);
 %ignore gnc_register_currency_option(GncOptionDB*, const char*, const char*, const char*, const char*, gnc_commodity*);
 %ignore gnc_register_currency_option(GncOptionDB*, const char*, const char*, const char*, const char*, const char*);
diff --git a/libgnucash/app-utils/gnc-optiondb.cpp b/libgnucash/app-utils/gnc-optiondb.cpp
index 82d78cce5..7c9af496f 100644
--- a/libgnucash/app-utils/gnc-optiondb.cpp
+++ b/libgnucash/app-utils/gnc-optiondb.cpp
@@ -833,10 +833,9 @@ gnc_register_number_plot_size_option(GncOptionDB* db,
 
 void
 gnc_register_query_option(GncOptionDB* db, const char* section,
-                          const char* name, const char* key,
-                          const char* doc_string, const QofQuery* value)
+                          const char* name, const QofQuery* value)
 {
-    GncOption option{section, name, key, doc_string, value,
+    GncOption option{section, name, "", "", value,
             GncOptionUIType::INTERNAL};
     db->register_option(section, std::move(option));
 }
diff --git a/libgnucash/app-utils/gnc-optiondb.hpp b/libgnucash/app-utils/gnc-optiondb.hpp
index 32f7981c1..d771eb05e 100644
--- a/libgnucash/app-utils/gnc-optiondb.hpp
+++ b/libgnucash/app-utils/gnc-optiondb.hpp
@@ -516,25 +516,24 @@ inline void gnc_register_number_plot_size_option(const GncOptionDBPtr& db,
 /**
  * Create a new QofQuery option and register it in the options database.
  *
+ * Query options have no UI component so they don't get a key or a docstring.
+ *
  * @param db A GncOptionDB* for calling from C. Caller retains ownership.
  * @param section The database section for the option.
  * @param name The option name.
- * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
  */
 void gnc_register_query_option(GncOptionDB* db, const char* section,
-                               const char* name, const char* key,
-                               const char* doc_string, const QofQuery* value);
+                               const char* name, const QofQuery* value);
 
 /**
  * As above but takes a const GncOptionDBPtr& (const std::unique_ptr<GncOptionDB>&) for calling from C++.
  */
 inline void gnc_register_query_option(GncOptionDBPtr& db, const char* section,
-                                      const char* name, const char* key,
-                                      const char* doc_string,
+                                      const char* name,
                                       const QofQuery* value)
 {
-    gnc_register_query_option(db.get(), section, name, key, doc_string, value);
+    gnc_register_query_option(db.get(), section, name, value);
 }
 
 /**

commit 6faaf3b427333d1374464e367e4681bfe90b24f8
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Aug 5 16:01:31 2022 -0700

    [options] Provide a const char* value flavor for register_commodity
    
    And register_currency_option

diff --git a/bindings/guile/gnc-optiondb.i b/bindings/guile/gnc-optiondb.i
index 12aaa0287..a0c80ee54 100644
--- a/bindings/guile/gnc-optiondb.i
+++ b/bindings/guile/gnc-optiondb.i
@@ -749,6 +749,7 @@ wrap_unique_ptr(GncOptionDBPtr, GncOptionDB);
 %ignore gnc_register_font_option(GncOptionDB*, const char*, const char*, const char*, const char*, std::string);
 %ignore gnc_register_budget_option(GncOptionDB*, const char*, const char*, const char*, const char*, GncBudget*);
 %ignore gnc_register_commodity_option(GncOptionDB*, const char*, const char*, const char*, const char*, gnc_commodity*);
+%ignore gnc_register_commodity_option(GncOptionDB*, const char*, const char*, const char*, const char*, const char*);
 %ignore gnc_register_simple_boolean_option(GncOptionDB*, const char* section, const char* name, const char* key, const char* doc_string, bool value);
 %ignore gnc_register_complex_boolean_option(GncOptionDB*, const char* section, const char* name, const char* key, const char* doc_string, bool value);
 %ignore gnc_register_pixmap_option(GncOptionDB*, const char*, const char*, const char*, const char*, std::string);
@@ -761,6 +762,7 @@ wrap_unique_ptr(GncOptionDBPtr, GncOptionDB);
 %ignore gnc_register_query_option(GncOptionDB*, const char*, const char*, const char*, const char*, QofQuery*);
 %ignore gnc_register_color_option(GncOptionDB*, const char*, const char*, const char*, const char*, std::string);
 %ignore gnc_register_currency_option(GncOptionDB*, const char*, const char*, const char*, const char*, gnc_commodity*);
+%ignore gnc_register_currency_option(GncOptionDB*, const char*, const char*, const char*, const char*, const char*);
 %ignore gnc_register_invoice_option(GncOptionDB*, const char*, const char*, const char*, const char*, GncInvoice*);
 %ignore gnc_register_taxtable_option(GncOptionDB*, const char*, const char*, const char*, const char*, GncTaxTable*);
 %ignore gnc_register_counter_option(GncOptionDB*, const char*, const char*, const char*, const char*, double);
diff --git a/libgnucash/app-utils/gnc-optiondb.cpp b/libgnucash/app-utils/gnc-optiondb.cpp
index 199f5f175..82d78cce5 100644
--- a/libgnucash/app-utils/gnc-optiondb.cpp
+++ b/libgnucash/app-utils/gnc-optiondb.cpp
@@ -33,6 +33,10 @@
 #include "gnc-optiondb-impl.hpp"
 #include "gnc-option-ui.hpp"
 
+extern "C"
+{
+#include <gnc-session.h>
+}
 constexpr const char* log_module{G_LOG_DOMAIN};
 
 constexpr auto stream_max = std::numeric_limits<std::streamsize>::max();
@@ -632,6 +636,30 @@ gnc_register_commodity_option(GncOptionDB* db, const char* section,
     db->register_option(section, std::move(option));
 }
 
+void
+gnc_register_commodity_option(GncOptionDB* db, const char* section,
+                              const char* name, const char* key,
+                              const char* doc_string, const char* value)
+{
+    gnc_commodity* commodity{};
+    const auto book{qof_session_get_book(gnc_get_current_session())};
+    const auto commodity_table{gnc_commodity_table_get_table(book)};
+    const auto namespaces{gnc_commodity_table_get_namespaces(commodity_table)};
+    for (auto node = namespaces; node && commodity == nullptr;
+         node = g_list_next(node))
+    {
+        commodity = gnc_commodity_table_lookup(commodity_table,
+                                               (const char*)(node->data),
+                                               value);
+        if (commodity)
+            break;
+    }
+    GncOption option{GncOptionCommodityValue{section, name, key, doc_string,
+                commodity,
+                GncOptionUIType::COMMODITY}};
+    db->register_option(section, std::move(option));
+}
+
 void
 gnc_register_simple_boolean_option(GncOptionDB* db,
                                    const char* section, const char* name,
@@ -901,7 +929,23 @@ gnc_register_currency_option(GncOptionDB* db, const char* section,
                              const char* doc_string, gnc_commodity *value)
 {
     GncOption option{GncOptionCommodityValue{
-        section, name, key, doc_string, value,GncOptionUIType::CURRENCY
+        section, name, key, doc_string, value, GncOptionUIType::CURRENCY
+        }};
+    db->register_option(section, std::move(option));
+}
+
+void
+gnc_register_currency_option(GncOptionDB* db, const char* section,
+                             const char* name, const char* key,
+                             const char* doc_string, const char* value)
+{
+    const auto book{qof_session_get_book(gnc_get_current_session())};
+    const auto commodity_table{gnc_commodity_table_get_table(book)};
+    const auto commodity = gnc_commodity_table_lookup(commodity_table,
+                                                      "CURRENCY",
+                                                      value);
+    GncOption option{GncOptionCommodityValue{
+        section, name, key, doc_string, commodity, GncOptionUIType::CURRENCY
         }};
     db->register_option(section, std::move(option));
 }
diff --git a/libgnucash/app-utils/gnc-optiondb.hpp b/libgnucash/app-utils/gnc-optiondb.hpp
index 11b00e176..32f7981c1 100644
--- a/libgnucash/app-utils/gnc-optiondb.hpp
+++ b/libgnucash/app-utils/gnc-optiondb.hpp
@@ -203,6 +203,28 @@ inline void gnc_register_commodity_option(const GncOptionDBPtr& db,
     gnc_register_commodity_option(db.get(), section, name, key,
                                   doc_string, value);
 }
+/**
+ * As above but with a const char* value, which should be the symbol
+ * for the commodity. All security editor namespaces will be searched
+ * to retrieve it.
+ */
+void gnc_register_commodity_option(GncOptionDB* db,
+                                   const char* section, const char* name,
+                                   const char* key, const char* doc_string,
+                                   const char* value);
+
+/**
+ * As above but takes a const GncOptionDBPtr& (const std::unique_ptr<GncOptionDB>&) for calling from C++.
+ */
+inline void gnc_register_commodity_option(const GncOptionDBPtr& db,
+                                          const char* section,
+                                          const char* name, const char* key,
+                                          const char* doc_string,
+                                          const char* value)
+{
+    gnc_register_commodity_option(db.get(), section, name, key,
+                                  doc_string, value);
+}
 
 /**
  * Create a new simple boolean option and register it in the options database.
@@ -603,6 +625,26 @@ inline void gnc_register_currency_option(const GncOptionDBPtr& db,
                                  doc_string, value);
 }
 
+/**
+ * As above but with a const char* value, which must be the ISO4217 three-letter
+ * symbol for the currency.
+ */
+void gnc_register_currency_option(GncOptionDB* db,
+                                  const char* section,
+                                  const char* name, const char* key,
+                                  const char* doc_string,
+                                  const char* value);
+
+inline void gnc_register_currency_option(const GncOptionDBPtr& db,
+                                          const char* section,
+                                          const char* name, const char* key,
+                                          const char* doc_string,
+                                          const char* value)
+{
+    gnc_register_currency_option(db.get(), section, name, key,
+                                 doc_string, value);
+}
+
 /**
  * Create a new invoice option and register it in the options database.
  *

commit 1ff844c19568c58daddd4b78ed1d3b60e364b245
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Aug 5 13:38:12 2022 -0700

    [options] Fix implementation of gnc_register_owner_option
    
    To take an owner-type parameter and to set the UIType accordingly.

diff --git a/libgnucash/app-utils/gnc-optiondb.cpp b/libgnucash/app-utils/gnc-optiondb.cpp
index 236df69d4..199f5f175 100644
--- a/libgnucash/app-utils/gnc-optiondb.cpp
+++ b/libgnucash/app-utils/gnc-optiondb.cpp
@@ -678,6 +678,10 @@ gnc_register_account_list_limited_option(GncOptionDB* db,
         std::for_each(value.begin(), value.end(), [](auto& guid){
             std::cout << gnc::GUID(guid).to_string() << " ";
         });
+        std::cout << "and types ";
+        std::for_each(allowed.begin(), allowed.end(), [](auto type) {
+            std::cout << xaccAccountTypeEnumAsString(type) << " ";
+        });
         std::cout << std::endl;
         GncOption option{GncOptionAccountListValue{section, name, key, doc_string,
                     GncOptionUIType::ACCOUNT_LIST, value, std::move(allowed)}};
@@ -812,10 +816,29 @@ gnc_register_query_option(GncOptionDB* db, const char* section,
 void
 gnc_register_owner_option(GncOptionDB* db, const char* section,
                           const char* name, const char* key,
-                          const char* doc_string, const GncOwner* value)
+                          const char* doc_string, const GncOwner* value,
+                          GncOwnerType type)
 {
+    GncOptionUIType uitype;
+    switch (type)
+    {
+    case GNC_OWNER_CUSTOMER:
+        uitype = GncOptionUIType::CUSTOMER;
+        break;
+    case GNC_OWNER_EMPLOYEE:
+        uitype = GncOptionUIType::EMPLOYEE;
+        break;
+    case GNC_OWNER_JOB:
+        uitype = GncOptionUIType::JOB;
+        break;
+    case GNC_OWNER_VENDOR:
+        uitype = GncOptionUIType::VENDOR;
+        break;
+    default:
+        uitype = GncOptionUIType::INTERNAL;
+    };
     GncOption option{section, name, key, doc_string, value,
-            GncOptionUIType::INTERNAL};
+                     uitype};
     db->register_option(section, std::move(option));
 }
 
diff --git a/libgnucash/app-utils/gnc-optiondb.hpp b/libgnucash/app-utils/gnc-optiondb.hpp
index 7efd769a6..11b00e176 100644
--- a/libgnucash/app-utils/gnc-optiondb.hpp
+++ b/libgnucash/app-utils/gnc-optiondb.hpp
@@ -523,10 +523,12 @@ inline void gnc_register_query_option(GncOptionDBPtr& db, const char* section,
  * @param name The option name.
  * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
  * @param value The initial and default value for the option.
+ * @param type The type of owner, determines the UI type.
  */
 void gnc_register_owner_option(GncOptionDB* db, const char* section,
                                const char* name, const char* key,
-                               const char* doc_string, const GncOwner* value);
+                               const char* doc_string, const GncOwner* value,
+                               GncOwnerType type);
 
 /**
  * As above but takes a const GncOptionDBPtr& (const std::unique_ptr<GncOptionDB>&) for calling from C++.
@@ -534,9 +536,10 @@ void gnc_register_owner_option(GncOptionDB* db, const char* section,
 inline void gnc_register_owner_option(GncOptionDBPtr& db, const char* section,
                                       const char* name, const char* key,
                                       const char* doc_string,
-                                      const GncOwner* value)
+                                      const GncOwner* value,
+                                      GncOwnerType type)
 {
-    gnc_register_owner_option(db.get(), section, name, key, doc_string, value);
+    gnc_register_owner_option(db.get(), section, name, key, doc_string, value, type);
 }
 
 /**

commit aa0b0921f408f9d863a153bd12db35f0ced5d1c1
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Jul 31 13:01:13 2022 -0700

    [options] Add a function to check if an option is internal.
    
    Instead of relying on the legacy underscore-section-name hack.

diff --git a/libgnucash/app-utils/gnc-option-impl.hpp b/libgnucash/app-utils/gnc-option-impl.hpp
index 983fae353..d2667db60 100644
--- a/libgnucash/app-utils/gnc-option-impl.hpp
+++ b/libgnucash/app-utils/gnc-option-impl.hpp
@@ -110,6 +110,7 @@ public:
     bool is_changed() const noexcept { return m_value != m_default_value; }
     GncOptionUIType get_ui_type() const noexcept { return m_ui_type; }
     void make_internal() { m_ui_type = GncOptionUIType::INTERNAL; }
+    bool is_internal() { return m_ui_type == GncOptionUIType::INTERNAL; }
     std::string serialize() const noexcept;
     bool deserialize(const std::string& str) noexcept;
 private:
@@ -141,6 +142,7 @@ public:
     bool is_changed() const noexcept;
     GncOptionUIType get_ui_type() const noexcept { return m_ui_type; }
     void make_internal() { m_ui_type = GncOptionUIType::INTERNAL; }
+    bool is_internal() { return m_ui_type == GncOptionUIType::INTERNAL; }
     std::string serialize() const noexcept;
     bool deserialize(const std::string& str) noexcept;
 private:
@@ -188,6 +190,7 @@ public:
     bool is_changed() const noexcept;
     GncOptionUIType get_ui_type() const noexcept { return m_ui_type; }
     void make_internal() { m_ui_type = GncOptionUIType::INTERNAL; }
+    bool is_internal() { return m_ui_type == GncOptionUIType::INTERNAL; }
     std::string serialize() const noexcept;
     bool deserialize(const std::string& str) noexcept;
 private:
@@ -368,6 +371,7 @@ public:
     bool is_changed() const noexcept { return m_value != m_default_value; }
     GncOptionUIType get_ui_type() const noexcept { return m_ui_type; }
     void make_internal() { m_ui_type = GncOptionUIType::INTERNAL; }
+    bool is_internal() { return m_ui_type == GncOptionUIType::INTERNAL; }
     bool is_alternate() const noexcept { return m_alternate; }
     void set_alternate(bool value) noexcept { m_alternate = value; }
     std::string serialize() const noexcept;
@@ -630,6 +634,7 @@ public:
     bool is_changed() const noexcept { return m_value != m_default_value; }
     GncOptionUIType get_ui_type() const noexcept { return m_ui_type; }
     void make_internal() { m_ui_type = GncOptionUIType::INTERNAL; }
+    bool is_internal() { return m_ui_type == GncOptionUIType::INTERNAL; }
     GncOptionMultichoiceKeyType get_keytype(unsigned i) const { return std::get<2>(m_choices.at(i)); }
     std::string serialize() const noexcept;
     bool deserialize(const std::string& str) noexcept;
@@ -782,6 +787,7 @@ public:
     bool is_changed() const noexcept;
     GncOptionUIType get_ui_type() const noexcept { return m_ui_type; }
     void make_internal() { m_ui_type = GncOptionUIType::INTERNAL; }
+    bool is_internal() { return m_ui_type == GncOptionUIType::INTERNAL; }
     bool is_multiselect() const noexcept { return m_multiselect; }
     std::string serialize() const noexcept;
     bool deserialize(const std::string& str) noexcept;
@@ -895,6 +901,7 @@ public:
     bool is_changed() const noexcept { return !guid_equal(&m_value, &m_default_value); }
     GncOptionUIType get_ui_type() const noexcept { return m_ui_type; }
     void make_internal() { m_ui_type = GncOptionUIType::INTERNAL; }
+    bool is_internal() { return m_ui_type == GncOptionUIType::INTERNAL; }
     std::string serialize() const noexcept;
     bool deserialize(const std::string& str) noexcept;
 private:
@@ -1043,6 +1050,7 @@ public:
             m_date != m_default_date; }
     GncOptionUIType get_ui_type() const noexcept { return m_ui_type; }
     void make_internal() { m_ui_type = GncOptionUIType::INTERNAL; }
+    bool is_internal() { return m_ui_type == GncOptionUIType::INTERNAL; }
     const RelativeDatePeriodVec& get_period_set() const { return m_period_set; }
     std::string serialize() const noexcept;
     bool deserialize(const std::string& str) noexcept;
diff --git a/libgnucash/app-utils/gnc-option.cpp b/libgnucash/app-utils/gnc-option.cpp
index d8673aedd..504859250 100644
--- a/libgnucash/app-utils/gnc-option.cpp
+++ b/libgnucash/app-utils/gnc-option.cpp
@@ -281,6 +281,14 @@ GncOption::make_internal()
                }, *m_option);
 }
 
+bool
+GncOption::is_internal()
+{
+    return std::visit([](auto& option)->bool {
+                   return option.is_internal();
+               }, *m_option);
+}
+
 bool
 GncOption::is_changed() const noexcept
 {
diff --git a/libgnucash/app-utils/gnc-option.hpp b/libgnucash/app-utils/gnc-option.hpp
index 71155c5f8..fd2281b73 100644
--- a/libgnucash/app-utils/gnc-option.hpp
+++ b/libgnucash/app-utils/gnc-option.hpp
@@ -160,6 +160,7 @@ public:
     void set_ui_item_from_option();
     void set_option_from_ui_item();
     void make_internal();
+    bool is_internal();
     bool is_changed() const noexcept;
 /** @returns false unless m_option contains a GncOptionMultiselectValue or
  * GncOptionAccountListValue for which multiple selections have been enabled.

commit da0eff2cacdfe5eeb42e0f5d19ec8e6888eab6ee
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Jul 26 14:54:10 2022 -0700

    [options] Implement widget-changed callbacks.
    
    Enables full functionality for complex-boolean and multichoice-callback
    options.
    
    Note that setter-function callback isn't used in any GnuCash code so it
    is not implemented and is not present in the register-callback functions.

diff --git a/bindings/guile/gnc-optiondb.i b/bindings/guile/gnc-optiondb.i
index 483ae6fae..12aaa0287 100644
--- a/bindings/guile/gnc-optiondb.i
+++ b/bindings/guile/gnc-optiondb.i
@@ -929,6 +929,17 @@ wrap_unique_ptr(GncOptionDBPtr, GncOptionDB);
         return gnc_relative_date_to_time64(scm_relative_date_get_period(date));
     }
 
+    void gnc_register_complex_boolean_option(GncOptionDBPtr&, const char*,
+                                             const char*, const char*,
+                                             const char*, bool, SCM);
+
+    void gnc_register_multichoice_callback_option(GncOptionDBPtr&, const char*,
+                                                  const char*, const char*,
+                                                  const char*, const char*,
+                                                  GncMultichoiceOptionChoices&&,
+                                                  SCM);
+
+
 %} //%header
 
 %ignore GncOptionMultichoiceKeyType;
@@ -1531,8 +1542,67 @@ inline SCM return_scm_value(ValueType value)
                     return SCM_BOOL_F;
             }, swig_get_option($self));
     }
+
 };
 
+%inline %{
+/**
+ * Create a new complex boolean option and register it in the options database.
+ *
+ * @param db A GncOptionDB* for calling from C. Caller retains ownership.
+ * @param section The database section for the option.
+ * @param name The option name.
+ * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
+ * @param value The initial and default value for the option.
+ * @param widget_changed_cb A Scheme callback to run from the UIItem's "changed" signal.
+ */
+void gnc_register_complex_boolean_option(GncOptionDBPtr& db,
+                                         const char* section, const char* name,
+                                         const char* key,
+                                         const char* doc_string,
+                                         bool value, SCM widget_changed_cb)
+{
+    GncOption option{section, name, key, doc_string, value,
+            GncOptionUIType::BOOLEAN};
+    option.set_widget_changed (widget_changed_cb);
+    db->register_option(section, std::move(option));
+}
+
+/**
+ * Create a new multichoice option and register it in the options database.
+ *
+ * @param db A GncOptionDB* for calling from C. Caller retains ownership.
+ * @param section The database section for the option.
+ * @param name The option name.
+ * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
+ * @param value The set of possible values for the option. Only one can be selected. Note that the value will be moved from the parameter and using the parameter after this call will result in undefined behavior.
+ * @param widget_changed_cb A Scheme callback to run from the UIItem's "changed" signal.
+ */
+void
+gnc_register_multichoice_callback_option(GncOptionDBPtr& db,
+                                         const char* section,
+                                         const char* name, const char* key,
+                                         const char* doc_string,
+                                         const char* default_val,
+                                         GncMultichoiceOptionChoices&& choices,
+                                         SCM widget_changed_cb)
+{
+    std::string defval{default_val};
+    auto found{std::find_if(choices.begin(), choices.end(),
+                            [&defval](auto& choice)->bool {
+                                return defval == std::get<0>(choice);
+                            })};
+    if (found == choices.end())
+        defval = (choices.empty() ? std::string{"None"} :
+                  std::get<0>(choices.at(0)));
+    GncOption option{GncOptionMultichoiceValue{section, name, key, doc_string,
+                defval.c_str(), std::move(choices)}};
+    option.set_widget_changed(widget_changed_cb);
+    db->register_option(section, std::move(option));
+}
+
+%}
+
 %extend GncOptionDB {
     %template(set_option_string) set_option<std::string>;
     %template(set_option_int) set_option<int>;
diff --git a/gnucash/gnome-utils/dialog-options.cpp b/gnucash/gnome-utils/dialog-options.cpp
index acc79f9e4..3f70884e0 100644
--- a/gnucash/gnome-utils/dialog-options.cpp
+++ b/gnucash/gnome-utils/dialog-options.cpp
@@ -180,6 +180,11 @@ GncOptionGtkUIItem::set_widget(GtkWidget* widget)
     m_widget = static_cast<GtkWidget*>(g_object_ref(widget));
 }
 
+SCM
+GncOptionGtkUIItem::get_widget_scm_value(const GncOption& option) const
+{
+    return SCM_BOOL_F;
+}
 
 static void dialog_reset_cb(GtkWidget * w, gpointer data);
 static void dialog_list_select_cb (GtkTreeSelection *selection, gpointer data);
@@ -238,7 +243,15 @@ void
 gnc_option_changed_widget_cb(GtkWidget *widget, GncOption* option)
 {
     if (!option) return;
-    const_cast<GncOptionUIItem*>(option->get_ui_item())->set_dirty(true);
+    auto ui_item{option->get_ui_item()};
+    auto widget_changed_cb{option->get_widget_changed()};
+    auto gtk_ui_item{dynamic_cast<GncOptionGtkUIItem*>(ui_item)};
+    if (widget_changed_cb && gtk_ui_item)
+    {
+        SCM widget_value{gtk_ui_item->get_widget_scm_value(*option)};
+        scm_call_1(static_cast<SCM>(widget_changed_cb), widget_value);
+    }
+    const_cast<GncOptionUIItem*>(ui_item)->set_dirty(true);
     dialog_changed_internal(widget, true);
 }
 
@@ -445,6 +458,11 @@ dialog_append_page(GncOptionsDialog* dlg, GncOptionSectionPtr& section)
                              GTK_WIDGET(page_content_box), page_label);
 
     /* Switch to selection from a list if the page count threshold is reached */
+    /* Run any callbacks on the default widget values. */
+    section->foreach_option(
+        [](GncOption& option) {
+            gnc_option_changed_option_cb(nullptr, &option);
+        });
     return setup_notebook_pages(dlg, page_content_box, name);
 }
 
@@ -838,6 +856,12 @@ public:
         auto widget{GTK_TOGGLE_BUTTON(get_widget())};
         option.set_value(static_cast<bool>(gtk_toggle_button_get_active(widget)));
     }
+    SCM get_widget_scm_value(const GncOption& option) const override
+    {
+        auto widget{GTK_TOGGLE_BUTTON(get_widget())};
+        return gtk_toggle_button_get_active(widget) ?
+            SCM_BOOL_T : SCM_BOOL_F;
+    }
 };
 
 template <> GtkWidget *
@@ -1102,6 +1126,13 @@ public:
         auto widget{GTK_COMBO_BOX(get_widget())};
         option.set_value<uint16_t>(static_cast<uint16_t>(gtk_combo_box_get_active(widget)));
     }
+    SCM get_widget_scm_value(const GncOption& option) const override
+    {
+        auto widget{GTK_COMBO_BOX(get_widget())};
+        auto id{gtk_combo_box_get_active(widget)};
+        auto value{option.permissible_value(id)};
+        return scm_from_utf8_symbol(value);
+    }
 };
 
 template<> GtkWidget*
diff --git a/gnucash/gnome-utils/dialog-options.hpp b/gnucash/gnome-utils/dialog-options.hpp
index 71c02c39d..b986c3e5e 100644
--- a/gnucash/gnome-utils/dialog-options.hpp
+++ b/gnucash/gnome-utils/dialog-options.hpp
@@ -32,6 +32,7 @@
 
 #include <vector>
 
+#include <libguile.h>
 #include <gnc-option-uitype.hpp>
 #include <gnc-option-ui.hpp>
 
@@ -92,6 +93,7 @@ public:
     void clear_ui_item() override;
     void set_widget(GtkWidget* widget);
     virtual GtkWidget* const get_widget() const { return m_widget; }
+    virtual SCM get_widget_scm_value(const GncOption&) const;
     static WidgetCreateFunc option_widget_factory(GncOption& option,
                                                   GtkGrid* page,
                                                   GtkLabel* name,
diff --git a/libgnucash/app-utils/gnc-option.hpp b/libgnucash/app-utils/gnc-option.hpp
index 71b239fdf..71155c5f8 100644
--- a/libgnucash/app-utils/gnc-option.hpp
+++ b/libgnucash/app-utils/gnc-option.hpp
@@ -197,11 +197,14 @@ public:
  */
     std::istream& in_stream(std::istream& iss);
     friend GncOptionVariant& swig_get_option(GncOption*);
-
+    void set_widget_changed (void* cb) { m_widget_changed = cb; }
+    void* get_widget_changed () { return m_widget_changed; }
 private:
     inline static const std::string c_empty_string{""};
     GncOptionVariantPtr m_option;
     GncOptionUIItemPtr m_ui_item{nullptr};
+/* This is a hack to reserve space for a Guile callback pointer. */
+    void* m_widget_changed{};
 };
 
 inline bool
diff --git a/libgnucash/app-utils/gnc-optiondb.cpp b/libgnucash/app-utils/gnc-optiondb.cpp
index 81ebc91f9..236df69d4 100644
--- a/libgnucash/app-utils/gnc-optiondb.cpp
+++ b/libgnucash/app-utils/gnc-optiondb.cpp
@@ -643,17 +643,6 @@ gnc_register_simple_boolean_option(GncOptionDB* db,
     db->register_option(section, std::move(option));
 }
 
-void
-gnc_register_complex_boolean_option(GncOptionDB* db,
-                                    const char* section, const char* name,
-                                    const char* key, const char* doc_string,
-                                    bool value)
-{
-    GncOption option{section, name, key, doc_string, value,
-            GncOptionUIType::BOOLEAN};
-    db->register_option(section, std::move(option));
-}
-
 void
 gnc_register_pixmap_option(GncOptionDB* db, const char* section,
                            const char* name, const char* key,
diff --git a/libgnucash/app-utils/gnc-optiondb.hpp b/libgnucash/app-utils/gnc-optiondb.hpp
index 7d137abb5..7efd769a6 100644
--- a/libgnucash/app-utils/gnc-optiondb.hpp
+++ b/libgnucash/app-utils/gnc-optiondb.hpp
@@ -232,35 +232,6 @@ inline void gnc_register_simple_boolean_option(const GncOptionDBPtr& db,
                                        doc_string, value);
 }
 
-/**
- * Create a new complex boolean option and register it in the options database.
- *
- * @param db A GncOptionDB* for calling from C. Caller retains ownership.
- * @param section The database section for the option.
- * @param name The option name.
- * @param doc_string A description of the option. This will be used in tooltips and should be marked for translation.
- * @param value The initial and default value for the option.
- */
-void gnc_register_complex_boolean_option(GncOptionDB* db,
-                                         const char* section, const char* name,
-                                         const char* key,
-                                         const char* doc_string,
-                                         bool value);
-
-/**
- * As above but takes a const GncOptionDBPtr& (const std::unique_ptr<GncOptionDB>&) for calling from C++.
- */
-inline void gnc_register_complex_boolean_option(const GncOptionDBPtr& db,
-                                                const char* section,
-                                                const char* name,
-                                                const char* key,
-                                                const char* doc_string,
-                                                bool value)
-{
-    gnc_register_complex_boolean_option(db.get(), section, name, key,
-                                        doc_string, value);
-}
-
 /**
  * Create a new pixmap option and register it in the options database.
  *

commit 552aa438ff7980337cac2168cf7c6621b071362d
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu Jul 21 17:11:51 2022 -0700

    [options] Implement gnc_register_internal_option.

diff --git a/bindings/guile/gnc-optiondb.i b/bindings/guile/gnc-optiondb.i
index e804f8d86..483ae6fae 100644
--- a/bindings/guile/gnc-optiondb.i
+++ b/bindings/guile/gnc-optiondb.i
@@ -771,8 +771,6 @@ wrap_unique_ptr(GncOptionDBPtr, GncOptionDB);
 %ignore gnc_register_date_option(GncOptionDB*, const char*, const char*, const char*, const char*, RelativeDatePeriodVec, bool);
 %ignore gnc_register_start_date_option(GncOptionDB*, const char*, const char*, const char*, const char*, bool);
 %ignore gnc_register_end_date_option(GncOptionDB*, const char*, const char*, const char*, const char*, bool);
-%ignore gnc_register_internal_option(GncOptionDBPtr&, const char*, const char*, const char*, const char*, const std::string&);
-%ignore gnc_register_internal_option(GncOptionDBPtr&, const char*, const char*, const char*, const char*, bool);
 %typemap(in) GncOption* "$1 = scm_is_true($input) ? static_cast<GncOption*>(scm_to_pointer($input)) : nullptr;"
 %typemap(out) GncOption* "$result = ($1) ? scm_from_pointer($1, nullptr) : SCM_BOOL_F;"
 
diff --git a/libgnucash/app-utils/gnc-optiondb.cpp b/libgnucash/app-utils/gnc-optiondb.cpp
index 6d52c118f..81ebc91f9 100644
--- a/libgnucash/app-utils/gnc-optiondb.cpp
+++ b/libgnucash/app-utils/gnc-optiondb.cpp
@@ -1003,6 +1003,28 @@ gnc_register_report_placement_option(GncOptionDBPtr& db,
     db->register_option(section, std::move(option));
 }
 
+void
+gnc_register_internal_option(GncOptionDBPtr& db,
+                             const char* section, const char* name,
+                             const std::string& value)
+{
+    GncOption option{
+        GncOptionValue<std::string>{section, name, "", "", value,
+                                    GncOptionUIType::INTERNAL}};
+    db->register_option(section, std::move(option));
+}
+
+void
+gnc_register_internal_option(GncOptionDBPtr& db,
+                             const char* section, const char* name,
+                             bool value)
+{
+    GncOption option{
+        GncOptionValue<bool>{section, name, "", "", value,
+                             GncOptionUIType::INTERNAL}};
+    db->register_option(section, std::move(option));
+}
+
 GncOptionDB*
 gnc_option_db_new(void)
 {
diff --git a/libgnucash/app-utils/gnc-optiondb.hpp b/libgnucash/app-utils/gnc-optiondb.hpp
index 6c5e8394e..7d137abb5 100644
--- a/libgnucash/app-utils/gnc-optiondb.hpp
+++ b/libgnucash/app-utils/gnc-optiondb.hpp
@@ -593,16 +593,12 @@ inline void gnc_register_color_option(GncOptionDBPtr& db, const char* section,
 }
 
 void gnc_register_internal_option(GncOptionDBPtr& db,
-                                          const char* section, const char* name,
-                                          const char* key,
-                                          const char* doc_string,
-                                          const std::string& value);
+                                  const char* section, const char* name,
+                                  const std::string& value);
 
 void gnc_register_internal_option(GncOptionDBPtr& db,
-                                          const char* section, const char* name,
-                                          const char* key,
-                                          const char* doc_string,
-                                          bool value);
+                                  const char* section, const char* name,
+                                  bool value);
 
 void gnc_register_report_placement_option(GncOptionDBPtr& db,
                                           const char* section, const char* name);

commit 0e9ed8cf0a5b432252c47bd1c0b07e42951ceaf3
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu Jul 21 17:13:45 2022 -0700

    [options] Provide float variants to gnc_register_plot_size_option.

diff --git a/libgnucash/app-utils/gnc-optiondb.hpp b/libgnucash/app-utils/gnc-optiondb.hpp
index 2fbb3237a..6c5e8394e 100644
--- a/libgnucash/app-utils/gnc-optiondb.hpp
+++ b/libgnucash/app-utils/gnc-optiondb.hpp
@@ -484,6 +484,17 @@ void gnc_register_number_plot_size_option(GncOptionDB* db,
                                           const char* doc_string,
                                           int value);
 
+inline void gnc_register_number_plot_size_option(GncOptionDB* db,
+                                          const char* section, const char* name,
+                                          const char* key,
+                                          const char* doc_string,
+                                          float value)
+{
+    gnc_register_number_plot_size_option(db, section, name, key,
+                                         doc_string, static_cast<int>(value));
+}
+
+
 /**
  * As above but takes a const GncOptionDBPtr& (const std::unique_ptr<GncOptionDB>&) for calling from C++.
  */
@@ -498,6 +509,17 @@ inline void gnc_register_number_plot_size_option(const GncOptionDBPtr& db,
                                          doc_string, value);
 }
 
+inline void gnc_register_number_plot_size_option(const GncOptionDBPtr& db,
+                                                 const char* section,
+                                                 const char* name,
+                                                 const char* key,
+                                                 const char* doc_string,
+                                                 float value)
+{
+    gnc_register_number_plot_size_option(db.get(), section, name, key,
+                                         doc_string, static_cast<int>(value));
+}
+
 /**
  * Create a new QofQuery option and register it in the options database.
  *

commit 3d275a3715cb04d9b9b94f3847dc340cae3ed310
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Aug 6 11:18:32 2022 -0700

    [options] Improve Scheme API consistency

diff --git a/bindings/guile/gnc-optiondb.i b/bindings/guile/gnc-optiondb.i
index 557b2228a..e804f8d86 100644
--- a/bindings/guile/gnc-optiondb.i
+++ b/bindings/guile/gnc-optiondb.i
@@ -931,11 +931,18 @@ wrap_unique_ptr(GncOptionDBPtr, GncOptionDB);
         return gnc_relative_date_to_time64(scm_relative_date_get_period(date));
     }
 
-    %}
+%} //%header
 
 %ignore GncOptionMultichoiceKeyType;
 
 %inline %{
+
+    inline SCM
+    is_gncoptiondb (const SCM ptr)
+    {
+        return SWIG_Guile_IsPointerOfType (ptr, SWIGTYPE_p_std__unique_ptrT_GncOptionDB_t) ? SCM_BOOL_T : SCM_BOOL_F;
+    }
+
     inline GncMultichoiceOptionIndexVec
     scm_to_multichoices(const SCM new_value,
                         const GncOptionMultichoiceValue& option)
@@ -1108,6 +1115,11 @@ inline SCM return_scm_value(ValueType value)
 %template(gnc_make_int64_option) gnc_make_option<int64_t>;
 %template(gnc_make_query_option) gnc_make_option<const QofQuery*>;
 %template(gnc_make_owner_option) gnc_make_option<const GncOwner*>;
+
+%rename (get_value) GncOption::get_scm_value;
+%rename (get_default_value) GncOption::get_scm_default_value;
+%rename (set_value) GncOption::set_value_from_scm;
+%rename (set_default_value) GncOption::set_default_value_from_scm;
 %extend GncOption {
     bool is_budget_option()
     {
@@ -1529,8 +1541,7 @@ inline SCM return_scm_value(ValueType value)
     %template(set_option_time64) set_option<time64>;
 };
 
-%template(gnc_register_number_range_option_double) gnc_register_number_range_option<double>;
-%template(gnc_register_number_range_option_int) gnc_register_number_range_option<int>;
+%template(gnc_register_number_range_option) gnc_register_number_range_option<double>;
 
 %inline %{
     /* qof_book_set_data isn't exported by sw-engine and we need it to set up a
@@ -1812,7 +1823,7 @@ inline SCM return_scm_value(ValueType value)
 
     using GncOptionDBPtr = std::unique_ptr<GncOptionDB>;
 /* Forward decls */
-    GncOptionDBPtr new_gnc_optiondb();
+    GncOptionDBPtr gnc_new_optiondb();
     GncOption* gnc_lookup_option(const GncOptionDBPtr& optiondb,
                                  const char* section, const char* name);
 
@@ -1827,8 +1838,9 @@ inline SCM return_scm_value(ValueType value)
     }
 
     static SCM
-    gnc_option_db_lookup_value(const GncOptionDB* optiondb, const char* section,
-                               const char* name)
+    gnc_optiondb_lookup_value(const GncOptionDBPtr& optiondb,
+                              const char* section,
+                              const char* name)
     {
         auto db_opt = optiondb->find_option(section, name);
         if (!db_opt)
@@ -1869,7 +1881,7 @@ inline SCM return_scm_value(ValueType value)
     }
 
     GncOptionDBPtr
-    new_gnc_optiondb()
+    gnc_new_optiondb()
     {
         auto db_ptr{std::make_unique<GncOptionDB>()};
         return db_ptr;
@@ -1883,7 +1895,7 @@ inline SCM return_scm_value(ValueType value)
     }
 
     static void
-    gnc_option_db_set_option_selectable_by_name(GncOptionDBPtr& odb,
+    gnc_optiondb_set_option_selectable_by_name(GncOptionDBPtr& odb,
                                                 const char* section,
                                                 const char* name,
                                                 bool selectable)
diff --git a/bindings/guile/options.scm b/bindings/guile/options.scm
index 847fc00e0..c1a4f58e2 100644
--- a/bindings/guile/options.scm
+++ b/bindings/guile/options.scm
@@ -31,24 +31,30 @@
 (use-modules (ice-9 format))
 (use-modules (ice-9 pretty-print))
 
+;; Conditionally extract the GncOptionDBPtr& from a passed in options:
+; If it's a procedure then it's the object returned by gnc:new-options;
+; otherwise it is assumed to be a GncOptionDBPtr&.
+(define-public (gnc:optiondb options)
+  (if (procedure? options) (options 'get) options))
+
 (define-public (gnc:lookup-option options section name)
   (if options
-      (gnc-lookup-option (options 'lookup) section name)
+      (gnc-lookup-option (gnc:optiondb options) section name)
       #f))
 
 (define-public (gnc:option-setter option)
-  (issue-deprecation-warning "gnc:option-setter is deprecated. Option values are set and retrieved by gnc-set-option and gnc-option-db-lookup.")
+  (issue-deprecation-warning "gnc:option-setter is deprecated. Option values are set and retrieved by gnc-set-option and gnc-optiondb-lookup-value.")
   (lambda (value)
-    (GncOption-set-value-from-scm option value)
+    (GncOption-set-value option value)
     ))
 
 (define-public (gnc:option-set-value option value)
     (issue-deprecation-warning "gnc:option-set-value and indeed all direct option access is deprecated. Use gnc-set-option instead.")
-    (GncOption-set-value-from-scm option value))
+    (GncOption-set-value option value))
 
 (define-public (gnc:option-set-default-value option value)
     (issue-deprecation-warning "gnc:option-set-default-value and indeed all direct option access is deprecated. Use gnc-set-option instead.")
-    (GncOption-set-default-value-from-scm option value))
+    (GncOption-set-default-value option value))
 
 (define-public (gnc:option-section option)
   (GncOption-get-section option))
@@ -57,29 +63,31 @@
   (GncOption-get-name option))
 
 (define-public (gnc:option-default-value option)
-  (GncOption-get-scm-default-value option))
+  (GncOption-get-default-value option))
 
 (define-public (gnc:option-value option)
-    (issue-deprecation-warning "gnc:option-value and indeed all direct option access is deprecated. Use gnc-option-db-lookup-option instead.")
-    (GncOption-get-scm-value option))
+    (issue-deprecation-warning "gnc:option-value and indeed all direct option access is deprecated. Use gnc-optiondb-lookup-value instead.")
+    (GncOption-get-value option))
 
-(define-public (gnc:color-option->html opt)
+(define-public (gnc:color->html color)
   ;; HTML doesn't like alpha values.
-  (let* ((color (GncOption-get-scm-value opt))
-         (html-color (if (> (string-length color) 6)
-                         (substring color 0 6)
-                         color)))
+  (let ((html-color (if (> (string-length color) 6)
+                       (substring color 0 6)
+                       color)))
     (format #f "#~a" html-color)))
 
+(define-public (gnc:color-option->html opt)
+  (gnc:color->html (GncOption-get-value opt)))
+
 (define-public (gnc:color-option->hex-string opt)
-  (format #f "~a" (GncOption-get-scm-value opt)))
+  (format #f "~a" (GncOption-get-value opt)))
 
 (define-public (gnc:option-get-value book category key)
   (define acc (if (pair? key) cons list))
   (qof-book-get-option book (acc category key)))
 
 (define-public (gnc:option-make-internal! options section name)
-  (let ((option (gnc-lookup-option (options 'lookup) section name)))
+  (let ((option (gnc-lookup-option (gnc:optiondb options) section name)))
     (and option (GncOption-make-internal option))))
 
 (define-public (gnc:option-type option)
@@ -87,20 +95,16 @@
 
 ;; Create the database and return a dispatch function.
 (define-public (gnc:new-options)
-  (let ((optiondb (new-gnc-optiondb)))
+  (let ((optiondb (gnc-new-optiondb)))
     (define (dispatch key)
       optiondb)
     dispatch))
 
-;; Use the dispatch function to get the optiondb
-(define-public (gnc:options-get dispatch)
-  (dispatch 'get))
-
-(define-public (gnc:options-set-default-section optiondb section)
-  (GncOptionDB-set-default-section (GncOptionDBPtr-get (optiondb 'set-default-section)) section))
+(define-public (gnc:options-set-default-section options section)
+  (GncOptionDBPtr-set-default-section (gnc:optiondb options) section))
 
 (define-public (gnc:options-for-each func optdb)
-  (gnc-optiondb-foreach (optdb 'foreach) func))
+  (gnc-optiondb-foreach (gnc:optiondb optdb) func))
 
 ;; Copies all values from src-options to dest-options, that is, it
 ;; copies the values of all options from src which exist in dest to
@@ -110,12 +114,12 @@
    dest-options
    (gnc:options-for-each 
     (lambda (src-option) 
-      (let ((dest-option (gnc:lookup-option dest-options 
+      (let ((dest-option (gnc-lookup-option (gnc:optiondb dest-options)
                                             (gnc:option-section src-option)
                                             (gnc:option-name src-option))))
         (if dest-option
-            (gnc:option-set-value dest-option 
-                                  (gnc:option-value src-option)))))
+            (GncOption-set-value dest-option 
+                                 (GncOption-get-value src-option)))))
     src-options)))
 
 ;; Get scheme commands to set changed options, used to write a file that will
@@ -132,8 +136,8 @@
     (GncOption-is-budget-option option))
 
   (define (option-op option)
-    (let ((value (gnc:option-value option))
-          (default-value (gnc:option-default-value option)))
+    (let ((value (GncOption-get-value option))
+          (default-value (GncOption-get-default-value option)))
       (if (not (equal? value default-value))
           (display (string-append
                       "(let ((option (gnc:lookup-option " toplevel-name "\n"
@@ -144,7 +148,7 @@
                       "  ("
                       (cond
                        ((gnc:option-is-budget? option)
-                       (let* ((budget (gnc:option-value option))
+                       (let* ((budget (GncOption-get-value option))
                               (guid (gncBudgetGetGUID budget))
                               (guid-string (gnc:value->string guid)))
                               (if (string? guid-string)
@@ -163,8 +167,7 @@
                       " option))\n\n")))))
 
   (define (generate-forms)
-    (let ((odb (options 'generate-restore-forms)))
-      (gnc-optiondb-foreach2 odb section-op option-op)))
+      (gnc-optiondb-foreach2 (gnc:optiondb options) section-op option-op))
 
   (with-output-to-string generate-forms))
 
@@ -172,11 +175,11 @@
 ;; The following implement the old API that separated creation from registration.
 (define-public (gnc:register-option optdb opt)
   (issue-deprecation-warning "gnc:register-option is deprecated. Use gnc-register-foo-option instead.")
-  (GncOptionDB-register-option (GncOptionDBPtr-get (optdb 'register-option))
-                               (GncOption-get-section opt) opt))
+  (GncOptionDBPtr-register-option (gnc:optiondb optdb)
+                                  (GncOption-get-section opt) opt))
 
 (define-public (gnc:unregister-option optdb section name)
-  (GncOptionDB-unregister-option (GncOptionDBPtr-get (optdb 'unregister-option)) section name))
+  (GncOptionDBPtr-unregister-option (gnc:optiondb optdb) section name))
 
 (define-public (gnc:make-string-option section name key docstring default)
   (issue-deprecation-warning "gnc:make-string-option is deprecated. Make and register the option in one command with gnc-register-string-option.")
@@ -226,7 +229,7 @@
   (let ((defval (if default (default) '())))
   (gnc-make-account-sel-limited-option section name key docstring defval '())))
 (define-public (gnc:make-multichoice-option section name key docstring default multichoice)
-  (issue-deprecation-warning "gnc:make-multichoice-option is deprecated. Make and register the option in one command with gnc:register-multichoice-option.")
+  (issue-deprecation-warning "gnc:make-multichoice-option is deprecated. Make and register the option in one command with gnc-register-multichoice-option.")
   (let ((defval (cond ((symbol? default)
                        (symbol->string default))
                       ((number? default)
@@ -321,13 +324,13 @@
         (both (if (eq? subtype 'both) #t #f)))
     (gnc-make-date-option section name key docstring default relative-date-list both)))
 
-(define-public (gnc:options-make-end-date! optiondb pagename optname sort-tag docstring)
-  (gnc-register-end-date-option (optiondb 'make-option) pagename optname sort-tag docstring))
+(define-public (gnc:options-make-end-date! options pagename optname sort-tag docstring)
+  (gnc-register-end-date-option (gnc:optiondb options) pagename optname sort-tag docstring))
 
-(define-public (gnc:options-make-date-interval! optiondb pagename name-from info-from name-to info-to sort-tag)
-  (gnc-register-start-date-option (optiondb 'make-option) pagename name-from
+(define-public (gnc:options-make-date-interval! options pagename name-from info-from name-to info-to sort-tag)
+  (gnc-register-start-date-option (gnc:optiondb options) pagename name-from
                                   (string-append sort-tag "a") info-from)
-  (gnc-register-end-date-option (optiondb 'make-option) pagename name-to
+  (gnc-register-end-date-option (gnc:optiondb options) pagename name-to
                                 (string-append sort-tag "b") info-to))
 (define-public (gnc:date-option-absolute-time option-value)
   (if (pair? option-value)
@@ -335,16 +338,6 @@
               (cdr option-value)
               (gnc-relative-date-to-time64 (cdr option-value)))
           option-value))
-;; This is a special case where we can't use the exported registration function
-;; because we need to transform the default argument first depending on its
-;; Scheme type.
-(define-public (gnc:register-multichoice-option options section name key docstring default multichoice)
-  (let ((defval (cond ((symbol? default)
-                       (symbol->string default))
-                      ((number? default)
-                       (number->string default))
-                     (else default))))
-  (gnc-register-multichoice-option options section name key docstring defval multichoice)))
 
 ;; Scheme code for supporting options for the business modules
 ;;
diff --git a/bindings/guile/test/test-gnc-option-scheme-output.scm b/bindings/guile/test/test-gnc-option-scheme-output.scm
index dd32ea3c6..bca38a137 100644
--- a/bindings/guile/test/test-gnc-option-scheme-output.scm
+++ b/bindings/guile/test/test-gnc-option-scheme-output.scm
@@ -142,7 +142,7 @@
 (define (test-gnc-string-option-to-scheme)
   (test-begin "test-gnc-string-option-to-scheme")
   (test-option-scheme-output "string"
-                             gnc:make-string-option GncOption-get-scm-value
+                             gnc:make-string-option GncOption-get-value
                              test-string-output-template
                              "waldo" "pepper")
   (test-end "test-gnc-string-option-to-scheme"))
@@ -150,7 +150,7 @@
 (define (test-gnc-text-option-to-scheme)
   (test-begin "test-gnc-text-option-to-scheme")
   (test-option-scheme-output "text"
-                             gnc:make-string-option GncOption-get-scm-value
+                             gnc:make-string-option GncOption-get-value
                              test-string-output-template
                              ""
 "Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium
@@ -161,7 +161,7 @@ veritatis et quasi architecto beatae vitae dicta sunt, explicabo.")
 (define (test-gnc-font-option-to-scheme)
   (test-begin "test-gnc-font-option-to-scheme")
   (test-option-scheme-output "font"
-                             gnc:make-font-option GncOption-get-scm-value
+                             gnc:make-font-option GncOption-get-value
                              test-string-output-template
                              "URW Bookman L Bold Italic 12"
                              "Helvetica 12")
@@ -231,14 +231,14 @@ veritatis et quasi architecto beatae vitae dicta sunt, explicabo.")
   (test-begin "test-gnc-bool-option-to-scheme")
   (test-option-scheme-output "bool"
                              gnc:make-simple-boolean-option
-                             GncOption-get-scm-value
+                             GncOption-get-value
                              test-string-output-template #f #t)
   (test-end "test-gnc-bool-option-to-scheme"))
 
 (define (test-gnc-pixmap-option-to-scheme)
   (test-begin "test-gnc-pixmap-option-to-scheme")
   (test-option-scheme-output "pixmap"
-                             gnc:make-pixmap-option GncOption-get-scm-value
+                             gnc:make-pixmap-option GncOption-get-value
                              test-string-output-template
                              "" "~/mybusiness/mylogo.png")
   (test-end "test-gnc-pixmap-option-to-scheme"))
@@ -258,7 +258,7 @@ veritatis et quasi architecto beatae vitae dicta sunt, explicabo.")
                   (gnc:generate-restore-forms odb "options"))
       (set! value '(relative . end-prev-year))
       (gnc:option-set-value option value)
-      (test-equal "Relative Date Value" value (GncOption-get-scm-value option))
+      (test-equal "Relative Date Value" value (GncOption-get-value option))
       (test-equal "Relative Date" (test-template (GncOption-serialize option))
                   (gnc:generate-restore-forms odb "options"))))
   (test-end "test-gnc-date-option-to-scheme"))
@@ -503,7 +503,7 @@ veritatis et quasi architecto beatae vitae dicta sunt, explicabo.")
       (let ((option (gnc:lookup-option odb "__reg" "query"))
             (test-template query-literal-output-template))
         (gnc:option-set-value option (gnc-scm2query query-scm))
-        (test-equal  "query form" (test-template (GncOption-get-scm-value option))
+        (test-equal  "query form" (test-template (GncOption-get-value option))
                     (gnc:generate-restore-forms odb "options"))
         ))
   (test-end "test-gnc-query-option-to-scheme"))
diff --git a/bindings/guile/test/test-gnc-optiondb.scm b/bindings/guile/test/test-gnc-optiondb.scm
index f19af1008..64bcb4842 100644
--- a/bindings/guile/test/test-gnc-optiondb.scm
+++ b/bindings/guile/test/test-gnc-optiondb.scm
@@ -24,18 +24,6 @@
 (use-modules (srfi srfi-64))
 (use-modules (tests srfi64-extras))
 
-;; This is a special case where we can't use the exported registration function
-;; because we need to transform the default argument first depending on its
-;; Scheme type.
-(define (gnc:register-multichoice-option options section name key docstring default multichoice)
-  (issue-deprecation-warning "gnc:make-multichoice-option is deprecated. Make and register the option in one command with gnc-register-multichoice-option.")
-  (let ((defval (cond ((symbol? default)
-                       (symbol->string default))
-                      ((number? default)
-                       (number->string default))
-                     (else default))))
-  (gnc-register-multichoice-option options section name key docstring defval multichoice)))
-
 ;; Load the C++ option implementation, avoiding the options.scm ones.
 (eval-when
  (compile load eval expand)
@@ -59,7 +47,7 @@
 
 (define (test-gnc-make-text-option)
   (test-begin "test-gnc-test-string-option")
-  (let* ((option-db (new-gnc-optiondb))
+  (let* ((option-db (gnc-new-optiondb))
          (string-opt (gnc-register-string-option option-db "foo" "bar" "baz"
                                                  "Phony Option" "waldo")))
     (test-equal "waldo" (gnc-option-value option-db "foo" "bar"))
@@ -103,7 +91,7 @@
 
   (define (test-make-account-list-option book)
     (test-group "test-make-account-list-option"
-    (let ((option-db (new-gnc-optiondb))
+    (let ((option-db (gnc-new-optiondb))
           (acctlist (gnc-account-list-from-types book
                                (list ACCT-TYPE-STOCK))))
       (gnc-register-account-list-option option-db "foo" "bar" "baz"
@@ -114,7 +102,7 @@
 
   (define (test-make-account-list-limited-option book)
     (test-group "test-make-account-list-limited-option"
-    (let ((option-db (new-gnc-optiondb))
+    (let ((option-db (gnc-new-optiondb))
           (acctlist (gnc-account-list-from-types book
                                (list ACCT-TYPE-STOCK))))
       (gnc-register-account-list-limited-option ;; Error not account type twice
@@ -131,7 +119,7 @@
 
   (define (test-make-account-sel-limited-option book)
     (test-group "test-make-account-list-option"
-    (let ((option-db (new-gnc-optiondb))
+    (let ((option-db (gnc-new-optiondb))
           (acctlist (gnc-account-list-from-types book
                                (list ACCT-TYPE-STOCK))))
       (gnc-register-account-sel-limited-option
@@ -165,15 +153,16 @@
   (assq-ref (assq-ref keylist key) info))
 
   (test-begin "test-gnc-test-multichoice-option")
-  (let* ((option-db (new-gnc-optiondb))
+  (let* ((option-db (gnc-new-optiondb))
          (multilist (list
                        (list "plugh" (cons 'text "xyzzy") (cons 'tip "thud"))
                        (list 'waldo (cons 'text "pepper") (cons 'tip "salt"))
                        (list "pork" (cons 'text "sausage") (cons 'tip "links"))
                        (list "corge" (cons 'text "grault") (cons 'tip "garply"))))
          (multichoice (keylist->vectorlist multilist))
-         (multi-opt (gnc:register-multichoice-option option-db "foo" "bar" "baz"
-                                                     "Phony Option" 'waldo multichoice)))
+         (multi-opt (gnc-register-multichoice-option
+                     option-db "foo" "bar" "baz"
+                     "Phony Option" "waldo" multichoice)))
 
     (test-equal 'waldo (gnc-option-value option-db "foo" "bar"))
     (gnc-set-option option-db "foo" "bar" "corge")
@@ -183,7 +172,7 @@
 
 (define (test-gnc-make-list-option)
   (test-begin "test-gnc-test-list-option")
-  (let* ((option-db (new-gnc-optiondb))
+  (let* ((option-db (gnc-new-optiondb))
          (value-list (list (vector "AvgBalPlot" "Average" "Average Balance")
                            (vector "GainPlot" "Profit" "Profit (Gain minus Loss)")
                            (vector "GLPlot" "Gain/Loss" "Gain and Loss")))
@@ -198,7 +187,7 @@
 
 (define (test-gnc-make-date-option)
   (test-begin "test-gnc-test-date-option")
-  (let* ((option-db (new-gnc-optiondb))
+  (let* ((option-db (gnc-new-optiondb))
          (date-opt (gnc-register-date-option option-db "foo" "bar"
                                              "baz" "Phony Option"
                                              (RelativeDatePeriod-TODAY)))
@@ -210,7 +199,7 @@
 
 (define (test-gnc-make-date-set-option)
   (test-begin "test-gnc-test-date-set-option")
-  (let* ((option-db (new-gnc-optiondb))
+  (let* ((option-db (gnc-new-optiondb))
          (date-opt (gnc-register-date-option-set
                     option-db "foo" "bar" "baz" "Phony Option"
                     '(today
@@ -228,8 +217,8 @@
 
 (define (test-gnc-make-number-range-option)
   (test-begin "test-gnc-number-range-option")
-  (let* ((option-db (new-gnc-optiondb))
-         (number-opt (gnc-register-number-range-option-double option-db "foo" "bar"
+  (let* ((option-db (gnc-new-optiondb))
+         (number-opt (gnc-register-number-range-option option-db "foo" "bar"
                                                        "baz" "Phony Option"
                                                        15 5 30 1)))
     (test-equal 15.0 (gnc-option-value option-db "foo" "bar"))
@@ -242,7 +231,7 @@
     (let* ((report1 123)
            (report2 456)
            (rp (list (list report1 2 3) (list report2 3 2)))
-           (option-db (new-gnc-optiondb)))
+           (option-db (gnc-new-optiondb)))
            (gnc-register-report-placement-option option-db "foo" "bar")
            (gnc-set-option option-db "foo" "bar" rp)
            (test-equal report2 (car (cadr (gnc-option-value option-db "foo" "bar")))))
diff --git a/bindings/guile/test/test-options.scm b/bindings/guile/test/test-options.scm
index f243e195f..c6692e73f 100644
--- a/bindings/guile/test/test-options.scm
+++ b/bindings/guile/test/test-options.scm
@@ -14,7 +14,7 @@
   (test-end "test-options"))
 
 (define (test-lookup-option)
-  (let* ((options (new-gnc-optiondb))
+  (let* ((options (gnc-new-optiondb))
          (string-opt (gnc-register-string-option options "Section" "Start Date"
                                                  "sort-tag" "docstring" "waldo")
                      ))
diff --git a/gnucash/report/gnc-report.cpp b/gnucash/report/gnc-report.cpp
index 544f01139..71c429de8 100644
--- a/gnucash/report/gnc-report.cpp
+++ b/gnucash/report/gnc-report.cpp
@@ -397,7 +397,7 @@ gnc_saved_reports_write_to_file (const gchar* report_def, gboolean overwrite)
 GncOptionDB*
 gnc_get_optiondb_from_dispatcher(SCM dispatcher)
 {
-    SCM  get_options = scm_c_eval_string("gnc:options-get");
+    SCM  get_options = scm_c_eval_string("gnc:optiondb");
     if (dispatcher == SCM_BOOL_F)
         return nullptr;
     auto scm_ptr{scm_call_1(get_options, dispatcher)};
diff --git a/gnucash/report/report-core.scm b/gnucash/report/report-core.scm
index 26573c0ca..4aa199c1c 100644
--- a/gnucash/report/report-core.scm
+++ b/gnucash/report/report-core.scm
@@ -286,37 +286,36 @@ not found.")))
          (gnc:report-template-renderer templ))))
 
 (define (gnc:report-template-new-options report-template)
-  (let ((generator (gnc:report-template-options-generator report-template))
-        (namer
-         (gnc:make-string-option
-          gnc:pagename-general gnc:optname-reportname "0a"
-          (N_ "Enter a descriptive name for this report.")
-          (G_ (gnc:report-template-name report-template))))
-        (stylesheet
-         (gnc:make-multichoice-option
-          gnc:pagename-general gnc:optname-stylesheet "0b"
-          (N_ "Select a stylesheet for the report.")
-          (string->symbol (N_ "Default"))
-          (map
-           (lambda (ss)
-             (vector
-              (string->symbol (gnc:html-style-sheet-name ss))
-              (gnc:html-style-sheet-name ss)))
-           (gnc:get-html-style-sheets)))))
-
-    (let ((options (if (procedure? generator)
+  (let* ((generator (gnc:report-template-options-generator report-template))
+         (options (if (procedure? generator)
                        (or (gnc:backtrace-if-exception generator)
                            (begin
                              (gnc:warn "BUG DETECTED: Scheme exception raised in "
                                        "report options generator procedure named "
                                        (procedure-name generator))
-                             (gnc:new-options)))
-                       (gnc:new-options))))
-      (or (gnc:lookup-option options gnc:pagename-general gnc:optname-reportname)
-          (gnc:register-option options namer))
-      (or (gnc:lookup-option options gnc:pagename-general gnc:optname-stylesheet)
-          (gnc:register-option options stylesheet))
-      options)))
+                             (gnc-new-optiondb)))
+                       (gnc-new-optiondb)))
+         (optiondb (gnc:optiondb options)))
+      (or
+       (gnc-lookup-option optiondb gnc:pagename-general gnc:optname-reportname)
+       (gnc-register-string-option optiondb
+        gnc:pagename-general gnc:optname-reportname "0a"
+        (N_ "Enter a descriptive name for this report.")
+        (G_ (gnc:report-template-name report-template))))
+      (or
+       (gnc-lookup-option optiondb gnc:pagename-general gnc:optname-stylesheet)
+       (gnc-register-multichoice-option
+        optiondb
+        gnc:pagename-general gnc:optname-stylesheet "0b"
+        (N_ "Select a stylesheet for the report.")
+        (N_ "Default")
+        (map
+         (lambda (ss)
+           (vector
+            (string->symbol (gnc:html-style-sheet-name ss))
+            (gnc:html-style-sheet-name ss)))
+         (gnc:get-html-style-sheets))))
+      options))
 
 ;; A <report> represents an instantiation of a particular report type.
 (define-record-type <report>
diff --git a/gnucash/report/reports/standard/account-summary.scm b/gnucash/report/reports/standard/account-summary.scm
index 14a9347ac..c8d628b25 100644
--- a/gnucash/report/reports/standard/account-summary.scm
+++ b/gnucash/report/reports/standard/account-summary.scm
@@ -143,7 +143,7 @@
 
 (define (accsum-options-generator sx? reportname)
   (let* ((options (gnc:new-options))
-         (odb (gnc:options-get options)))
+         (odb (gnc:optiondb options)))
 
    (gnc-register-string-option odb
       gnc:pagename-general optname-report-title
diff --git a/gnucash/report/reports/standard/view-column.scm b/gnucash/report/reports/standard/view-column.scm
index 352d59317..e075f2f48 100644
--- a/gnucash/report/reports/standard/view-column.scm
+++ b/gnucash/report/reports/standard/view-column.scm
@@ -42,7 +42,7 @@
 	    (gnc:register-option options opt))))
     ;; the report-list is edited by a special add-on page for the
     ;; options editor.
-    (gnc-register-report-placement-option (gnc:options-get options) "__general" "report-list")
+    (gnc-register-report-placement-option (gnc:optiondb options) "__general" "report-list")
     
     (opt-register
      (gnc:make-number-range-option 
diff --git a/gnucash/report/test/test-report.scm b/gnucash/report/test/test-report.scm
index 94bff2c08..50386fcdb 100644
--- a/gnucash/report/test/test-report.scm
+++ b/gnucash/report/test/test-report.scm
@@ -132,8 +132,8 @@
   (define test4-name "Test Report Template")
   (test-begin "test-report-template-getters")
   (test-assert "gnc:report-template-new-options/report-guid"
-    (procedure?
-     (gnc:report-template-new-options/report-guid test4-guid test4-name)))
+    (is-gncoptiondb
+     (gnc:optiondb (gnc:report-template-new-options/report-guid test4-guid test4-name))))
   (test-equal "gnc:report-template-menu-name/report-guid"
     "Menu Name"
     (gnc:report-template-menu-name/report-guid test4-guid test4-name))
@@ -141,8 +141,8 @@
     "Renderer"
     (gnc:report-template-renderer/report-guid test4-guid test4-name))
   (test-assert "gnc:report-template-new-options"
-    (procedure?
-     (gnc:report-template-new-options (gnc:find-report-template test4-guid))))
+    (is-gncoptiondb
+     (gnc:optiondb (gnc:report-template-new-options (gnc:find-report-template test4-guid)))))
   (test-end "test-report-template-getters"))
 
 (define (test-make-report)
@@ -159,8 +159,8 @@
      (gnc:restore-report-by-guid-with-custom-template
       "id" test4-guid test4-name "custom-template-id" #f)))
   (test-assert "gnc:make-report-options"
-    (procedure?
-     (gnc:make-report-options test4-guid)))
+    (is-gncoptiondb
+     (gnc:optiondb (gnc:make-report-options test4-guid))))
   (test-end "test-make-report"))
 
 (define (test-report)

commit 418bb7d0cc9e0b051b44af906e76ff3168cc2863
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Jul 19 11:12:04 2022 -0700

    [options] Fix two deprecation messages.

diff --git a/bindings/guile/options.scm b/bindings/guile/options.scm
index d7a5e5d87..847fc00e0 100644
--- a/bindings/guile/options.scm
+++ b/bindings/guile/options.scm
@@ -226,7 +226,7 @@
   (let ((defval (if default (default) '())))
   (gnc-make-account-sel-limited-option section name key docstring defval '())))
 (define-public (gnc:make-multichoice-option section name key docstring default multichoice)
-  (issue-deprecation-warning "gnc:make-multichoice-option is deprecated. Make and register the option in one command with gnc-register-multichoice-option.")
+  (issue-deprecation-warning "gnc:make-multichoice-option is deprecated. Make and register the option in one command with gnc:register-multichoice-option.")
   (let ((defval (cond ((symbol? default)
                        (symbol->string default))
                       ((number? default)
@@ -339,7 +339,6 @@
 ;; because we need to transform the default argument first depending on its
 ;; Scheme type.
 (define-public (gnc:register-multichoice-option options section name key docstring default multichoice)
-  (issue-deprecation-warning "gnc:make-multichoice-option is deprecated. Make and register the option in one command with gnc-register-multichoice-option.")
   (let ((defval (cond ((symbol? default)
                        (symbol->string default))
                       ((number? default)

commit 0213787a2f3587c5287fc77f15dc587a1526de3e
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Jul 19 11:11:37 2022 -0700

    [options] Enable registering an absolute date option.

diff --git a/libgnucash/app-utils/gnc-optiondb.cpp b/libgnucash/app-utils/gnc-optiondb.cpp
index d94e1f650..6d52c118f 100644
--- a/libgnucash/app-utils/gnc-optiondb.cpp
+++ b/libgnucash/app-utils/gnc-optiondb.cpp
@@ -929,10 +929,14 @@ gnc_register_date_option(GncOptionDB* db,
                                   RelativeDatePeriodVec& period_set,
                                   bool both)
 {
+    auto is_absolute = period_set.size() == 1 &&
+                       period_set.front() == RelativeDatePeriod::ABSOLUTE;
     auto ui_type = both ? GncOptionUIType::DATE_BOTH :
-        GncOptionUIType::DATE_RELATIVE;
+        is_absolute ? GncOptionUIType::DATE_ABSOLUTE : GncOptionUIType::DATE_RELATIVE;
     GncOption option{GncOptionDateValue(section, name, key, doc_string,
                                         ui_type, period_set)};
+    if (is_absolute)
+        option.set_default_value(gnc_time(nullptr));
     db->register_option(section, std::move(option));
 }
 

commit cf2870b71a8e693e9ccae5db33529ae876b216e6
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Jul 17 15:16:10 2022 -0700

    [options] Change RelativeDate and Multichoice index type to uint16_t.
    
    From size_t because clang thinks that std::is_same_v<size_t, time64> is
    true and we need to differentiate the handling of the two.

diff --git a/bindings/guile/gnc-optiondb.i b/bindings/guile/gnc-optiondb.i
index b4feefd82..557b2228a 100644
--- a/bindings/guile/gnc-optiondb.i
+++ b/bindings/guile/gnc-optiondb.i
@@ -527,7 +527,7 @@ gnc_option_test_book_destroy(QofBook* book)
 %ignore GncOptionDateValue(GncOptionDateValue&&);
 %ignore GncOptionDateValue::operator=(const GncOptionDateValue&);
 %ignore GncOptionDateValue::operator=(GncOptionDateValue&&);
-%ignore GncOptionDateValue::set_value(size_t); // Used only by dialog-options
+%ignore GncOptionDateValue::set_value(uint16_t); // Used only by dialog-options
 %ignore operator<<(std::ostream&, const GncOption&);
 %ignore operator<<(std::ostream&, const RelativeDatePeriod);
 %ignore operator>>(std::istream&, GncOption&);
@@ -779,9 +779,9 @@ wrap_unique_ptr(GncOptionDBPtr, GncOptionDB);
 %header %{
 
     static std::vector<SCM> reldate_values{};
-    inline size_t index_of(RelativeDatePeriod per)
+    inline uint16_t index_of(RelativeDatePeriod per)
     {
-        return static_cast<size_t>(per) + 1;
+        return static_cast<uint16_t>(per) + 1;
     }
     
     static void init_reldate_values()
@@ -891,7 +891,7 @@ wrap_unique_ptr(GncOptionDBPtr, GncOptionDB);
     inline static SCM scm_relative_date_from_period(RelativeDatePeriod period)
     {
         init_reldate_values();
-        return reldate_values[static_cast<size_t>(period) + 1];
+        return reldate_values[static_cast<uint16_t>(period) + 1];
     }
 
     inline static bool scm_date_absolute(SCM date)
@@ -940,7 +940,7 @@ wrap_unique_ptr(GncOptionDBPtr, GncOptionDB);
     scm_to_multichoices(const SCM new_value,
                         const GncOptionMultichoiceValue& option)
     {
-        static const auto size_t_max = std::numeric_limits<std::size_t>::max();
+        static const auto uint16_t_max = std::numeric_limits<uint16_t>::max();
         static const char* empty{""};
         auto scm_to_str = [](auto item)->const char* {
                 if (scm_is_integer(item))
@@ -962,14 +962,14 @@ wrap_unique_ptr(GncOptionDBPtr, GncOptionDB);
             {
                 auto item{scm_list_ref(new_value, scm_from_size_t(i))};
                 auto index{option.permissible_value_index(scm_to_str(item))};
-                if (index < size_t_max)
+                if (index < uint16_t_max)
                     vec.push_back(index);
             }
         }
         else
         {
             auto index{option.permissible_value_index(scm_to_str(new_value))};
-            if (index < size_t_max)
+            if (index < uint16_t_max)
                 vec.push_back(index);
         }
         return vec;
diff --git a/common/base-typemaps.i b/common/base-typemaps.i
index 98fbe3027..39f12638a 100644
--- a/common/base-typemaps.i
+++ b/common/base-typemaps.i
@@ -22,6 +22,7 @@
  *                                                                  *
 \********************************************************************/
 %include "constraints.i"
+%include <stdint.i>
 
 typedef void * gpointer; // Not sure why SWIG doesn't figure this out.
 %typemap(newfree) gchar * "g_free($1);"
@@ -173,7 +174,6 @@ typedef char gchar;
 #elif defined(SWIGPYTHON) /* Typemaps for Python */
 
 %import "glib.h"
-%include <stdint.i>
 
 %apply int { gint };
 %apply unsigned int { guint };
diff --git a/gnucash/gnome-utils/dialog-options.cpp b/gnucash/gnome-utils/dialog-options.cpp
index 8a219dc3b..acc79f9e4 100644
--- a/gnucash/gnome-utils/dialog-options.cpp
+++ b/gnucash/gnome-utils/dialog-options.cpp
@@ -1095,12 +1095,12 @@ public:
     void set_ui_item_from_option(GncOption& option) noexcept override
     {
         auto widget{GTK_COMBO_BOX(get_widget())};
-        gtk_combo_box_set_active(widget, option.get_value<size_t>());
+        gtk_combo_box_set_active(widget, option.get_value<uint16_t>());
     }
     void set_option_from_ui_item(GncOption& option) noexcept override
     {
         auto widget{GTK_COMBO_BOX(get_widget())};
-        option.set_value<size_t>(static_cast<size_t>(gtk_combo_box_get_active(widget)));
+        option.set_value<uint16_t>(static_cast<uint16_t>(gtk_combo_box_get_active(widget)));
     }
 };
 
@@ -1240,13 +1240,13 @@ RelativeDateEntry::RelativeDateEntry(GncOption& option)
 void
 RelativeDateEntry::set_entry_from_option(GncOption& option)
 {
-    gtk_combo_box_set_active(GTK_COMBO_BOX(m_entry), option.get_value<size_t>());
+    gtk_combo_box_set_active(GTK_COMBO_BOX(m_entry), option.get_value<uint16_t>());
 }
 
 void
 RelativeDateEntry::set_option_from_entry(GncOption& option)
 {
-    option.set_value<size_t>(gtk_combo_box_get_active(GTK_COMBO_BOX(m_entry)));
+    option.set_value<uint16_t>(gtk_combo_box_get_active(GTK_COMBO_BOX(m_entry)));
 }
 
 void
@@ -2383,7 +2383,7 @@ public:
         GncOptionGtkUIItem{widget, GncOptionUIType::RADIOBUTTON} {}
     void set_ui_item_from_option(GncOption& option) noexcept override
     {
-        auto index{option.get_value<size_t>()};
+        auto index{option.get_value<uint16_t>()};
         auto list{gtk_container_get_children(GTK_CONTAINER(get_widget()))};
         auto box{GTK_WIDGET(list->data)};
         g_list_free(list);
@@ -2397,7 +2397,7 @@ public:
         }
         else
         {
-            PERR("Invalid Radio Button Selection %lu", index);
+            PERR("Invalid Radio Button Selection %hu", index);
             g_list_free(list);
             return;
         }
@@ -2412,7 +2412,7 @@ public:
     {
         auto index{g_object_get_data(G_OBJECT(get_widget()),
                                      "gnc_radiobutton_index")};
-        option.set_value<size_t>(GPOINTER_TO_INT(index));
+        option.set_value<uint16_t>(GPOINTER_TO_INT(index));
     }
 };
 
diff --git a/libgnucash/app-utils/gnc-option-impl.cpp b/libgnucash/app-utils/gnc-option-impl.cpp
index 2b42508ca..ef193ca7e 100644
--- a/libgnucash/app-utils/gnc-option-impl.cpp
+++ b/libgnucash/app-utils/gnc-option-impl.cpp
@@ -465,7 +465,7 @@ GncOptionDateValue::get_default_value() const noexcept
 /* Use asserts for pre- and post-conditions to deliberately crash if they're not
  * met as the program design should prevent that from happening.
  */
-size_t
+uint16_t
 GncOptionDateValue::get_period_index() const noexcept
 {
     assert (m_period != RelativeDatePeriod::ABSOLUTE);
@@ -475,7 +475,7 @@ GncOptionDateValue::get_period_index() const noexcept
     return item - m_period_set.begin();
 }
 
-size_t
+uint16_t
 GncOptionDateValue::get_default_period_index() const noexcept
 {
     assert(m_period != RelativeDatePeriod::ABSOLUTE);
@@ -487,7 +487,7 @@ GncOptionDateValue::get_default_period_index() const noexcept
 }
 
 void
-GncOptionDateValue::set_value(size_t index) noexcept
+GncOptionDateValue::set_value(uint16_t index) noexcept
 {
     assert(!m_period_set.empty());
     assert(index < m_period_set.size());
@@ -495,7 +495,7 @@ GncOptionDateValue::set_value(size_t index) noexcept
     m_period = m_period_set[index];
 }
 
-size_t
+uint16_t
 GncOptionDateValue::permissible_value_index(const char* key) const noexcept
 {
     auto index = std::find_if(m_period_set.begin(), m_period_set.end(),
@@ -800,11 +800,11 @@ GncOptionMultichoiceValue::serialize() const noexcept
 bool
 GncOptionMultichoiceValue::deserialize(const std::string& str) noexcept
 {
-    static const auto size_t_max = std::numeric_limits<std::size_t>::max();
+    static const auto uint16_t_max = std::numeric_limits<uint16_t>::max();
     if (str.empty())
 
         return false;
-    size_t pos{};
+    uint16_t pos{};
     while (pos < str.size())
     {
         auto endpos{str.find(' ', pos)};
@@ -812,7 +812,7 @@ GncOptionMultichoiceValue::deserialize(const std::string& str) noexcept
             endpos = str.size();
         //need a null-terminated char* to pass to permissible_value_index
         auto index{permissible_value_index(str.substr(pos, endpos).c_str())};
-        if (index == size_t_max)
+        if (index == uint16_t_max)
             return false;
         m_value.push_back(index);
         pos = endpos + 1;
@@ -870,7 +870,7 @@ GncOptionDateValue::deserialize(const std::string& str) noexcept
     if (type_str == "absolute")
     {
         // Need a cast to disambiguate from time64.
-        set_value(static_cast<size_t>(std::stoll(period_str)));
+        set_value(static_cast<uint16_t>(std::stoll(period_str)));
         return true;
     }
     else if (type_str == "relative ")
@@ -914,7 +914,7 @@ template GncOptionValue<std::string>::GncOptionValue(const GncOptionValue<std::s
 template GncOptionValue<const QofQuery*>::GncOptionValue(const GncOptionValue<const QofQuery*>&);
 template GncOptionValue<const GncOwner*>::GncOptionValue(const GncOptionValue<const GncOwner*>&);
 template GncOptionValue<RelativeDatePeriod>::GncOptionValue(const GncOptionValue<RelativeDatePeriod>&);
-template GncOptionValue<size_t>::GncOptionValue(const GncOptionValue<size_t>&);
+template GncOptionValue<uint16_t>::GncOptionValue(const GncOptionValue<uint16_t>&);
 template GncOptionValue<GncOptionAccountList>::GncOptionValue(const GncOptionValue<GncOptionAccountList>&);
 template GncOptionValue<GncMultichoiceOptionIndexVec>::GncOptionValue(const GncOptionValue<GncMultichoiceOptionIndexVec>&);
 template GncOptionValue<GncOptionReportPlacementVec>::GncOptionValue(const GncOptionValue<GncOptionReportPlacementVec>&);
@@ -928,7 +928,7 @@ template void GncOptionValue<std::string>::set_value(std::string);
 template void GncOptionValue<const QofQuery*>::set_value(const QofQuery*);
 template void GncOptionValue<const GncOwner*>::set_value(const GncOwner*);
 template void GncOptionValue<RelativeDatePeriod>::set_value(RelativeDatePeriod);
-template void GncOptionValue<size_t>::set_value(size_t);
+template void GncOptionValue<uint16_t>::set_value(uint16_t);
 template void GncOptionValue<GncOptionAccountList>::set_value(GncOptionAccountList);
 template void GncOptionValue<GncMultichoiceOptionIndexVec>::set_value(GncMultichoiceOptionIndexVec);
 template void GncOptionValue<GncOptionReportPlacementVec>::set_value(GncOptionReportPlacementVec);
@@ -942,7 +942,7 @@ template void GncOptionValue<std::string>::set_default_value(std::string);
 template void GncOptionValue<const QofQuery*>::set_default_value(const QofQuery*);
 template void GncOptionValue<const GncOwner*>::set_default_value(const GncOwner*);
 template void GncOptionValue<RelativeDatePeriod>::set_default_value(RelativeDatePeriod);
-template void GncOptionValue<size_t>::set_default_value(size_t);
+template void GncOptionValue<uint16_t>::set_default_value(uint16_t);
 template void GncOptionValue<GncOptionAccountList>::set_default_value(GncOptionAccountList);
 template void GncOptionValue<GncMultichoiceOptionIndexVec>::set_default_value(GncMultichoiceOptionIndexVec);
 template void GncOptionValue<GncOptionReportPlacementVec>::set_default_value(GncOptionReportPlacementVec);
@@ -956,7 +956,7 @@ template void GncOptionValue<std::string>::reset_default_value();
 template void GncOptionValue<const QofQuery*>::reset_default_value();
 template void GncOptionValue<const GncOwner*>::reset_default_value();
 template void GncOptionValue<RelativeDatePeriod>::reset_default_value();
-template void GncOptionValue<size_t>::reset_default_value();
+template void GncOptionValue<uint16_t>::reset_default_value();
 template void GncOptionValue<GncOptionAccountList>::reset_default_value();
 template void GncOptionValue<GncMultichoiceOptionIndexVec>::reset_default_value();
 template void GncOptionValue<GncOptionReportPlacementVec>::reset_default_value();
diff --git a/libgnucash/app-utils/gnc-option-impl.hpp b/libgnucash/app-utils/gnc-option-impl.hpp
index 9102f3e58..983fae353 100644
--- a/libgnucash/app-utils/gnc-option-impl.hpp
+++ b/libgnucash/app-utils/gnc-option-impl.hpp
@@ -77,7 +77,7 @@ struct OptionClassifier
 
 
 #ifndef SWIG
-auto constexpr size_t_max = std::numeric_limits<std::size_t>::max();
+auto constexpr uint16_t_max = std::numeric_limits<uint16_t>::max();
 #endif
 
 /** @class GncOptionValue
@@ -424,7 +424,7 @@ operator>> (std::istream& iss, OptType& opt)
 using GncMultichoiceOptionEntry = std::tuple<const std::string,
                                              const std::string,
                                              GncOptionMultichoiceKeyType>;
-using GncMultichoiceOptionIndexVec = std::vector<std::size_t>;
+using GncMultichoiceOptionIndexVec = std::vector<uint16_t>;
 using GncMultichoiceOptionChoices = std::vector<GncMultichoiceOptionEntry>;
 
 /** @class GncOptionMultichoiceValue
@@ -457,7 +457,7 @@ public:
         if (value)
         {
             if (auto index = find_key(value);
-                index != size_t_max)
+                index != uint16_t_max)
             {
                 m_value.push_back(index);
                 m_default_value.push_back(index);
@@ -467,7 +467,7 @@ public:
 
     GncOptionMultichoiceValue(const char* section, const char* name,
                               const char* key, const char* doc_string,
-                              size_t index,
+                              uint16_t index,
                               GncMultichoiceOptionChoices&& choices,
                               GncOptionUIType ui_type = GncOptionUIType::MULTICHOICE) :
         OptionClassifier{section, name, key, doc_string},
@@ -516,7 +516,7 @@ public:
             return c_list_string;
     }
 
-    size_t get_index() const
+    uint16_t get_index() const
     {
         if (m_value.size() > 0)
             return m_value[0];
@@ -535,7 +535,7 @@ public:
     bool validate(const std::string& value) const noexcept
     {
         auto index = find_key(value);
-        return index != size_t_max;
+        return index != uint16_t_max;
 
     }
     bool validate(const GncMultichoiceOptionIndexVec& indexes) const noexcept
@@ -549,7 +549,7 @@ public:
     void set_value(const std::string& value)
     {
         auto index = find_key(value);
-        if (index != size_t_max)
+        if (index != uint16_t_max)
         {
             m_value.clear();
             m_value.push_back(index);
@@ -558,7 +558,7 @@ public:
             throw std::invalid_argument("Value not a valid choice.");
 
     }
-    void set_value(size_t index)
+    void set_value(uint16_t index)
     {
         if (index < m_choices.size())
         {
@@ -572,7 +572,7 @@ public:
     void set_default_value(const std::string& value)
     {
         auto index = find_key(value);
-        if (index != size_t_max)
+        if (index != uint16_t_max)
         {
             m_value.clear();
             m_value.push_back(index);
@@ -583,7 +583,7 @@ public:
             throw std::invalid_argument("Value not a valid choice.");
 
     }
-    void set_default_value(size_t index)
+    void set_default_value(uint16_t index)
     {
         if (index < m_choices.size())
         {
@@ -610,19 +610,19 @@ public:
         else
             throw std::invalid_argument("One of the supplied indexes was out of range.");
     }
-    std::size_t num_permissible_values() const noexcept
+    uint16_t num_permissible_values() const noexcept
     {
         return m_choices.size();
     }
-    std::size_t permissible_value_index(const char* key) const noexcept
+    uint16_t permissible_value_index(const char* key) const noexcept
     {
             return find_key(key);
     }
-    const char* permissible_value(std::size_t index) const
+    const char* permissible_value(uint16_t index) const
     {
         return std::get<0>(m_choices.at(index)).c_str();
     }
-    const char* permissible_value_name(std::size_t index) const
+    const char* permissible_value_name(uint16_t index) const
     {
         return std::get<1>(m_choices.at(index)).c_str();
     }
@@ -634,7 +634,7 @@ public:
     std::string serialize() const noexcept;
     bool deserialize(const std::string& str) noexcept;
 private:
-    std::size_t find_key (const std::string& key) const noexcept
+    uint16_t find_key (const std::string& key) const noexcept
     {
         auto iter = std::find_if(m_choices.begin(), m_choices.end(),
                               [key](auto choice) {
@@ -642,7 +642,7 @@ private:
         if (iter != m_choices.end())
             return iter - m_choices.begin();
         else
-            return size_t_max;
+            return uint16_t_max;
 
     }
     GncOptionUIType m_ui_type;
@@ -682,7 +682,7 @@ operator>> <GncOptionMultichoiceValue>(std::istream& iss,
         if (!str.empty())
         {
             auto index = opt.permissible_value_index(str.c_str());
-            if (index != size_t_max)
+            if (index != uint16_t_max)
                 values.push_back(index);
             else
             {
@@ -983,8 +983,8 @@ public:
     time64 get_default_value() const noexcept;
     RelativeDatePeriod get_period() const noexcept { return m_period; }
     RelativeDatePeriod get_default_period() const noexcept { return m_default_period; }
-    size_t get_period_index() const noexcept;
-    size_t get_default_period_index() const noexcept;
+    uint16_t get_period_index() const noexcept;
+    uint16_t get_default_period_index() const noexcept;
     std::ostream& out_stream(std::ostream& oss) const noexcept;
     std::istream& in_stream(std::istream& iss);
     bool validate(RelativeDatePeriod value);
@@ -1007,7 +1007,7 @@ public:
             m_date = time;
         }
     }
-    void set_value(size_t index) noexcept;
+    void set_value(uint16_t index) noexcept;
     void set_default_value(RelativeDatePeriod value) {
         if (validate(value))
         {
@@ -1022,16 +1022,16 @@ public:
             m_date = m_default_date = time;
         }
     }
-    std::size_t num_permissible_values() const noexcept
+    uint16_t num_permissible_values() const noexcept
     {
         return m_period_set.size();
     }
-    std::size_t permissible_value_index(const char* key) const noexcept;
-    const char* permissible_value(std::size_t index) const
+    uint16_t permissible_value_index(const char* key) const noexcept;
+    const char* permissible_value(uint16_t index) const
     {
         return gnc_relative_date_storage_string(m_period_set.at(index));
     }
-    const char* permissible_value_name(std::size_t index) const
+    const char* permissible_value_name(uint16_t index) const
     {
         return gnc_relative_date_display_string(m_period_set.at(index));
     }
diff --git a/libgnucash/app-utils/gnc-option.cpp b/libgnucash/app-utils/gnc-option.cpp
index c113a6db6..d8673aedd 100644
--- a/libgnucash/app-utils/gnc-option.cpp
+++ b/libgnucash/app-utils/gnc-option.cpp
@@ -59,14 +59,16 @@ GncOption::get_value() const
                 if constexpr (is_same_decayed_v<ValueType,
                               RelativeDatePeriod>)
                     return option.get_period();
-                if constexpr (std::is_same_v<ValueType, size_t>)
+                if constexpr (std::is_same_v<ValueType, time64>)
+                    return option.get_value();
+                if constexpr (std::is_same_v<ValueType, uint16_t>)
                     return option.get_period_index();
                 return ValueType{};
             }
             if constexpr (is_same_decayed_v<decltype(option),
                           GncOptionMultichoiceValue>)
             {
-                if constexpr (std::is_same_v<ValueType, size_t>)
+                if constexpr (std::is_same_v<ValueType, uint16_t>)
                     return option.get_index();
                 if constexpr (is_same_decayed_v<ValueType,
                               GncMultichoiceOptionIndexVec>)
@@ -90,7 +92,9 @@ GncOption::get_default_value() const
                 if constexpr (is_same_decayed_v<ValueType,
                               RelativeDatePeriod>)
                     return option.get_default_period();
-                if constexpr (std::is_same_v<ValueType, size_t>)
+                if constexpr (std::is_same_v<ValueType, time64>)
+                    return option.get_value();
+                if constexpr (std::is_same_v<ValueType, uint16_t>)
                     return option.get_default_period_index();
                 return ValueType{};
             }
@@ -115,7 +119,8 @@ GncOption::set_value(ValueType value)
                  (is_same_decayed_v<decltype(option),
                   GncOptionDateValue> &&
                   (is_same_decayed_v<ValueType, RelativeDatePeriod> ||
-                   std::is_same_v<ValueType, size_t>)))
+                   std::is_same_v<ValueType, time64> ||
+                   std::is_same_v<ValueType, uint16_t>)))
                 option.set_value(value);
             if constexpr (is_same_decayed_v<decltype(option),
                           GncOptionMultichoiceValue>)
@@ -124,7 +129,7 @@ GncOption::set_value(ValueType value)
                               GncMultichoiceOptionIndexVec>)
                     option.set_multiple(value);
                 else if constexpr
-                    (std::is_same_v<ValueType, size_t> ||
+                    (std::is_same_v<ValueType, uint16_t> ||
                      is_same_decayed_v<ValueType, std::string> ||
                      std::is_same_v<std::remove_cv<ValueType>, char*>)
                     option.set_value(value);
@@ -141,7 +146,8 @@ GncOption::set_default_value(ValueType value)
                 (is_same_decayed_v<decltype(option.get_value()), ValueType>||
                  (is_same_decayed_v<decltype(option), GncOptionDateValue> &&
                   (is_same_decayed_v<ValueType, RelativeDatePeriod> ||
-                   std::is_same_v<ValueType, size_t>)))
+                   std::is_same_v<ValueType, time64> ||
+                   std::is_same_v<ValueType, uint16_t>)))
                 option.set_default_value(value);
             if constexpr (is_same_decayed_v<decltype(option),
                           GncOptionMultichoiceValue>)
@@ -150,7 +156,7 @@ GncOption::set_default_value(ValueType value)
                               GncMultichoiceOptionIndexVec>)
                     option.set_default_multiple(value);
                 else if constexpr
-                    (std::is_same_v<ValueType, size_t> ||
+                    (std::is_same_v<ValueType, uint16_t> ||
                      is_same_decayed_v<ValueType, std::string> ||
                      std::is_same_v<std::remove_cv<ValueType>, char*>)
                     option.set_default_value(value);
@@ -317,38 +323,38 @@ GncOption::validate(ValueType value) const
         }, *m_option);
 }
 
-std::size_t
+std::uint16_t
 GncOption::num_permissible_values() const
 {
     return std::visit(
-        [] (const auto& option) -> size_t {
+        [] (const auto& option) -> uint16_t {
             if constexpr (is_same_decayed_v<decltype(option),
                           GncOptionMultichoiceValue>  ||
                           is_same_decayed_v<decltype(option),
                           GncOptionDateValue>)
                 return option.num_permissible_values();
             else
-                return size_t_max;
+                return uint16_t_max;
         }, *m_option);
 }
 
-std::size_t
+std::uint16_t
 GncOption::permissible_value_index(const char* value) const
 {
     return std::visit(
-        [&value] (const auto& option) -> size_t {
+        [&value] (const auto& option) -> uint16_t {
             if constexpr (is_same_decayed_v<decltype(option),
                                             GncOptionMultichoiceValue> ||
                           is_same_decayed_v<decltype(option),
                                             GncOptionDateValue>)
                 return option.permissible_value_index(value);
             else
-                return size_t_max;
+                return uint16_t_max;
         }, *m_option);
 }
 
 const char*
-GncOption::permissible_value(std::size_t index) const
+GncOption::permissible_value(std::uint16_t index) const
 {
     return std::visit([index] (const auto& option) -> const char* {
                           if constexpr (std::is_same_v<std::decay_t<decltype(option)>,
@@ -362,7 +368,7 @@ GncOption::permissible_value(std::size_t index) const
 }
 
 const char*
-GncOption::permissible_value_name(std::size_t index) const
+GncOption::permissible_value_name(std::uint16_t index) const
 {
     return std::visit([index] (const auto& option) -> const char* {
                           if constexpr (std::is_same_v<std::decay_t<decltype(option)>,
@@ -459,7 +465,7 @@ template bool GncOption::get_value<bool>() const;
 template int GncOption::get_value<int>() const;
 template int64_t GncOption::get_value<int64_t>() const;
 template double GncOption::get_value<double>() const;
-template size_t GncOption::get_value<size_t>() const;
+template uint16_t GncOption::get_value<uint16_t>() const;
 template const char* GncOption::get_value<const char*>() const;
 template std::string GncOption::get_value<std::string>() const;
 template const QofInstance* GncOption::get_value<const QofInstance*>() const;
@@ -495,7 +501,7 @@ template void GncOption::set_value(const QofInstance*);
 template void GncOption::set_value(gnc_commodity*);
 template void GncOption::set_value(const Account*);
 template void GncOption::set_value(RelativeDatePeriod);
-template void GncOption::set_value(size_t);
+template void GncOption::set_value(uint16_t);
 template void GncOption::set_value(GncOptionAccountList);
 template void GncOption::set_value(GncMultichoiceOptionIndexVec);
 template void GncOption::set_value(GncOptionReportPlacementVec);
@@ -510,7 +516,7 @@ template void GncOption::set_default_value(std::string);
 template void GncOption::set_default_value(const QofInstance*);
 template void GncOption::set_default_value(const Account*);
 template void GncOption::set_default_value(RelativeDatePeriod);
-template void GncOption::set_default_value(size_t);
+template void GncOption::set_default_value(uint16_t);
 template void GncOption::set_default_value(GncOptionAccountList);
 template void GncOption::set_default_value(GncMultichoiceOptionIndexVec);
 template void GncOption::set_default_value(GncOptionReportPlacementVec);
diff --git a/libgnucash/app-utils/gnc-option.hpp b/libgnucash/app-utils/gnc-option.hpp
index 138b3fbc6..71b239fdf 100644
--- a/libgnucash/app-utils/gnc-option.hpp
+++ b/libgnucash/app-utils/gnc-option.hpp
@@ -171,13 +171,13 @@ public:
 /** Not implemented for GncOptionValue. */
     template <typename ValueType> bool validate(ValueType value) const;
 /** Implemented only for GncOptionMultiselectValue. */
-    std::size_t num_permissible_values() const;
+    uint16_t num_permissible_values() const;
 /** Implemented only for GncOptionMultiselectValue. */
-    std::size_t permissible_value_index(const char* value) const;
+    uint16_t permissible_value_index(const char* value) const;
 /** Implemented only for GncOptionMultiselectValue. */
-    const char* permissible_value(std::size_t index) const;
+    const char* permissible_value(uint16_t index) const;
 /** Implemented only for GncOptionMultiselectValue. */
-    const char* permissible_value_name(std::size_t index) const;
+    const char* permissible_value_name(uint16_t index) const;
 /** Implemented only for GncOptionAccountListValue. */
     GList* account_type_list() const noexcept;
     bool is_alternate() const noexcept;
diff --git a/libgnucash/app-utils/test/gtest-gnc-option.cpp b/libgnucash/app-utils/test/gtest-gnc-option.cpp
index 71504a97f..2f6a6c702 100644
--- a/libgnucash/app-utils/test/gtest-gnc-option.cpp
+++ b/libgnucash/app-utils/test/gtest-gnc-option.cpp
@@ -783,7 +783,7 @@ TEST_F(GncMultichoiceOption, test_permissible_value_stuff)
                  std::out_of_range);
     EXPECT_THROW({ auto result = m_option.permissible_value_name(9); },
         std::out_of_range);
-    EXPECT_EQ(std::numeric_limits<std::size_t>::max(),
+    EXPECT_EQ(std::numeric_limits<uint16_t>::max(),
               m_option.permissible_value_index("xyzzy"));
 }
 
@@ -842,14 +842,14 @@ TEST_F(GncListOption, test_set_value)
             m_option.set_value(GncMultichoiceOptionIndexVec{1, 3});
             EXPECT_STREQ("multiple values",
                          m_option.get_value<std::string>().c_str());
-            EXPECT_EQ(1U, m_option.get_value<size_t>());
+            EXPECT_EQ(1U, m_option.get_value<uint16_t>());
             auto vec{m_option.get_value<GncMultichoiceOptionIndexVec>()};
             ASSERT_EQ(2U, vec.size());
             EXPECT_EQ(1U, vec[0]);
             EXPECT_EQ(3U, vec[1]);
         });
     EXPECT_THROW({ m_option.set_value(GncMultichoiceOptionIndexVec{2, 5}); }, std::invalid_argument);
-    EXPECT_EQ(1U, m_option.get_value<size_t>());
+    EXPECT_EQ(1U, m_option.get_value<uint16_t>());
 }
 
 TEST_F(GncListOption, test_list_out)
@@ -1066,15 +1066,15 @@ TEST_F(GncDateOptionList, test_set_and_get_relative)
     m_option.set_value(RelativeDatePeriod::START_THIS_MONTH);
     EXPECT_EQ(time1, m_option.get_value<time64>());
     EXPECT_EQ(RelativeDatePeriod::START_THIS_MONTH, m_option.get_value<RelativeDatePeriod>());
-    size_t index(std::find(c_begin_dates.begin(), c_begin_dates.end(),
+    uint16_t index(std::find(c_begin_dates.begin(), c_begin_dates.end(),
                          RelativeDatePeriod::START_THIS_MONTH) - c_begin_dates.begin());
-    EXPECT_EQ(index, m_option.get_value<size_t>());
+    EXPECT_EQ(index, m_option.get_value<uint16_t>());
     // And check that nothing happens when we try to set m_option to an end date
     m_option.set_value(RelativeDatePeriod::END_THIS_MONTH);
     EXPECT_EQ(RelativeDatePeriod::START_THIS_MONTH, m_option.get_value<RelativeDatePeriod>());
-    m_option.set_value(static_cast<size_t>(5));
+    m_option.set_value(static_cast<uint16_t>(5));
     EXPECT_EQ(RelativeDatePeriod::START_CAL_YEAR, m_option.get_value<RelativeDatePeriod>());
-    EXPECT_EQ(5u, m_option.get_value<size_t>());
+    EXPECT_EQ(5u, m_option.get_value<uint16_t>());
 }
 
 TEST_F(GncDateOption, test_stream_out)
@@ -1326,4 +1326,4 @@ TEST(GncOption, test_create)
     EXPECT_EQ(wide, swide);
     EXPECT_EQ(high, shigh);
 
-}
\ No newline at end of file
+}
diff --git a/libgnucash/app-utils/test/gtest-gnc-optiondb.cpp b/libgnucash/app-utils/test/gtest-gnc-optiondb.cpp
index c1120c958..f2af95de0 100644
--- a/libgnucash/app-utils/test/gtest-gnc-optiondb.cpp
+++ b/libgnucash/app-utils/test/gtest-gnc-optiondb.cpp
@@ -282,12 +282,12 @@ TEST_F(GncOptionDBTest, test_register_start_date_option)
      * gnc-optiondb.cpp.
      */
     EXPECT_EQ(static_cast<unsigned int>(std::distance(begin_dates.begin(), index)),
-              m_db->find_option("foo", "bar")->get_value<size_t>());
+              m_db->find_option("foo", "bar")->get_value<uint16_t>());
     m_db->set_option("foo", "bar", RelativeDatePeriod::END_THIS_MONTH);
     EXPECT_EQ(RelativeDatePeriod::START_THIS_MONTH,
               m_db->find_option("foo", "bar")->get_value<RelativeDatePeriod>());
-    m_db->set_option("foo", "bar", static_cast<size_t>(5));
-    EXPECT_EQ(5u, m_db->find_option("foo", "bar")->get_value<size_t>());
+    m_db->set_option("foo", "bar", static_cast<uint16_t>(5));
+    EXPECT_EQ(5u, m_db->find_option("foo", "bar")->get_value<uint16_t>());
 
 }
 

commit 0b2d14ee726d5efe758c8cbef803e3ee20b4fad7
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Jul 31 12:56:59 2022 -0700

    Fix distribution for expressions target.

diff --git a/bindings/guile/CMakeLists.txt b/bindings/guile/CMakeLists.txt
index 321145809..fae228510 100644
--- a/bindings/guile/CMakeLists.txt
+++ b/bindings/guile/CMakeLists.txt
@@ -234,6 +234,7 @@ set_local_dist(guile_DIST_local
     ${app_utils_SCHEME_1c}
     ${app_utils_SCHEME_2}
     ${app_utils_SCHEME_3}
+    ${expressions_SCHEME}
     expressions.i)
 set(guile_DIST ${guile_DIST_local} ${test_guile_DIST} PARENT_SCOPE)
 
diff --git a/libgnucash/app-utils/test/CMakeLists.txt b/libgnucash/app-utils/test/CMakeLists.txt
index 9c5d89247..416d61f63 100644
--- a/libgnucash/app-utils/test/CMakeLists.txt
+++ b/libgnucash/app-utils/test/CMakeLists.txt
@@ -23,7 +23,7 @@ macro(add_app_utils_test _TARGET _SOURCE_FILES)
 endmacro()
 
 gnc_add_test_with_guile(test-exp-parser test-exp-parser.c
-  APP_UTILS_TEST_INCLUDE_DIRS APP_UTILS_TEST_LIBS
+  APP_UTILS_TEST_INCLUDE_DIRS APP_UTILS_TEST_LIBS scm-expressions
  )
 add_app_utils_test(test-print-parse-amount test-print-parse-amount.cpp)
 add_app_utils_test(test-sx test-sx.cpp)

commit b94440b16ac64175f9dfc0248ab4ef701d63d582
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sat Aug 6 14:08:22 2022 +0800

    Bug 798588 - sx scrubbing was using incorrect free function
    
    the GHashTable values are gnc_numeric*.

diff --git a/libgnucash/app-utils/gnc-sx-instance-model.c b/libgnucash/app-utils/gnc-sx-instance-model.c
index b3a8e782d..c3a433857 100644
--- a/libgnucash/app-utils/gnc-sx-instance-model.c
+++ b/libgnucash/app-utils/gnc-sx-instance-model.c
@@ -102,7 +102,7 @@ scrub_sx_split_numeric (Split* split, gboolean is_credit, GList **changes)
     char *formval;
     gnc_numeric *numval = NULL;
     GHashTable *parser_vars = g_hash_table_new_full
-        (g_str_hash, g_str_equal, g_free, (GDestroyNotify)gnc_sx_variable_free);
+        (g_str_hash, g_str_equal, g_free, (GDestroyNotify)g_free);
     char *error_loc;
     gnc_numeric amount = gnc_numeric_zero ();
     gboolean parse_result = FALSE;

commit ea56d67797096511d27097021e40d5f31b2bd696
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sat Aug 6 14:09:26 2022 +0800

    [gnc-sx-instance-model.c] indent attributes properly

diff --git a/libgnucash/app-utils/gnc-sx-instance-model.c b/libgnucash/app-utils/gnc-sx-instance-model.c
index dcb51f8cb..b3a8e782d 100644
--- a/libgnucash/app-utils/gnc-sx-instance-model.c
+++ b/libgnucash/app-utils/gnc-sx-instance-model.c
@@ -107,8 +107,10 @@ scrub_sx_split_numeric (Split* split, gboolean is_credit, GList **changes)
     gnc_numeric amount = gnc_numeric_zero ();
     gboolean parse_result = FALSE;
 
-    qof_instance_get (QOF_INSTANCE (split), formula, &formval,
-                      numeric, &numval, NULL);
+    qof_instance_get (QOF_INSTANCE (split),
+                      formula, &formval,
+                      numeric, &numval,
+                      NULL);
 
     parse_result = gnc_exp_parser_parse_separate_vars (formval, &amount,
                                                        &error_loc, parser_vars);
@@ -116,8 +118,6 @@ scrub_sx_split_numeric (Split* split, gboolean is_credit, GList **changes)
     if (!parse_result || g_hash_table_size (parser_vars) != 0)
         amount = gnc_numeric_zero ();
 
-    g_hash_table_unref (parser_vars);
-
     if (!numval || !gnc_numeric_eq (amount, *numval))
     {
         ScrubItem *change = g_new (ScrubItem, 1);
@@ -126,6 +126,7 @@ scrub_sx_split_numeric (Split* split, gboolean is_credit, GList **changes)
         *changes = g_list_prepend (*changes, change);
     }
 
+    g_hash_table_destroy (parser_vars);
     g_free (formval);
     g_free (numval);
 }
@@ -148,7 +149,9 @@ gnc_sx_scrub_split_numerics (gpointer psplit, gpointer puser)
     for (GList *n = changes; n; n = n->next)
     {
         ScrubItem *change = n->data;
-        qof_instance_set (QOF_INSTANCE (split), change->name, &change->amount, NULL);
+        qof_instance_set (QOF_INSTANCE (split),
+                          change->name, &change->amount,
+                          NULL);
     }
     xaccTransCommitEdit (trans);
     g_list_free_full (changes, g_free);

commit a98e4abbd421f79d35e475dd93920d7085fe81f5
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sat Aug 6 10:20:16 2022 +0800

    [test-charts] add cash-flow to clear warning about missing report

diff --git a/gnucash/report/reports/standard/test/test-charts.scm b/gnucash/report/reports/standard/test/test-charts.scm
index d4707a74b..76b53f7ba 100644
--- a/gnucash/report/reports/standard/test/test-charts.scm
+++ b/gnucash/report/reports/standard/test/test-charts.scm
@@ -4,6 +4,7 @@
 (use-modules (gnucash reports standard category-barchart))
 (use-modules (gnucash reports standard net-charts))
 (use-modules (gnucash reports standard account-piecharts))
+(use-modules (gnucash reports standard cash-flow))
 (use-modules (gnucash reports standard cashflow-barchart))
 (use-modules (gnucash reports standard price-scatter))
 (use-modules (gnucash reports example daily-reports))



Summary of changes:
 bindings/guile/CMakeLists.txt                      |   1 +
 bindings/guile/gnc-optiondb.i                      | 118 +++++++++++++---
 bindings/guile/options.scm                         |  92 ++++++-------
 .../guile/test/test-gnc-option-scheme-output.scm   |  14 +-
 bindings/guile/test/test-gnc-optiondb.scm          |  39 ++----
 bindings/guile/test/test-options.scm               |   2 +-
 common/base-typemaps.i                             |   2 +-
 gnucash/gnome-utils/dialog-options.cpp             |  47 +++++--
 gnucash/gnome-utils/dialog-options.hpp             |   2 +
 gnucash/report/gnc-report.cpp                      |   2 +-
 gnucash/report/report-core.scm                     |  51 ++++---
 .../report/reports/standard/account-summary.scm    |   2 +-
 .../report/reports/standard/test/test-charts.scm   |   1 +
 gnucash/report/reports/standard/view-column.scm    |   2 +-
 gnucash/report/test/test-report.scm                |  12 +-
 libgnucash/app-utils/gnc-option-impl.cpp           |  24 ++--
 libgnucash/app-utils/gnc-option-impl.hpp           |  56 ++++----
 libgnucash/app-utils/gnc-option.cpp                |  50 ++++---
 libgnucash/app-utils/gnc-option.hpp                |  14 +-
 libgnucash/app-utils/gnc-optiondb.cpp              | 117 +++++++++++++---
 libgnucash/app-utils/gnc-optiondb.hpp              | 152 ++++++++++++++-------
 libgnucash/app-utils/gnc-sx-instance-model.c       |  15 +-
 libgnucash/app-utils/test/CMakeLists.txt           |   2 +-
 libgnucash/app-utils/test/gtest-gnc-option.cpp     |  16 +--
 libgnucash/app-utils/test/gtest-gnc-optiondb.cpp   |   6 +-
 25 files changed, 553 insertions(+), 286 deletions(-)



More information about the gnucash-changes mailing list