c++options: Remove the callback registration functions.

pull/1191/head
John Ralls 4 years ago
parent 759376eb13
commit 16dc15964c

@ -375,14 +375,7 @@ not found.")))
(let ((options (if (null? rest)
(gnc:report-template-new-options template)
(car rest))))
(gnc:report-set-options! r options)
(gnc:options-register-callback
#f #f
(lambda ()
(gnc:report-set-dirty?! r #t)
(let ((cb (gnc:report-template-options-changed-cb template)))
(if cb (cb r))))
options))
(gnc:report-set-options! r options))
(gnc:report-set-id! r (gnc-report-add r))
(gnc:report-id r)))

@ -53,18 +53,6 @@
options))
(define (make-child-options-callback view child)
(let* ((view-opts (gnc:report-options view))
(child-opts (gnc:report-options child))
(id
(gnc:options-register-callback
#f #f
(lambda ()
(gnc:report-set-dirty?! child #t)
(gnc:options-touch view-opts))
child-opts)))
id))
(define (render-view report)
(let* ((view-doc (gnc:make-html-document))
(options (gnc:report-options report))
@ -80,17 +68,6 @@
(current-width 0)
(current-row-num 0))
;; make sure each subreport has an option change callback that
;; pings the parent
(let loop ((reports reports) (new-reports '()))
(match reports
(() (gnc:option-set-value report-opt (reverse new-reports)))
(((child rowspan colspan callback) . rest)
(let ((callback (or callback
(make-child-options-callback
report (gnc-report-find child)))))
(loop rest (cons (list child rowspan colspan callback) new-reports))))))
;; we really would rather do something smart here with the
;; report's cached text if possible. For the moment, we'll have
;; to rerun every report, every time... FIXME

@ -178,12 +178,6 @@
(with-output-to-string generate-forms))
;; FIXME: Fake callback functions for boolean-complex and multichoice-callback
(define-public (gnc:options-register-callback section name callback options) (options 'register-callback) 1)
(define-public (gnc:options-register-c-callback section name callback data options) (options 'register-c-callback) 1)
(define-public (gnc:options-unregister-callback-id id) 0 (options 'unregister-callback-id))
;; 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.")

Loading…
Cancel
Save