gnucash maint: Bug 87847 - RFE: Create a 'checkbox' cell type

John Ralls jralls at code.gnucash.org
Fri Sep 24 19:47:31 EDT 2021


Updated	 via  https://github.com/Gnucash/gnucash/commit/e123d1be (commit)
	from  https://github.com/Gnucash/gnucash/commit/3d9faf70 (commit)



commit e123d1bec57d668db24662e81fd34dee294cee92
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Sep 24 16:23:43 2021 -0700

    Bug 87847 - RFE: Create a 'checkbox' cell type

diff --git a/gnucash/register/register-core/checkboxcell.c b/gnucash/register/register-core/checkboxcell.c
index 1267f80f6..fe0f08071 100644
--- a/gnucash/register/register-core/checkboxcell.c
+++ b/gnucash/register/register-core/checkboxcell.c
@@ -111,8 +111,14 @@ gnc_checkbox_cell_get_flag (CheckboxCell *cell)
     return cell->flag;
 }
 
+#define UNICODE_CHECKMARK "\xe2\x9c\x93" // U+2716
 const char *
 gnc_checkbox_cell_get_string (gboolean flag)
 {
-    return (flag ? "X" : " ");
+#ifndef MAC_INTEGRATION
+    const char* checked = UNICODE_CHECKMARK;
+#else
+    const char* checked = "X";
+#endif
+    return (flag ? checked : " ");
 }



Summary of changes:
 gnucash/register/register-core/checkboxcell.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list