gnucash stable: Bug 799456 - Tabbing through fields autoselects all but Num field
John Ralls
jralls at code.gnucash.org
Tue Dec 10 17:02:10 EST 2024
Updated via https://github.com/Gnucash/gnucash/commit/f0f875d5 (commit)
from https://github.com/Gnucash/gnucash/commit/667d3cbc (commit)
commit f0f875d5ab429716db906adde17ee574c735903f
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Dec 10 13:48:23 2024 -0800
Bug 799456 - Tabbing through fields autoselects all but Num field
By which the reporter means that the value in every cell except Num
is selected on cell entry. Add a cell_enter function for Numcell that
does that.
diff --git a/gnucash/register/register-core/numcell.c b/gnucash/register/register-core/numcell.c
index 644462832b..2f9f1af4f6 100644
--- a/gnucash/register/register-core/numcell.c
+++ b/gnucash/register/register-core/numcell.c
@@ -40,12 +40,14 @@
#include "numcell.h"
#include "gnc-engine.h"
+static const QofLogModule log_module = G_LOG_DOMAIN;
/* This static indicates the debugging module that this .o belongs to. */
/* static short module = MOD_REGISTER; */
static void gnc_num_cell_init (NumCell *cell);
-
+static gboolean gnc_num_cell_enter (BasicCell *cell, int *cursor_position,
+ int *start_selection, int *end_selection);
/* Parses the string value and returns true if it is a
* number. In that case, *num is set to the value parsed. */
@@ -237,4 +239,16 @@ gnc_num_cell_init (NumCell *cell)
cell->cell.modify_verify = gnc_num_cell_modify_verify;
cell->cell.set_value = gnc_num_cell_set_value_internal;
+ cell->cell.enter_cell = gnc_num_cell_enter;
+}
+
+static gboolean
+gnc_num_cell_enter (BasicCell *cell, int *cursor_position,
+ int *start_selection, int *end_selection)
+{
+ DEBUG("%d, %d, %d", *cursor_position, *start_selection, *end_selection);
+ *cursor_position = -1;
+ *start_selection = 0;
+ *end_selection = -1;
+ return TRUE;
}
Summary of changes:
gnucash/register/register-core/numcell.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
More information about the gnucash-changes
mailing list