More HBCI work.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10266 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2004-09-19 14:41:50 +00:00
parent 0cdf0a55d8
commit b986f2e2d8
2 changed files with 14 additions and 9 deletions

View File

@ -521,7 +521,7 @@ hbci_trans_fill_values(const AB_ACCOUNT *h_acc, HBCITransDialog *td)
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 @@ hbci_trans_fill_values(const AB_ACCOUNT *h_acc, HBCITransDialog *td)
(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);

View File

@ -242,19 +242,20 @@ static int gnc__extractText(const char *text, GWEN_BUFFER *tbuf) {
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 @@ static int inputBoxCB(AB_BANKING *ab,
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 @@ static int inputBoxCB(AB_BANKING *ab,
/* 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 @@ static int inputBoxCB(AB_BANKING *ab,
}
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 @@ static int inputBoxCB(AB_BANKING *ab,
}
/* User wanted to abort. */
g_free(latin1text);
GWEN_Buffer_free (buffer1);
GWEN_Buffer_free (buffer2);
return 1;