Clean up split register struct.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5273 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2001-09-04 06:22:36 +00:00
parent 4c50554ecf
commit 3df10c8112
9 changed files with 211 additions and 211 deletions

View File

@ -76,7 +76,7 @@ xaccLedgerDisplayInternal (Account *lead_account, Query *q,
LedgerDisplayType ld_type,
SplitRegisterType reg_type,
SplitRegisterStyle style,
gboolean templateMode );
gboolean is_template);
static void xaccLedgerDisplayRefreshInternal (xaccLedgerDisplay *ld,
GList *splits);
@ -436,7 +436,7 @@ xaccLedgerDisplayGL (void)
* this template ledger.
**/
xaccLedgerDisplay *
xaccLedgerDisplayTemplateGL( char *id )
xaccLedgerDisplayTemplateGL (char *id)
{
GNCBook *book;
Query *q;
@ -447,25 +447,29 @@ xaccLedgerDisplayTemplateGL( char *id )
AccountGroup *ag;
Account *acct;
q = xaccMallocQuery();
q = xaccMallocQuery ();
ag = gnc_book_get_template_group( gncGetCurrentBook() );
acct = xaccGetAccountFromName( ag, id );
if ( acct == NULL ) {
ag = gnc_book_get_template_group (gncGetCurrentBook());
acct = xaccGetAccountFromName (ag, id);
if (!acct)
{
/* FIXME */
printf( "can't get template account for id \"%s\"\n", id );
}
xaccQueryAddSingleAccountMatch( q, acct, QUERY_AND );
book = gncGetCurrentBook();
xaccQuerySetGroup( q, gnc_book_get_template_group(book) );
ld = xaccLedgerDisplayInternal( NULL, q, LD_GL,
xaccQueryAddSingleAccountMatch (q, acct, QUERY_AND);
book = gncGetCurrentBook ();
xaccQuerySetGroup (q, gnc_book_get_template_group(book));
ld = xaccLedgerDisplayInternal (NULL, q, LD_GL,
GENERAL_LEDGER,
REG_STYLE_JOURNAL,
TRUE ); /* template mode? TRUE. */
TRUE); /* template mode? TRUE. */
sr = xaccLedgerDisplayGetSR (ld);
gnc_split_register_set_template_account (sr, acct);
sr = xaccLedgerDisplayGetSR( ld );
sr->templateAcct = acct;
return ld;
}
@ -641,7 +645,7 @@ xaccLedgerDisplayInternal (Account *lead_account, Query *q,
LedgerDisplayType ld_type,
SplitRegisterType reg_type,
SplitRegisterStyle style,
gboolean templateMode )
gboolean is_template )
{
xaccLedgerDisplay *ld;
gboolean show_all;
@ -748,12 +752,10 @@ xaccLedgerDisplayInternal (Account *lead_account, Query *q,
* The main register window itself *
\******************************************************************/
ld->reg = gnc_split_register_new (reg_type, style, FALSE, templateMode);
ld->reg = gnc_split_register_new (reg_type, style, FALSE, is_template);
xaccSRSetData (ld->reg, ld, xaccLedgerDisplayParent);
ld->reg->template = templateMode;
splits = xaccQueryGetSplits (ld->query);
ledger_set_watches (ld, splits);

View File

@ -100,7 +100,7 @@ gnc_split_register_set_cells (SplitRegister *reg, TableLayout *layout)
gnc_table_layout_set_cell (layout, curs, DESC_CELL, 0, 2);
gnc_table_layout_set_cell (layout, curs, MXFRM_CELL, 0, 3);
gnc_table_layout_set_cell (layout, curs, RECN_CELL, 0, 4);
if (reg->template)
if (reg->is_template)
{
gnc_table_layout_set_cell (layout, curs, FDEBT_CELL, 0, 5);
gnc_table_layout_set_cell (layout, curs, FCRED_CELL, 0, 6);
@ -146,7 +146,7 @@ gnc_split_register_set_cells (SplitRegister *reg, TableLayout *layout)
gnc_table_layout_set_cell (layout, curs, MEMO_CELL, 0, 2);
gnc_table_layout_set_cell (layout, curs, XFRM_CELL, 0, 3);
gnc_table_layout_set_cell (layout, curs, RECN_CELL, 0, 4);
if (reg->template)
if (reg->is_template)
{
gnc_table_layout_set_cell (layout, curs, FDEBT_CELL, 0, 5);
gnc_table_layout_set_cell (layout, curs, FCRED_CELL, 0, 6);
@ -173,7 +173,7 @@ gnc_split_register_set_cells (SplitRegister *reg, TableLayout *layout)
gnc_table_layout_set_cell (layout, curs, DESC_CELL, 0, 2);
gnc_table_layout_set_cell (layout, curs, MXFRM_CELL, 0, 3);
gnc_table_layout_set_cell (layout, curs, RECN_CELL, 0, 4);
if (reg->template)
if (reg->is_template)
{
gnc_table_layout_set_cell (layout, curs, FDEBT_CELL, 0, 5);
gnc_table_layout_set_cell (layout, curs, FCRED_CELL, 0, 6);
@ -217,7 +217,7 @@ gnc_split_register_set_cells (SplitRegister *reg, TableLayout *layout)
gnc_table_layout_set_cell (layout, curs, MEMO_CELL, 0, 2);
gnc_table_layout_set_cell (layout, curs, XFRM_CELL, 0, 3);
gnc_table_layout_set_cell (layout, curs, RECN_CELL, 0, 4);
if (reg->template)
if (reg->is_template)
{
gnc_table_layout_set_cell (layout, curs, FDEBT_CELL, 0, 5);
gnc_table_layout_set_cell (layout, curs, FCRED_CELL, 0, 6);

View File

@ -504,8 +504,6 @@ xaccSRLoadRegister (SplitRegister *reg, GList * slist,
/* enable callback for cursor user-driven moves */
gnc_table_control_allow_move (table->control, TRUE);
reg->destroy = LedgerDestroy;
xaccSRLoadXferCells (reg, default_account);
}

View File

@ -320,14 +320,14 @@ gnc_split_register_save_template_cells (gpointer save_data,
trans = sd->trans;
split = sd->split;
template_acc = reg->templateAcct;
template_acc = xaccAccountLookup (&info->template_account);
if ( gnc_table_layout_get_cell_changed (reg->table->layout,
DATE_CELL, TRUE) ||
gnc_table_layout_get_cell_changed (reg->table->layout,
NUM_CELL, TRUE) ||
gnc_table_layout_get_cell_changed (reg->table->layout,
RECN_CELL, TRUE) )
if (gnc_table_layout_get_cell_changed (reg->table->layout,
DATE_CELL, TRUE) ||
gnc_table_layout_get_cell_changed (reg->table->layout,
NUM_CELL, TRUE) ||
gnc_table_layout_get_cell_changed (reg->table->layout,
RECN_CELL, TRUE))
{
PERR( "unexpected changed fields in a template register\n" );
}
@ -335,8 +335,7 @@ gnc_split_register_save_template_cells (gpointer save_data,
/* We'll be using the Split's KVP frame a lot */
kvpf = xaccSplitGetSlots (split);
if ( gnc_table_layout_get_cell_changed (reg->table->layout,
XFRM_CELL, TRUE) )
if (gnc_table_layout_get_cell_changed (reg->table->layout, XFRM_CELL, TRUE))
{
Account *acct;
const GUID *acctGUID;
@ -351,7 +350,7 @@ gnc_split_register_save_template_cells (gpointer save_data,
acctGUID = xaccAccountGetGUID (acct);
kvp_frame_set_slot (kvpf, "sched-xaction/xfrm",
kvp_value_new_guid(acctGUID));
kvp_value_new_guid (acctGUID));
kvpf = xaccSplitGetSlots (split);
cell = gnc_table_layout_get_cell (reg->table->layout, XFRM_CELL);
@ -370,10 +369,10 @@ gnc_split_register_save_template_cells (gpointer save_data,
gnc_basic_cell_set_changed (cell, FALSE);
}
if ( gnc_table_layout_get_cell_changed (reg->table->layout,
FCRED_CELL, TRUE) ||
gnc_table_layout_get_cell_changed (reg->table->layout,
FDEBT_CELL, TRUE) )
if (gnc_table_layout_get_cell_changed (reg->table->layout,
FCRED_CELL, TRUE) ||
gnc_table_layout_get_cell_changed (reg->table->layout,
FDEBT_CELL, TRUE))
{
const char *value;
char *amountStr = "x + y/42";
@ -381,17 +380,17 @@ gnc_split_register_save_template_cells (gpointer save_data,
gnc_numeric credit;
gnc_numeric debit;
DEBUG( "kvp_frame before: %s\n", kvp_frame_to_string( kvpf ) );
DEBUG ("kvp_frame before: %s\n", kvp_frame_to_string (kvpf));
/* amountStr = gnc_numeric_to_string( new_amount ); */
value = gnc_table_layout_get_cell_value (reg->table->layout, FCRED_CELL);
kvp_frame_set_slot( kvpf, "sched-xaction/credit_formula",
kvp_value_new_string( value ) );
kvp_frame_set_slot (kvpf, "sched-xaction/credit_formula",
kvp_value_new_string (value));
value = gnc_table_layout_get_cell_value (reg->table->layout, FDEBT_CELL);
kvp_frame_set_slot( kvpf, "sched-xaction/debit_formula",
kvp_value_new_string( value ) );
kvp_frame_set_slot (kvpf, "sched-xaction/debit_formula",
kvp_value_new_string (value));
DEBUG( "kvp_frame after: %s\n", kvp_frame_to_string( kvpf ) );
@ -399,22 +398,22 @@ gnc_split_register_save_template_cells (gpointer save_data,
xaccSplitSetValue (split, gnc_numeric_create(0, 1) );
}
if ( gnc_table_layout_get_cell_changed (reg->table->layout,
SHRS_CELL, TRUE) )
if (gnc_table_layout_get_cell_changed (reg->table->layout,
SHRS_CELL, TRUE))
{
char *sharesStr = "(x + y)/42";
/* FIXME: shares cells are numeric by definition. */
DEBUG( "kvp_frame before: %s\n", kvp_frame_to_string( kvpf ) );
DEBUG ("kvp_frame before: %s\n", kvp_frame_to_string (kvpf));
/* sharesStr = gnc_numeric_to_string( sharesStr ); */
kvp_frame_set_slot( kvpf, "sched-xaction/shares",
kvp_value_new_string( sharesStr ) );
DEBUG( "kvp_frame after: %s\n", kvp_frame_to_string( kvpf ) );
kvp_frame_set_slot (kvpf, "sched-xaction/shares",
kvp_value_new_string (sharesStr));
DEBUG ("kvp_frame after: %s\n", kvp_frame_to_string (kvpf));
/* set the shares to an innocuous value */
xaccSplitSetSharePriceAndAmount (split,
gnc_numeric_create(0, 1),
gnc_numeric_create(0, 1) );
gnc_numeric_create(0, 1));
cell = gnc_table_layout_get_cell (reg->table->layout, SHRS_CELL);
gnc_basic_cell_set_changed (cell, FALSE);

View File

@ -217,23 +217,24 @@ gnc_split_register_get_tcredit_label (VirtualLocation virt_loc,
gpointer user_data)
{
SplitRegister *reg = user_data;
SRInfo *info = xaccSRGetInfo (reg);
if (reg->tcredit_str)
return reg->tcredit_str;
if (info->tcredit_str)
return info->tcredit_str;
{
const char *string = xaccSRGetCreditString (reg);
if (string)
reg->tcredit_str = g_strdup_printf (_("Tot %s"), string);
info->tcredit_str = g_strdup_printf (_("Tot %s"), string);
}
if (reg->tcredit_str)
return reg->tcredit_str;
if (info->tcredit_str)
return info->tcredit_str;
reg->tcredit_str = g_strdup (_("Tot Credit"));
info->tcredit_str = g_strdup (_("Tot Credit"));
return reg->tcredit_str;
return info->tcredit_str;
}
static const char *
@ -241,22 +242,23 @@ gnc_split_register_get_tdebit_label (VirtualLocation virt_loc,
gpointer user_data)
{
SplitRegister *reg = user_data;
SRInfo *info = xaccSRGetInfo (reg);
if (reg->tdebit_str)
return reg->tdebit_str;
if (info->tdebit_str)
return info->tdebit_str;
{
const char *string = xaccSRGetDebitString (reg);
if (string)
reg->tdebit_str = g_strdup_printf (_("Tot %s"), string);
info->tdebit_str = g_strdup_printf (_("Tot %s"), string);
}
if (reg->tdebit_str)
return reg->tdebit_str;
if (info->tdebit_str)
return info->tdebit_str;
reg->tdebit_str = g_strdup (_("Tot Debit"));
info->tdebit_str = g_strdup (_("Tot Debit"));
return reg->tdebit_str;
return info->tdebit_str;
}
static const char *

View File

@ -32,8 +32,7 @@
#define STOCK_SPLIT_STR _("-- Stock Split --")
typedef struct _SRInfo SRInfo;
struct _SRInfo
struct sr_info
{
/* The blank split at the bottom of the register */
GUID blank_split_guid;
@ -98,6 +97,18 @@ struct _SRInfo
/* hook to get parent widget */
SRGetParentCallback get_parent;
/* flag indicating a template register */
gboolean template;
/* The template account which template transaction should below to */
GUID template_account;
/* configured strings for debit/credit headers */
char *debit_str;
char *credit_str;
char *tdebit_str;
char *tcredit_str;
};
@ -142,8 +153,6 @@ Account * gnc_split_register_get_account (SplitRegister *reg,
gboolean gnc_split_register_recn_cell_confirm (char old_flag, gpointer data);
void LedgerDestroy (SplitRegister *reg);
CursorClass gnc_split_register_cursor_name_to_class (const char *cursor_name);
#endif

View File

@ -70,13 +70,14 @@ xaccSRInitRegisterData (SplitRegister *reg)
info->blank_split_guid = *xaccGUIDNULL ();
info->pending_trans_guid = *xaccGUIDNULL ();
info->default_account = *xaccGUIDNULL ();
info->template_account = *xaccGUIDNULL ();
info->last_date_entered = get_today_midnight ();
info->first_pass = TRUE;
info->full_refresh = TRUE;
reg->user_data = info;
reg->sr_info = info;
}
SRInfo *
@ -85,10 +86,10 @@ xaccSRGetInfo (SplitRegister *reg)
if (!reg)
return NULL;
if (reg->user_data == NULL)
if (reg->sr_info == NULL)
xaccSRInitRegisterData (reg);
return reg->user_data;
return reg->sr_info;
}
gncUIWidget
@ -128,6 +129,17 @@ sr_get_default_account (SplitRegister *reg)
return xaccAccountLookup (&info->default_account);
}
void
gnc_split_register_set_template_account (SplitRegister *reg,
Account *template_account)
{
SRInfo *info = xaccSRGetInfo (reg);
g_return_if_fail (reg != NULL);
info->template_account = *xaccAccountGetGUID (template_account);
}
Transaction *
xaccSRGetTrans (SplitRegister *reg, VirtualCellLocation vcell_loc)
{

View File

@ -153,29 +153,6 @@ static gboolean sr_split_auto_calc (SplitRegister *reg, Split *split);
/** implementations *******************************************************/
static void
xaccSRDestroyRegisterData (SplitRegister *reg)
{
if (reg == NULL)
return;
g_free (reg->user_data);
reg->user_data = NULL;
}
void
xaccSRSetData (SplitRegister *reg, void *user_data,
SRGetParentCallback get_parent)
{
SRInfo *info = xaccSRGetInfo (reg);
g_return_if_fail (reg != NULL);
info->user_data = user_data;
info->get_parent = get_parent;
}
static int
gnc_trans_split_index (Transaction *trans, Split *split)
{
@ -343,53 +320,6 @@ xaccSRCurrentTransExpanded (SplitRegister *reg)
return info->trans_expanded;
}
void
LedgerDestroy (SplitRegister *reg)
{
SRInfo *info = xaccSRGetInfo(reg);
Split *blank_split = xaccSplitLookup(&info->blank_split_guid);
Transaction *pending_trans = xaccTransLookup(&info->pending_trans_guid);
Transaction *trans;
gnc_suspend_gui_refresh ();
/* be sure to destroy the "blank split" */
if (blank_split != NULL)
{
/* split destroy will automatically remove it
* from its parent account */
trans = xaccSplitGetParent (blank_split);
/* Make sure we don't commit this below */
if (trans == pending_trans)
{
info->pending_trans_guid = *xaccGUIDNULL ();
pending_trans = NULL;
}
xaccTransBeginEdit (trans);
xaccTransDestroy (trans);
xaccTransCommitEdit (trans);
info->blank_split_guid = *xaccGUIDNULL ();
blank_split = NULL;
}
/* be sure to take care of any open transactions */
if (pending_trans != NULL)
{
if (xaccTransIsOpen (pending_trans))
xaccTransCommitEdit (pending_trans);
info->pending_trans_guid = *xaccGUIDNULL ();
pending_trans = NULL;
}
xaccSRDestroyRegisterData (reg);
gnc_resume_gui_refresh ();
}
Transaction *
xaccSRGetCurrentTrans (SplitRegister *reg)
{
@ -1858,40 +1788,44 @@ sr_type_to_account_type(SplitRegisterType sr_type)
const char *
xaccSRGetDebitString (SplitRegister *reg)
{
SRInfo *info = xaccSRGetInfo (reg);
if (!reg)
return NULL;
if (reg->debit_str)
return reg->debit_str;
if (info->debit_str)
return info->debit_str;
reg->debit_str = gnc_get_debit_string (sr_type_to_account_type (reg->type));
info->debit_str = gnc_get_debit_string (sr_type_to_account_type (reg->type));
if (reg->debit_str)
return reg->debit_str;
if (info->debit_str)
return info->debit_str;
reg->debit_str = g_strdup (_("Debit"));
info->debit_str = g_strdup (_("Debit"));
return reg->debit_str;
return info->debit_str;
}
const char *
xaccSRGetCreditString (SplitRegister *reg)
{
SRInfo *info = xaccSRGetInfo (reg);
if (!reg)
return NULL;
if (reg->credit_str)
return reg->credit_str;
if (info->credit_str)
return info->credit_str;
reg->credit_str =
info->credit_str =
gnc_get_credit_string (sr_type_to_account_type (reg->type));
if (reg->credit_str)
return reg->credit_str;
if (info->credit_str)
return info->credit_str;
reg->credit_str = g_strdup (_("Credit"));
info->credit_str = g_strdup (_("Credit"));
return reg->credit_str;
return info->credit_str;
}
gboolean
@ -2159,19 +2093,18 @@ gnc_split_register_init (SplitRegister *reg,
SplitRegisterType type,
SplitRegisterStyle style,
gboolean use_double_line,
gboolean templateMode)
gboolean is_template)
{
TableLayout *layout;
TableModel *model;
TableControl *control;
reg->user_data = NULL;
reg->destroy = NULL;
reg->sr_info = NULL;
reg->type = type;
reg->style = style;
reg->use_double_line = use_double_line;
reg->template = templateMode;
reg->is_template = is_template;
layout = gnc_split_register_layout_new (reg);
@ -2217,7 +2150,7 @@ SplitRegister *
gnc_split_register_new (SplitRegisterType type,
SplitRegisterStyle style,
gboolean use_double_line,
gboolean templateMode)
gboolean is_template)
{
SplitRegister * reg;
@ -2230,7 +2163,7 @@ gnc_split_register_new (SplitRegisterType type,
type,
style,
use_double_line,
templateMode);
is_template);
return reg;
}
@ -2254,6 +2187,92 @@ gnc_split_register_config (SplitRegister *reg,
gnc_table_realize_gui (reg->table);
}
static void
gnc_split_register_destroy_info (SplitRegister *reg)
{
SRInfo *info;
if (reg == NULL)
return;
info = reg->sr_info;
if (!info)
return;
g_free (info->debit_str);
g_free (info->tdebit_str);
g_free (info->credit_str);
g_free (info->tcredit_str);
info->debit_str = NULL;
info->tdebit_str = NULL;
info->credit_str = NULL;
info->tcredit_str = NULL;
g_free (reg->sr_info);
reg->sr_info = NULL;
}
void
xaccSRSetData (SplitRegister *reg, void *user_data,
SRGetParentCallback get_parent)
{
SRInfo *info = xaccSRGetInfo (reg);
g_return_if_fail (reg != NULL);
info->user_data = user_data;
info->get_parent = get_parent;
}
static void
gnc_split_register_cleanup (SplitRegister *reg)
{
SRInfo *info = xaccSRGetInfo(reg);
Split *blank_split = xaccSplitLookup(&info->blank_split_guid);
Transaction *pending_trans = xaccTransLookup(&info->pending_trans_guid);
Transaction *trans;
gnc_suspend_gui_refresh ();
/* be sure to destroy the "blank split" */
if (blank_split != NULL)
{
/* split destroy will automatically remove it
* from its parent account */
trans = xaccSplitGetParent (blank_split);
/* Make sure we don't commit this below */
if (trans == pending_trans)
{
info->pending_trans_guid = *xaccGUIDNULL ();
pending_trans = NULL;
}
xaccTransBeginEdit (trans);
xaccTransDestroy (trans);
xaccTransCommitEdit (trans);
info->blank_split_guid = *xaccGUIDNULL ();
blank_split = NULL;
}
/* be sure to take care of any open transactions */
if (pending_trans != NULL)
{
if (xaccTransIsOpen (pending_trans))
xaccTransCommitEdit (pending_trans);
info->pending_trans_guid = *xaccGUIDNULL ();
pending_trans = NULL;
}
gnc_split_register_destroy_info (reg);
gnc_resume_gui_refresh ();
}
void
gnc_split_register_destroy (SplitRegister *reg)
{
@ -2262,26 +2281,11 @@ gnc_split_register_destroy (SplitRegister *reg)
if (!reg)
return;
/* give the user a chance to clean up */
if (reg->destroy)
(reg->destroy) (reg);
reg->destroy = NULL;
reg->user_data = NULL;
gnc_split_register_cleanup (reg);
gnc_table_destroy (reg->table);
reg->table = NULL;
g_free (reg->debit_str);
g_free (reg->tdebit_str);
g_free (reg->credit_str);
g_free (reg->tcredit_str);
reg->debit_str = NULL;
reg->tdebit_str = NULL;
reg->credit_str = NULL;
reg->tcredit_str = NULL;
/* free the memory itself */
g_free (reg);
}

View File

@ -122,8 +122,7 @@ typedef struct split_register_colors
typedef struct split_register SplitRegister;
typedef void (*SplitRegisterDestroyCB) (SplitRegister *reg);
typedef struct sr_info SRInfo;
struct split_register
{
@ -134,33 +133,10 @@ struct split_register
SplitRegisterStyle style;
gboolean use_double_line;
gboolean is_template;
/* some private data; outsiders should not access this */
/**
* A flag indicating a "template" register.
**/
gboolean template; /* FIXME: this should not be here! */
/**
* The template account which the transactions in a template
* splitregister will belong to.
**/
Account *templateAcct; /* FIXME: this should not be here! */
/* user_data allows users of this object to hang
* private data onto it */
gpointer user_data;
/* The destroy callback gives user's a chance
* to free up any associated user_hook data */
SplitRegisterDestroyCB destroy;
/* configured strings for debit/credit headers */
char *debit_str;
char *credit_str;
char *tdebit_str;
char *tcredit_str;
/* private data; outsiders should not access this */
SRInfo * sr_info;
};
/* Callback function type */
@ -174,7 +150,7 @@ typedef void (*SRSetHelpCallback) (gpointer user_data, const char *help_str);
SplitRegister * gnc_split_register_new (SplitRegisterType type,
SplitRegisterStyle style,
gboolean use_double_line,
gboolean templateMode);
gboolean is_template);
/* Configure the split register. */
void gnc_split_register_config (SplitRegister *reg,
@ -185,6 +161,10 @@ void gnc_split_register_config (SplitRegister *reg,
/* Destroy the split register. */
void gnc_split_register_destroy (SplitRegister *reg);
/* Set the template account used by template registers */
void gnc_split_register_set_template_account (SplitRegister *reg,
Account *template_account);
/* Returns the class of the current cursor */
CursorClass gnc_split_register_get_current_cursor_class (SplitRegister *reg);
@ -337,14 +317,8 @@ CellIOFlags xaccSRTemplateGetIOFlagsHandler (VirtualLocation virt_loc,
gboolean xaccSRTemplateConfirmHandler (VirtualLocation virt_loc,
gpointer user_data);
/*
* jsled-added 2001.05.19 for export to dialog-nextrun.c [which will
* change its name at some point]
*/
void gnc_copy_trans_onto_trans(Transaction *from, Transaction *to,
gboolean use_cut_semantics,
gboolean do_commit);
#endif