mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[c++options] Convert trep-engine, trep-based-reports, and tests to new API
This commit is contained in:
@@ -43,10 +43,9 @@
|
||||
(gnc:options->sxml rpt-uuid options "test-gstr" test-title))
|
||||
|
||||
(define (set-option! options section name value)
|
||||
(let ((option (gnc:lookup-option options section name)))
|
||||
(if option
|
||||
(gnc:option-set-value option value)
|
||||
(test-assert (format #f "wrong-option ~a ~a" section name) #f))))
|
||||
(if (gnc-lookup-option options section name)
|
||||
(gnc-set-option options section name value)
|
||||
(test-assert (format #f "wrong-option ~a ~a" section name) #f)))
|
||||
|
||||
(define* (create-txn d m y desc splits #:optional txn-type)
|
||||
(let* ((splits (map (lambda (s) (vector (cdr s) (car s) (car s))) splits))
|
||||
|
||||
@@ -102,15 +102,13 @@
|
||||
(sxml->table-row-col sxml 1 row col))
|
||||
|
||||
(define (set-option! options section name value)
|
||||
(let ((option (gnc:lookup-option options section name)))
|
||||
(if option
|
||||
(gnc:option-set-value option value)
|
||||
(test-assert (format #f "wrong-option ~a ~a" section name) #f))))
|
||||
(if (gnc-lookup-option options section name)
|
||||
(gnc-set-option options section name value)
|
||||
(test-assert (format #f "wrong-option ~a ~a" section name) #f)))
|
||||
(define (opt-val options section name)
|
||||
(let ((option (gnc:lookup-option options section name)))
|
||||
(if option
|
||||
(gnc:option-value option)
|
||||
(test-assert (format #f "wrong-option ~a ~a" section name) #f))))
|
||||
(if (gnc-lookup-option options section name)
|
||||
(gnc-get-option options section name value)
|
||||
(test-assert (format #f "wrong-option ~a ~a" section name) #f)))
|
||||
|
||||
(define structure
|
||||
(list "Root" (list (cons 'type ACCT-TYPE-ASSET))
|
||||
|
||||
@@ -990,9 +990,7 @@ be excluded from periodic reporting.")
|
||||
(gnc-register-internal-option options "__trep" "unique-transactions" #f)
|
||||
|
||||
(GncOptionDBPtr-set-default-section options gnc:pagename-general)
|
||||
;; A temporary hack so that trep users will get the options type they expect.
|
||||
(lambda (key)
|
||||
options)))
|
||||
options))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;
|
||||
;; Here comes the big function that builds the whole table.
|
||||
|
||||
Reference in New Issue
Block a user