mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
some cheap hacks
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@924 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
8353387b06
commit
4d8f7a4366
@ -92,7 +92,7 @@ void xaccSetBasicCellValue (BasicCell *cell, const char *val)
|
|||||||
cb = cell->set_value;
|
cb = cell->set_value;
|
||||||
if (cb) {
|
if (cb) {
|
||||||
/* avoid recursion by disabling the
|
/* avoid recursion by disabling the
|
||||||
* callback while it'sbeing called. */
|
* callback while it's being called. */
|
||||||
cell->set_value = NULL;
|
cell->set_value = NULL;
|
||||||
(*cb) (cell, val);
|
(*cb) (cell, val);
|
||||||
cell->set_value = cb;
|
cell->set_value = cb;
|
||||||
|
@ -357,6 +357,28 @@ void xaccInitSplitRegister (SplitRegister *reg, int type)
|
|||||||
curs = xaccMallocCellBlock (1, reg->num_cols);
|
curs = xaccMallocCellBlock (1, reg->num_cols);
|
||||||
reg->trans_cursor = curs;
|
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; i<reg->num_cols; i++) {
|
||||||
|
xaccAddCell (curs, nullcell, 0, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FANCY (date, Date, DATE);
|
FANCY (date, Date, DATE);
|
||||||
BASIC (num, Text, NUM);
|
BASIC (num, Text, NUM);
|
||||||
FANCY (desc, QuickFill, DESC);
|
FANCY (desc, QuickFill, DESC);
|
||||||
@ -382,6 +404,18 @@ void xaccInitSplitRegister (SplitRegister *reg, int type)
|
|||||||
curs = xaccMallocCellBlock (1, reg->num_cols);
|
curs = xaccMallocCellBlock (1, reg->num_cols);
|
||||||
reg->split_cursor = curs;
|
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; i<reg->num_cols; i++) {
|
||||||
|
xaccAddCell (curs, nullcell, 0, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
FANCY (xfrm, Combo, XFRM);
|
FANCY (xfrm, Combo, XFRM);
|
||||||
FANCY (xto, Combo, XTO);
|
FANCY (xto, Combo, XTO);
|
||||||
FANCY (action, Combo, ACTN);
|
FANCY (action, Combo, ACTN);
|
||||||
|
Loading…
Reference in New Issue
Block a user