mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Don't blank zero values in the balance column of register.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2275 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
deb2e431a3
commit
06ef3213dc
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
|||||||
|
2000-05-08 Dave Peticolas <peticola@cs.ucdavis.edu>
|
||||||
|
|
||||||
|
* src/register/pricecell.c: allow the cell to be blanked directly.
|
||||||
|
|
||||||
|
* src/SplitLedger.c (xaccSRLoadRegEntry): explicitly blank the
|
||||||
|
balance cell for the blank split.
|
||||||
|
|
||||||
|
* src/register/splitreg.c (xaccInitSplitRegister): don't blank zeros
|
||||||
|
on the balance cell by default.
|
||||||
|
|
||||||
|
* src/gnome/window-main.c (gnc_main_create_menus): rename the
|
||||||
|
'Help' menu item to 'Manual'.
|
||||||
|
|
||||||
2000-05-07 Dave Peticolas <peticola@cs.ucdavis.edu>
|
2000-05-07 Dave Peticolas <peticola@cs.ucdavis.edu>
|
||||||
|
|
||||||
* src/guile/i18n.h.in: always include locale.h
|
* src/guile/i18n.h.in: always include locale.h
|
||||||
|
@ -1759,7 +1759,11 @@ xaccSRLoadRegEntry (SplitRegister *reg, Split *split)
|
|||||||
(EXPENSE_REGISTER == typo)) {
|
(EXPENSE_REGISTER == typo)) {
|
||||||
baln = -baln;
|
baln = -baln;
|
||||||
}
|
}
|
||||||
xaccSetPriceCellValue (reg->balanceCell, baln);
|
|
||||||
|
if (split == info->blank_split)
|
||||||
|
xaccSetPriceCellBlank (reg->balanceCell);
|
||||||
|
else
|
||||||
|
xaccSetPriceCellValue (reg->balanceCell, baln);
|
||||||
|
|
||||||
xaccSetPriceCellValue (reg->shrsCell, xaccSplitGetShareBalance (split));
|
xaccSetPriceCellValue (reg->shrsCell, xaccSplitGetShareBalance (split));
|
||||||
|
|
||||||
|
@ -915,7 +915,7 @@ gnc_main_create_menus(GnomeApp *app, GtkWidget *account_tree,
|
|||||||
static GnomeUIInfo helpmenu[] = {
|
static GnomeUIInfo helpmenu[] = {
|
||||||
{
|
{
|
||||||
GNOME_APP_UI_ITEM,
|
GNOME_APP_UI_ITEM,
|
||||||
HELP_MENU_STR_N, TOOLTIP_HELP_N,
|
MAN_MENU_STR_N, TOOLTIP_MAN_N,
|
||||||
gnc_ui_help_cb, NULL, NULL,
|
gnc_ui_help_cb, NULL, NULL,
|
||||||
GNOME_APP_PIXMAP_NONE, NULL,
|
GNOME_APP_PIXMAP_NONE, NULL,
|
||||||
0, 0, NULL
|
0, 0, NULL
|
||||||
|
@ -218,6 +218,8 @@
|
|||||||
#define TOOLTIP_JUMP_TRANS_N N_("Jump to the corresponding transaction in "\
|
#define TOOLTIP_JUMP_TRANS_N N_("Jump to the corresponding transaction in "\
|
||||||
"the other account")
|
"the other account")
|
||||||
#define TOOLTIP_JUMP_TRANS _(TOOLTIP_JUMP_TRANS_N)
|
#define TOOLTIP_JUMP_TRANS _(TOOLTIP_JUMP_TRANS_N)
|
||||||
|
#define TOOLTIP_MAN_N N_("Open the GnuCash Manual")
|
||||||
|
#define TOOLTIP_MAN _(TOOLTIP_MAN_N)
|
||||||
#define TOOLTIP_MULTI_LINE_N N_("Show transactions on multiple lines with "\
|
#define TOOLTIP_MULTI_LINE_N N_("Show transactions on multiple lines with "\
|
||||||
"one line for each split")
|
"one line for each split")
|
||||||
#define TOOLTIP_MULTI_LINE _(TOOLTIP_MULTI_LINE_N)
|
#define TOOLTIP_MULTI_LINE _(TOOLTIP_MULTI_LINE_N)
|
||||||
@ -338,6 +340,8 @@
|
|||||||
#define HELP_MENU_STR _(HELP_MENU_STR_N)
|
#define HELP_MENU_STR _(HELP_MENU_STR_N)
|
||||||
#define JUMP_MENU_STR_N N_("_Jump")
|
#define JUMP_MENU_STR_N N_("_Jump")
|
||||||
#define JUMP_MENU_STR _(JUMP_MENU_STR_N)
|
#define JUMP_MENU_STR _(JUMP_MENU_STR_N)
|
||||||
|
#define MAN_MENU_STR_N N_("_Manual")
|
||||||
|
#define MAN_MENU_STR _(MAN_MENU_STR_N)
|
||||||
#define NEW_MENU_STR_N N_("_New")
|
#define NEW_MENU_STR_N N_("_New")
|
||||||
#define NEW_MENU_STR _(NEW_MENU_STR_N)
|
#define NEW_MENU_STR _(NEW_MENU_STR_N)
|
||||||
#define NEW_ACC_MENU_STR _("_New Account")
|
#define NEW_ACC_MENU_STR _("_New Account")
|
||||||
|
@ -239,15 +239,20 @@ xaccPriceCellPrintValue (PriceCell *cell)
|
|||||||
double
|
double
|
||||||
xaccGetPriceCellValue (PriceCell *cell)
|
xaccGetPriceCellValue (PriceCell *cell)
|
||||||
{
|
{
|
||||||
assert(cell != NULL);
|
if (cell == NULL)
|
||||||
|
return 0.0;
|
||||||
|
|
||||||
return cell->amount;
|
return cell->amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
void xaccSetPriceCellValue (PriceCell * cell, double amt)
|
void
|
||||||
|
xaccSetPriceCellValue (PriceCell * cell, double amt)
|
||||||
{
|
{
|
||||||
char *buff;
|
char *buff;
|
||||||
|
|
||||||
|
if (cell == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
cell->amount = amt;
|
cell->amount = amt;
|
||||||
buff = xaccPriceCellPrintValue (cell);
|
buff = xaccPriceCellPrintValue (cell);
|
||||||
|
|
||||||
@ -257,6 +262,19 @@ void xaccSetPriceCellValue (PriceCell * cell, double amt)
|
|||||||
COLORIZE (cell, amt);
|
COLORIZE (cell, amt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
xaccSetPriceCellBlank (PriceCell *cell)
|
||||||
|
{
|
||||||
|
if (cell == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
cell->amount = 0.0;
|
||||||
|
|
||||||
|
SET ( &(cell->cell), "");
|
||||||
|
|
||||||
|
COLORIZE (cell, 0.0);
|
||||||
|
}
|
||||||
|
|
||||||
/* ================================================ */
|
/* ================================================ */
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -318,9 +336,17 @@ static void
|
|||||||
PriceSetValue (BasicCell *_cell, const char *str)
|
PriceSetValue (BasicCell *_cell, const char *str)
|
||||||
{
|
{
|
||||||
PriceCell *cell = (PriceCell *) _cell;
|
PriceCell *cell = (PriceCell *) _cell;
|
||||||
double amt = xaccParseAmount (str, cell->monetary);
|
double amount;
|
||||||
|
|
||||||
xaccSetPriceCellValue (cell, amt);
|
if (str == NULL)
|
||||||
|
str = "";
|
||||||
|
|
||||||
|
if (!cell->blank_zero && (*str == '\0'))
|
||||||
|
xaccSetPriceCellBlank(cell);
|
||||||
|
else {
|
||||||
|
amount = xaccParseAmount (str, cell->monetary);
|
||||||
|
xaccSetPriceCellValue (cell, amount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------- end of file ---------------------- */
|
/* --------------- end of file ---------------------- */
|
||||||
|
@ -76,6 +76,9 @@ double xaccGetPriceCellValue (PriceCell *cell);
|
|||||||
/* updates amount, string format is three decimal places */
|
/* updates amount, string format is three decimal places */
|
||||||
void xaccSetPriceCellValue (PriceCell *cell, double amount);
|
void xaccSetPriceCellValue (PriceCell *cell, double amount);
|
||||||
|
|
||||||
|
/* Sets the cell as blank, regardless of the blank_zero value */
|
||||||
|
void xaccSetPriceCellBlank (PriceCell *cell);
|
||||||
|
|
||||||
/* determines whether 0 values are left blank or printed.
|
/* determines whether 0 values are left blank or printed.
|
||||||
* defaults to true. */
|
* defaults to true. */
|
||||||
void xaccSetPriceCellBlankZero (PriceCell *cell, gncBoolean);
|
void xaccSetPriceCellBlankZero (PriceCell *cell, gncBoolean);
|
||||||
|
@ -1120,6 +1120,9 @@ xaccInitSplitRegister (SplitRegister *reg, int type)
|
|||||||
reg->balanceCell->cell.input_output = XACC_CELL_ALLOW_SHADOW;
|
reg->balanceCell->cell.input_output = XACC_CELL_ALLOW_SHADOW;
|
||||||
reg->shrsCell->cell.input_output = XACC_CELL_ALLOW_SHADOW;
|
reg->shrsCell->cell.input_output = XACC_CELL_ALLOW_SHADOW;
|
||||||
|
|
||||||
|
/* by default, don't blank zeros on the balance cell. */
|
||||||
|
xaccSetPriceCellBlankZero(reg->balanceCell, GNC_F);
|
||||||
|
|
||||||
/* The reconcile cell should only be entered with the pointer,
|
/* The reconcile cell should only be entered with the pointer,
|
||||||
* and only then when the user clicks directly on the cell.
|
* and only then when the user clicks directly on the cell.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user