gnucash stable: Bug 798991 - Incorrect Account Name Order in Transaction Report

Christopher Lam clam at code.gnucash.org
Mon Jul 10 20:42:14 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/2a392633 (commit)
	from  https://github.com/Gnucash/gnucash/commit/f2d92302 (commit)



commit 2a392633ed7219a556106b1816aa30f92649fc2c
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Mon Jul 10 20:07:27 2023 +0800

    Bug 798991 - Incorrect Account Name Order in Transaction Report
    
    gnc:string-locale<? uses glib instead of guile string compare

diff --git a/bindings/core-utils.i b/bindings/core-utils.i
index e950532abc..b0c501d446 100644
--- a/bindings/core-utils.i
+++ b/bindings/core-utils.i
@@ -104,6 +104,8 @@ const char * gnc_locale_default_iso_currency_code (void);
 %newobject gnc_locale_name;
 gchar *gnc_locale_name (void);
 
+int g_utf8_collate (const char *a, const char *b);
+
 #if defined(SWIGGUILE)
 %init {
     {
diff --git a/bindings/guile/core-utils.scm b/bindings/guile/core-utils.scm
index dfe98fc5a6..bab5106e65 100644
--- a/bindings/guile/core-utils.scm
+++ b/bindings/guile/core-utils.scm
@@ -75,8 +75,8 @@
      (issue-deprecation-warning "Using _ to call gettext is disallowed in guile-3 and will be removed in the future. Use G_ instead.")
      (gnc:gettext x))))
 
-(define gnc:string-locale<? string-locale<?)
-(define gnc:string-locale>? string-locale>?)
+(define (gnc:string-locale<? a b) (< (g-utf8-collate a b) 0))
+(define (gnc:string-locale>? a b) (> (g-utf8-collate a b) 0))
 
 ;; Custom unbound-variable exception printer: instead of generic "In
 ;; procedure module-lookup: Unbound variable: varname", it will first



Summary of changes:
 bindings/core-utils.i         | 2 ++
 bindings/guile/core-utils.scm | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)



More information about the gnucash-changes mailing list