gnucash stable: Account tree: make numeric columns selectable via GncCellRendererLabel
Robert Fewell
bobit at code.gnucash.org
Sat May 23 08:19:27 EDT 2026
Updated via https://github.com/Gnucash/gnucash/commit/25e0f214 (commit)
from https://github.com/Gnucash/gnucash/commit/ec4a85a5 (commit)
commit 25e0f2144a16b2dc31822b9ba277c43265aee05a
Author: galbarm <galbarm at gmail.com>
Date: Thu May 7 20:23:18 2026 +0300
Account tree: make numeric columns selectable via GncCellRendererLabel
Implements the approach suggested by jralls in PR #2222: instead of a
context menu action, introduce GncCellRendererLabel - a
GtkCellRendererText subclass that returns a read-only, selectable
GtkEntry when a cell is activated.
All numeric columns (Balance, Total, Cleared, Reconciled, Present,
Future Minimum, and their report/period variants) are affected because
they all go through gnc_tree_view_add_numeric_column.
Usage:
- Click once to select the row (unchanged behaviour)
- Click again on a numeric cell to activate it; the value appears in a
read-only entry field with the text pre-selected
- Ctrl+C copies the value to the clipboard; Escape or clicking away
dismisses the field without modifying the model
- Unicode bidi control characters (added by GnuCash for RTL display)
are stripped before showing the value so the copied text is clean
Summary of changes:
gnucash/gnome-utils/CMakeLists.txt | 2 +
gnucash/gnome-utils/gnc-cell-renderer-label.c | 169 ++++++++++++++++++++++++++
gnucash/gnome-utils/gnc-cell-renderer-label.h | 35 ++++++
gnucash/gnome-utils/gnc-tree-view.c | 14 ++-
libgnucash/app-utils/gnc-ui-util.cpp | 28 +++++
libgnucash/app-utils/gnc-ui-util.h | 14 +++
po/POTFILES.in | 1 +
7 files changed, 257 insertions(+), 6 deletions(-)
create mode 100644 gnucash/gnome-utils/gnc-cell-renderer-label.c
create mode 100644 gnucash/gnome-utils/gnc-cell-renderer-label.h
More information about the gnucash-patches
mailing list