r23691 - gnucash/trunk/src/register/ledger-core - Extract function update_info.
John Ralls
jralls at code.gnucash.org
Sun Jan 12 21:12:35 EST 2014
Author: jralls
Date: 2014-01-12 21:12:35 -0500 (Sun, 12 Jan 2014)
New Revision: 23691
Trac: http://svn.gnucash.org/trac/changeset/23691
Modified:
gnucash/trunk/src/register/ledger-core/split-register-load.c
Log:
Extract function update_info.
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:27 UTC (rev 23690)
+++ gnucash/trunk/src/register/ledger-core/split-register-load.c 2014-01-13 02:12:35 UTC (rev 23691)
@@ -305,6 +305,22 @@
gnc_split_register_recn_cell_confirm, reg);
}
+static void
+update_info (SRInfo *info, SplitRegister *reg)
+{
+ /* Set up the hint transaction, split, transaction split, and column. */
+ info->cursor_hint_trans = gnc_split_register_get_current_trans (reg);
+ info->cursor_hint_split = gnc_split_register_get_current_split (reg);
+ info->cursor_hint_trans_split =
+ gnc_split_register_get_current_trans_split (reg, NULL);
+ info->cursor_hint_cursor_class =
+ gnc_split_register_get_current_cursor_class (reg);
+ info->hint_set_by_traverse = FALSE;
+ info->traverse_to_new = FALSE;
+ info->exact_traversal = FALSE;
+ info->first_pass = FALSE;
+ info->reg_loaded = TRUE;
+}
void
gnc_split_register_load (SplitRegister *reg, GList * slist,
@@ -679,18 +695,7 @@
cursor_buffer = NULL;
}
- /* Set up the hint transaction, split, transaction split, and column. */
- info->cursor_hint_trans = gnc_split_register_get_current_trans (reg);
- info->cursor_hint_split = gnc_split_register_get_current_split (reg);
- info->cursor_hint_trans_split =
- gnc_split_register_get_current_trans_split (reg, NULL);
- info->cursor_hint_cursor_class =
- gnc_split_register_get_current_cursor_class (reg);
- info->hint_set_by_traverse = FALSE;
- info->traverse_to_new = FALSE;
- info->exact_traversal = FALSE;
- info->first_pass = FALSE;
- info->reg_loaded = TRUE;
+ update_info (info, reg);
gnc_split_register_set_cell_fractions(
reg, gnc_split_register_get_current_split (reg));
More information about the gnucash-changes
mailing list