r20485 - gnucash/branches/2.4/src - [20481] Bug #645640: Online transfer must not allow to change amount in second window
Christian Stimming
cstim at code.gnucash.org
Sat Mar 26 05:26:58 EDT 2011
Author: cstim
Date: 2011-03-26 05:26:58 -0400 (Sat, 26 Mar 2011)
New Revision: 20485
Trac: http://svn.gnucash.org/trac/changeset/20485
Modified:
gnucash/branches/2.4/src/gnome-utils/dialog-transfer.c
gnucash/branches/2.4/src/gnome-utils/dialog-transfer.h
gnucash/branches/2.4/src/import-export/aqbanking/gnc-ab-transfer.c
Log:
[20481] Bug #645640: Online transfer must not allow to change amount in second window
Modified: gnucash/branches/2.4/src/gnome-utils/dialog-transfer.c
===================================================================
--- gnucash/branches/2.4/src/gnome-utils/dialog-transfer.c 2011-03-26 09:23:56 UTC (rev 20484)
+++ gnucash/branches/2.4/src/gnome-utils/dialog-transfer.c 2011-03-26 09:26:58 UTC (rev 20485)
@@ -1176,6 +1176,12 @@
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);
+}
/********************************************************************\
Modified: gnucash/branches/2.4/src/gnome-utils/dialog-transfer.h
===================================================================
--- gnucash/branches/2.4/src/gnome-utils/dialog-transfer.h 2011-03-26 09:23:56 UTC (rev 20484)
+++ gnucash/branches/2.4/src/gnome-utils/dialog-transfer.h 2011-03-26 09:26:58 UTC (rev 20485)
@@ -99,6 +99,9 @@
*/
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
*
Modified: gnucash/branches/2.4/src/import-export/aqbanking/gnc-ab-transfer.c
===================================================================
--- gnucash/branches/2.4/src/import-export/aqbanking/gnc-ab-transfer.c 2011-03-26 09:23:56 UTC (rev 20484)
+++ gnucash/branches/2.4/src/import-export/aqbanking/gnc-ab-transfer.c 2011-03-26 09:26:58 UTC (rev 20485)
@@ -226,6 +226,7 @@
xaccAccountGetCommoditySCU(gnc_acc),
GNC_HOW_RND_ROUND_HALF_UP);
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);
gnc_xfer_dialog_set_description(xfer_dialog, description);
More information about the gnucash-changes
mailing list