gnucash stable: Multiple changes pushed

Christopher Lam clam at code.gnucash.org
Fri Jan 26 14:46:12 EST 2024


Updated	 via  https://github.com/Gnucash/gnucash/commit/4bbb2c2d (commit)
	 via  https://github.com/Gnucash/gnucash/commit/688032b5 (commit)
	from  https://github.com/Gnucash/gnucash/commit/c956aa16 (commit)



commit 4bbb2c2db031f51b72b42254b9d54ba70d72ea8c
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Jan 26 20:26:30 2024 +0800

    [balsheet-pnl] don't add trailing <br> in monetary cell

diff --git a/gnucash/report/reports/standard/balsheet-pnl.scm b/gnucash/report/reports/standard/balsheet-pnl.scm
index 765e130e54..2c678c83e4 100644
--- a/gnucash/report/reports/standard/balsheet-pnl.scm
+++ b/gnucash/report/reports/standard/balsheet-pnl.scm
@@ -408,13 +408,13 @@ also show overall period profit & loss."))
            (lp rest
                (let ((converted (and show-orig-cur? convert-curr-fn
                                      (convert-curr-fn monetary col-datum))))
-                 (cons* (gnc:html-markup-br)
-                        (if anchor
+                 (cons* (if anchor
                             (gnc:html-markup-anchor anchor (or converted monetary))
                             (or converted monetary))
                         (if converted
                             (gnc:html-markup-i (gnc:html-markup "small" monetary " "))
                             "")
+                        (if (null? accum) "" (gnc:html-markup-br))
                         accum)))))))
 
   (define (account->depth acc)

commit 688032b5902ce126ef3eaad1291a9a5fbcbd7059
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Jan 26 22:06:09 2024 +0800

    [app-utils/gnc-ui-balances.cpp] convert to cpp

diff --git a/libgnucash/app-utils/CMakeLists.txt b/libgnucash/app-utils/CMakeLists.txt
index e3d7a8ae17..45b2bf5ea3 100644
--- a/libgnucash/app-utils/CMakeLists.txt
+++ b/libgnucash/app-utils/CMakeLists.txt
@@ -32,7 +32,7 @@ set (app_utils_SOURCES
   gnc-quotes.cpp
   gnc-state.c
   gnc-ui-util.cpp
-  gnc-ui-balances.c
+  gnc-ui-balances.cpp
   )
 
 set_source_files_properties (${app_utils_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFIG_H})
diff --git a/libgnucash/app-utils/gnc-ui-balances.c b/libgnucash/app-utils/gnc-ui-balances.cpp
similarity index 99%
rename from libgnucash/app-utils/gnc-ui-balances.c
rename to libgnucash/app-utils/gnc-ui-balances.cpp
index a93c5d557a..45b3363350 100644
--- a/libgnucash/app-utils/gnc-ui-balances.c
+++ b/libgnucash/app-utils/gnc-ui-balances.cpp
@@ -212,7 +212,7 @@ account_get_balance_as_of_date (Account *account,
             gnc_commodity *child_currency;
             gnc_numeric child_balance;
 
-            child = node->data;
+            child = static_cast<Account*>(node->data);
             child_currency = xaccAccountGetCommodity (child);
             child_balance = fn (child, date);
             child_balance =
diff --git a/libgnucash/app-utils/gnc-ui-balances.h b/libgnucash/app-utils/gnc-ui-balances.h
index b80c626275..376ce8817f 100644
--- a/libgnucash/app-utils/gnc-ui-balances.h
+++ b/libgnucash/app-utils/gnc-ui-balances.h
@@ -34,6 +34,10 @@
 #include "gncOwner.h"
 #include "qof.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /********************************************************************
  * Balance calculations related to accounts
  ********************************************************************/
@@ -197,4 +201,8 @@ gchar * gnc_ui_account_get_balance_limit_icon_name (const Account *account);
  */
 gchar * gnc_ui_account_get_balance_limit_explanation (const Account *account);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* GNC_UI_BALANCES_H_ */
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0f1930a593..94fbc6f70a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -543,7 +543,7 @@ libgnucash/app-utils/gnc-prefs-utils.c
 libgnucash/app-utils/gnc-quotes.cpp
 libgnucash/app-utils/gnc-state.c
 libgnucash/app-utils/gnc-sx-instance-model.c
-libgnucash/app-utils/gnc-ui-balances.c
+libgnucash/app-utils/gnc-ui-balances.cpp
 libgnucash/app-utils/gnc-ui-util.cpp
 libgnucash/app-utils/QuickFill.c
 libgnucash/backend/dbi/gnc-backend-dbi.cpp



Summary of changes:
 gnucash/report/reports/standard/balsheet-pnl.scm                | 4 ++--
 libgnucash/app-utils/CMakeLists.txt                             | 2 +-
 libgnucash/app-utils/{gnc-ui-balances.c => gnc-ui-balances.cpp} | 2 +-
 libgnucash/app-utils/gnc-ui-balances.h                          | 8 ++++++++
 po/POTFILES.in                                                  | 2 +-
 5 files changed, 13 insertions(+), 5 deletions(-)
 rename libgnucash/app-utils/{gnc-ui-balances.c => gnc-ui-balances.cpp} (99%)



More information about the gnucash-changes mailing list