[options] Provide gnc:register-multichoice-callback-option.

Compatibility function for passing symbols or numbers as the default
value.

Note that this isn't used by GnuCash code and so isn't exercised or
tested, it's provided only to simplify user-written code migration.
This commit is contained in:
John Ralls 2022-08-26 11:50:40 -07:00
parent 80c015d6d6
commit 30b2c0bcac

View File

@ -339,6 +339,14 @@
(gnc-relative-date-to-time64 (cdr option-value)))
option-value))
(define-public (gnc:register-multichoice-callback-option options section name key docstring default multichoice widget-changed-cb)
(let ((defval (cond ((symbol? default)
(symbol->string default))
((number? default)
(number->string default))
(else default))))
(gnc-register-multichoice-callback-option (gnc:optiondb options) section name key docstring defval multichoice widget-changed-cb)))
;; Scheme code for supporting options for the business modules
;;
;; Created by: Derek Atkins <derek@ihtfp.com>