gnucash maint: Use original guile variable names changed in #1073
Christopher Lam
clam at code.gnucash.org
Sun Mar 20 00:38:40 EDT 2022
Updated via https://github.com/Gnucash/gnucash/commit/cf128250 (commit)
from https://github.com/Gnucash/gnucash/commit/189db58e (commit)
commit cf1282501e8d6c5c2d59fcb1c8d34456833c244c
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sun Mar 20 12:26:26 2022 +0800
Use original guile variable names changed in #1073
The changes 09296dfb96, 1373233cd0 and 189db58e6 had caused
inconsistencies. Best restore original guile variable names using
underscore, bound to strings instead of functions returning strings.
diff --git a/bindings/guile/engine.scm b/bindings/guile/engine.scm
index 2997189cb..76be35339 100644
--- a/bindings/guile/engine.scm
+++ b/bindings/guile/engine.scm
@@ -37,8 +37,8 @@
(export account-full-name<?)
(export accounts-get-children-depth)
-(define-public GNC-COMMODITY-NS-CURRENCY "CURRENCY")
-(define-public GNC-COMMODITY-NS-NONCURRENCY (gettext "ALL NON-CURRENCY"))
+(define-public GNC_COMMODITY_NS_CURRENCY "CURRENCY")
+(define-public GNC_COMMODITY_NS_NONCURRENCY (gettext "ALL NON-CURRENCY"))
(define (gnc-pricedb-lookup-latest-before-t64 . args)
(issue-deprecation-warning "gnc-pricedb-lookup-latest-before-t64 has been renamed to gnc-pricedb-lookup-nearest-before-t64")
diff --git a/gnucash/import-export/qif-imp/qif-dialog-utils.scm b/gnucash/import-export/qif-imp/qif-dialog-utils.scm
index e261476fc..166884245 100644
--- a/gnucash/import-export/qif-imp/qif-dialog-utils.scm
+++ b/gnucash/import-export/qif-imp/qif-dialog-utils.scm
@@ -736,7 +736,7 @@
;; compatible with the QIF type?
(and (string=? s (caddr elt))
(not (and (string? qif-type)
- (string=? (GNC-COMMODITY-NS-NONCURRENCY)
+ (string=? GNC_COMMODITY_NS_NONCURRENCY
(cadr elt))
(or (string-ci=? qif-type "stock")
(string-ci=? qif-type "etf"))))))
@@ -745,7 +745,7 @@
;; If a preferences match was found, use its namespace.
(if pref-match (cadr pref-match))
;; There's no symbol. Default to a fund.
- (GNC-COMMODITY-NS-NONCURRENCY))))
+ GNC_COMMODITY_NS_NONCURRENCY)))
;; Was a QIF type given?
(if (string? qif-type)
@@ -753,7 +753,7 @@
(if (or
(string-ci=? qif-type "mutual fund")
(string-ci=? qif-type "index"))
- (GNC-COMMODITY-NS-NONCURRENCY)
+ GNC_COMMODITY_NS_NONCURRENCY
(guess-by-symbol qif-symbol)))
;; No QIF type was given, so guess a
diff --git a/gnucash/import-export/qif-imp/qif-to-gnc.scm b/gnucash/import-export/qif-imp/qif-to-gnc.scm
index ec1040437..cc785e825 100644
--- a/gnucash/import-export/qif-imp/qif-to-gnc.scm
+++ b/gnucash/import-export/qif-imp/qif-to-gnc.scm
@@ -270,7 +270,7 @@
(default-currency
(gnc-commodity-table-find-full
(gnc-commodity-table-get-table (gnc-get-current-book))
- (GNC-COMMODITY-NS-CURRENCY) default-currency-name))
+ GNC_COMMODITY_NS_CURRENCY default-currency-name))
(sorted-accounts-list '())
(markable-xtns '())
(sorted-qif-files-list (sort qif-files-list
diff --git a/libgnucash/app-utils/options.scm b/libgnucash/app-utils/options.scm
index 9e950dcfa..52ab8cf3d 100644
--- a/libgnucash/app-utils/options.scm
+++ b/libgnucash/app-utils/options.scm
@@ -435,7 +435,7 @@ the option '~a'."))
(if (string? currency)
(gnc-commodity-table-lookup
(gnc-commodity-table-get-table (gnc-get-current-book))
- (GNC-COMMODITY-NS-CURRENCY) currency)
+ GNC_COMMODITY_NS_CURRENCY currency)
currency))
(let* ((value (currency->scm default-value))
@@ -561,7 +561,7 @@ the option '~a'."))
(define (commodity->scm commodity)
(if (string? commodity)
(list 'commodity-scm
- (GNC-COMMODITY-NS-CURRENCY)
+ GNC_COMMODITY_NS_CURRENCY
commodity)
(list 'commodity-scm
(gnc-commodity-get-namespace commodity)
@@ -1560,7 +1560,7 @@ the option '~a'."))
(if (string? currency-string)
(gnc-commodity-table-lookup
(gnc-commodity-table-get-table (gnc-get-current-book))
- (GNC-COMMODITY-NS-CURRENCY) currency-string)
+ GNC_COMMODITY_NS_CURRENCY currency-string)
#f))
(define (currency? val)
Summary of changes:
bindings/guile/engine.scm | 4 ++--
gnucash/import-export/qif-imp/qif-dialog-utils.scm | 6 +++---
gnucash/import-export/qif-imp/qif-to-gnc.scm | 2 +-
libgnucash/app-utils/options.scm | 6 +++---
4 files changed, 9 insertions(+), 9 deletions(-)
More information about the gnucash-changes
mailing list