[Gnucash-changes] More HBCI/AqBanking work.
Christian Stimming
cstim at cvs.gnucash.org
Mon Sep 6 15:18:36 EDT 2004
Log Message:
-----------
More HBCI/AqBanking work.
2004-09-06 Christian Stimming <stimming at tuhh.de>
* src/import-export/hbci/dialog-hbcitrans.c,
gnc-hbci-getbalance.c, gnc-hbci-gettrans.c: More AqBanking work
after hints from Martin Preuss <martin at libchipcard.de>.
Modified Files:
--------------
gnucash:
ChangeLog
gnucash/src/import-export/hbci:
dialog-hbcitrans.c
gnc-hbci-getbalance.c
gnc-hbci-gettrans.c
gnucash/src/import-export/hbci/glade:
hbci.glade
Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1837
retrieving revision 1.1838
diff -LChangeLog -LChangeLog -u -r1.1837 -r1.1838
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,9 @@
+2004-09-06 Christian Stimming <stimming at tuhh.de>
+
+ * src/import-export/hbci/dialog-hbcitrans.c,
+ gnc-hbci-getbalance.c, gnc-hbci-gettrans.c: More AqBanking work
+ after hints from Martin Preuss <martin at libchipcard.de>.
+
2004-09-04 Christian Stimming <stimming at tuhh.de>
* src/import-export/hbci/*.h, *.c, macros/aqbanking.m4,
Index: gnc-hbci-gettrans.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-gettrans.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -Lsrc/import-export/hbci/gnc-hbci-gettrans.c -Lsrc/import-export/hbci/gnc-hbci-gettrans.c -u -r1.28 -r1.29
--- src/import-export/hbci/gnc-hbci-gettrans.c
+++ src/import-export/hbci/gnc-hbci-gettrans.c
@@ -95,6 +95,11 @@
/* Create OutboxJob */
job = AB_JobGetTransactions_new((AB_ACCOUNT*)h_acc);
+ if (AB_Job_CheckAvailability(job)) {
+ printf("gnc_hbci_gettrans: Oops, job not available. Aborting.\n");
+ /* FIXME: free unneeded data */
+ return;
+ }
AB_JobGetTransactions_SetFromTime(job, from_date);
AB_JobGetTransactions_SetToTime(job, to_date);
Index: dialog-hbcitrans.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/dialog-hbcitrans.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -Lsrc/import-export/hbci/dialog-hbcitrans.c -Lsrc/import-export/hbci/dialog-hbcitrans.c -u -r1.31 -r1.32
--- src/import-export/hbci/dialog-hbcitrans.c
+++ src/import-export/hbci/dialog-hbcitrans.c
@@ -65,6 +65,8 @@
/* Purpose, description */
GtkWidget *purpose_entry;
GtkWidget *purpose_cont_entry;
+ GtkWidget *purpose_cont2_entry;
+ GtkWidget *purpose_cont3_entry;
/* Recipient's bank name (may be filled in automatically sometime later) */
GtkWidget *recp_bankname_label;
@@ -276,6 +278,10 @@
g_assert
((td->purpose_cont_entry = glade_xml_get_widget (xml, "purpose_cont_entry")) != NULL);
g_assert
+ ((td->purpose_cont2_entry = glade_xml_get_widget (xml, "purpose_cont2_entry")) != NULL);
+ g_assert
+ ((td->purpose_cont3_entry = glade_xml_get_widget (xml, "purpose_cont3_entry")) != NULL);
+ g_assert
((orig_name_label = glade_xml_get_widget (xml, "orig_name_label")) != NULL);
g_assert
((orig_account_label = glade_xml_get_widget (xml, "orig_account_label")) != NULL);
@@ -423,8 +429,24 @@
const AB_ACCOUNT *h_acc)
{
int result;
+ int max_purpose_lines;
gboolean values_ok;
+ {
+ AB_JOB *job = AB_JobSingleTransfer_new((AB_ACCOUNT *)h_acc);
+ if (AB_Job_CheckAvailability(job)) {
+ printf("gnc_hbci_trans_dialog_enqueue: Oops, job not available. Aborting.\n");
+ return -1;
+ }
+ max_purpose_lines = AB_JobSingleTransfer_GetMaxPurposeLines(job);
+ /* these are the number of fields, 27 characters each. */
+ AB_Job_free(job);
+ }
+ /* gtk_widget_set_sensitive (GTK_WIDGET (td->purpose_entry), max_purpose_lines > 0); */
+ gtk_widget_set_sensitive (GTK_WIDGET (td->purpose_cont_entry), max_purpose_lines > 1);
+ gtk_widget_set_sensitive (GTK_WIDGET (td->purpose_cont2_entry), max_purpose_lines > 2);
+ gtk_widget_set_sensitive (GTK_WIDGET (td->purpose_cont3_entry), max_purpose_lines > 3);
+
/* Repeat until entered values make sense */
do {
@@ -517,6 +539,10 @@
(trans, gtk_entry_get_text (GTK_ENTRY (td->purpose_entry)), FALSE);
AB_Transaction_AddPurpose
(trans, gtk_entry_get_text (GTK_ENTRY (td->purpose_cont_entry)), FALSE);
+ AB_Transaction_AddPurpose
+ (trans, gtk_entry_get_text (GTK_ENTRY (td->purpose_cont2_entry)), FALSE);
+ AB_Transaction_AddPurpose
+ (trans, gtk_entry_get_text (GTK_ENTRY (td->purpose_cont3_entry)), FALSE);
/* FIXME: Replace "EUR" by account-dependent string here. */
AB_Transaction_SetValue
@@ -613,6 +639,10 @@
}
}
job = AB_JobSingleTransfer_new(h_acc);
+ if (AB_Job_CheckAvailability(job)) {
+ printf("gnc_hbci_trans_dialog_enqueue: Oops, job not available. Aborting.\n");
+ return NULL;
+ }
AB_JobSingleTransfer_SetTransaction(job, td->hbci_trans);
/* Make really sure there is no other job in the queue */
Index: gnc-hbci-getbalance.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-getbalance.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -Lsrc/import-export/hbci/gnc-hbci-getbalance.c -Lsrc/import-export/hbci/gnc-hbci-getbalance.c -u -r1.24 -r1.25
--- src/import-export/hbci/gnc-hbci-getbalance.c
+++ src/import-export/hbci/gnc-hbci-getbalance.c
@@ -89,7 +89,7 @@
AB_JOB *job;
job = AB_JobGetBalance_new((AB_ACCOUNT*)h_acc);
- if (!AB_Job_CheckAvailability(job)) {
+ if (AB_Job_CheckAvailability(job)) {
printf("gnc_hbci_getbalance: JobGetBalance not avaiable for this account.\n");
/* FIXME: free unneeded data */
return;
Index: hbci.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/glade/hbci.glade,v
retrieving revision 1.33
retrieving revision 1.34
diff -Lsrc/import-export/hbci/glade/hbci.glade -Lsrc/import-export/hbci/glade/hbci.glade -u -r1.33 -r1.34
--- src/import-export/hbci/glade/hbci.glade
+++ src/import-export/hbci/glade/hbci.glade
@@ -760,30 +760,6 @@
</widget>
<widget>
- <class>GtkEntry</class>
- <name>purpose_entry</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>27</text_max_length>
- <text></text>
- <child>
- <left_attach>0</left_attach>
- <right_attach>3</right_attach>
- <top_attach>11</top_attach>
- <bottom_attach>12</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
<class>GtkLabel</class>
<name>label8877435</name>
<label>Payment Purpose continued</label>
@@ -810,30 +786,6 @@
</widget>
<widget>
- <class>GtkEntry</class>
- <name>purpose_cont_entry</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>27</text_max_length>
- <text></text>
- <child>
- <left_attach>0</left_attach>
- <right_attach>3</right_attach>
- <top_attach>13</top_attach>
- <bottom_attach>14</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
<class>GtkLabel</class>
<name>orig_name_heading</name>
<label>Originator Name</label>
@@ -1315,6 +1267,102 @@
<yfill>True</yfill>
</child>
</widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>purpose_entry</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>27</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>11</top_attach>
+ <bottom_attach>12</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>purpose_cont2_entry</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>27</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>13</top_attach>
+ <bottom_attach>14</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>purpose_cont_entry</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>27</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>11</top_attach>
+ <bottom_attach>12</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>purpose_cont3_entry</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>27</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>13</top_attach>
+ <bottom_attach>14</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
</widget>
</widget>
</widget>
More information about the gnucash-changes
mailing list