split-register-load.c (gnucash-5.0.tar.bz2) | : | split-register-load.c (gnucash-5.1.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 575 | skipping to change at line 575 | |||
slist = g_list_copy (slist); | slist = g_list_copy (slist); | |||
we_own_slist = TRUE; | we_own_slist = TRUE; | |||
} | } | |||
slist = g_list_append (slist, pending_split); | slist = g_list_append (slist, pending_split); | |||
} | } | |||
} | } | |||
if (multi_line) | if (multi_line) | |||
trans_table = g_hash_table_new (g_direct_hash, g_direct_equal); | trans_table = g_hash_table_new (g_direct_hash, g_direct_equal); | |||
// View reversed add blank transaction at the top | ||||
if (table->model->reverse_sort && !future_after_blank) | ||||
{ | ||||
if (blank_trans == find_trans) | ||||
new_trans_row = vcell_loc.virt_row; | ||||
if (blank_split == find_trans_split) | ||||
new_trans_split_row = vcell_loc.virt_row; | ||||
/* go to blank on first pass */ | ||||
if (info->first_pass) | ||||
{ | ||||
save_loc.vcell_loc = vcell_loc; | ||||
save_loc.phys_row_offset = 0; | ||||
save_loc.phys_col_offset = 0; | ||||
} | ||||
// used in the setting the rows insensitive | ||||
table->model->blank_trans_row = vcell_loc.virt_row; | ||||
gnc_split_register_add_transaction (reg, | ||||
blank_trans, blank_split, | ||||
lead_cursor, split_cursor, | ||||
multi_line, start_primary_color, | ||||
info->blank_split_edited, | ||||
find_trans, find_split, | ||||
find_class, &new_split_row, | ||||
&vcell_loc); | ||||
if (!multi_line) | ||||
start_primary_color = !start_primary_color; | ||||
added_blank_trans = TRUE; | ||||
} | ||||
/* populate the table */ | /* populate the table */ | |||
for (node = slist; node; node = node->next) | for (node = slist; node; node = node->next) | |||
{ | { | |||
split = node->data; | split = node->data; | |||
trans = xaccSplitGetParent (split); | trans = xaccSplitGetParent (split); | |||
if (!xaccTransStillHasSplit (trans, split)) | if (!xaccTransStillHasSplit (trans, split)) | |||
continue; | continue; | |||
if (pending_trans == trans) | if (pending_trans == trans) | |||
skipping to change at line 627 | skipping to change at line 662 | |||
else | else | |||
{ | { | |||
need_divider_upper = TRUE; | need_divider_upper = TRUE; | |||
} | } | |||
} | } | |||
if (info->show_present_divider && !found_divider && | if (info->show_present_divider && !found_divider && | |||
((table->model->reverse_sort && xaccTransGetDate (trans) < present) || | ((table->model->reverse_sort && xaccTransGetDate (trans) < present) || | |||
(!table->model->reverse_sort && xaccTransGetDate (trans) > present) )) | (!table->model->reverse_sort && xaccTransGetDate (trans) > present) )) | |||
{ | { | |||
table->model->dividing_row = vcell_loc.virt_row; | gint count_blank_splits = 1; | |||
gint virt_row_offset = 2; | ||||
gboolean show_lower_divider = FALSE; | ||||
if (table->model->reverse_sort) | ||||
{ | ||||
count_blank_splits = xaccTransCountSplits (blank_trans); | ||||
if (count_blank_splits > 1) | ||||
count_blank_splits ++; | ||||
if (table->model->reverse_sort && future_after_blank) | ||||
virt_row_offset = 0; | ||||
} | ||||
if ((table->model->reverse_sort && vcell_loc.virt_row != count_blank | ||||
_splits + virt_row_offset) || | ||||
!table->model->reverse_sort) | ||||
{ | ||||
table->model->dividing_row = vcell_loc.virt_row; // blue top | ||||
show_lower_divider = TRUE; | ||||
} | ||||
found_divider = TRUE; | found_divider = TRUE; | |||
if (future_after_blank) | if (future_after_blank) | |||
{ | { | |||
if (blank_trans == find_trans) | if (blank_trans == find_trans) | |||
new_trans_row = vcell_loc.virt_row; | new_trans_row = vcell_loc.virt_row; | |||
if (blank_split == find_trans_split) | if (blank_split == find_trans_split) | |||
new_trans_split_row = vcell_loc.virt_row; | new_trans_split_row = vcell_loc.virt_row; | |||
skipping to change at line 658 | skipping to change at line 714 | |||
gnc_split_register_add_transaction (reg, | gnc_split_register_add_transaction (reg, | |||
blank_trans, blank_split, | blank_trans, blank_split, | |||
lead_cursor, split_cursor, | lead_cursor, split_cursor, | |||
multi_line, start_primary_co lor, | multi_line, start_primary_co lor, | |||
info->blank_split_edited, | info->blank_split_edited, | |||
find_trans, find_split, | find_trans, find_split, | |||
find_class, &new_split_row, | find_class, &new_split_row, | |||
&vcell_loc); | &vcell_loc); | |||
table->model->dividing_row_lower = vcell_loc.virt_row; | if (show_lower_divider) | |||
table->model->dividing_row_lower = vcell_loc.virt_row; // bl | ||||
ue bottom | ||||
if (!multi_line) | if (!multi_line) | |||
start_primary_color = !start_primary_color; | start_primary_color = !start_primary_color; | |||
added_blank_trans = TRUE; | added_blank_trans = TRUE; | |||
} | } | |||
} | } | |||
/* If this is the first load of the register, | /* If this is the first load of the register, | |||
* fill up the quickfill cells. */ | * fill up the quickfill cells. */ | |||
if (info->first_pass) | if (info->first_pass) | |||
skipping to change at line 720 | skipping to change at line 778 | |||
{ | { | |||
info->pending_trans_guid = *guid_null(); | info->pending_trans_guid = *guid_null(); | |||
if (xaccTransIsOpen (pending_trans)) | if (xaccTransIsOpen (pending_trans)) | |||
xaccTransCommitEdit (pending_trans); | xaccTransCommitEdit (pending_trans); | |||
else if (pending_trans) | else if (pending_trans) | |||
g_assert_not_reached(); | g_assert_not_reached(); | |||
pending_trans = NULL; | pending_trans = NULL; | |||
} | } | |||
if (!added_blank_trans) { | if (!added_blank_trans) | |||
{ | ||||
if (blank_trans == find_trans) | if (blank_trans == find_trans) | |||
new_trans_row = vcell_loc.virt_row; | new_trans_row = vcell_loc.virt_row; | |||
if (blank_split == find_trans_split) | if (blank_split == find_trans_split) | |||
new_trans_split_row = vcell_loc.virt_row; | new_trans_split_row = vcell_loc.virt_row; | |||
/* go to blank on first pass */ | /* go to blank on first pass */ | |||
if (info->first_pass) | if (info->first_pass) | |||
{ | { | |||
save_loc.vcell_loc = vcell_loc; | save_loc.vcell_loc = vcell_loc; | |||
skipping to change at line 815 | skipping to change at line 874 | |||
gnc_cursor_buffer_destroy (cursor_buffer); | gnc_cursor_buffer_destroy (cursor_buffer); | |||
cursor_buffer = NULL; | cursor_buffer = NULL; | |||
update_info (info, reg); | update_info (info, reg); | |||
gnc_split_register_set_cell_fractions ( | gnc_split_register_set_cell_fractions ( | |||
reg, gnc_split_register_get_current_split (reg)); | reg, gnc_split_register_get_current_split (reg)); | |||
gnc_table_refresh_gui (table, TRUE); | gnc_table_refresh_gui (table, TRUE); | |||
gnc_split_register_show_trans (reg, table->current_cursor_loc.vcell_loc); | // if in reverse order, always show the first transaction | |||
if (table->model->reverse_sort) | ||||
{ | ||||
VirtualCellLocation vc_loc; | ||||
vc_loc.virt_row = 0; | ||||
gnc_split_register_show_trans (reg, vc_loc); | ||||
} | ||||
else | ||||
gnc_split_register_show_trans (reg, table->current_cursor_loc.vcell_loc) | ||||
; | ||||
/* enable callback for cursor user-driven moves */ | /* enable callback for cursor user-driven moves */ | |||
gnc_table_control_allow_move (table->control, TRUE); | gnc_table_control_allow_move (table->control, TRUE); | |||
if (we_own_slist) | if (we_own_slist) | |||
g_list_free (slist); | g_list_free (slist); | |||
LEAVE (" "); | LEAVE (" "); | |||
} | } | |||
End of changes. 5 change blocks. | ||||
4 lines changed or deleted | 74 lines changed or added |