Skip to content

Commit

Permalink
Deprecate unused function gnc:second-html-build-acct-table
Browse files Browse the repository at this point in the history
and ensure gnc:html-build-acct-table is redefined to the former
gnc:first-html-build-acct-table, and gnc:first-html-build-acct-table
redirects to gnc:html-build-acct-table.

It would seem gnc:second-html-build-acct-table has never been used.
  • Loading branch information
christopherlam committed Jun 18, 2019
1 parent d16b138 commit a44a1a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 31 deletions.
2 changes: 2 additions & 0 deletions gnucash/report/report-system/html-acct-table.scm
Original file line number Diff line number Diff line change
Expand Up @@ -1373,6 +1373,8 @@
;; presently unimplemented. many of these functions are better left
;; to the renderer, anyway. but if you *really* need them, you may
;; still use gnc:first-html-build-acct-table.
(issue-deprecation-warning
"gnc:second-html-build-acct-table is unused. use gnc:html-build-acct-table.")
(let* ((env (list
(list 'start-date start-date)
(list 'end-date end-date)
Expand Down
37 changes: 6 additions & 31 deletions gnucash/report/report-system/html-utilities.scm
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,12 @@
;; <int> start-percent, delta-percent: Fill in the [start:start+delta]
;; section of the progress bar while running this function.
;;

(define (gnc:first-html-build-acct-table . args)
(issue-deprecation-warning
"gnc:first-html-build-acct-table is deprecated. use gnc:html-build-acct-table.")
(apply gnc:html-build-acct-table args))

(define (gnc:html-build-acct-table
start-date end-date
tree-depth show-subaccts? accounts
Expand All @@ -396,37 +402,6 @@
show-total? get-total-fn
total-name group-types? show-parent-balance? show-parent-total?
show-other-curr? report-commodity exchange-fn show-zero-entries?)
;; Select, here, which version of gnc:html-build-acct-table you want
;; to use by default.
(define fn-version 'first)
(if (equal? fn-version 'second)
(gnc:second-html-build-acct-table
start-date end-date
tree-depth show-subaccts? accounts
start-percent delta-percent
show-col-headers?
show-total? get-total-fn
total-name group-types? show-parent-balance? show-parent-total?
show-other-curr? report-commodity exchange-fn show-zero-entries?)
(gnc:first-html-build-acct-table
start-date end-date
tree-depth show-subaccts? accounts
start-percent delta-percent
show-col-headers?
show-total? get-total-fn
total-name group-types? show-parent-balance? show-parent-total?
show-other-curr? report-commodity exchange-fn show-zero-entries?)
)
)

(define (gnc:first-html-build-acct-table
start-date end-date
tree-depth show-subaccts? accounts
start-percent delta-percent
show-col-headers?
show-total? get-total-fn
total-name group-types? show-parent-balance? show-parent-total?
show-other-curr? report-commodity exchange-fn show-zero-entries?)
(let ((table (gnc:make-html-table))
(work-to-do 0)
(work-done 0)
Expand Down

0 comments on commit a44a1a4

Please sign in to comment.