Commit Graph

15 Commits

Author SHA1 Message Date
John Ralls
852b2ffc2e Handle bare currency mnemonics, catch invalid GUID string exceptions. 2021-08-13 14:06:47 -07:00
John Ralls
18997db720 Separate GncOptionAccountValue into GncOptionAccountListValue and GncOptionAccountSelValue.
They have different get_value() return types so can't cohabit comfortably.
2021-07-31 18:22:46 -07:00
John Ralls
05ac056449 Make separate option type for GncOwner.
GncOwner is not a QofInstance subclass.
2021-07-31 18:22:45 -07:00
John Ralls
c034a26ae7 Protect stored scheme option values from the garbage collector. 2021-07-31 18:18:05 -07:00
John Ralls
0a8f66ee90 Fold GncOptionGncOwnerValue into GncOptionValue<const QofQuery*>.
Reflecting the way Scheme options handles it.
2021-07-31 17:54:30 -07:00
John Ralls
418eb06620 Remove GncOptionDateValue::set_default_value(size_t)
Because it's ambiguous with set_default_value(time64).
2021-07-31 17:54:30 -07:00
John Ralls
63502900f3 Permit GncOptionAccountValue to have a nil default value. 2021-07-31 17:54:30 -07:00
John Ralls
5c74337810 Add function GncOption::set_default_value.
Allows reports to derive from other reports and then change the option
default values to suit. If they change only the values and not the defaults
then it's possible to create saved report configs that don't include the
options whose values are changed to the base report's default value. See
https://bugs.gnucash.org/show_bug.cgi?id=642292.
2021-07-31 17:54:30 -07:00
John Ralls
cb7270cafe Fix myriad gcc10 complaints. 2021-07-31 17:54:29 -07:00
John Ralls
a995343a8b Provide for multiple selections in GncOptionMultichoiceValue
To support the GncOptionUIType::LIST. This UI type is unused in GnuCash
code but might be used in user custom reports.
2021-07-31 17:54:28 -07:00
John Ralls
16da3208fc Make GncOptionDateValue::get_period_index return value size_t.
Instead of int8_t to match the built-in vector index type.
2021-07-31 17:54:28 -07:00
John Ralls
3200bd4966 Add a multiselect boolean member to GncOptionAccountValue.
To support a variation available in dialog-options. Even though it's not
used in any GnuCash code nor documented anywhere it might be in some
custom reports.
2021-07-31 17:54:28 -07:00
John Ralls
3b78b6e894 Change the GncOptionMultichoiceValue permissible value return types to const char*.
From std::string. The consumer is a GtkWidget so we might as well do the conversion
inside the class and this will simplify adding these functions to GncOptionDateValue
in the next commit.
2021-07-10 17:29:16 -07:00
John Ralls
dc876d4041 Provide an accessor to GncOptionAccountValue::m_allowed
To enable its use by gnc_account_sel_filter
2021-07-10 17:29:15 -07:00
John Ralls
aa246d3096 Make implementation classes and template code visible only in app-utils.
So only GncOption and the GncOptionDB free-function interface are public.
We don't want to expose template headers widely, it would blow up compilation
times and might lead to one definition rule violations.
2021-07-10 17:24:58 -07:00