mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
c++options: Remove gnc:options-data
This commit is contained in:
parent
16dc15964c
commit
11225d9741
@ -11,6 +11,7 @@
|
||||
(use-modules (gnucash reports))
|
||||
(use-modules (tests test-report-extras))
|
||||
(use-modules (srfi srfi-9))
|
||||
(use-modules (srfi srfi-26))
|
||||
(use-modules (srfi srfi-64))
|
||||
(use-modules (srfi srfi-98))
|
||||
(use-modules (tests srfi64-extras))
|
||||
@ -68,7 +69,8 @@
|
||||
(gnc:options-for-each
|
||||
(lambda (option)
|
||||
(when (case (gnc:option-type option)
|
||||
((multichoice) (pair? (cdr (gnc:option-data option))))
|
||||
((multichoice)
|
||||
(> (GncOption-num-permissible-values option) 1))
|
||||
((boolean) #t)
|
||||
(else #f))
|
||||
(set! report-options-tested
|
||||
@ -76,8 +78,9 @@
|
||||
(gnc:option-section option)
|
||||
(gnc:option-name option)
|
||||
(case (gnc:option-type option)
|
||||
((multichoice) (map (lambda (d) (vector-ref d 0))
|
||||
(gnc:option-data option)))
|
||||
((multichoice)
|
||||
(map (cut GncOption-permissible-value option <>)
|
||||
(iota (GncOption-num-permissible-values option))))
|
||||
((boolean) (list #t #f))))
|
||||
report-options-tested))))
|
||||
options)
|
||||
|
@ -85,15 +85,6 @@
|
||||
(define-public (gnc:option-type option)
|
||||
(GncOption-get-type option))
|
||||
|
||||
;; Used only by test-stress-options.scm
|
||||
(define-public (gnc:option-data option)
|
||||
; (define num-values (GncOption-num-permissible-values option))
|
||||
; (let loop ((i 0) (retval '()))
|
||||
; (if (>= i num-values) (reverse retval)
|
||||
; (let ((value (GncOption-permissible-value option i))
|
||||
; (name (GncOption-permissible-value-name option i)))
|
||||
; (loop (1+ i) (cons (vector value name) retval))))))
|
||||
(list (vector 1 2)))
|
||||
;; Create the database and return a dispatch function.
|
||||
(define-public (gnc:new-options)
|
||||
(let ((optiondb (new-gnc-optiondb)))
|
||||
|
Loading…
Reference in New Issue
Block a user