Remove gncBoolean typedef and constants. Replace all uses of them

with the glib equivalents.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2682 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-08-21 10:26:57 +00:00
parent 2c2d1baef2
commit 0256e9db4a
46 changed files with 318 additions and 317 deletions

View File

@ -1,3 +1,8 @@
2000-08-21 Dave Peticolas <dave@krondo.com>
* src/engine/gnc-common.h: remove gncBoolean type and constants.
Replace all uses with glib versions.
2000-08-12 Dave Peticolas <dave@krondo.com> 2000-08-12 Dave Peticolas <dave@krondo.com>
* src/engine/Transaction.c (xaccSplitSetBaseValue): don't adjust * src/engine/Transaction.c (xaccSplitSetBaseValue): don't adjust

View File

@ -66,14 +66,14 @@ static AccountGroup *topgroup = NULL; /* the current top of the hierarchy */
uh_oh = 1; \ uh_oh = 1; \
break; \ break; \
case ERR_FILEIO_FILE_TOO_OLD: \ case ERR_FILEIO_FILE_TOO_OLD: \
if (!gnc_verify_dialog( FILE_TOO_OLD_MSG, GNC_T )) { \ if (!gnc_verify_dialog( FILE_TOO_OLD_MSG, TRUE )) { \
xaccFreeAccountGroup (newgrp); \ xaccFreeAccountGroup (newgrp); \
newgrp = NULL; \ newgrp = NULL; \
uh_oh = 1; \ uh_oh = 1; \
} \ } \
break; \ break; \
case ERR_FILEIO_FILE_BAD_READ: \ case ERR_FILEIO_FILE_BAD_READ: \
if (!gnc_verify_dialog( FILE_BAD_READ_MSG, GNC_T )) { \ if (!gnc_verify_dialog( FILE_BAD_READ_MSG, TRUE )) { \
xaccFreeAccountGroup (newgrp); \ xaccFreeAccountGroup (newgrp); \
newgrp = NULL; \ newgrp = NULL; \
uh_oh = 1; \ uh_oh = 1; \
@ -151,7 +151,7 @@ gncFileNew (void)
/* ======================================================== */ /* ======================================================== */
gncBoolean gboolean
gncFileQuerySave (void) gncFileQuerySave (void)
{ {
Session *sess; Session *sess;
@ -498,7 +498,7 @@ gncFileSaveAs (void)
tmpmsg = alloca (strlen (FMB_EEXIST_MSG) + strlen (newfile)); tmpmsg = alloca (strlen (FMB_EEXIST_MSG) + strlen (newfile));
sprintf (tmpmsg, FMB_EEXIST_MSG, newfile); sprintf (tmpmsg, FMB_EEXIST_MSG, newfile);
/* if user says cancel, we should break out */ /* if user says cancel, we should break out */
if (! gnc_verify_dialog (tmpmsg, GNC_F)) return; if (! gnc_verify_dialog (tmpmsg, FALSE)) return;
/* Whoa-ok. Blow away the previous file. /* Whoa-ok. Blow away the previous file.
* Do not disable logging ... we want to capture the * Do not disable logging ... we want to capture the

View File

@ -68,9 +68,9 @@
* otherwise no action will be performed. If there is no currently * otherwise no action will be performed. If there is no currently
* locked session, a popup will query the user for a filename * locked session, a popup will query the user for a filename
* (using the gncFileSaveAs() routine). The routine will return * (using the gncFileSaveAs() routine). The routine will return
* GNC_T if the user hits "Yes" or "No" and GNC_F if the user * TRUE if the user hits "Yes" or "No" and GNC_F if the user
* hits "Cancel". If nothing needed to be saved, the routine * hits "Cancel". If nothing needed to be saved, the routine
* will return GNC_T. * will return TRUE.
* *
* The gncFileNew() routine will check for an existing edit session. * The gncFileNew() routine will check for an existing edit session.
* If one exists, it will ask the user if they want to save it, * If one exists, it will ask the user if they want to save it,
@ -123,7 +123,7 @@
#include "Group.h" #include "Group.h"
#include "Session.h" #include "Session.h"
void gncFileNew (void); void gncFileNew (void);
void gncFileOpen (void); void gncFileOpen (void);
void gncFileQIFImport (void); void gncFileQIFImport (void);
@ -132,7 +132,7 @@ void gncFileSaveAs (void);
void gncFileOpenFile (const char *); void gncFileOpenFile (const char *);
gncBoolean gncFileQuerySave (void); gboolean gncFileQuerySave (void);
void gncFileQuit (void); void gncFileQuit (void);

View File

@ -208,8 +208,8 @@ static GUID copied_leader_guid;
static Split * xaccSRGetTransSplit (SplitRegister *reg, static Split * xaccSRGetTransSplit (SplitRegister *reg,
int phys_row, int phys_col); int phys_row, int phys_col);
static void xaccSRLoadRegEntry (SplitRegister *reg, Split *split); static void xaccSRLoadRegEntry (SplitRegister *reg, Split *split);
static gncBoolean xaccSRSaveRegEntryToSCM (SplitRegister *reg, static gboolean xaccSRSaveRegEntryToSCM (SplitRegister *reg,
SCM trans_scm, SCM split_scm); SCM trans_scm, SCM split_scm);
static Transaction * xaccSRGetTrans (SplitRegister *reg, static Transaction * xaccSRGetTrans (SplitRegister *reg,
int phys_row, int phys_col); int phys_row, int phys_col);
static Split * xaccSRGetCurrentTransSplit (SplitRegister *reg); static Split * xaccSRGetCurrentTransSplit (SplitRegister *reg);
@ -699,7 +699,7 @@ LedgerMoveCursor (Table *table,
xaccTransCommitEdit (trans); xaccTransCommitEdit (trans);
info->pending_trans_guid = *xaccGUIDNULL(); info->pending_trans_guid = *xaccGUIDNULL();
pending_trans = NULL; pending_trans = NULL;
saved = GNC_T; saved = TRUE;
} }
/* redrawing the register can muck everything up */ /* redrawing the register can muck everything up */
@ -799,7 +799,7 @@ LedgerMoveCursor (Table *table,
info->cursor_hint_phys_col = -1; info->cursor_hint_phys_col = -1;
} }
info->hint_set_by_traverse = GNC_F; info->hint_set_by_traverse = FALSE;
} }
/* This function determines if auto-completion is appropriate and, /* This function determines if auto-completion is appropriate and,
@ -874,8 +874,8 @@ LedgerAutoCompletion(SplitRegister *reg, gncTableTraversalDir dir,
if (auto_trans == NULL) if (auto_trans == NULL)
return; return;
xaccTransBeginEdit(trans, GNC_F); xaccTransBeginEdit(trans, FALSE);
gnc_copy_trans_onto_trans(auto_trans, trans, GNC_F); gnc_copy_trans_onto_trans(auto_trans, trans, FALSE);
if (info->default_source_account != NULL) if (info->default_source_account != NULL)
{ {
@ -916,7 +916,7 @@ LedgerAutoCompletion(SplitRegister *reg, gncTableTraversalDir dir,
pending_trans = trans; pending_trans = trans;
info->pending_trans_guid = *xaccTransGetGUID(pending_trans); info->pending_trans_guid = *xaccTransGetGUID(pending_trans);
info->blank_split_edited = GNC_T; info->blank_split_edited = TRUE;
refresh_accounts = xaccSRSaveChangedCells(reg, trans, blank_split); refresh_accounts = xaccSRSaveChangedCells(reg, trans, blank_split);
@ -998,13 +998,13 @@ LedgerAutoCompletion(SplitRegister *reg, gncTableTraversalDir dir,
fullname = xaccAccountGetFullName (xaccSplitGetAccount (auto_split), fullname = xaccAccountGetFullName (xaccSplitGetAccount (auto_split),
account_separator); account_separator);
xaccSetComboCellValue (reg->xfrmCell, fullname); xaccSetComboCellValue (reg->xfrmCell, fullname);
xaccBasicCellSetChanged(&(reg->xfrmCell->cell), GNC_T); xaccBasicCellSetChanged(&(reg->xfrmCell->cell), TRUE);
amount = xaccSplitGetValue (auto_split); amount = xaccSplitGetValue (auto_split);
xaccSetDebCredCellValue (reg->ndebitCell, reg->ncreditCell, -amount); xaccSetDebCredCellValue (reg->ndebitCell, reg->ncreditCell, -amount);
xaccBasicCellSetChanged (&(reg->ndebitCell->cell), GNC_T); xaccBasicCellSetChanged (&(reg->ndebitCell->cell), TRUE);
xaccBasicCellSetChanged (&(reg->ncreditCell->cell), GNC_T); xaccBasicCellSetChanged (&(reg->ncreditCell->cell), TRUE);
/* copy cursor contents into the table */ /* copy cursor contents into the table */
gnc_table_commit_cursor (reg->table); gnc_table_commit_cursor (reg->table);
@ -1114,7 +1114,7 @@ LedgerTraverse (Table *table,
info->cursor_hint_split = split; info->cursor_hint_split = split;
info->cursor_hint_trans_split = xaccSRGetCurrentTransSplit (reg); info->cursor_hint_trans_split = xaccSRGetCurrentTransSplit (reg);
info->cursor_hint_phys_col = -1; info->cursor_hint_phys_col = -1;
info->hint_set_by_traverse = GNC_T; info->hint_set_by_traverse = TRUE;
return; return;
} }
@ -1460,11 +1460,11 @@ xaccSRGetSplitRowCol (SplitRegister *reg, Split *split,
if (virt_col != NULL) if (virt_col != NULL)
*virt_col = v_col; *virt_col = v_col;
return GNC_T; return TRUE;
} }
} }
return GNC_F; return FALSE;
} }
/* ======================================================== */ /* ======================================================== */
@ -1475,9 +1475,9 @@ xaccSRGetTransSplitRowCol (SplitRegister *reg, Transaction *trans,
int *virt_row, int *virt_col) int *virt_row, int *virt_col)
{ {
Table *table = reg->table; Table *table = reg->table;
gboolean found_trans = GNC_F; gboolean found_trans = FALSE;
gboolean found_trans_split = GNC_F; gboolean found_trans_split = FALSE;
gboolean found_something = GNC_F; gboolean found_something = FALSE;
CursorType cursor_type; CursorType cursor_type;
int v_row, v_col; int v_row, v_col;
Transaction *t; Transaction *t;
@ -1492,10 +1492,10 @@ xaccSRGetTransSplitRowCol (SplitRegister *reg, Transaction *trans,
cursor_type = xaccSplitRegisterGetCursorTypeRowCol(reg, v_row, v_col); cursor_type = xaccSplitRegisterGetCursorTypeRowCol(reg, v_row, v_col);
if (t == trans) if (t == trans)
found_trans = GNC_T; found_trans = TRUE;
if ((cursor_type == CURSOR_TRANS) && (s == trans_split)) if ((cursor_type == CURSOR_TRANS) && (s == trans_split))
found_trans_split = GNC_T; found_trans_split = TRUE;
if (found_trans && (s == split)) if (found_trans && (s == split))
{ {
@ -1504,7 +1504,7 @@ xaccSRGetTransSplitRowCol (SplitRegister *reg, Transaction *trans,
if (virt_col != NULL) if (virt_col != NULL)
*virt_col = v_col; *virt_col = v_col;
found_something = GNC_T; found_something = TRUE;
} }
if (found_trans_split && (s == split)) if (found_trans_split && (s == split))
@ -1514,7 +1514,7 @@ xaccSRGetTransSplitRowCol (SplitRegister *reg, Transaction *trans,
if (virt_col != NULL) if (virt_col != NULL)
*virt_col = v_col; *virt_col = v_col;
return GNC_T; return TRUE;
} }
} }
@ -1573,7 +1573,7 @@ xaccSRDuplicateCurrent (SplitRegister *reg)
if (result == GNC_VERIFY_CANCEL) if (result == GNC_VERIFY_CANCEL)
return NULL; return NULL;
xaccSRSaveRegEntry(reg, GNC_T); xaccSRSaveRegEntry(reg, TRUE);
/* If the split is NULL, then we were on a blank split row /* If the split is NULL, then we were on a blank split row
* in an expanded transaction. The new split (created by * in an expanded transaction. The new split (created by
@ -1594,7 +1594,7 @@ xaccSRDuplicateCurrent (SplitRegister *reg)
new_split = xaccMallocSplit(); new_split = xaccMallocSplit();
xaccTransBeginEdit(trans, GNC_T); xaccTransBeginEdit(trans, TRUE);
xaccTransAppendSplit(trans, new_split); xaccTransAppendSplit(trans, new_split);
xaccTransCommitEdit(trans); xaccTransCommitEdit(trans);
@ -1621,9 +1621,9 @@ xaccSRDuplicateCurrent (SplitRegister *reg)
new_trans = xaccMallocTransaction(); new_trans = xaccMallocTransaction();
gnc_copy_trans_onto_trans(trans, new_trans, GNC_T); gnc_copy_trans_onto_trans(trans, new_trans, TRUE);
xaccTransBeginEdit(new_trans, GNC_T); xaccTransBeginEdit(new_trans, TRUE);
xaccTransSetDateSecs(new_trans, info->last_date_entered); xaccTransSetDateSecs(new_trans, info->last_date_entered);
xaccTransCommitEdit(new_trans); xaccTransCommitEdit(new_trans);
@ -1823,7 +1823,7 @@ xaccSRPasteCurrent (SplitRegister *reg)
{ /* We are on a null split in an expanded transaction. */ { /* We are on a null split in an expanded transaction. */
split = xaccMallocSplit(); split = xaccMallocSplit();
xaccTransBeginEdit(trans, GNC_T); xaccTransBeginEdit(trans, TRUE);
xaccTransAppendSplit(trans, split); xaccTransAppendSplit(trans, split);
xaccTransCommitEdit(trans); xaccTransCommitEdit(trans);
} }
@ -1857,10 +1857,10 @@ xaccSRPasteCurrent (SplitRegister *reg)
new_guid = xaccAccountGetGUID(info->default_source_account); new_guid = xaccAccountGetGUID(info->default_source_account);
gnc_copy_trans_scm_onto_trans_swap_accounts(copied_item, trans, gnc_copy_trans_scm_onto_trans_swap_accounts(copied_item, trans,
&copied_leader_guid, &copied_leader_guid,
new_guid, GNC_T); new_guid, TRUE);
} }
else else
gnc_copy_trans_scm_onto_trans(copied_item, trans, GNC_T); gnc_copy_trans_scm_onto_trans(copied_item, trans, TRUE);
num_splits = xaccTransCountSplits(trans); num_splits = xaccTransCountSplits(trans);
if (split_index >= num_splits) if (split_index >= num_splits)
@ -2098,7 +2098,7 @@ xaccSRCancelCursorSplitChanges (SplitRegister *reg)
xaccSRLoadRegEntry(reg, split); xaccSRLoadRegEntry(reg, split);
xaccSplitRegisterClearChangeFlag(reg); xaccSplitRegisterClearChangeFlag(reg);
if (gnc_table_find_valid_cell_horiz(reg->table, &row, &col, GNC_F)) if (gnc_table_find_valid_cell_horiz(reg->table, &row, &col, FALSE))
gnc_table_move_cursor_gui(reg->table, row, col); gnc_table_move_cursor_gui(reg->table, row, col);
gnc_table_refresh_gui(reg->table); gnc_table_refresh_gui(reg->table);
@ -2175,12 +2175,12 @@ xaccSRSaveRegEntryToSCM (SplitRegister *reg, SCM trans_scm, SCM split_scm)
* cut down on uneccessary register redraws. */ * cut down on uneccessary register redraws. */
changed = xaccSplitRegisterGetChangeFlag (reg); changed = xaccSplitRegisterGetChangeFlag (reg);
if (!changed) if (!changed)
return GNC_F; return FALSE;
/* get the handle to the current split and transaction */ /* get the handle to the current split and transaction */
trans = xaccSRGetCurrentTrans (reg); trans = xaccSRGetCurrentTrans (reg);
if (trans == NULL) if (trans == NULL)
return GNC_F; return FALSE;
/* copy the contents from the cursor to the split */ /* copy the contents from the cursor to the split */
if (MOD_DATE & changed) { if (MOD_DATE & changed) {
@ -2316,7 +2316,7 @@ xaccSRSaveRegEntryToSCM (SplitRegister *reg, SCM trans_scm, SCM split_scm)
gnc_split_scm_set_share_price_and_amount(split_scm, price, value); gnc_split_scm_set_share_price_and_amount(split_scm, price, value);
} }
return GNC_T; return TRUE;
} }
/* ======================================================== */ /* ======================================================== */
@ -2338,7 +2338,7 @@ xaccSRSaveRegEntry (SplitRegister *reg, gboolean do_commit)
split = xaccSRGetCurrentSplit (reg); split = xaccSRGetCurrentSplit (reg);
trans = xaccSRGetCurrentTrans (reg); trans = xaccSRGetCurrentTrans (reg);
if (trans == NULL) if (trans == NULL)
return GNC_F; return FALSE;
/* use the changed flag to avoid heavy-weight updates /* use the changed flag to avoid heavy-weight updates
* of the split & transaction fields. This will help * of the split & transaction fields. This will help
@ -2347,7 +2347,7 @@ xaccSRSaveRegEntry (SplitRegister *reg, gboolean do_commit)
if (!changed) if (!changed)
{ {
if (!do_commit) if (!do_commit)
return GNC_F; return FALSE;
if (trans == blank_trans) if (trans == blank_trans)
{ {
@ -2355,14 +2355,14 @@ xaccSRSaveRegEntry (SplitRegister *reg, gboolean do_commit)
{ {
info->last_date_entered = xaccTransGetDate(trans); info->last_date_entered = xaccTransGetDate(trans);
info->blank_split_guid = *xaccGUIDNULL(); info->blank_split_guid = *xaccGUIDNULL();
info->blank_split_edited = GNC_F; info->blank_split_edited = FALSE;
blank_split = NULL; blank_split = NULL;
} }
else else
return GNC_F; return FALSE;
} }
else if (!xaccTransIsOpen(trans)) else if (!xaccTransIsOpen(trans))
return GNC_F; return FALSE;
if (xaccTransIsOpen(trans)) if (xaccTransIsOpen(trans))
xaccTransCommitEdit(trans); xaccTransCommitEdit(trans);
@ -2373,7 +2373,7 @@ xaccSRSaveRegEntry (SplitRegister *reg, gboolean do_commit)
info->pending_trans_guid = *xaccGUIDNULL(); info->pending_trans_guid = *xaccGUIDNULL();
} }
return GNC_T; return TRUE;
} }
ENTER ("xaccSRSaveRegEntry(): save split is %p \n", split); ENTER ("xaccSRSaveRegEntry(): save split is %p \n", split);
@ -2382,7 +2382,7 @@ xaccSRSaveRegEntry (SplitRegister *reg, gboolean do_commit)
if (pending_trans != trans) { if (pending_trans != trans) {
if (xaccTransIsOpen (pending_trans)) if (xaccTransIsOpen (pending_trans))
xaccTransCommitEdit (pending_trans); xaccTransCommitEdit (pending_trans);
xaccTransBeginEdit (trans, GNC_F); xaccTransBeginEdit (trans, FALSE);
pending_trans = trans; pending_trans = trans;
info->pending_trans_guid = *xaccTransGetGUID(trans); info->pending_trans_guid = *xaccTransGetGUID(trans);
} }
@ -2439,7 +2439,7 @@ xaccSRSaveRegEntry (SplitRegister *reg, gboolean do_commit)
info->last_date_entered = xaccTransGetDate(trans); info->last_date_entered = xaccTransGetDate(trans);
} }
else else
info->blank_split_edited = GNC_T; info->blank_split_edited = TRUE;
} }
/* If requested, commit the current transaction and set the pending /* If requested, commit the current transaction and set the pending
@ -2462,7 +2462,7 @@ xaccSRSaveRegEntry (SplitRegister *reg, gboolean do_commit)
g_list_free(refresh_accounts); g_list_free(refresh_accounts);
} }
return GNC_T; return TRUE;
} }
/* ======================================================== */ /* ======================================================== */
@ -2923,12 +2923,12 @@ xaccSRLoadRegEntry (SplitRegister *reg, Split *split)
{ {
Split *s = xaccGetOtherSplit (split); Split *s = xaccGetOtherSplit (split);
gboolean need_to_free = GNC_F; gboolean need_to_free = FALSE;
if (s) { if (s) {
accname = xaccAccountGetFullName (xaccSplitGetAccount (s), accname = xaccAccountGetFullName (xaccSplitGetAccount (s),
account_separator); account_separator);
need_to_free = GNC_T; need_to_free = TRUE;
} else { } else {
/* determine whether s is null because threre are three /* determine whether s is null because threre are three
* or more splits, or whether there is only one ... */ * or more splits, or whether there is only one ... */
@ -2977,10 +2977,10 @@ xaccSRCountRows (SplitRegister *reg,
Transaction *find_trans, Transaction *find_trans,
Split *find_split, Split *find_split,
Split *find_trans_split, Split *find_trans_split,
gncBoolean *ext_found_trans, gboolean *ext_found_trans,
gncBoolean *ext_found_split, gboolean *ext_found_split,
gncBoolean *ext_found_trans_split, gboolean *ext_found_trans_split,
gncBoolean *ext_on_blank_split) gboolean *ext_on_blank_split)
{ {
SRInfo *info = xaccSRGetInfo(reg); SRInfo *info = xaccSRGetInfo(reg);
Split *blank_split = xaccSplitLookup(&info->blank_split_guid); Split *blank_split = xaccSplitLookup(&info->blank_split_guid);
@ -2990,11 +2990,11 @@ xaccSRCountRows (SplitRegister *reg,
Split *split; Split *split;
Table *table; Table *table;
gboolean found_split = GNC_F; gboolean found_split = FALSE;
gboolean found_trans = GNC_F; gboolean found_trans = FALSE;
gboolean found_trans_split = GNC_F; gboolean found_trans_split = FALSE;
gboolean on_blank_split = GNC_F; gboolean on_blank_split = FALSE;
gboolean did_expand = GNC_F; gboolean did_expand = FALSE;
gboolean on_trans_split; gboolean on_trans_split;
gboolean multi_line; gboolean multi_line;
gboolean dynamic; gboolean dynamic;
@ -3054,7 +3054,7 @@ xaccSRCountRows (SplitRegister *reg,
while (split) { while (split) {
if (split == find_trans_split) if (split == find_trans_split)
{ {
found_trans_split = GNC_T; found_trans_split = TRUE;
break; break;
} }
i++; i++;
@ -3063,7 +3063,7 @@ xaccSRCountRows (SplitRegister *reg,
split = blank_split; split = blank_split;
if ((split != NULL) && (split == find_trans_split)) if ((split != NULL) && (split == find_trans_split))
found_trans_split = GNC_T; found_trans_split = TRUE;
/* now count the rows */ /* now count the rows */
i=0; i=0;
@ -3088,8 +3088,8 @@ xaccSRCountRows (SplitRegister *reg,
save_cursor_phys_row = num_phys_rows; save_cursor_phys_row = num_phys_rows;
save_cursor_virt_row = num_virt_rows; save_cursor_virt_row = num_virt_rows;
if (on_trans_split || !found_trans_split) if (on_trans_split || !found_trans_split)
found_split = GNC_T; found_split = TRUE;
found_trans = GNC_T; found_trans = TRUE;
} }
/* Otherwise, check for a close match. This could happen /* Otherwise, check for a close match. This could happen
* if, e.g., we are collapsing from multi-line to single. */ * if, e.g., we are collapsing from multi-line to single. */
@ -3097,12 +3097,12 @@ xaccSRCountRows (SplitRegister *reg,
save_cursor_phys_row = num_phys_rows; save_cursor_phys_row = num_phys_rows;
save_cursor_virt_row = num_virt_rows; save_cursor_virt_row = num_virt_rows;
if (trans == find_trans) if (trans == find_trans)
found_trans = GNC_T; found_trans = TRUE;
} }
else if (!found_trans && (trans == find_trans)) { else if (!found_trans && (trans == find_trans)) {
save_cursor_phys_row = num_phys_rows; save_cursor_phys_row = num_phys_rows;
save_cursor_virt_row = num_virt_rows; save_cursor_virt_row = num_virt_rows;
found_trans = GNC_T; found_trans = TRUE;
} }
} }
@ -3116,7 +3116,7 @@ xaccSRCountRows (SplitRegister *reg,
/* make sure we only expand once on dynamic */ /* make sure we only expand once on dynamic */
if (dynamic && do_expand) if (dynamic && do_expand)
did_expand = GNC_T; did_expand = TRUE;
if (do_expand) if (do_expand)
{ {
@ -3152,8 +3152,8 @@ xaccSRCountRows (SplitRegister *reg,
save_cursor_phys_row = num_phys_rows; save_cursor_phys_row = num_phys_rows;
save_cursor_virt_row = num_virt_rows; save_cursor_virt_row = num_virt_rows;
if (on_trans_split || !found_trans_split) if (on_trans_split || !found_trans_split)
found_split = GNC_T; found_split = TRUE;
found_trans = GNC_T; found_trans = TRUE;
} }
} }
@ -3184,7 +3184,7 @@ xaccSRCountRows (SplitRegister *reg,
on_trans_split = (find_trans_split == split); on_trans_split = (find_trans_split == split);
if (on_trans_split) if (on_trans_split)
found_trans_split = GNC_T; found_trans_split = TRUE;
if (split != NULL) { if (split != NULL) {
/* lets determine where to locate the cursor ... */ /* lets determine where to locate the cursor ... */
@ -3192,15 +3192,15 @@ xaccSRCountRows (SplitRegister *reg,
save_cursor_phys_row = num_phys_rows; save_cursor_phys_row = num_phys_rows;
save_cursor_virt_row = num_virt_rows; save_cursor_virt_row = num_virt_rows;
if (on_trans_split || !found_trans_split) if (on_trans_split || !found_trans_split)
found_split = GNC_T; found_split = TRUE;
found_trans = GNC_T; found_trans = TRUE;
on_blank_split = GNC_T; on_blank_split = TRUE;
} }
else if (!found_split && (trans == find_trans)) { else if (!found_split && (trans == find_trans)) {
save_cursor_phys_row = num_phys_rows; save_cursor_phys_row = num_phys_rows;
save_cursor_virt_row = num_virt_rows; save_cursor_virt_row = num_virt_rows;
found_trans = GNC_T; found_trans = TRUE;
on_blank_split = GNC_T; on_blank_split = TRUE;
} }
} }
@ -3230,8 +3230,8 @@ xaccSRCountRows (SplitRegister *reg,
save_cursor_phys_row = num_phys_rows; save_cursor_phys_row = num_phys_rows;
save_cursor_virt_row = num_virt_rows; save_cursor_virt_row = num_virt_rows;
if (on_trans_split || !found_trans_split) if (on_trans_split || !found_trans_split)
found_split = GNC_T; found_split = TRUE;
found_trans = GNC_T; found_trans = TRUE;
} }
} }
@ -3297,11 +3297,11 @@ xaccSRLoadRegister (SplitRegister *reg, Split **slist,
Split *split; Split *split;
Table *table; Table *table;
gboolean found_pending = GNC_F; gboolean found_pending = FALSE;
gboolean found_split = GNC_F; gboolean found_split = FALSE;
gboolean found_trans = GNC_F; gboolean found_trans = FALSE;
gboolean found_trans_split = GNC_F; gboolean found_trans_split = FALSE;
gboolean did_expand = GNC_F; gboolean did_expand = FALSE;
gboolean on_blank_split; gboolean on_blank_split;
gboolean multi_line; gboolean multi_line;
gboolean dynamic; gboolean dynamic;
@ -3329,7 +3329,7 @@ xaccSRLoadRegister (SplitRegister *reg, Split **slist,
blank_split = xaccTransGetSplit (trans, 0); blank_split = xaccTransGetSplit (trans, 0);
info->blank_split_guid = *xaccSplitGetGUID (blank_split); info->blank_split_guid = *xaccSplitGetGUID (blank_split);
info->blank_split_edited = GNC_F; info->blank_split_edited = FALSE;
} }
info->default_source_account = default_source_acc; info->default_source_account = default_source_acc;
@ -3408,7 +3408,7 @@ xaccSRLoadRegister (SplitRegister *reg, Split **slist,
while (split) { while (split) {
if (pending_trans == xaccSplitGetParent (split)) if (pending_trans == xaccSplitGetParent (split))
found_pending = GNC_T; found_pending = TRUE;
/* do not load the blank split */ /* do not load the blank split */
if (split != blank_split) { if (split != blank_split) {
@ -3429,14 +3429,14 @@ xaccSRLoadRegister (SplitRegister *reg, Split **slist,
if (dynamic && !found_trans && !found_trans_split && if (dynamic && !found_trans && !found_trans_split &&
(vrow == reg->cursor_virt_row)) { (vrow == reg->cursor_virt_row)) {
reg->cursor_phys_row = phys_row; reg->cursor_phys_row = phys_row;
do_expand = GNC_T; do_expand = TRUE;
} }
/* make sure we only expand once on dynamic */ /* make sure we only expand once on dynamic */
do_expand = do_expand && !did_expand; do_expand = do_expand && !did_expand;
if (dynamic && do_expand) if (dynamic && do_expand)
did_expand = GNC_T; did_expand = TRUE;
if (do_expand) if (do_expand)
{ {
@ -3492,7 +3492,7 @@ xaccSRLoadRegister (SplitRegister *reg, Split **slist,
/* add the blank split at the end. */ /* add the blank split at the end. */
split = blank_split; split = blank_split;
if (pending_trans == xaccSplitGetParent(split)) if (pending_trans == xaccSplitGetParent(split))
found_pending = GNC_T; found_pending = TRUE;
if (multi_line || (dynamic && info->blank_split_edited)) { if (multi_line || (dynamic && info->blank_split_edited)) {
/* do the transaction row of the blank split */ /* do the transaction row of the blank split */
@ -3539,7 +3539,7 @@ xaccSRLoadRegister (SplitRegister *reg, Split **slist,
int row = reg->cursor_phys_row; int row = reg->cursor_phys_row;
int col = save_phys_col; int col = save_phys_col;
if (gnc_table_find_valid_cell_horiz(table, &row, &col, GNC_F)) if (gnc_table_find_valid_cell_horiz(table, &row, &col, FALSE))
{ {
gnc_table_move_cursor_gui(table, row, col); gnc_table_move_cursor_gui(table, row, col);
reg->cursor_phys_row = row; reg->cursor_phys_row = row;
@ -3574,8 +3574,8 @@ xaccSRLoadRegister (SplitRegister *reg, Split **slist,
info->cursor_hint_split = xaccSRGetCurrentSplit (reg); info->cursor_hint_split = xaccSRGetCurrentSplit (reg);
info->cursor_hint_trans_split = xaccSRGetCurrentTransSplit (reg); info->cursor_hint_trans_split = xaccSRGetCurrentTransSplit (reg);
info->cursor_hint_phys_col = -1; info->cursor_hint_phys_col = -1;
info->hint_set_by_traverse = GNC_F; info->hint_set_by_traverse = FALSE;
info->exact_traversal = GNC_F; info->exact_traversal = FALSE;
gnc_table_refresh_gui (table); gnc_table_refresh_gui (table);
@ -3701,11 +3701,11 @@ xaccSRHasPendingChanges (SplitRegister *reg)
guint32 changed; guint32 changed;
if (reg == NULL) if (reg == NULL)
return GNC_F; return FALSE;
changed = xaccSplitRegisterGetChangeFlag (reg); changed = xaccSplitRegisterGetChangeFlag (reg);
if (changed) if (changed)
return GNC_T; return TRUE;
return xaccTransIsOpen(pending_trans); return xaccTransIsOpen(pending_trans);
} }

View File

@ -95,10 +95,10 @@ char * xaccAccountGetTypeStr (int type)
} }
/* =========================================================== */ /* =========================================================== */
gncBoolean gboolean
xaccAccountTypesCompatible (int parent_type, int child_type) xaccAccountTypesCompatible (int parent_type, int child_type)
{ {
gncBoolean compatible = GNC_F; gboolean compatible = FALSE;
switch(parent_type) switch(parent_type)
{ {

View File

@ -110,7 +110,7 @@ char * xaccAccountGetTypeStr (int type); /* GUI names */
Used for text exports */ Used for text exports */
char * xaccAccountTypeEnumAsString (int type); char * xaccAccountTypeEnumAsString (int type);
gncBoolean xaccAccountTypesCompatible (int parent_type, int child_type); gboolean xaccAccountTypesCompatible (int parent_type, int child_type);
typedef struct _BankAcct BankAcct; typedef struct _BankAcct BankAcct;

View File

@ -1332,11 +1332,11 @@ IthAccount (Account **list, int i)
/********************************************************************\ /********************************************************************\
\********************************************************************/ \********************************************************************/
gncBoolean gboolean
xaccAccountsHaveCommonCurrency(Account *account_1, Account *account_2) xaccAccountsHaveCommonCurrency(Account *account_1, Account *account_2)
{ {
if ((account_1 == NULL) || (account_2 == NULL)) if ((account_1 == NULL) || (account_2 == NULL))
return GNC_F; return FALSE;
return xaccIsCommonCurrency(account_1->currency, account_1->security, return xaccIsCommonCurrency(account_1->currency, account_1->security,
account_2->currency, account_2->security); account_2->currency, account_2->security);
@ -1345,24 +1345,24 @@ xaccAccountsHaveCommonCurrency(Account *account_1, Account *account_2)
/********************************************************************\ /********************************************************************\
\********************************************************************/ \********************************************************************/
gncBoolean gboolean
xaccAccountHasAncestor (Account *account, Account * ancestor) xaccAccountHasAncestor (Account *account, Account * ancestor)
{ {
Account *parent; Account *parent;
if ((account == NULL) || (ancestor == NULL)) if ((account == NULL) || (ancestor == NULL))
return GNC_F; return FALSE;
parent = xaccAccountGetParentAccount(account); parent = xaccAccountGetParentAccount(account);
while (parent != NULL) while (parent != NULL)
{ {
if (parent == ancestor) if (parent == ancestor)
return GNC_T; return TRUE;
parent = xaccAccountGetParentAccount(parent); parent = xaccAccountGetParentAccount(parent);
} }
return GNC_F; return FALSE;
} }
/*************************** END OF FILE **************************** */ /*************************** END OF FILE **************************** */

View File

@ -184,19 +184,18 @@ char * xaccAccountGetFullName (Account *, const char separator);
* value is just list[i]. This routine is needed for the perl * value is just list[i]. This routine is needed for the perl
* swig wrappers, which cannot dereference a list. * swig wrappers, which cannot dereference a list.
*/ */
Account * IthAccount (Account **list, int i); Account * IthAccount (Account **list, int i);
/* xaccAccountsHaveCommonCurrency returns true if the two given accounts /* xaccAccountsHaveCommonCurrency returns true if the two given accounts
* have a currency in common, i.e., if they can have common transactions. * have a currency in common, i.e., if they can have common transactions.
* Useful for UI sanity checks. * Useful for UI sanity checks.
*/ */
gncBoolean xaccAccountsHaveCommonCurrency(Account *account_1, gboolean xaccAccountsHaveCommonCurrency(Account *account_1,
Account *account_2); Account *account_2);
/* Returns true if the account has 'ancestor' as an ancestor. /* Returns true if the account has 'ancestor' as an ancestor.
* Returns false if either is NULL. */ * Returns false if either is NULL. */
gncBoolean xaccAccountHasAncestor (Account *, Account * ancestor); gboolean xaccAccountHasAncestor (Account *, Account * ancestor);
/* Get and Set a mark on the account. The meaning of this mark is /* Get and Set a mark on the account. The meaning of this mark is
* completely undefined. Its presented here as a utility for the * completely undefined. Its presented here as a utility for the

View File

@ -52,7 +52,7 @@
void void
xaccInitializeAccountGroup (AccountGroup *grp) xaccInitializeAccountGroup (AccountGroup *grp)
{ {
grp->saved = GNC_T; grp->saved = TRUE;
grp->parent = NULL; grp->parent = NULL;
grp->numAcc = 0; grp->numAcc = 0;
@ -131,7 +131,7 @@ xaccGroupMarkSaved (AccountGroup *grp)
int i; int i;
if (!grp) return; if (!grp) return;
grp->saved = GNC_T; grp->saved = TRUE;
for (i=0; i<grp->numAcc; i++) { for (i=0; i<grp->numAcc; i++) {
xaccGroupMarkSaved (grp->account[i]->children); xaccGroupMarkSaved (grp->account[i]->children);
@ -145,7 +145,7 @@ void
xaccGroupMarkNotSaved (AccountGroup *grp) xaccGroupMarkNotSaved (AccountGroup *grp)
{ {
if (!grp) return; if (!grp) return;
grp->saved = GNC_F; grp->saved = FALSE;
} }
/********************************************************************\ /********************************************************************\
@ -158,7 +158,7 @@ xaccGroupNotSaved (AccountGroup *grp)
int i; int i;
if (!grp) return 0; if (!grp) return 0;
if (GNC_F == grp->saved) return 1; if (FALSE == grp->saved) return 1;
for (i=0; i<grp->numAcc; i++) { for (i=0; i<grp->numAcc; i++) {
not_saved = xaccGroupNotSaved (grp->account[i]->children); not_saved = xaccGroupNotSaved (grp->account[i]->children);
@ -479,7 +479,7 @@ xaccRemoveGroup (AccountGroup *grp)
grp = acc -> parent; grp = acc -> parent;
if (!grp) return; if (!grp) return;
grp->saved = GNC_F; grp->saved = FALSE;
} }
/********************************************************************\ /********************************************************************\
@ -512,7 +512,7 @@ xaccRemoveAccount (Account *acc)
nacc --; nacc --;
arr[nacc] = NULL; arr[nacc] = NULL;
grp->numAcc = nacc; grp->numAcc = nacc;
grp->saved = GNC_F; grp->saved = FALSE;
/* if this was the last account in a group, delete /* if this was the last account in a group, delete
* the group as well (unless its a root group) */ * the group as well (unless its a root group) */
@ -566,7 +566,7 @@ xaccGroupInsertAccount( AccountGroup *grp, Account *acc )
if (grp == acc->parent) ralo = 0; if (grp == acc->parent) ralo = 0;
xaccRemoveAccount (acc); xaccRemoveAccount (acc);
} }
grp->saved = GNC_F; grp->saved = FALSE;
/* set back-pointer to the account's parent */ /* set back-pointer to the account's parent */
acc->parent = grp; acc->parent = grp;
@ -954,24 +954,24 @@ xaccAccountsBeginStagedTransactionTraversals (Account **accounts)
xaccAccountBeginStagedTransactionTraversals(*aptr); xaccAccountBeginStagedTransactionTraversals(*aptr);
} }
gncBoolean gboolean
xaccTransactionTraverse(Transaction *trans, int stage) xaccTransactionTraverse(Transaction *trans, int stage)
{ {
if (trans == NULL) return GNC_F; if (trans == NULL) return FALSE;
if (trans->marker < stage) if (trans->marker < stage)
{ {
trans->marker = stage; trans->marker = stage;
return GNC_T; return TRUE;
} }
return GNC_F; return FALSE;
} }
gncBoolean gboolean
xaccSplitTransactionTraverse(Split *split, int stage) xaccSplitTransactionTraverse(Split *split, int stage)
{ {
if (split == NULL) return GNC_F; if (split == NULL) return FALSE;
return xaccTransactionTraverse(split->parent, stage); return xaccTransactionTraverse(split->parent, stage);
} }

View File

@ -275,8 +275,8 @@ void xaccAccountsBeginStagedTransactionTraversals (Account **accounts);
* the given split. * the given split.
*/ */
gncBoolean xaccTransactionTraverse(Transaction *trans, int stage); gboolean xaccTransactionTraverse(Transaction *trans, int stage);
gncBoolean xaccSplitTransactionTraverse(Split *split, int stage); gboolean xaccSplitTransactionTraverse(Split *split, int stage);
/* xaccGroupStagedTransactionTraversal() calls thunk on each /* xaccGroupStagedTransactionTraversal() calls thunk on each
* transaction in the group whose current marker is less than the * transaction in the group whose current marker is less than the

View File

@ -35,20 +35,20 @@ static short module = MOD_ENGINE;
/* ------------------------------------------------------ */ /* ------------------------------------------------------ */
gncBoolean accListHasAccount (Account **list, Account *findme) gboolean accListHasAccount (Account **list, Account *findme)
{ {
Account *acc; Account *acc;
int nacc = 0; int nacc = 0;
if (!list || !findme) return GNC_F; if (!list || !findme) return FALSE;
acc = list[0]; acc = list[0];
while (acc) { while (acc) {
if (acc == findme) if (acc == findme)
return GNC_T; return TRUE;
nacc++; nacc++;
acc = list[nacc]; acc = list[nacc];
} }
return GNC_F; return FALSE;
} }
/* ------------------------------------------------------ */ /* ------------------------------------------------------ */

View File

@ -31,7 +31,7 @@
/** PROTOTYPES ******************************************************/ /** PROTOTYPES ******************************************************/
gncBoolean accListHasAccount (Account **list, Account *findme); gboolean accListHasAccount (Account **list, Account *findme);
int accListCount (Account **list); int accListCount (Account **list);
Account ** accListCopy (Account **list); Account ** accListCopy (Account **list);
Account ** xaccGroupToList (Account *); Account ** xaccGroupToList (Account *);

View File

@ -56,7 +56,7 @@ struct _querystruct {
sort_type_t primary_sort; sort_type_t primary_sort;
sort_type_t secondary_sort; sort_type_t secondary_sort;
sort_type_t tertiary_sort; sort_type_t tertiary_sort;
gncBoolean sort_increasing; gboolean sort_increasing;
int max_splits; int max_splits;
/* cache the results so we don't have to run the whole search /* cache the results so we don't have to run the whole search
@ -152,7 +152,7 @@ xaccInitQuery(Query * q, QueryTerm * initial_term) {
q->secondary_sort = BY_NONE; q->secondary_sort = BY_NONE;
q->tertiary_sort = BY_NONE; q->tertiary_sort = BY_NONE;
q->sort_increasing = GNC_T; q->sort_increasing = TRUE;
} }
@ -1812,7 +1812,7 @@ xaccQuerySetSortOrder(Query * q, sort_type_t primary,
* xaccQuerySetSortIncreasing * xaccQuerySetSortIncreasing
*******************************************************************/ *******************************************************************/
void void
xaccQuerySetSortIncreasing(Query * q, gncBoolean increasing) xaccQuerySetSortIncreasing(Query * q, gboolean increasing)
{ {
q->sort_increasing = increasing; q->sort_increasing = increasing;
} }

View File

@ -190,7 +190,7 @@ void xaccQueryAddClearedMatch(Query * q, int how,
void xaccQuerySetSortOrder(Query * q, sort_type_t primary, void xaccQuerySetSortOrder(Query * q, sort_type_t primary,
sort_type_t secondary, sort_type_t tertiary); sort_type_t secondary, sort_type_t tertiary);
void xaccQuerySetSortIncreasing(Query * q, gncBoolean increasing); void xaccQuerySetSortIncreasing(Query * q, gboolean increasing);
void xaccQuerySetMaxSplits(Query * q, int n); void xaccQuerySetMaxSplits(Query * q, int n);

View File

@ -813,14 +813,14 @@ xaccTransGetImbalance (Transaction * trans)
/********************************************************************\ /********************************************************************\
\********************************************************************/ \********************************************************************/
gncBoolean gboolean
xaccIsCommonCurrency(const char *currency_1, const char *security_1, xaccIsCommonCurrency(const char *currency_1, const char *security_1,
const char *currency_2, const char *security_2) const char *currency_2, const char *security_2)
{ {
int c1c2, c1s2, s1c2, s1s2; int c1c2, c1s2, s1c2, s1s2;
if ((currency_1 == NULL) || (currency_2 == NULL)) if ((currency_1 == NULL) || (currency_2 == NULL))
return GNC_F; return FALSE;
if ((security_1 != NULL) && (security_1[0] == 0x0)) if ((security_1 != NULL) && (security_1[0] == 0x0))
security_1 = NULL; security_1 = NULL;
@ -1345,10 +1345,10 @@ xaccTransRollbackEdit (Transaction *trans)
LEAVE ("trans addr=%p\n", trans); LEAVE ("trans addr=%p\n", trans);
} }
gncBoolean gboolean
xaccTransIsOpen (Transaction *trans) xaccTransIsOpen (Transaction *trans)
{ {
if (!trans) return GNC_F; if (!trans) return FALSE;
return (0 != (trans->open & BEGIN_EDIT)); return (0 != (trans->open & BEGIN_EDIT));
} }

View File

@ -147,7 +147,7 @@ void xaccTransBeginEdit (Transaction *, int defer);
void xaccTransCommitEdit (Transaction *); void xaccTransCommitEdit (Transaction *);
void xaccTransRollbackEdit (Transaction *); void xaccTransRollbackEdit (Transaction *);
gncBoolean xaccTransIsOpen (Transaction *trans); gboolean xaccTransIsOpen (Transaction *trans);
/* /*
* The xaccTransGetGUID() subroutine will return the * The xaccTransGetGUID() subroutine will return the
@ -273,8 +273,8 @@ int xaccTransCountSplits (Transaction *trans);
* xaccTransFindCommonCurrency. This method is useful for determining * xaccTransFindCommonCurrency. This method is useful for determining
* whether two accounts can have transactions in common. * whether two accounts can have transactions in common.
*/ */
gncBoolean xaccIsCommonCurrency(const char *currency_1, const char *security_1, gboolean xaccIsCommonCurrency(const char *currency_1, const char *security_1,
const char *currency_2, const char *security_2); const char *currency_2, const char *security_2);
/* The xaccTransFindCommonCurrency () method returns a string value /* The xaccTransFindCommonCurrency () method returns a string value
* indicating a currency denomination that all of the splits in this * indicating a currency denomination that all of the splits in this

View File

@ -28,8 +28,4 @@
#include "config.h" #include "config.h"
#include <glib.h> #include <glib.h>
typedef gboolean gncBoolean;
#define GNC_F (FALSE)
#define GNC_T (TRUE)
#endif #endif

View File

@ -81,11 +81,11 @@ gnc_set_log_level_global(gncLogLevel level)
/* xaccParseAmount configuration */ /* xaccParseAmount configuration */
static gncBoolean auto_decimal_enabled = GNC_F; static gboolean auto_decimal_enabled = FALSE;
/* enable/disable the auto_decimal_enabled option */ /* enable/disable the auto_decimal_enabled option */
void void
gnc_set_auto_decimal_enabled(gncBoolean enabled) gnc_set_auto_decimal_enabled(gboolean enabled)
{ {
auto_decimal_enabled = enabled; auto_decimal_enabled = enabled;
} }
@ -351,32 +351,32 @@ util_fptostr(char *buf, double val, int prec)
} }
/********************************************************************\ /********************************************************************\
* returns GNC_T if the string is a number, possibly with whitespace * returns TRUE if the string is a number, possibly with whitespace
\********************************************************************/ \********************************************************************/
gncBoolean gboolean
gnc_strisnum(const char *s) gnc_strisnum(const char *s)
{ {
if (s == NULL) return GNC_F; if (s == NULL) return FALSE;
if (*s == 0) return GNC_F; if (*s == 0) return FALSE;
while (*s && isspace(*s)) while (*s && isspace(*s))
s++; s++;
if (*s == 0) return GNC_F; if (*s == 0) return FALSE;
if (!isdigit(*s)) return GNC_F; if (!isdigit(*s)) return FALSE;
while (*s && isdigit(*s)) while (*s && isdigit(*s))
s++; s++;
if (*s == 0) return GNC_T; if (*s == 0) return TRUE;
while (*s && isspace(*s)) while (*s && isspace(*s))
s++; s++;
if (*s == 0) return GNC_T; if (*s == 0) return TRUE;
return GNC_F; return FALSE;
} }
/********************************************************************\ /********************************************************************\
@ -417,7 +417,7 @@ struct lconv *
gnc_localeconv() gnc_localeconv()
{ {
static struct lconv lc; static struct lconv lc;
static gncBoolean lc_set = GNC_F; static gboolean lc_set = FALSE;
if (lc_set) if (lc_set)
return &lc; return &lc;
@ -441,7 +441,7 @@ gnc_localeconv()
gnc_lconv_set_char(&lc.p_sign_posn, 1); gnc_lconv_set_char(&lc.p_sign_posn, 1);
gnc_lconv_set_char(&lc.n_sign_posn, 1); gnc_lconv_set_char(&lc.n_sign_posn, 1);
lc_set = GNC_T; lc_set = TRUE;
return &lc; return &lc;
} }
@ -450,7 +450,7 @@ char *
gnc_locale_default_currency() gnc_locale_default_currency()
{ {
static char currency[4]; static char currency[4];
gncBoolean got_it = GNC_F; gboolean got_it = FALSE;
struct lconv *lc; struct lconv *lc;
int i; int i;
@ -464,7 +464,7 @@ gnc_locale_default_currency()
strncpy(currency, lc->int_curr_symbol, 3); strncpy(currency, lc->int_curr_symbol, 3);
got_it = GNC_T; got_it = TRUE;
return currency; return currency;
} }
@ -472,8 +472,8 @@ gnc_locale_default_currency()
/* Utility function for printing non-negative amounts */ /* Utility function for printing non-negative amounts */
static int static int
PrintAmt(char *buf, double val, int prec, PrintAmt(char *buf, double val, int prec,
gncBoolean use_separators, gboolean use_separators,
gncBoolean monetary, gboolean monetary,
int min_trailing_zeros) int min_trailing_zeros)
{ {
int i, stringLength, numWholeDigits, sepCount; int i, stringLength, numWholeDigits, sepCount;
@ -589,7 +589,7 @@ xaccSPrintAmountGeneral (char * bufp, double val,
char sep_by_space; char sep_by_space;
char sign_posn; char sign_posn;
gncBoolean print_sign = GNC_T; gboolean print_sign = TRUE;
if (!bufp) return 0; if (!bufp) return 0;
@ -645,7 +645,7 @@ xaccSPrintAmountGeneral (char * bufp, double val,
} }
if ((val == 0.0) || (sign == NULL) || (sign[0] == 0)) if ((val == 0.0) || (sign == NULL) || (sign[0] == 0))
print_sign = GNC_F; print_sign = FALSE;
/* See if we print sign now */ /* See if we print sign now */
if (print_sign && (sign_posn == 1)) if (print_sign && (sign_posn == 1))
@ -771,8 +771,8 @@ xaccPrintAmount (double val, GNCPrintAmountFlags flags, const char *curr_code)
} }
char * char *
xaccPrintAmountArgs (double val, gncBoolean print_currency_symbol, xaccPrintAmountArgs (double val, gboolean print_currency_symbol,
gncBoolean print_separators, gncBoolean is_shares_value, gboolean print_separators, gboolean is_shares_value,
const char *curr_code) const char *curr_code)
{ {
GNCPrintAmountFlags flags = 0; GNCPrintAmountFlags flags = 0;
@ -794,10 +794,10 @@ xaccPrintAmountArgs (double val, gncBoolean print_currency_symbol,
* Return: double -- the parsed amount * * Return: double -- the parsed amount *
\********************************************************************/ \********************************************************************/
double xaccParseAmount (const char * instr, gncBoolean monetary) double xaccParseAmount (const char * instr, gboolean monetary)
{ {
struct lconv *lc = gnc_localeconv(); struct lconv *lc = gnc_localeconv();
gncBoolean isneg = GNC_F; gboolean isneg = FALSE;
char *mstr, *str, *tok; char *mstr, *str, *tok;
double amount = 0.0; double amount = 0.0;
char negative_sign; char negative_sign;
@ -842,7 +842,7 @@ double xaccParseAmount (const char * instr, gncBoolean monetary)
/* look for a negative sign */ /* look for a negative sign */
if (*str == negative_sign) { if (*str == negative_sign) {
isneg = GNC_T; isneg = TRUE;
str++; str++;
} }
@ -871,7 +871,7 @@ double xaccParseAmount (const char * instr, gncBoolean monetary)
/* look for a negative sign at the end, some locales allow it, /* look for a negative sign at the end, some locales allow it,
* we'll just allow it everywhere. */ * we'll just allow it everywhere. */
if (*tok == negative_sign) { if (*tok == negative_sign) {
isneg = GNC_T; isneg = TRUE;
*tok = '\0'; *tok = '\0';
} }

View File

@ -153,7 +153,7 @@ void gnc_set_log_level(gncModuleType module, gncLogLevel level);
void gnc_set_log_level_global(gncLogLevel level); void gnc_set_log_level_global(gncLogLevel level);
/* enable/disable the auto decimal option */ /* enable/disable the auto decimal option */
void gnc_set_auto_decimal_enabled(gncBoolean enabled); void gnc_set_auto_decimal_enabled(gboolean enabled);
/********************************************************/ /********************************************************/
@ -191,7 +191,7 @@ char * ultostr (unsigned long val, int base);
/* Returns true if string s is a number, possibly /* Returns true if string s is a number, possibly
* surrounded by whitespace. */ * surrounded by whitespace. */
gncBoolean gnc_strisnum(const char *s); gboolean gnc_strisnum(const char *s);
/* The gnc_localeconv() subroutine returns an lconv structure /* The gnc_localeconv() subroutine returns an lconv structure
* containing locale information. If no locale is set, the * containing locale information. If no locale is set, the
@ -258,13 +258,13 @@ int xaccSPrintAmountGeneral (char * bufp, double val,
int min_trailing_zeros, int min_trailing_zeros,
const char *curr_sym); const char *curr_sym);
char * xaccPrintAmountArgs (double val, char * xaccPrintAmountArgs (double val,
gncBoolean print_currency_symbol, gboolean print_currency_symbol,
gncBoolean print_separators, gboolean print_separators,
gncBoolean is_shares_value, gboolean is_shares_value,
const char *curr_code); const char *curr_code);
/* Parse i18n amount strings */ /* Parse i18n amount strings */
double xaccParseAmount (const char * instr, gncBoolean monetary); double xaccParseAmount (const char * instr, gboolean monetary);
/** TEMPLATES ******************************************************/ /** TEMPLATES ******************************************************/

View File

@ -116,7 +116,7 @@ gnc_account_tree_init(GNCAccountTree *tree)
{ {
tree->root_account = NULL; tree->root_account = NULL;
tree->current_accounts = NULL; tree->current_accounts = NULL;
tree->ignore_unselect = GNC_F; tree->ignore_unselect = FALSE;
tree->filter = NULL; tree->filter = NULL;
tree->filter_data = NULL; tree->filter_data = NULL;
@ -598,8 +598,8 @@ gnc_account_tree_insert_account(GNCAccountTree *tree, Account *account)
void void
gnc_account_tree_show_income_expense(GNCAccountTree *tree) gnc_account_tree_show_income_expense(GNCAccountTree *tree)
{ {
tree->avi.include_type[EXPENSE] = GNC_T; tree->avi.include_type[EXPENSE] = TRUE;
tree->avi.include_type[INCOME] = GNC_T; tree->avi.include_type[INCOME] = TRUE;
gnc_account_tree_refresh(tree); gnc_account_tree_refresh(tree);
} }
@ -615,8 +615,8 @@ gnc_account_tree_show_income_expense(GNCAccountTree *tree)
void void
gnc_account_tree_hide_income_expense(GNCAccountTree *tree) gnc_account_tree_hide_income_expense(GNCAccountTree *tree)
{ {
tree->avi.include_type[EXPENSE] = GNC_F; tree->avi.include_type[EXPENSE] = FALSE;
tree->avi.include_type[INCOME] = GNC_F; tree->avi.include_type[INCOME] = FALSE;
gnc_account_tree_refresh(tree); gnc_account_tree_refresh(tree);
} }
@ -702,14 +702,14 @@ gnc_init_account_view_info(AccountViewInfo *avi)
int i; int i;
for (i = 0; i < NUM_ACCOUNT_TYPES; i++) for (i = 0; i < NUM_ACCOUNT_TYPES; i++)
avi->include_type[i] = GNC_T; avi->include_type[i] = TRUE;
for (i = 0; i < NUM_ACCOUNT_FIELDS; i++) for (i = 0; i < NUM_ACCOUNT_FIELDS; i++)
avi->show_field[i] = GNC_F; avi->show_field[i] = FALSE;
avi->show_field[ACCOUNT_NAME] = GNC_T; avi->show_field[ACCOUNT_NAME] = TRUE;
avi->show_field[ACCOUNT_DESCRIPTION] = GNC_T; avi->show_field[ACCOUNT_DESCRIPTION] = TRUE;
avi->show_field[ACCOUNT_TOTAL] = GNC_T; avi->show_field[ACCOUNT_TOTAL] = TRUE;
} }
/********************************************************************\ /********************************************************************\
@ -806,7 +806,7 @@ gnc_account_tree_button_press(GtkWidget *widget,
node = gtk_ctree_node_nth(ctree, row); node = gtk_ctree_node_nth(ctree, row);
account = gtk_ctree_node_get_row_data(ctree, node); account = gtk_ctree_node_get_row_data(ctree, node);
GNC_ACCOUNT_TREE(ctree)->ignore_unselect = GNC_T; GNC_ACCOUNT_TREE(ctree)->ignore_unselect = TRUE;
gtk_signal_emit(GTK_OBJECT(widget), gtk_signal_emit(GTK_OBJECT(widget),
account_tree_signals[ACTIVATE_ACCOUNT], account_tree_signals[ACTIVATE_ACCOUNT],
@ -831,7 +831,7 @@ gnc_account_tree_select_row(GtkCTree *ctree,
Account *account; Account *account;
GList *node; GList *node;
tree->ignore_unselect = GNC_F; tree->ignore_unselect = FALSE;
account = gtk_ctree_node_get_row_data(ctree, GTK_CTREE_NODE(row)); account = gtk_ctree_node_get_row_data(ctree, GTK_CTREE_NODE(row));
node = g_list_find(tree->current_accounts, account); node = g_list_find(tree->current_accounts, account);
@ -856,7 +856,7 @@ gnc_account_tree_unselect_row(GtkCTree *ctree,
if (tree->ignore_unselect) if (tree->ignore_unselect)
{ {
tree->ignore_unselect = GNC_F; tree->ignore_unselect = FALSE;
return; return;
} }

View File

@ -287,7 +287,7 @@ change_func(gpointer key, gpointer value, gpointer field_code)
if (account == NULL) if (account == NULL)
return; return;
xaccAccountBeginEdit(account, GNC_T); xaccAccountBeginEdit(account, TRUE);
switch (field) switch (field)
{ {
@ -1053,7 +1053,7 @@ gnc_parent_tree_select(GNCAccountTree *tree,
/* Deleselect any or select top account */ /* Deleselect any or select top account */
if (account == NULL || account == aw->top_level_account) if (account == NULL || account == aw->top_level_account)
for (type = 0; type < NUM_ACCOUNT_TYPES; type++) for (type = 0; type < NUM_ACCOUNT_TYPES; type++)
gnc_type_list_row_set_active(GTK_CLIST(aw->type_list), type, GNC_T); gnc_type_list_row_set_active(GTK_CLIST(aw->type_list), type, TRUE);
else /* Some other account was selected */ else /* Some other account was selected */
{ {
parent_type = xaccAccountGetType(account); parent_type = xaccAccountGetType(account);

View File

@ -864,7 +864,7 @@ subentry_amount_entry_focus_out(GtkWidget *widget, GdkEventFocus *event,
if ((string == NULL) || (*string == '\0')) if ((string == NULL) || (*string == '\0'))
return FALSE; return FALSE;
value = xaccParseAmount(string, GNC_T); value = xaccParseAmount(string, TRUE);
new_string = xaccPrintAmount(value, PRTSEP, NULL); new_string = xaccPrintAmount(value, PRTSEP, NULL);

View File

@ -394,7 +394,7 @@ gnc_option_get_ui_value(GNCOption *option)
void void
gnc_set_option_selectable_by_name( const char *section, gnc_set_option_selectable_by_name( const char *section,
const char *name, const char *name,
gncBoolean selectable) gboolean selectable)
{ {
GNCOption *option = gnc_get_option_by_name( section, name ); GNCOption *option = gnc_get_option_by_name( section, name );

View File

@ -158,7 +158,7 @@ gnc_xfer_update_cb(GtkWidget *widget, GdkEventFocus *event, gpointer data)
if ((string == NULL) || (*string == 0)) if ((string == NULL) || (*string == 0))
return FALSE; return FALSE;
value = xaccParseAmount(string, GNC_T); value = xaccParseAmount(string, TRUE);
currency = xaccAccountGetCurrency(account); currency = xaccAccountGetCurrency(account);
@ -325,14 +325,14 @@ gnc_xfer_dialog_ok_cb(GtkWidget * widget, gpointer data)
} }
string = gtk_entry_get_text(GTK_ENTRY(xferData->amount_entry)); string = gtk_entry_get_text(GTK_ENTRY(xferData->amount_entry));
amount = xaccParseAmount(string, GNC_T); amount = xaccParseAmount(string, TRUE);
time = gnc_date_edit_get_date(GNC_DATE_EDIT(xferData->date_entry)); time = gnc_date_edit_get_date(GNC_DATE_EDIT(xferData->date_entry));
/* Create the transaction */ /* Create the transaction */
trans = xaccMallocTransaction(); trans = xaccMallocTransaction();
xaccTransBeginEdit(trans, GNC_T); xaccTransBeginEdit(trans, TRUE);
xaccTransSetDateSecs(trans, time); xaccTransSetDateSecs(trans, time);
string = gtk_entry_get_text(GTK_ENTRY(xferData->num_entry)); string = gtk_entry_get_text(GTK_ENTRY(xferData->num_entry));
@ -355,12 +355,12 @@ gnc_xfer_dialog_ok_cb(GtkWidget * widget, gpointer data)
xaccTransSetMemo(trans, string); xaccTransSetMemo(trans, string);
/* Now do the 'to' account */ /* Now do the 'to' account */
xaccAccountBeginEdit(to, GNC_F); xaccAccountBeginEdit(to, FALSE);
xaccAccountInsertSplit(to, to_split); xaccAccountInsertSplit(to, to_split);
xaccAccountCommitEdit(to); xaccAccountCommitEdit(to);
/* Now do the 'from' account */ /* Now do the 'from' account */
xaccAccountBeginEdit(from, GNC_F); xaccAccountBeginEdit(from, FALSE);
xaccAccountInsertSplit(from, from_split); xaccAccountInsertSplit(from, from_split);
xaccAccountCommitEdit(from); xaccAccountCommitEdit(from);

View File

@ -105,10 +105,10 @@ gnc_foundation_query_dialog(gncUIWidget parent,
const gchar *title, const gchar *title,
GtkWidget *contents, GtkWidget *contents,
int default_answer, int default_answer,
gncBoolean yes_allowed, gboolean yes_allowed,
gncBoolean ok_allowed, gboolean ok_allowed,
gncBoolean no_allowed, gboolean no_allowed,
gncBoolean cancel_allowed, gboolean cancel_allowed,
int *dialog_result) { int *dialog_result) {
FoundationCBData * cb_data; FoundationCBData * cb_data;
@ -196,7 +196,7 @@ gnc_foundation_query_dialog(gncUIWidget parent,
cb_data); cb_data);
/* Setup window settings */ /* Setup window settings */
gtk_window_set_modal(GTK_WINDOW(query_dialog), GNC_T); gtk_window_set_modal(GTK_WINDOW(query_dialog), TRUE);
gnome_dialog_set_default(GNOME_DIALOG(query_dialog), default_button); gnome_dialog_set_default(GNOME_DIALOG(query_dialog), default_button);
gnome_dialog_set_close(GNOME_DIALOG(query_dialog), TRUE); gnome_dialog_set_close(GNOME_DIALOG(query_dialog), TRUE);
if (parent != NULL) if (parent != NULL)
@ -341,8 +341,8 @@ gnc_verify_cancel_dialog_parented(GtkWidget *parent, const char *message,
* "No" is the default button. * * "No" is the default button. *
* Return: true for "Yes", false for "No" * * Return: true for "Yes", false for "No" *
\********************************************************************/ \********************************************************************/
gncBoolean gboolean
gnc_verify_dialog(const char *message, gncBoolean yes_is_default) gnc_verify_dialog(const char *message, gboolean yes_is_default)
{ {
return gnc_verify_dialog_parented(GTK_WINDOW(gnc_get_ui_data()), return gnc_verify_dialog_parented(GTK_WINDOW(gnc_get_ui_data()),
message, yes_is_default); message, yes_is_default);
@ -360,9 +360,9 @@ gnc_verify_dialog(const char *message, gncBoolean yes_is_default)
* "No" is the default button. * * "No" is the default button. *
* Return: true for "Yes", false for "No" * * Return: true for "Yes", false for "No" *
\********************************************************************/ \********************************************************************/
gncBoolean gboolean
gnc_verify_dialog_parented(GtkWindow *parent, const char *message, gnc_verify_dialog_parented(GtkWindow *parent, const char *message,
gncBoolean yes_is_default) gboolean yes_is_default)
{ {
GtkWidget *verify_box = NULL; GtkWidget *verify_box = NULL;
@ -527,7 +527,7 @@ gnc_choose_item_from_list_dialog(const char *title, SCM list_items)
GtkWidget *vbox; GtkWidget *vbox;
GtkWidget *query_box; GtkWidget *query_box;
SCM listcursor; SCM listcursor;
gncBoolean status_ok; gboolean status_ok;
unsigned long i; unsigned long i;
if(title == NULL) if(title == NULL)
@ -541,21 +541,21 @@ gnc_choose_item_from_list_dialog(const char *title, SCM list_items)
/* Convert the scm data to C callback structs */ /* Convert the scm data to C callback structs */
i = 0; i = 0;
status_ok = GNC_T; status_ok = TRUE;
listcursor = list_items; listcursor = list_items;
while(status_ok && !gh_null_p(listcursor)) { while(status_ok && !gh_null_p(listcursor)) {
SCM scm_item = gh_car(listcursor); SCM scm_item = gh_car(listcursor);
if(!gh_pair_p(scm_item)) { if(!gh_pair_p(scm_item)) {
fprintf(stderr, "Dying: not a pair.\n"); fprintf(stderr, "Dying: not a pair.\n");
status_ok = GNC_F; status_ok = FALSE;
} else { } else {
SCM item_scm_name = gh_car(scm_item); SCM item_scm_name = gh_car(scm_item);
SCM item_scm_thunk = gh_cdr(scm_item); SCM item_scm_thunk = gh_cdr(scm_item);
if(!(gh_string_p(item_scm_name) && gh_procedure_p(item_scm_thunk))) { if(!(gh_string_p(item_scm_name) && gh_procedure_p(item_scm_thunk))) {
fprintf(stderr, "Dying: bad pair item(s).\n"); fprintf(stderr, "Dying: bad pair item(s).\n");
status_ok = GNC_F; status_ok = FALSE;
} else { } else {
cb_data[i].name = gh_scm2newstr(item_scm_name, NULL); cb_data[i].name = gh_scm2newstr(item_scm_name, NULL);
cb_data[i].closure = item_scm_thunk; cb_data[i].closure = item_scm_thunk;
@ -564,7 +564,7 @@ gnc_choose_item_from_list_dialog(const char *title, SCM list_items)
if(!cb_data[i].name) { if(!cb_data[i].name) {
fprintf(stderr, "Dying: no C name.\n"); fprintf(stderr, "Dying: no C name.\n");
status_ok = GNC_F; status_ok = FALSE;
} else { } else {
listcursor = gh_cdr(listcursor); listcursor = gh_cdr(listcursor);
i++; i++;
@ -585,7 +585,7 @@ gnc_choose_item_from_list_dialog(const char *title, SCM list_items)
for(i = 0; i < num_items; i++) { for(i = 0; i < num_items; i++) {
GtkWidget *b = gtk_button_new_with_label(cb_data[i].name); GtkWidget *b = gtk_button_new_with_label(cb_data[i].name);
if(b == NULL) { if(b == NULL) {
status_ok = GNC_F; status_ok = FALSE;
} else { } else {
gtk_signal_connect(GTK_OBJECT(b), "clicked", gtk_signal_connect(GTK_OBJECT(b), "clicked",
GTK_SIGNAL_FUNC(gnc_choose_item_cb), GTK_SIGNAL_FUNC(gnc_choose_item_cb),
@ -608,10 +608,10 @@ gnc_choose_item_from_list_dialog(const char *title, SCM list_items)
title, title,
vbox, vbox,
GNC_QUERY_CANCEL, /* cancel */ GNC_QUERY_CANCEL, /* cancel */
GNC_F, /* yes_allowed */ FALSE, /* yes_allowed */
GNC_F, /* ok_allowed */ FALSE, /* ok_allowed */
GNC_F, /* no_allowed */ FALSE, /* no_allowed */
GNC_T, /* cancel_allowed */ TRUE, /* cancel_allowed */
&dialog_result); &dialog_result);
if(query_box == NULL) { if(query_box == NULL) {
@ -724,10 +724,10 @@ gnc_choose_radio_option_dialog_parented(gncUIWidget parent,
title, title,
main_vbox, main_vbox,
GNC_QUERY_YES, /* ok */ GNC_QUERY_YES, /* ok */
GNC_F, /* yes_allowed */ FALSE, /* yes_allowed */
GNC_T, /* ok_allowed */ TRUE, /* ok_allowed */
GNC_F, /* no_allowed */ FALSE, /* no_allowed */
GNC_F, /* cancel_allowed */ FALSE, /* cancel_allowed */
&dialog_result); &dialog_result);
gnome_dialog_run_and_close(GNOME_DIALOG(query_box)); gnome_dialog_run_and_close(GNOME_DIALOG(query_box));

View File

@ -33,8 +33,8 @@ enum
}; };
gncBoolean gnc_verify_dialog_parented(GtkWindow *parent, const char *message, gboolean gnc_verify_dialog_parented(GtkWindow *parent, const char *message,
gncBoolean yes_is_default); gboolean yes_is_default);
void gnc_info_dialog(const char *message); void gnc_info_dialog(const char *message);
void gnc_info_dialog_parented(GtkWindow *parent, const char *message); void gnc_info_dialog_parented(GtkWindow *parent, const char *message);

View File

@ -645,12 +645,12 @@ gnc_configure_register_borders(void)
if (gnc_lookup_boolean_option("Register", if (gnc_lookup_boolean_option("Register",
"Show Vertical Borders", "Show Vertical Borders",
GNC_T)) TRUE))
reg_borders |= STYLE_BORDER_LEFT | STYLE_BORDER_RIGHT; reg_borders |= STYLE_BORDER_LEFT | STYLE_BORDER_RIGHT;
if (gnc_lookup_boolean_option("Register", if (gnc_lookup_boolean_option("Register",
"Show Horizontal Borders", "Show Horizontal Borders",
GNC_T)) TRUE))
reg_borders |= STYLE_BORDER_TOP | STYLE_BORDER_BOTTOM; reg_borders |= STYLE_BORDER_TOP | STYLE_BORDER_BOTTOM;
gnucash_style_set_register_borders (reg_borders); gnucash_style_set_register_borders (reg_borders);
@ -671,28 +671,28 @@ gnc_configure_reverse_balance_cb(void *not_used)
gnc_refresh_main_window(); gnc_refresh_main_window();
} }
static gncBoolean reverse_type[NUM_ACCOUNT_TYPES]; static gboolean reverse_type[NUM_ACCOUNT_TYPES];
gncBoolean gboolean
gnc_reverse_balance_type(int type) gnc_reverse_balance_type(int type)
{ {
if ((type < 0) || (type >= NUM_ACCOUNT_TYPES)) if ((type < 0) || (type >= NUM_ACCOUNT_TYPES))
return GNC_F; return FALSE;
return reverse_type[type]; return reverse_type[type];
} }
gncBoolean gboolean
gnc_reverse_balance(Account *account) gnc_reverse_balance(Account *account)
{ {
int type; int type;
if (account == NULL) if (account == NULL)
return GNC_F; return FALSE;
type = xaccAccountGetType(account); type = xaccAccountGetType(account);
if ((type < 0) || (type >= NUM_ACCOUNT_TYPES)) if ((type < 0) || (type >= NUM_ACCOUNT_TYPES))
return GNC_F; return FALSE;
return reverse_type[type]; return reverse_type[type];
} }
@ -712,7 +712,7 @@ gnc_configure_reverse_balance(void)
xaccSRSetReverseBalanceCallback(gnc_reverse_balance); xaccSRSetReverseBalanceCallback(gnc_reverse_balance);
for (i = 0; i < NUM_ACCOUNT_TYPES; i++) for (i = 0; i < NUM_ACCOUNT_TYPES; i++)
reverse_type[i] = GNC_F; reverse_type[i] = FALSE;
choice = gnc_lookup_multichoice_option("General", choice = gnc_lookup_multichoice_option("General",
"Reversed-balance account types", "Reversed-balance account types",
@ -720,15 +720,15 @@ gnc_configure_reverse_balance(void)
if (safe_strcmp(choice, "default") == 0) if (safe_strcmp(choice, "default") == 0)
{ {
reverse_type[INCOME] = GNC_T; reverse_type[INCOME] = TRUE;
reverse_type[EXPENSE] = GNC_T; reverse_type[EXPENSE] = TRUE;
} }
else if (safe_strcmp(choice, "credit") == 0) else if (safe_strcmp(choice, "credit") == 0)
{ {
reverse_type[LIABILITY] = GNC_T; reverse_type[LIABILITY] = TRUE;
reverse_type[EQUITY] = GNC_T; reverse_type[EQUITY] = TRUE;
reverse_type[INCOME] = GNC_T; reverse_type[INCOME] = TRUE;
reverse_type[CREDIT] = GNC_T; reverse_type[CREDIT] = TRUE;
} }
else if (safe_strcmp(choice, "none") == 0) else if (safe_strcmp(choice, "none") == 0)
{ {
@ -737,8 +737,8 @@ gnc_configure_reverse_balance(void)
{ {
PERR("bad value\n"); PERR("bad value\n");
reverse_type[INCOME] = GNC_T; reverse_type[INCOME] = TRUE;
reverse_type[EXPENSE] = GNC_T; reverse_type[EXPENSE] = TRUE;
} }
if (choice != NULL) if (choice != NULL)
@ -767,12 +767,13 @@ gnc_configure_auto_decimal_cb(void *not_used)
static void static void
gnc_configure_auto_decimal(void) gnc_configure_auto_decimal(void)
{ {
gnc_set_auto_decimal_enabled gboolean enabled;
(
(gncBoolean) gnc_lookup_boolean_option("General", enabled = gnc_lookup_boolean_option("General",
"Automatic Decimal Point", "Automatic Decimal Point",
GNC_F) FALSE);
);
gnc_set_auto_decimal_enabled(enabled);
} }
/* gnc_configure_register_font_cb /* gnc_configure_register_font_cb

View File

@ -118,7 +118,7 @@ gnc_ui_AdjBWindow_ok_cb(GtkWidget * widget, gpointer data)
gchar * string; gchar * string;
string = gtk_entry_get_text(GTK_ENTRY(adjBData->balance_entry)); string = gtk_entry_get_text(GTK_ENTRY(adjBData->balance_entry));
new_balance = xaccParseAmount(string, GNC_T); new_balance = xaccParseAmount(string, TRUE);
if (gnc_reverse_balance(adjBData->account)) if (gnc_reverse_balance(adjBData->account))
new_balance = -new_balance; new_balance = -new_balance;
@ -164,7 +164,7 @@ gnc_adjust_update_cb(GtkWidget *widget, GdkEventFocus *event, gpointer data)
string = gtk_entry_get_text(entry); string = gtk_entry_get_text(entry);
value = xaccParseAmount(string, GNC_T); value = xaccParseAmount(string, TRUE);
currency = xaccAccountGetCurrency(account); currency = xaccAccountGetCurrency(account);

View File

@ -176,7 +176,7 @@ historyInsert(HTMLHistory *history, HTMLData *data)
if (history->current_node == NULL) if (history->current_node == NULL)
{ {
history->current_node = new; history->current_node = new;
return GNC_T; return TRUE;
} }
/* delete all next pages: */ /* delete all next pages: */
@ -195,7 +195,7 @@ historyInsert(HTMLHistory *history, HTMLData *data)
history->current_node->next = new; history->current_node->next = new;
history->current_node = new; history->current_node = new;
return GNC_F; return FALSE;
} }
/* Move forward in history, and return current history data */ /* Move forward in history, and return current history data */

View File

@ -515,7 +515,7 @@ gnc_ui_delete_account_cb ( GtkWidget *widget, gpointer data )
name = xaccAccountGetName(account); name = xaccAccountGetName(account);
message = g_strdup_printf(ACC_DEL_SURE_MSG, name); message = g_strdup_printf(ACC_DEL_SURE_MSG, name);
if (gnc_verify_dialog(message, GNC_F)) if (gnc_verify_dialog(message, FALSE))
gnc_ui_delete_account(account); gnc_ui_delete_account(account);
g_free(message); g_free(message);
@ -1332,8 +1332,8 @@ mainWindow()
GTK_SIGNAL_FUNC(gnc_account_cb), NULL); GTK_SIGNAL_FUNC(gnc_account_cb), NULL);
/* create statusbar and add it to the application. */ /* create statusbar and add it to the application. */
statusbar = gnome_appbar_new(GNC_F, /* no progress bar, maybe later? */ statusbar = gnome_appbar_new(FALSE, /* no progress bar, maybe later? */
GNC_T, /* has status area */ TRUE, /* has status area */
GNOME_PREFERENCES_USER /* recommended */); GNOME_PREFERENCES_USER /* recommended */);
gnome_app_set_statusbar(GNOME_APP(app), GTK_WIDGET(statusbar)); gnome_app_set_statusbar(GNOME_APP(app), GTK_WIDGET(statusbar));

View File

@ -269,7 +269,7 @@ gnc_start_recn_update_cb(GtkWidget *widget, GdkEventFocus *event,
string = gtk_entry_get_text(entry); string = gtk_entry_get_text(entry);
value = xaccParseAmount(string, GNC_T); value = xaccParseAmount(string, TRUE);
account_type = xaccAccountGetType(account); account_type = xaccAccountGetType(account);
if ((account_type == STOCK) || (account_type == MUTUAL) || if ((account_type == STOCK) || (account_type == MUTUAL) ||
@ -362,7 +362,7 @@ startRecnWindow(GtkWidget *parent, Account *account,
GtkWidget *start_value = gtk_label_new(amount); GtkWidget *start_value = gtk_label_new(amount);
GtkWidget *vbox = GNOME_DIALOG(dialog)->vbox; GtkWidget *vbox = GNOME_DIALOG(dialog)->vbox;
date_value = gnc_date_edit_new(*statement_date, GNC_F, GNC_F); date_value = gnc_date_edit_new(*statement_date, FALSE, FALSE);
end_value = gtk_entry_new(); end_value = gtk_entry_new();
amount = xaccPrintAmount(*new_ending, flags & ~PRTSYM, currency); amount = xaccPrintAmount(*new_ending, flags & ~PRTSYM, currency);
@ -412,7 +412,7 @@ startRecnWindow(GtkWidget *parent, Account *account,
string = gtk_entry_get_text(GTK_ENTRY(end_value)); string = gtk_entry_get_text(GTK_ENTRY(end_value));
*new_ending = xaccParseAmount(string, GNC_T); *new_ending = xaccParseAmount(string, TRUE);
*statement_date = gnc_date_edit_get_date(GNC_DATE_EDIT(date_value)); *statement_date = gnc_date_edit_get_date(GNC_DATE_EDIT(date_value));
if (gnc_reverse_balance(account)) if (gnc_reverse_balance(account))
@ -489,7 +489,7 @@ gnc_reconcile_window_set_titles(RecnWindow *recnData)
gchar *title; gchar *title;
formal = gnc_lookup_boolean_option("General", formal = gnc_lookup_boolean_option("General",
"Use accounting labels", GNC_F); "Use accounting labels", FALSE);
if (formal) if (formal)
title = DEBITS_STR; title = DEBITS_STR;
@ -591,8 +591,8 @@ gnc_recn_create_status_bar(RecnWindow *recnData)
{ {
GtkWidget *statusbar; GtkWidget *statusbar;
statusbar = gnome_appbar_new(GNC_F, /* no progress bar */ statusbar = gnome_appbar_new(FALSE, /* no progress bar */
GNC_T, /* has status area */ TRUE, /* has status area */
GNOME_PREFERENCES_USER); GNOME_PREFERENCES_USER);
return statusbar; return statusbar;
@ -670,7 +670,7 @@ gnc_ui_reconcile_window_delete_cb(GtkButton *button, gpointer data)
gboolean result; gboolean result;
result = gnc_verify_dialog_parented(GTK_WINDOW(recnData->window), result = gnc_verify_dialog_parented(GTK_WINDOW(recnData->window),
TRANS_DEL2_MSG, GNC_F); TRANS_DEL2_MSG, FALSE);
if (!result) if (!result)
return; return;
@ -1639,7 +1639,7 @@ recnFinishCB(GtkWidget *w, gpointer data)
if (!DEQ(recnRecalculateBalance(recnData), 0.0)) if (!DEQ(recnRecalculateBalance(recnData), 0.0))
if (!gnc_verify_dialog_parented(GTK_WINDOW(recnData->window), if (!gnc_verify_dialog_parented(GTK_WINDOW(recnData->window),
RECN_BALN_WARN, GNC_F)) RECN_BALN_WARN, FALSE))
return; return;
date = recnData->statement_date; date = recnData->statement_date;
@ -1686,7 +1686,7 @@ recnCancelCB(GtkWidget *w, gpointer data)
if (changed) if (changed)
if (!gnc_verify_dialog_parented(GTK_WINDOW(recnData->window), if (!gnc_verify_dialog_parented(GTK_WINDOW(recnData->window),
RECN_CANCEL_WARN, GNC_F)) RECN_CANCEL_WARN, FALSE))
return; return;
gtk_widget_destroy(recnData->window); gtk_widget_destroy(recnData->window);

View File

@ -95,7 +95,7 @@ struct _RegWindow
RegDateWindow *date_window; RegDateWindow *date_window;
/* Do we close the ledger when the window closes? */ /* Do we close the ledger when the window closes? */
gncBoolean close_ledger; gboolean close_ledger;
}; };
@ -888,8 +888,8 @@ gnc_register_create_status_bar(RegWindow *regData)
GtkWidget *hbox; GtkWidget *hbox;
GtkWidget *label; GtkWidget *label;
statusbar = gnome_appbar_new(GNC_F, /* no progress bar */ statusbar = gnome_appbar_new(FALSE, /* no progress bar */
GNC_T, /* has status area */ TRUE, /* has status area */
GNOME_PREFERENCES_USER); GNOME_PREFERENCES_USER);
regData->statusbar = statusbar; regData->statusbar = statusbar;
@ -956,7 +956,7 @@ new_trans_cb(GtkWidget *widget, gpointer data)
{ {
RegWindow *regData = data; RegWindow *regData = data;
if (xaccSRSaveRegEntry(regData->ledger->ledger, GNC_T)) if (xaccSRSaveRegEntry(regData->ledger->ledger, TRUE))
xaccSRRedrawRegEntry(regData->ledger->ledger); xaccSRRedrawRegEntry(regData->ledger->ledger);
gnc_register_jump_to_blank(regData); gnc_register_jump_to_blank(regData);
@ -1420,11 +1420,11 @@ static void
gnc_register_record_cb(GnucashRegister *reg, gpointer data) gnc_register_record_cb(GnucashRegister *reg, gpointer data)
{ {
RegWindow *regData = data; RegWindow *regData = data;
gncBoolean goto_blank; gboolean goto_blank;
goto_blank = gnc_lookup_boolean_option("Register", goto_blank = gnc_lookup_boolean_option("Register",
"'Enter' moves to blank transaction", "'Enter' moves to blank transaction",
GNC_F); FALSE);
/* If we are in single or double line mode and we hit enter /* If we are in single or double line mode and we hit enter
* on the blank split, go to the blank split instead of the * on the blank split, go to the blank split instead of the
@ -1447,7 +1447,7 @@ gnc_register_record_cb(GnucashRegister *reg, gpointer data)
current_split = xaccSRGetCurrentSplit(sr); current_split = xaccSRGetCurrentSplit(sr);
if (blank_split == current_split) if (blank_split == current_split)
goto_blank = GNC_T; goto_blank = TRUE;
} }
} }
} }
@ -1502,19 +1502,19 @@ gnc_reg_set_window_name(RegWindow *regData)
case GENERAL_LEDGER: case GENERAL_LEDGER:
case INCOME_LEDGER: case INCOME_LEDGER:
reg_name = GENERAL_LEDGER_STR; reg_name = GENERAL_LEDGER_STR;
single_account = GNC_F; single_account = FALSE;
break; break;
case PORTFOLIO_LEDGER: case PORTFOLIO_LEDGER:
reg_name = PORTFOLIO_STR; reg_name = PORTFOLIO_STR;
single_account = GNC_F; single_account = FALSE;
break; break;
case SEARCH_LEDGER: case SEARCH_LEDGER:
reg_name = SEARCH_RESULTS_STR; reg_name = SEARCH_RESULTS_STR;
single_account = GNC_F; single_account = FALSE;
break; break;
default: default:
reg_name = REGISTER_STR; reg_name = REGISTER_STR;
single_account = GNC_T; single_account = TRUE;
break; break;
} }
@ -1582,7 +1582,7 @@ regWindowLedger(xaccLedgerDisplay *ledger)
gtk_box_pack_start(GTK_BOX(vbox), register_dock, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox), register_dock, TRUE, TRUE, 0);
regData->ledger = ledger; regData->ledger = ledger;
regData->close_ledger = GNC_T; regData->close_ledger = TRUE;
regData->window = register_window; regData->window = register_window;
regData->sort_type = BY_STANDARD; regData->sort_type = BY_STANDARD;
@ -1842,7 +1842,7 @@ regDestroy(xaccLedgerDisplay *ledger)
gnc_register_check_close(regData); gnc_register_check_close(regData);
/* It will be closed elsewhere */ /* It will be closed elsewhere */
regData->close_ledger = GNC_F; regData->close_ledger = FALSE;
gnc_reg_save_size(regData); gnc_reg_save_size(regData);
@ -2134,12 +2134,12 @@ static void
recordCB(GtkWidget *w, gpointer data) recordCB(GtkWidget *w, gpointer data)
{ {
RegWindow *regData = (RegWindow *) data; RegWindow *regData = (RegWindow *) data;
gncBoolean really_saved; gboolean really_saved;
Transaction *trans; Transaction *trans;
trans = xaccSRGetCurrentTrans(regData->ledger->ledger); trans = xaccSRGetCurrentTrans(regData->ledger->ledger);
really_saved = xaccSRSaveRegEntry(regData->ledger->ledger, GNC_T); really_saved = xaccSRSaveRegEntry(regData->ledger->ledger, TRUE);
if (!really_saved) if (!really_saved)
return; return;
@ -2312,7 +2312,7 @@ deleteCB(GtkWidget *widget, gpointer data)
xaccTransGetDescription(trans)); xaccTransGetDescription(trans));
result = gnc_verify_dialog_parented(GTK_WINDOW(regData->window), result = gnc_verify_dialog_parented(GTK_WINDOW(regData->window),
buf, GNC_F); buf, FALSE);
g_free(buf); g_free(buf);
@ -2331,7 +2331,7 @@ deleteCB(GtkWidget *widget, gpointer data)
((style == REG_SINGLE_LINE) || (style == REG_DOUBLE_LINE))) ((style == REG_SINGLE_LINE) || (style == REG_DOUBLE_LINE)))
{ {
result = gnc_verify_dialog_parented(GTK_WINDOW(regData->window), result = gnc_verify_dialog_parented(GTK_WINDOW(regData->window),
TRANS_DEL2_MSG, GNC_F); TRANS_DEL2_MSG, FALSE);
if (!result) if (!result)
return; return;
@ -2407,13 +2407,13 @@ cancelCB(GtkWidget *w, gpointer data)
static void static void
gnc_register_check_close(RegWindow *regData) gnc_register_check_close(RegWindow *regData)
{ {
gncBoolean pending_changes; gboolean pending_changes;
pending_changes = xaccSRHasPendingChanges(regData->ledger->ledger); pending_changes = xaccSRHasPendingChanges(regData->ledger->ledger);
if (pending_changes) if (pending_changes)
{ {
if (gnc_verify_dialog_parented if (gnc_verify_dialog_parented
(GTK_WINDOW(regData->window), TRANS_CHANGED_MSG, GNC_T)) (GTK_WINDOW(regData->window), TRANS_CHANGED_MSG, TRUE))
recordCB(regData->window, regData); recordCB(regData->window, regData);
else else
xaccSRCancelCursorSplitChanges(regData->ledger->ledger); xaccSRCancelCursorSplitChanges(regData->ledger->ledger);

View File

@ -322,10 +322,10 @@ gnc_report_export(ReportData *report_data)
/* See if the file exists */ /* See if the file exists */
if ((stat(export_filename, &file_status) == 0)) if ((stat(export_filename, &file_status) == 0))
{ {
gncBoolean result; gboolean result;
message = g_strdup_printf(FMB_EEXIST_MSG, export_filename); message = g_strdup_printf(FMB_EEXIST_MSG, export_filename);
result = gnc_verify_dialog_parented(parent, message, GNC_F); result = gnc_verify_dialog_parented(parent, message, FALSE);
g_free(message); g_free(message);
if (!result) if (!result)

View File

@ -170,7 +170,7 @@ xaccBasicCellGetHelp (BasicCell *cell)
/* ===================================================== */ /* ===================================================== */
void void
xaccBasicCellSetChanged (BasicCell *cell, gncBoolean changed) xaccBasicCellSetChanged (BasicCell *cell, gboolean changed)
{ {
if (cell == NULL) if (cell == NULL)
return; return;

View File

@ -286,7 +286,7 @@ void xaccSetBasicCellValue (BasicCell *, const char *);
void xaccSetBasicCellBlankHelp (BasicCell *, const char *); void xaccSetBasicCellBlankHelp (BasicCell *, const char *);
char * xaccBasicCellGetHelp (BasicCell *); char * xaccBasicCellGetHelp (BasicCell *);
void xaccBasicCellSetChanged (BasicCell *, gncBoolean); void xaccBasicCellSetChanged (BasicCell *, gboolean);
#endif /* __BASIC_CELL_H__ */ #endif /* __BASIC_CELL_H__ */
/* ------------------ end of file ---------------------- */ /* ------------------ end of file ---------------------- */

View File

@ -135,18 +135,18 @@ DateMV (BasicCell *_cell,
int *end_selection) int *end_selection)
{ {
DateCell *cell = (DateCell *) _cell; DateCell *cell = (DateCell *) _cell;
gboolean accept = GNC_F; gboolean accept = FALSE;
struct tm *date; struct tm *date;
char buff[30]; char buff[30];
/* if user hit backspace, accept the change */ /* if user hit backspace, accept the change */
if (change == NULL) accept = GNC_T; if (change == NULL) accept = TRUE;
else if (0x0 == change[0]) accept = GNC_T; else if (0x0 == change[0]) accept = TRUE;
else else
{ {
int i, count = 0; int i, count = 0;
char separator = dateSeparator(); char separator = dateSeparator();
gncBoolean ok = TRUE; gboolean ok = TRUE;
for (i = 0; 0 != change[i]; i++) for (i = 0; 0 != change[i]; i++)
{ {
@ -154,7 +154,7 @@ DateMV (BasicCell *_cell,
* separator of '-' (for DATE_FORMAT_ISO) takes precedence * separator of '-' (for DATE_FORMAT_ISO) takes precedence
* over the accelerator below! */ * over the accelerator below! */
if (!isdigit(change[i]) && (separator != change[i])) if (!isdigit(change[i]) && (separator != change[i]))
ok = GNC_F; ok = FALSE;
if (separator == change[i]) if (separator == change[i])
count++; count++;
@ -165,10 +165,10 @@ DateMV (BasicCell *_cell,
count++; count++;
if (2 < count) if (2 < count)
ok = GNC_F; ok = FALSE;
if (ok) if (ok)
accept = GNC_T; accept = TRUE;
} }
/* keep a copy of the new value */ /* keep a copy of the new value */

View File

@ -65,7 +65,7 @@ typedef struct _PopBox
QuickFill *qf; QuickFill *qf;
gboolean in_list_select; gboolean in_list_select;
gncBoolean strict; gboolean strict;
char complete_char; /* char to be used for auto-completion */ char complete_char; /* char to be used for auto-completion */
@ -526,7 +526,7 @@ ComboMV (BasicCell *_cell,
/* =============================================== */ /* =============================================== */
static gncBoolean static gboolean
ComboDirect (BasicCell *bcell, ComboDirect (BasicCell *bcell,
const char *oldval, const char *oldval,
char **newval_ptr, char **newval_ptr,
@ -818,7 +818,7 @@ leaveCombo (BasicCell *bcell, const char *value)
/* =============================================== */ /* =============================================== */
void void
xaccComboCellSetStrict (ComboCell *cell, gncBoolean strict) xaccComboCellSetStrict (ComboCell *cell, gboolean strict)
{ {
PopBox *box; PopBox *box;
@ -878,7 +878,7 @@ xaccComboCellSetIgnoreHelp (ComboCell *cell, const char *ignore_help)
/* =============================================== */ /* =============================================== */
void void
xaccComboCellSetAutoPop (gncBoolean auto_pop_combos_arg) xaccComboCellSetAutoPop (gboolean auto_pop_combos_arg)
{ {
auto_pop_combos = auto_pop_combos_arg; auto_pop_combos = auto_pop_combos_arg;
} }

View File

@ -138,7 +138,7 @@ gnucash_sheet_cursor_set (GnucashSheet *sheet, int virt_row, int virt_col,
} }
void void
gnucash_sheet_cursor_set_from_table (GnucashSheet *sheet, gncBoolean do_scroll) gnucash_sheet_cursor_set_from_table (GnucashSheet *sheet, gboolean do_scroll)
{ {
Table *table; Table *table;
gint cell_row, cell_col; gint cell_row, cell_col;
@ -1324,7 +1324,7 @@ gnucash_button_press_event (GtkWidget *widget, GdkEventButton *event)
int new_v_row, new_v_col, new_c_row, new_c_col; int new_v_row, new_v_col, new_c_row, new_c_col;
Table *table; Table *table;
gncBoolean exit_register; gboolean exit_register;
g_return_val_if_fail(widget != NULL, TRUE); g_return_val_if_fail(widget != NULL, TRUE);
g_return_val_if_fail(GNUCASH_IS_SHEET(widget), TRUE); g_return_val_if_fail(GNUCASH_IS_SHEET(widget), TRUE);
@ -1641,8 +1641,8 @@ gnucash_sheet_key_press_event (GtkWidget *widget, GdkEventKey *event)
CellBlock *header; CellBlock *header;
int direction = 0; int direction = 0;
gboolean pass_on = FALSE; gboolean pass_on = FALSE;
gncBoolean exit_register; gboolean exit_register;
gncBoolean set_selection = TRUE; gboolean set_selection = TRUE;
int current_p_row, current_p_col, new_p_row, new_p_col; int current_p_row, current_p_col, new_p_row, new_p_col;
g_return_val_if_fail(widget != NULL, TRUE); g_return_val_if_fail(widget != NULL, TRUE);
@ -1824,7 +1824,7 @@ gnucash_sheet_goto_virt_row_col (GnucashSheet *sheet,
{ {
Table *table; Table *table;
VirtualCell *vcell; VirtualCell *vcell;
gncBoolean exit_register; gboolean exit_register;
int current_p_row, current_p_col, new_p_row, new_p_col; int current_p_row, current_p_col, new_p_row, new_p_col;
g_return_if_fail(GNUCASH_IS_SHEET(sheet)); g_return_if_fail(GNUCASH_IS_SHEET(sheet));

View File

@ -240,7 +240,7 @@ void gnucash_sheet_block_set_from_table (GnucashSheet *sheet, gint virt_row,
void gnucash_sheet_set_scroll_region (GnucashSheet *sheet); void gnucash_sheet_set_scroll_region (GnucashSheet *sheet);
void gnucash_sheet_cursor_set_from_table (GnucashSheet *sheet, void gnucash_sheet_cursor_set_from_table (GnucashSheet *sheet,
gncBoolean do_scroll); gboolean do_scroll);
void gnucash_sheet_move_cursor (GnucashSheet *sheet, int col, int row); void gnucash_sheet_move_cursor (GnucashSheet *sheet, int col, int row);

View File

@ -97,8 +97,8 @@ NumMV (BasicCell *_cell,
int *end_selection) int *end_selection)
{ {
NumCell *cell = (NumCell *) _cell; NumCell *cell = (NumCell *) _cell;
gncBoolean accel = FALSE; gboolean accel = FALSE;
gncBoolean is_num; gboolean is_num;
long int number = 0; long int number = 0;
if ((change == NULL) || (change[0] == 0) || /* if we are deleting */ if ((change == NULL) || (change[0] == 0) || /* if we are deleting */

View File

@ -201,15 +201,15 @@ xaccInitPriceCell (PriceCell *cell)
xaccInitBasicCell (&(cell->cell)); xaccInitBasicCell (&(cell->cell));
cell->amount = 0.0; cell->amount = 0.0;
cell->blank_zero = GNC_T; cell->blank_zero = TRUE;
cell->monetary = GNC_T; cell->monetary = TRUE;
cell->is_currency = GNC_F; cell->is_currency = FALSE;
cell->shares_value = GNC_F; cell->shares_value = FALSE;
SET (&(cell->cell), ""); SET (&(cell->cell), "");
COLORIZE (cell, 0.0); COLORIZE (cell, 0.0);
cell->cell.use_fg_color = GNC_T; cell->cell.use_fg_color = TRUE;
cell->cell.enter_cell = PriceEnter; cell->cell.enter_cell = PriceEnter;
cell->cell.modify_verify = PriceMV; cell->cell.modify_verify = PriceMV;
cell->cell.leave_cell = PriceLeave; cell->cell.leave_cell = PriceLeave;
@ -294,7 +294,7 @@ xaccSetPriceCellBlank (PriceCell *cell)
/* ================================================ */ /* ================================================ */
void void
xaccSetPriceCellSharesValue (PriceCell * cell, gncBoolean shares_value) xaccSetPriceCellSharesValue (PriceCell * cell, gboolean shares_value)
{ {
if (cell == NULL) if (cell == NULL)
return; return;
@ -305,7 +305,7 @@ xaccSetPriceCellSharesValue (PriceCell * cell, gncBoolean shares_value)
/* ================================================ */ /* ================================================ */
void void
xaccSetPriceCellMonetary (PriceCell * cell, gncBoolean monetary) xaccSetPriceCellMonetary (PriceCell * cell, gboolean monetary)
{ {
if (cell == NULL) if (cell == NULL)
return; return;
@ -316,7 +316,7 @@ xaccSetPriceCellMonetary (PriceCell * cell, gncBoolean monetary)
/* ================================================ */ /* ================================================ */
void void
xaccSetPriceCellIsCurrency (PriceCell *cell, gncBoolean is_currency) xaccSetPriceCellIsCurrency (PriceCell *cell, gboolean is_currency)
{ {
if (cell == NULL) if (cell == NULL)
return; return;
@ -327,7 +327,7 @@ xaccSetPriceCellIsCurrency (PriceCell *cell, gncBoolean is_currency)
/* ================================================ */ /* ================================================ */
void void
xaccSetPriceCellBlankZero (PriceCell *cell, gncBoolean blank_zero) xaccSetPriceCellBlankZero (PriceCell *cell, gboolean blank_zero)
{ {
if (cell == NULL) if (cell == NULL)
return; return;

View File

@ -84,7 +84,7 @@ ToggleRecn (BasicCell *_cell,
still perhaps not optimal. */ still perhaps not optimal. */
if (cell->reconciled_flag == YREC) if (cell->reconciled_flag == YREC)
if (!gnc_verify_dialog(CHANGE_RECN_MSG, GNC_T)) if (!gnc_verify_dialog(CHANGE_RECN_MSG, TRUE))
return NULL; return NULL;
if (cell->reconciled_flag == NREC) if (cell->reconciled_flag == NREC)

View File

@ -234,7 +234,7 @@ struct _SplitRegisterColors
guint32 double_cursor_passive_bg_color; guint32 double_cursor_passive_bg_color;
guint32 double_cursor_passive_bg_color2; guint32 double_cursor_passive_bg_color2;
gncBoolean double_alternate_virt; gboolean double_alternate_virt;
guint32 trans_cursor_active_bg_color; guint32 trans_cursor_active_bg_color;
guint32 trans_cursor_passive_bg_color; guint32 trans_cursor_passive_bg_color;
@ -287,7 +287,7 @@ CellType xaccSplitRegisterGetCellTypeRowCol (SplitRegister *reg,
/* Returns the physical row and column in the current cursor of the /* Returns the physical row and column in the current cursor of the
* given cell using the pointer values. The function returns true if * given cell using the pointer values. The function returns true if
* the given cell type is in the current cursor, false otherwise. */ * the given cell type is in the current cursor, false otherwise. */
gncBoolean xaccSplitRegisterGetCellRowCol (SplitRegister *reg, gboolean xaccSplitRegisterGetCellRowCol (SplitRegister *reg,
CellType cell_type, CellType cell_type,
int *p_phys_row, int *p_phys_row,
int *p_phys_col); int *p_phys_col);

View File

@ -243,7 +243,7 @@ struct _Table
* colors alternate between odd and even virt * colors alternate between odd and even virt
* rows, or between the first and non-first * rows, or between the first and non-first
* physical rows within cellblocks. */ * physical rows within cellblocks. */
gncBoolean alternate_bg_colors; gboolean alternate_bg_colors;
/* private data */ /* private data */
@ -378,7 +378,7 @@ gboolean gnc_table_physical_cell_valid(Table *table,
void gnc_table_refresh_cursor_gui (Table * table, CellBlock *curs, void gnc_table_refresh_cursor_gui (Table * table, CellBlock *curs,
int phys_row, int phys_col, int phys_row, int phys_col,
gncBoolean do_scroll); gboolean do_scroll);
/* gnc_table_enter_update() is a utility function used to determine /* gnc_table_enter_update() is a utility function used to determine

View File

@ -53,7 +53,7 @@ gncUIWidget gnc_get_ui_data();
void gnc_ui_shutdown(); void gnc_ui_shutdown();
gncBoolean gnc_reverse_balance(Account *account); gboolean gnc_reverse_balance(Account *account);
gncBoolean gnc_reverse_balance_type(GNCAccountType type); gboolean gnc_reverse_balance_type(GNCAccountType type);
#endif #endif

View File

@ -52,9 +52,9 @@ gnc_ok_cancel_dialog_parented(gncUIWidget parent,
void gnc_warning_dialog_parented(gncUIWidget parent, const char *message); void gnc_warning_dialog_parented(gncUIWidget parent, const char *message);
gncBoolean gnc_verify_dialog( const char *message, gboolean gnc_verify_dialog( const char *message,
gncBoolean yes_is_default ); gboolean yes_is_default );
void gnc_error_dialog( const char *message ); void gnc_error_dialog( const char *message );
int gnc_choose_radio_option_dialog_parented(gncUIWidget parent, int gnc_choose_radio_option_dialog_parented(gncUIWidget parent,
const char *title, const char *title,