GnuCash
Contact   Instructions
Bug 87847 - RFE: Create a 'checkbox' cell type
Summary: RFE: Create a 'checkbox' cell type
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Register (show other bugs)
Version: unspecified
Hardware: Other All
: Normal enhancement
Target Milestone: ---
Assignee: ui
QA Contact: ui
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-10 11:56 EDT by Derek Atkins
Modified: 2021-09-24 19:48 EDT (History)
6 users (show)

See Also:


Attachments
a patch (447 bytes, patch)
2021-05-02 09:58 EDT, Christopher Lam
christopher.lck: needs-work+
Details

Description Derek Atkins 2002-07-10 11:56:34 EDT
A number of table cells are really just booleans, so having a cell that
uses a real checkmark instead of, say, ' ' and 'X', would be more visually
appealing.
Comment 1 Derek Atkins 2002-10-05 19:54:42 EDT
There is now a CheckboxCell in register/register-core, but it still
only prints 'X' and ' '.  The code in register-gnome should become
aware of the CheckboxCell and use a gnome checkmark instead of 'X' and
' '.
Comment 2 Christian Stimming 2002-11-25 08:04:24 EST
Changed severity to enhancement since this is a RFE.
Comment 3 Christopher Lam 2021-05-02 09:58:42 EDT
Created attachment 374057 [details]
a patch

which does seem to work :)
Comment 4 John Ralls 2021-05-02 11:50:32 EDT
As long as the typeface in use has glyphs for those code points and GnuCash is built in such a way that it can display them. That's unfortunately not the case on macOS so see Bob Fewell's workaround for a similar problem in https://github.com/Gnucash/gnucash/blob/maint/gnucash/register/register-core/doclinkcell.c.

✔️ and ✖️ might be better glyphs, being more stylistically similar (both are unboxed).

Also note that not all compilers support unicode characters directly that way so it's safer to use the octal representation of the UTF8 as Bob did in https://github.com/Gnucash/gnucash/blob/maint/gnucash/register/register-core/doclinkcell.h#L46.
Comment 5 Christopher Lam 2021-05-04 08:35:58 EDT
"✔️" and " " also work well (on Ubuntu). I'll leave it to someone else to figure out whether to augment doclinkcell.c to handle CHECKBOX_TICKED and CHECKBOX_UNTICKED or to duplicate the code
Comment 6 John Ralls 2021-09-24 19:48:43 EDT
Time to put this to rest: https://github.com/Gnucash/gnucash/commit/e123d1bec57d668db24662e81fd34dee294cee92

Note You need to log in before you can comment on or make changes to this bug.