r22784 - gnucash/trunk/src - Aqbanking online transfer: Set the date in the gnucash txn dialog to non-sensitive.

Christian Stimming cstim at code.gnucash.org
Mon Feb 18 15:48:28 EST 2013


Author: cstim
Date: 2013-02-18 15:48:28 -0500 (Mon, 18 Feb 2013)
New Revision: 22784
Trac: http://svn.gnucash.org/trac/changeset/22784

Modified:
   gnucash/trunk/src/gnome-utils/dialog-transfer.c
   gnucash/trunk/src/gnome-utils/dialog-transfer.h
   gnucash/trunk/src/import-export/aqbanking/gnc-ab-transfer.c
Log:
Aqbanking online transfer: Set the date in the gnucash txn dialog to non-sensitive.

Users regularly expect that date to be the online job execution date,
but that's not what is implemented. So we prevent editing here at all.

Modified: gnucash/trunk/src/gnome-utils/dialog-transfer.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-transfer.c	2013-02-18 20:37:08 UTC (rev 22783)
+++ gnucash/trunk/src/gnome-utils/dialog-transfer.c	2013-02-18 20:48:28 UTC (rev 22784)
@@ -1308,6 +1308,12 @@
 
     gnc_date_edit_set_time( GNC_DATE_EDIT(xferData->date_entry), set_date );
 }
+void gnc_xfer_dialog_set_date_sensitive(XferDialog *xferData,
+        gboolean is_sensitive)
+{
+    g_assert(xferData);
+    gtk_widget_set_sensitive (xferData->date_entry, is_sensitive);
+}
 
 void
 gnc_xfer_dialog_set_exchange_rate(XferDialog *xferData, gnc_numeric exchange_rate)

Modified: gnucash/trunk/src/gnome-utils/dialog-transfer.h
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-transfer.h	2013-02-18 20:37:08 UTC (rev 22783)
+++ gnucash/trunk/src/gnome-utils/dialog-transfer.h	2013-02-18 20:48:28 UTC (rev 22784)
@@ -138,6 +138,9 @@
  */
 void gnc_xfer_dialog_set_date(XferDialog *xferData, time64 set_time);
 
+/** Set the "sensitive" state of the date field to the given value */
+void gnc_xfer_dialog_set_date_sensitive(XferDialog *xferData, gboolean is_sensitive);
+
 /** Set the exchange rate.  If exchange-rate is 0, then do nothing */
 void gnc_xfer_dialog_set_exchange_rate(XferDialog *xferData,
                                        gnc_numeric exchange_rate);

Modified: gnucash/trunk/src/import-export/aqbanking/gnc-ab-transfer.c
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/gnc-ab-transfer.c	2013-02-18 20:37:08 UTC (rev 22783)
+++ gnucash/trunk/src/import-export/aqbanking/gnc-ab-transfer.c	2013-02-18 20:48:28 UTC (rev 22784)
@@ -237,6 +237,7 @@
                      GNC_HOW_RND_ROUND_HALF_UP);
         gnc_xfer_dialog_set_amount(xfer_dialog, amount);
         gnc_xfer_dialog_set_amount_sensitive(xfer_dialog, FALSE);
+        gnc_xfer_dialog_set_date_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