From 4d8f7a4366af04fd8531367c8a121c43a877bbf1 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Mon, 3 Aug 1998 06:39:21 +0000 Subject: [PATCH] some cheap hacks git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@924 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/register/basiccell.c | 2 +- src/register/splitreg.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/register/basiccell.c b/src/register/basiccell.c index 6695c52291..c1b23de2e5 100644 --- a/src/register/basiccell.c +++ b/src/register/basiccell.c @@ -92,7 +92,7 @@ void xaccSetBasicCellValue (BasicCell *cell, const char *val) cb = cell->set_value; if (cb) { /* avoid recursion by disabling the - * callback while it'sbeing called. */ + * callback while it's being called. */ cell->set_value = NULL; (*cb) (cell, val); cell->set_value = cb; diff --git a/src/register/splitreg.c b/src/register/splitreg.c index c071c91ade..8f8c0ded9b 100644 --- a/src/register/splitreg.c +++ b/src/register/splitreg.c @@ -357,6 +357,28 @@ void xaccInitSplitRegister (SplitRegister *reg, int type) curs = xaccMallocCellBlock (1, reg->num_cols); reg->trans_cursor = curs; +{ +/* hack alertoid yeah */ +/* +make sure that "blank" cells stay blank, and don't +get trailing garbage in them as things move about. +but this is broken, as when the cuirsor is moved, +the contents of the register are copied into the +supposedly "blank" cell, and all is screwed up. +Fix this later .... +*/ +int i; +BasicCell *nullcell; +nullcell = xaccMallocBasicCell(); +xaccSetBasicCellValue (nullcell, ""); +nullcell->input_output = 0; +nullcell->width = 1; +nullcell->bg_color = 0xccccff; +for (i=0; inum_cols; i++) { +xaccAddCell (curs, nullcell, 0, i); +} +} + FANCY (date, Date, DATE); BASIC (num, Text, NUM); FANCY (desc, QuickFill, DESC); @@ -382,6 +404,18 @@ void xaccInitSplitRegister (SplitRegister *reg, int type) curs = xaccMallocCellBlock (1, reg->num_cols); reg->split_cursor = curs; +{ +/* hack alertoid yeah */ +int i; +BasicCell *nullcell; +nullcell = xaccMallocBasicCell(); +xaccSetBasicCellValue (nullcell, ""); +nullcell->input_output = 0; +nullcell->width = 1; +for (i=0; inum_cols; i++) { +xaccAddCell (curs, nullcell, 0, i); +} +} FANCY (xfrm, Combo, XFRM); FANCY (xto, Combo, XTO); FANCY (action, Combo, ACTN);