mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
deprecations: clarify functions deprecated in 4.x.
This commit is contained in:
parent
f072fef014
commit
851bc7f8d9
@ -100,7 +100,7 @@
|
|||||||
(define (gnc:owner-from-split split result-owner)
|
(define (gnc:owner-from-split split result-owner)
|
||||||
(define (notnull x) (and (not (null? x)) x))
|
(define (notnull x) (and (not (null? x)) x))
|
||||||
(issue-deprecation-warning
|
(issue-deprecation-warning
|
||||||
"gnc:owner-from-split is deprecated. use gnc:split->owner instead.")
|
"gnc:owner-from-split is deprecated in 4.x. use gnc:split->owner instead.")
|
||||||
(let* ((trans (xaccSplitGetParent split))
|
(let* ((trans (xaccSplitGetParent split))
|
||||||
(invoice (notnull (gncInvoiceGetInvoiceFromTxn trans)))
|
(invoice (notnull (gncInvoiceGetInvoiceFromTxn trans)))
|
||||||
(temp (gncOwnerNew))
|
(temp (gncOwnerNew))
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
(use-modules (ice-9 match))
|
(use-modules (ice-9 match))
|
||||||
|
|
||||||
(define (deprecate . lst)
|
(define (deprecate . lst)
|
||||||
|
;; 4.x deprecation. remove in 5.x
|
||||||
(issue-deprecation-warning (string-concatenate lst)))
|
(issue-deprecation-warning (string-concatenate lst)))
|
||||||
|
|
||||||
(define (no-op-deprecation-warning)
|
(define (no-op-deprecation-warning)
|
||||||
|
@ -154,7 +154,7 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(define-public (gnc:substring-replace-from-to s1 s2 s3 start end-after)
|
(define-public (gnc:substring-replace-from-to s1 s2 s3 start end-after)
|
||||||
(issue-deprecation-warning "gnc:substring-replace-from-to is deprecated.")
|
(issue-deprecation-warning "gnc:substring-replace-from-to is deprecated in 4.x.")
|
||||||
(string-replace-substring
|
(string-replace-substring
|
||||||
s1 s2 s3 0 (string-length s1) (max 0 (1- start))
|
s1 s2 s3 0 (string-length s1) (max 0 (1- start))
|
||||||
(and (positive? end-after) (+ (max 0 (1- start)) (1- end-after)))))
|
(and (positive? end-after) (+ (max 0 (1- start)) (1- end-after)))))
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
(let* ((stylesheetpath (find-stylesheet fname))
|
(let* ((stylesheetpath (find-stylesheet fname))
|
||||||
(templatepath (find-template fname)))
|
(templatepath (find-template fname)))
|
||||||
; make sure there's a trailing delimiter
|
; make sure there's a trailing delimiter
|
||||||
(issue-deprecation-warning "find-file is deprecated. Please use find-stylesheet or find-template instead.")
|
(issue-deprecation-warning "find-file is deprecated in 4.x. Please use find-stylesheet or find-template instead.")
|
||||||
(cond
|
(cond
|
||||||
((access? stylesheetpath R_OK) stylesheetpath)
|
((access? stylesheetpath R_OK) stylesheetpath)
|
||||||
((access? templatepath R_OK) templatepath)
|
((access? templatepath R_OK) templatepath)
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
|
|
||||||
(define (gnc:make-html-barchart)
|
(define (gnc:make-html-barchart)
|
||||||
(issue-deprecation-warning
|
(issue-deprecation-warning
|
||||||
"(gnc:make-html-barchart) is deprecated. use gnc:make-html-chart instead.")
|
"(gnc:make-html-barchart) is deprecated in 4.x. use gnc:make-html-chart instead.")
|
||||||
(gnc:make-html-barchart-internal '(pixels . -1) '(pixels . -1) #f #f #f #f '() '() '()
|
(gnc:make-html-barchart-internal '(pixels . -1) '(pixels . -1) #f #f #f #f '() '() '()
|
||||||
#f #f #f '() #f #f #f #f #f #f))
|
#f #f #f '() #f #f #f #f #f #f))
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
(define (gnc:make-html-linechart)
|
(define (gnc:make-html-linechart)
|
||||||
(issue-deprecation-warning
|
(issue-deprecation-warning
|
||||||
"(gnc:make-html-linechart) is deprecated. use gnc:make-html-chart instead.")
|
"(gnc:make-html-linechart) is deprecated in 4.x. use gnc:make-html-chart instead.")
|
||||||
(gnc:make-html-linechart-internal
|
(gnc:make-html-linechart-internal
|
||||||
'(pixels . -1) ;;width
|
'(pixels . -1) ;;width
|
||||||
'(pixels . -1) ;;height
|
'(pixels . -1) ;;height
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
(define (gnc:make-html-piechart)
|
(define (gnc:make-html-piechart)
|
||||||
(issue-deprecation-warning
|
(issue-deprecation-warning
|
||||||
"(gnc:make-html-piechart) is deprecated. use gnc:make-html-chart instead.")
|
"(gnc:make-html-piechart) is deprecated in 4.x. use gnc:make-html-chart instead.")
|
||||||
(gnc:make-html-piechart-internal '(pixels . -1) '(pixels . -1) #f #f #f #f #f #f #f #f #f #f #f))
|
(gnc:make-html-piechart-internal '(pixels . -1) '(pixels . -1) #f #f #f #f #f #f #f #f #f #f #f))
|
||||||
|
|
||||||
(define gnc:html-piechart-data
|
(define gnc:html-piechart-data
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
(define (gnc:make-html-scatter)
|
(define (gnc:make-html-scatter)
|
||||||
(issue-deprecation-warning
|
(issue-deprecation-warning
|
||||||
"(gnc:make-html-scatter) is deprecated. use gnc:make-html-chart instead.")
|
"(gnc:make-html-scatter) is deprecated in 4.x. use gnc:make-html-chart instead.")
|
||||||
(gnc:make-html-scatter-internal '(pixels . -1) '(pixels . -1) #f #f #f #f '() #f #f))
|
(gnc:make-html-scatter-internal '(pixels . -1) '(pixels . -1) #f #f #f #f '() #f #f))
|
||||||
|
|
||||||
(define gnc:html-scatter-width
|
(define gnc:html-scatter-width
|
||||||
|
@ -309,11 +309,11 @@
|
|||||||
|
|
||||||
;; Symbols deprecated in 4.x, to remove for 5.x
|
;; Symbols deprecated in 4.x, to remove for 5.x
|
||||||
(define-public (gnc:get-debit-string acct-type)
|
(define-public (gnc:get-debit-string acct-type)
|
||||||
(issue-deprecation-warning "gnc:get-debit-string is deprecated. Please use (gnucash engine)'s gnc-account-get-debit-string instead.")
|
(issue-deprecation-warning "gnc:get-debit-string is deprecated in 4.x. Please use (gnucash engine)'s gnc-account-get-debit-string instead.")
|
||||||
(gnc-account-get-debit-string acct-type))
|
(gnc-account-get-debit-string acct-type))
|
||||||
(define-public (gnc:get-credit-string acct-type)
|
(define-public (gnc:get-credit-string acct-type)
|
||||||
(issue-deprecation-warning "gnc:get-credit-string is deprecated. Please use (gnucash engine)'s gnc-account-get-credit-string instead.")
|
(issue-deprecation-warning "gnc:get-credit-string is deprecated in 4.x. Please use (gnucash engine)'s gnc-account-get-credit-string instead.")
|
||||||
(gnc-account-get-debit-string acct-type))
|
(gnc-account-get-debit-string acct-type))
|
||||||
(define-public (gnc:config-file-format-version version)
|
(define-public (gnc:config-file-format-version version)
|
||||||
(issue-deprecation-warning "gnc:config-file-format-version is deprecated and will be removed from a future version.")
|
(issue-deprecation-warning "gnc:config-file-format-version is deprecated in 4.x and will be removed from a future version.")
|
||||||
#t)
|
#t)
|
||||||
|
Loading…
Reference in New Issue
Block a user