gnucash maint: Multiple changes pushed

Christopher Lam clam at code.gnucash.org
Mon Dec 20 23:57:55 EST 2021


Updated	 via  https://github.com/Gnucash/gnucash/commit/00570271 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/a809058e (commit)
	from  https://github.com/Gnucash/gnucash/commit/0b258e35 (commit)



commit 0057027153466dda9e8701df77035a3ee40c4ea5
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Tue Dec 21 12:52:19 2021 +0800

    [assistant-qif-import] prevent ambiguous mnemonic
    
    Mnemonic N clashes with GtkAssistant "Next". Change to D which does
    not clash.

diff --git a/gnucash/import-export/qif-imp/assistant-qif-import.c b/gnucash/import-export/qif-imp/assistant-qif-import.c
index f8f2514da..008060162 100644
--- a/gnucash/import-export/qif-imp/assistant-qif-import.c
+++ b/gnucash/import-export/qif-imp/assistant-qif-import.c
@@ -903,7 +903,7 @@ new_security_notebook_page (SCM security_hash_key, gnc_commodity *comm, QIFImpor
     comm_nb_page->name_entry = gtk_entry_new ();
     gtk_entry_set_text (GTK_ENTRY(comm_nb_page->name_entry),
                         gnc_commodity_get_fullname (comm));
-    label = gtk_label_new_with_mnemonic (_("_Name or description"));
+    label = gtk_label_new_with_mnemonic (_("Name or _description"));
     gtk_label_set_mnemonic_widget (GTK_LABEL(label), comm_nb_page->name_entry);
     gnc_label_set_alignment (label, 0, 0.5);
 

commit a809058e10ceeb9688b2937a6bf98563b3a3d528
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sun Dec 5 20:57:51 2021 +0800

    [qif-guess-map] simplify extract-all-account-info

diff --git a/gnucash/import-export/qif-imp/qif-guess-map.scm b/gnucash/import-export/qif-imp/qif-guess-map.scm
index 94705561e..75e7a8304 100644
--- a/gnucash/import-export/qif-imp/qif-guess-map.scm
+++ b/gnucash/import-export/qif-imp/qif-guess-map.scm
@@ -102,27 +102,10 @@
   ;; GnuCash account. Each member of the list is itself a list with
   ;; the form: (shortname fullname Account*)
   (define (extract-all-account-info an-account root-name)
-    (if (null? an-account)
-        '()
-        (let ((children-list (gnc-account-get-children-sorted an-account))
-              (names '()))
-
-          ;; Recursively walk the account tree.
-          (for-each
-           (lambda (child-acct)
-             (let* ((name (xaccAccountGetName child-acct))
-                    (fullname
-                     (if (string? root-name)
-                         (string-append root-name
-                                        (gnc-get-account-separator-string)
-                                        name)
-                         name)))
-               (set! names
-                     (append (cons (list name fullname child-acct)
-                                   (extract-all-account-info child-acct fullname))
-                             names))))
-           children-list)
-          names)))
+    (map
+     (lambda (acct)
+       (list (xaccAccountGetName acct) (gnc-account-get-full-name acct) acct))
+     (gnc-account-get-descendants-sorted an-account)))
 
   (define (safe-read)
     (false-if-exception



Summary of changes:
 .../import-export/qif-imp/assistant-qif-import.c   |  2 +-
 gnucash/import-export/qif-imp/qif-guess-map.scm    | 25 ++++------------------
 2 files changed, 5 insertions(+), 22 deletions(-)



More information about the gnucash-changes mailing list