More openhbci2 work.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9828 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming
2004-02-07 11:08:08 +00:00
parent 1f8faa860d
commit ceaa55b937
+13 -16
View File
@@ -194,6 +194,15 @@ void GNCInteractor_reparent (GNCInteractor *i, GtkWidget *new_parent)
/******************************************************** /********************************************************
* Now all the callback functions * Now all the callback functions
*/ */
static const char *username_from_user(const HBCI_User *user)
{
return (user ?
(HBCI_User_name (user) ? HBCI_User_name (user) :
(HBCI_User_userId (user) ? HBCI_User_userId (user) :
_("Unknown"))) :
_("Newly created user"));
}
static int msgInputPin(const HBCI_User *user, static int msgInputPin(const HBCI_User *user,
char **pinbuf, char **pinbuf,
int minsize, int minsize,
@@ -207,10 +216,7 @@ static int msgInputPin(const HBCI_User *user,
g_assert(data); g_assert(data);
while (TRUE) { while (TRUE) {
const char *username = const char *username = username_from_user(user);
(HBCI_User_name (user) ? HBCI_User_name (user) :
(HBCI_User_userId (user) ? HBCI_User_userId (user) :
_("Unknown")));
g_assert (username); g_assert (username);
if (newPin) { if (newPin) {
@@ -331,10 +337,7 @@ static int msgInsertMediumOrAbort(const HBCI_User *user,
g_assert(data); g_assert(data);
if (user != NULL) { if (user != NULL) {
const char *username = const char *username = username_from_user(user);
(HBCI_User_name (user) ? HBCI_User_name (user) :
(HBCI_User_userId (user) ? HBCI_User_userId (user) :
_("Unknown")));
b = HBCI_User_bank (user); b = HBCI_User_bank (user);
switch (mtype) switch (mtype)
{ {
@@ -407,10 +410,7 @@ static int msgInsertCorrectMediumOrAbort(const HBCI_User *user,
g_assert(data); g_assert(data);
if (user != NULL) { if (user != NULL) {
const char *username = const char *username = username_from_user(user);
(HBCI_User_name (user) ? HBCI_User_name (user) :
(HBCI_User_userId (user) ? HBCI_User_userId (user) :
_("Unknown")));
b = HBCI_User_bank (user); b = HBCI_User_bank (user);
switch (mtype) switch (mtype)
{ {
@@ -527,10 +527,7 @@ msgStartInputPinViaKeypadCB(const HBCI_User *user, void *user_data)
/* Create message string */ /* Create message string */
if (user != NULL) { if (user != NULL) {
const char *username = const char *username = username_from_user(user);
(HBCI_User_name (user) ? HBCI_User_name (user) :
(HBCI_User_userId (user) ? HBCI_User_userId (user) :
_("Unknown")));
bank = HBCI_User_bank (user); bank = HBCI_User_bank (user);
if (bank != NULL) { if (bank != NULL) {
/* xgettext:c-format */ /* xgettext:c-format */