Bug #645640: Online transfer must not allow to change amount in second window

BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20481 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2011-03-25 21:19:01 +00:00
parent 2a380b3f78
commit de7fec3b0e
3 changed files with 10 additions and 0 deletions

View File

@ -1176,6 +1176,12 @@ gnc_xfer_dialog_set_amount(XferDialog *xferData, gnc_numeric amount)
gnc_amount_edit_set_amount (GNC_AMOUNT_EDIT (xferData->amount_edit), amount); gnc_amount_edit_set_amount (GNC_AMOUNT_EDIT (xferData->amount_edit), amount);
} }
void gnc_xfer_dialog_set_amount_sensitive(XferDialog *xferData,
gboolean is_sensitive)
{
g_assert(xferData);
gtk_widget_set_sensitive(gnc_amount_edit_gtk_entry(GNC_AMOUNT_EDIT (xferData->amount_edit)), is_sensitive);
}
/********************************************************************\ /********************************************************************\

View File

@ -99,6 +99,9 @@ void gnc_xfer_dialog_hide_to_account_tree(XferDialog *xferData );
*/ */
void gnc_xfer_dialog_set_amount(XferDialog *xferData, gnc_numeric amount); void gnc_xfer_dialog_set_amount(XferDialog *xferData, gnc_numeric amount);
/** Set the "sensitive" state of the amount field to the given value */
void gnc_xfer_dialog_set_amount_sensitive(XferDialog *xferData, gboolean is_sensitive);
/** /**
* set the description in the given xfer dialog * set the description in the given xfer dialog
* *

View File

@ -226,6 +226,7 @@ gnc_ab_maketrans(GtkWidget *parent, Account *gnc_acc,
xaccAccountGetCommoditySCU(gnc_acc), xaccAccountGetCommoditySCU(gnc_acc),
GNC_HOW_RND_ROUND_HALF_UP); GNC_HOW_RND_ROUND_HALF_UP);
gnc_xfer_dialog_set_amount(xfer_dialog, amount); gnc_xfer_dialog_set_amount(xfer_dialog, amount);
gnc_xfer_dialog_set_amount_sensitive(xfer_dialog, FALSE);
description = gnc_ab_description_to_gnc(ab_trans); description = gnc_ab_description_to_gnc(ab_trans);
gnc_xfer_dialog_set_description(xfer_dialog, description); gnc_xfer_dialog_set_description(xfer_dialog, description);