From 16dc15964c0eaa8727b8bd2d0d0940bd8451e97e Mon Sep 17 00:00:00 2001 From: John Ralls Date: Wed, 15 Dec 2021 14:32:39 -0800 Subject: [PATCH] c++options: Remove the callback registration functions. --- gnucash/report/report-core.scm | 9 +------- .../report/reports/standard/view-column.scm | 23 ------------------- libgnucash/app-utils/options.scm | 6 ----- 3 files changed, 1 insertion(+), 37 deletions(-) diff --git a/gnucash/report/report-core.scm b/gnucash/report/report-core.scm index 52505a0a52..036ffe0d81 100644 --- a/gnucash/report/report-core.scm +++ b/gnucash/report/report-core.scm @@ -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))) diff --git a/gnucash/report/reports/standard/view-column.scm b/gnucash/report/reports/standard/view-column.scm index b84d536b9d..7ef37994e4 100644 --- a/gnucash/report/reports/standard/view-column.scm +++ b/gnucash/report/reports/standard/view-column.scm @@ -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 diff --git a/libgnucash/app-utils/options.scm b/libgnucash/app-utils/options.scm index 7cfa911ad2..c26663dd6a 100644 --- a/libgnucash/app-utils/options.scm +++ b/libgnucash/app-utils/options.scm @@ -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.")