AUDIT: r17149 - gnucash/trunk/src/gnome-utils - Correct quickfill direction in transfer dialogs.
Andreas Köhler
andi5 at cvs.gnucash.org
Sat May 10 20:02:14 EDT 2008
Author: andi5
Date: 2008-05-10 20:02:14 -0400 (Sat, 10 May 2008)
New Revision: 17149
Trac: http://svn.gnucash.org/trac/changeset/17149
Modified:
gnucash/trunk/src/gnome-utils/dialog-transfer.c
Log:
Correct quickfill direction in transfer dialogs.
gnc_xfer_dialog_quickfill() messed up debit and credit. When the "from
account" (left in normal mode, right/credit when using formal accounting
terms) was chosen as basis for the quickfill and a match was found, the
remote account should be selected on the "to account" side.
BP
Modified: gnucash/trunk/src/gnome-utils/dialog-transfer.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-transfer.c 2008-05-01 22:21:53 UTC (rev 17148)
+++ gnucash/trunk/src/gnome-utils/dialog-transfer.c 2008-05-11 00:02:14 UTC (rev 17149)
@@ -623,14 +623,17 @@
{
GNCAccountType other_type;
GtkWidget *other_button;
-
+ XferDirection other_direction;
+
DEBUG("updating other split");
if (xferData->quickfill == XFER_DIALOG_FROM) {
- other_button = xferData->from_show_button;
+ other_button = xferData->to_show_button;
+ other_direction = XFER_DIALOG_TO;
}
else
{
- other_button = xferData->to_show_button;
+ other_button = xferData->from_show_button;
+ other_direction = XFER_DIALOG_FROM;
}
other_type = xaccAccountGetType(other_acct);
@@ -641,7 +644,7 @@
if( (other_type == ACCT_TYPE_EXPENSE) || (other_type == ACCT_TYPE_INCOME) )
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(other_button), TRUE);
- gnc_transfer_dialog_set_selected_account (xferData, other_acct, xferData->quickfill);
+ gnc_transfer_dialog_set_selected_account (xferData, other_acct, other_direction);
changed = TRUE;
}
More information about the gnucash-changes
mailing list