[Gnucash-changes] More HBCI work.
Christian Stimming
cstim at cvs.gnucash.org
Sun Sep 19 10:41:51 EDT 2004
Log Message:
-----------
More HBCI work.
Modified Files:
--------------
gnucash/src/import-export/hbci:
dialog-hbcitrans.c
hbci-interaction.c
Revision Data
-------------
Index: hbci-interaction.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/hbci-interaction.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -Lsrc/import-export/hbci/hbci-interaction.c -Lsrc/import-export/hbci/hbci-interaction.c -u -r1.40 -r1.41
--- src/import-export/hbci/hbci-interaction.c
+++ src/import-export/hbci/hbci-interaction.c
@@ -242,19 +242,20 @@
return 0;
}
-#if 0
void gnc__utf8ToLatin1(const char *utf, int outputlength, char *latin1);
void gnc__utf8ToLatin1(const char *utf, int outputlength, char *latin1)
{
- xmlCharEncodingHandlerPtr utf8ptr =
- xmlGetCharEncodingHandler(XML_CHAR_ENCODING_UTF8);
+/* xmlCharEncodingHandlerPtr utf8ptr = */
+/* xmlGetCharEncodingHandler(XML_CHAR_ENCODING_UTF8); */
+/* xmlCharEncodingInputFunc fromutf8 = utf8ptr->output; */
xmlCharEncodingHandlerPtr latin1ptr =
xmlGetCharEncodingHandler(XML_CHAR_ENCODING_8859_1);
xmlCharEncodingInputFunc intolatin1 = latin1ptr->input;
- xmlCharEncodingInputFunc fromutf8 = utf8ptr->output;
+ /* int i; */
+
+ intolatin1(latin1, outputlength, (char*)utf, strlen(utf));
}
-#endif
/********************************************************
* Now all the callback functions
@@ -275,7 +276,7 @@
int hideInput;
GWEN_BUFFER *buffer1, *buffer2;
int bufsize = 10+strlen(utf8text);
- const char *latin1text;
+ char *latin1text;
const char *latin1title;
g_assert(ab);
@@ -292,7 +293,9 @@
/* AB_ImExporter_Utf8ToDta (title, bufsize, buffer1); */
/* AB_ImExporter_Utf8ToDta (text, bufsize, buffer2); */
latin1title = GWEN_Buffer_GetStart (buffer1);
- latin1text = GWEN_Buffer_GetStart (buffer2);
+
+ latin1text = g_strdup(GWEN_Buffer_GetStart (buffer2));
+/* gnc__utf8ToLatin1(GWEN_Buffer_GetStart (buffer2), strlen(utf8text), latin1text); */
newPin = (flags | AB_BANKING_INPUT_FLAGS_CONFIRM) == 0;
/* printf("inputBoxCB: Requesting newPind: %s\n", newPin ? "true" : "false"); */
@@ -353,6 +356,7 @@
}
else
g_free (memset (passwd, 0, strlen (passwd)));
+ g_free(latin1text);
GWEN_Buffer_free (buffer1);
GWEN_Buffer_free (buffer2);
return 0;
@@ -360,6 +364,7 @@
}
/* User wanted to abort. */
+ g_free(latin1text);
GWEN_Buffer_free (buffer1);
GWEN_Buffer_free (buffer2);
return 1;
Index: dialog-hbcitrans.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/dialog-hbcitrans.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -Lsrc/import-export/hbci/dialog-hbcitrans.c -Lsrc/import-export/hbci/dialog-hbcitrans.c -u -r1.37 -r1.38
--- src/import-export/hbci/dialog-hbcitrans.c
+++ src/import-export/hbci/dialog-hbcitrans.c
@@ -521,7 +521,7 @@
AB_Transaction_SetLocalBankCode (trans,
AB_Account_GetBankCode (h_acc));
AB_Transaction_SetLocalAccountNumber (trans, AB_Account_GetAccountNumber (h_acc));
- AB_Transaction_SetLocalCountryCode (trans, 280);
+ AB_Transaction_SetLocalCountry (trans, "DE");
AB_Transaction_SetRemoteBankCode
(trans, gtk_entry_get_text (GTK_ENTRY (td->recp_bankcode_entry)));
@@ -531,7 +531,7 @@
(trans, gtk_entry_get_text (GTK_ENTRY (td->recp_account_entry)));
/* printf("Got otherAccountId %s.\n",
AB_Transaction_otherAccountId (trans)); */
- AB_Transaction_SetRemoteCountryCode (trans, 280);
+ AB_Transaction_SetRemoteCountry (trans, "DE");
AB_Transaction_AddRemoteName
(trans, gtk_entry_get_text (GTK_ENTRY (td->recp_name_entry)), FALSE);
More information about the gnucash-changes
mailing list