gnucash master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sun Mar 19 13:12:22 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/90e1e2d1 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/a576dd87 (commit)
	from  https://github.com/Gnucash/gnucash/commit/0c3e8540 (commit)



commit 90e1e2d1c38ccd95a7a4f93ce718fdd07b92dded
Merge: 0c3e85404d a576dd87a4
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Mar 19 10:11:42 2023 -0700

    Merge Bob Fewell's 'bug798558' into master.


commit a576dd87a4584771c87070f5f90e7e934d450dc4
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun Mar 19 13:31:50 2023 +0000

    Bug798558 - Irregular line spacing in Account Tree View
    
    When securities are in the list, the rows look twice as high as though
    there is a linefeed at the end. This is partly due to commit for bug
    797501 which worked at the time but a change in pango 50.4 to do with
    wrapping has highlighted this bug.
    
    To fix this only wrap currencies with ltr bidi isolate characters in
    gnc_print_amount_with_bidi_ltr_isolate

diff --git a/libgnucash/app-utils/gnc-ui-util.c b/libgnucash/app-utils/gnc-ui-util.c
index a165de5529..a8de2e4084 100644
--- a/libgnucash/app-utils/gnc-ui-util.c
+++ b/libgnucash/app-utils/gnc-ui-util.c
@@ -1486,6 +1486,9 @@ gnc_print_amount_with_bidi_ltr_isolate (gnc_numeric val, GNCPrintAmountInfo info
     static const char ltr_pop_isolate[] = { 0xe2, 0x81, 0xa9 };
     size_t offset = info.use_symbol ? 3 : 0;
 
+    if (!gnc_commodity_is_currency (info.commodity))
+        offset = 0;
+
     memset (buf, 0, BUFLEN);
     if (!xaccSPrintAmount (buf + offset, val, info))
     {
@@ -1493,7 +1496,7 @@ gnc_print_amount_with_bidi_ltr_isolate (gnc_numeric val, GNCPrintAmountInfo info
         return buf;
     };
 
-    if (!info.use_symbol)
+    if (offset == 0)
         return buf;
 
     memcpy (buf, ltr_isolate, 3);



Summary of changes:
 libgnucash/app-utils/gnc-ui-util.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list