mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
The reinitialize transaction code should mark the transaction as
pending so that the right checks are done when leaving the transaction. Fix spelling errors in function names. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7459 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
b1f5562368
commit
f6858e7a5b
24
ChangeLog
24
ChangeLog
@ -1,3 +1,27 @@
|
||||
2002-11-10 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/scm/price-quotes.scm ((gnc:book-add-quotes book)): Don't get
|
||||
stock quotes for accounts where all the shares have all been
|
||||
sold. #95547
|
||||
|
||||
* src/register/ledger-core/split-register.c
|
||||
(gnc_split_register_empty_current_trans_except_split): After
|
||||
modifying the transaction, leave it in "open" state and mark it as
|
||||
the currently pending transaction. This insures that the register
|
||||
does the right thing when leaving this transaction. Also fix
|
||||
spelling error in function name.
|
||||
(gnc_split_register_empty_current_trans): Fix spelling error in
|
||||
function name.
|
||||
|
||||
* src/register/ledger-core/split-register.c: Fix spelling error in
|
||||
function names.
|
||||
|
||||
* src/gnome/gnc-split-reg.c (gsr_default_reinit_handler): Fix
|
||||
spelling error in function name.
|
||||
(gnc_split_reg_reinitialize_trans_cb): Emit the right signal.
|
||||
(gnc_split_reg_jump_to_split_amount): Remove uninitialized
|
||||
variable.
|
||||
|
||||
2002-11-09 Herbert Thoma <herbie@hthoma.de>
|
||||
|
||||
* /src/report/standard-reports/cash-flow.scm: bug fix for cash flow
|
||||
|
@ -981,7 +981,7 @@ gsr_default_reinit_handler( GNCSplitReg *gsr, gpointer data )
|
||||
if (!gnc_split_register_get_split_virt_loc(reg, split, &vcell_loc))
|
||||
return;
|
||||
split = gnc_split_register_get_current_trans_split (reg, &vcell_loc);
|
||||
gnc_split_register_emtpy_current_trans_except_split (reg, split);
|
||||
gnc_split_register_empty_current_trans_except_split (reg, split);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -991,7 +991,7 @@ void
|
||||
gnc_split_reg_reinitialize_trans_cb(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
GNCSplitReg *gsr = data;
|
||||
gsr_emit_signal( gsr, "reinit" );
|
||||
gsr_emit_signal( gsr, "reinit_ent" );
|
||||
}
|
||||
|
||||
void
|
||||
@ -1295,7 +1295,6 @@ gnc_split_reg_jump_to_split(GNCSplitReg *gsr, Split *split)
|
||||
void
|
||||
gnc_split_reg_jump_to_split_amount(GNCSplitReg *gsr, Split *split)
|
||||
{
|
||||
Transaction *trans;
|
||||
VirtualLocation virt_loc;
|
||||
SplitRegister *reg;
|
||||
|
||||
|
@ -1018,7 +1018,7 @@ gnc_split_register_delete_current_trans (SplitRegister *reg)
|
||||
}
|
||||
|
||||
void
|
||||
gnc_split_register_emtpy_current_trans_except_split (SplitRegister *reg, Split *split)
|
||||
gnc_split_register_empty_current_trans_except_split (SplitRegister *reg, Split *split)
|
||||
{
|
||||
SRInfo *info = gnc_split_register_get_info (reg);
|
||||
Transaction *pending_trans;
|
||||
@ -1077,14 +1077,9 @@ gnc_split_register_emtpy_current_trans_except_split (SplitRegister *reg, Split *
|
||||
for (node = splits; node; node = node->next)
|
||||
if (node->data != split)
|
||||
xaccSplitDestroy (node->data);
|
||||
xaccTransCommitEdit (trans);
|
||||
|
||||
/* Check pending transaction */
|
||||
if (trans == pending_trans)
|
||||
{
|
||||
info->pending_trans_guid = *xaccGUIDNULL ();
|
||||
pending_trans = NULL;
|
||||
}
|
||||
/* This is now the pending transaction */
|
||||
info->pending_trans_guid = *xaccTransGetGUID(trans);
|
||||
|
||||
gnc_resume_gui_refresh ();
|
||||
|
||||
@ -1092,13 +1087,13 @@ gnc_split_register_emtpy_current_trans_except_split (SplitRegister *reg, Split *
|
||||
}
|
||||
|
||||
void
|
||||
gnc_split_register_emtpy_current_trans (SplitRegister *reg)
|
||||
gnc_split_register_empty_current_trans (SplitRegister *reg)
|
||||
{
|
||||
Split *split;
|
||||
|
||||
/* get the current split based on cursor position */
|
||||
split = gnc_split_register_get_current_split (reg);
|
||||
gnc_split_register_emtpy_current_trans_except_split (reg, split);
|
||||
gnc_split_register_empty_current_trans_except_split (reg, split);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -241,8 +241,8 @@ void gnc_split_register_delete_current_trans (SplitRegister *reg);
|
||||
|
||||
/* Deletes the non-transaction splits associated wih the current
|
||||
* cursor, if both are non-NULL. */
|
||||
void gnc_split_register_emtpy_current_trans_except_split (SplitRegister *reg, Split *split);
|
||||
void gnc_split_register_emtpy_current_trans (SplitRegister *reg);
|
||||
void gnc_split_register_empty_current_trans_except_split (SplitRegister *reg, Split *split);
|
||||
void gnc_split_register_empty_current_trans (SplitRegister *reg);
|
||||
|
||||
/* Cancels any changes made to the current cursor, reloads the cursor
|
||||
* from the engine, reloads the table from the cursor, and updates
|
||||
|
Loading…
Reference in New Issue
Block a user