r23690 - gnucash/trunk/src/register/ledger-core - Extract function change_account_separator.
John Ralls
jralls at code.gnucash.org
Sun Jan 12 21:12:27 EST 2014
Author: jralls
Date: 2014-01-12 21:12:27 -0500 (Sun, 12 Jan 2014)
New Revision: 23690
Trac: http://svn.gnucash.org/trac/changeset/23690
Modified:
gnucash/trunk/src/register/ledger-core/split-register-load.c
Log:
Extract function change_account_separator.
Modified: gnucash/trunk/src/register/ledger-core/split-register-load.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-load.c 2014-01-13 02:12:19 UTC (rev 23689)
+++ gnucash/trunk/src/register/ledger-core/split-register-load.c 2014-01-13 02:12:27 UTC (rev 23690)
@@ -285,6 +285,27 @@
return blank_split;
}
+static void
+change_account_separator (SRInfo *info, Table *table, SplitRegister *reg)
+{
+ info->separator_changed = FALSE;
+
+ /* set the completion character for the xfer cells */
+ gnc_combo_cell_set_complete_char(
+ (ComboCell *) gnc_table_layout_get_cell(table->layout, MXFRM_CELL),
+ gnc_get_account_separator());
+
+ gnc_combo_cell_set_complete_char(
+ (ComboCell *) gnc_table_layout_get_cell(table->layout, XFRM_CELL),
+ gnc_get_account_separator());
+
+ /* set the confirmation callback for the reconcile cell */
+ gnc_recn_cell_set_confirm_cb(
+ (RecnCell *) gnc_table_layout_get_cell(table->layout, RECN_CELL),
+ gnc_split_register_recn_cell_confirm, reg);
+}
+
+
void
gnc_split_register_load (SplitRegister *reg, GList * slist,
Account *default_account)
@@ -445,24 +466,8 @@
}
if (info->separator_changed)
- {
- info->separator_changed = FALSE;
+ change_account_separator (info, table, reg);
- /* set the completion character for the xfer cells */
- gnc_combo_cell_set_complete_char(
- (ComboCell *) gnc_table_layout_get_cell(table->layout, MXFRM_CELL),
- gnc_get_account_separator());
-
- gnc_combo_cell_set_complete_char(
- (ComboCell *) gnc_table_layout_get_cell(table->layout, XFRM_CELL),
- gnc_get_account_separator());
-
- /* set the confirmation callback for the reconcile cell */
- gnc_recn_cell_set_confirm_cb(
- (RecnCell *) gnc_table_layout_get_cell(table->layout, RECN_CELL),
- gnc_split_register_recn_cell_confirm, reg);
- }
-
table->model->dividing_row_upper = -1;
table->model->dividing_row = -1;
More information about the gnucash-changes
mailing list