From 4fa0476da496ec65db880faded2668459f5b8736 Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Sat, 25 Sep 2004 08:08:49 +0000 Subject: [PATCH] More HBCI work. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10269 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/import-export/hbci/dialog-pass.c | 4 +++- src/import-export/hbci/dialog-pass.h | 3 ++- src/import-export/hbci/hbci-interaction.c | 3 ++- src/import-export/hbci/hbci-interactionP.h | 19 ++++++++++--------- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/import-export/hbci/dialog-pass.c b/src/import-export/hbci/dialog-pass.c index 9b5649a478..8928d8a2dc 100644 --- a/src/import-export/hbci/dialog-pass.c +++ b/src/import-export/hbci/dialog-pass.c @@ -34,7 +34,8 @@ gnc_hbci_get_password (GtkWidget *parent, const char *windowtitle, const char *heading, const char *initial_password, - char **password) + char **password, + gboolean hide_input) { GtkWidget *dialog; GtkWidget *heading_label; @@ -68,6 +69,7 @@ gnc_hbci_get_password (GtkWidget *parent, if (initial_password) gtk_entry_set_text (GTK_ENTRY (password_entry), initial_password); + gtk_entry_set_visibility (GTK_ENTRY (password_entry), !hide_input); gtk_widget_grab_focus (password_entry); diff --git a/src/import-export/hbci/dialog-pass.h b/src/import-export/hbci/dialog-pass.h index 8ec4211bb9..dc28d56aba 100644 --- a/src/import-export/hbci/dialog-pass.h +++ b/src/import-export/hbci/dialog-pass.h @@ -30,7 +30,8 @@ gnc_hbci_get_password (GtkWidget *parent, const char *windowtitle, const char *heading, const char *initial_password, - char **password); + char **password, + gboolean hide_input); gboolean gnc_hbci_get_initial_password (GtkWidget *parent, const char *windowtitle, diff --git a/src/import-export/hbci/hbci-interaction.c b/src/import-export/hbci/hbci-interaction.c index 2d63f89dbc..244d956338 100644 --- a/src/import-export/hbci/hbci-interaction.c +++ b/src/import-export/hbci/hbci-interaction.c @@ -331,7 +331,8 @@ static int inputBoxCB(AB_BANKING *ab, latin1title, latin1text, NULL, - &passwd); + &passwd, + hideInput); } /* user == data->user */ } /* newPin */ diff --git a/src/import-export/hbci/hbci-interactionP.h b/src/import-export/hbci/hbci-interactionP.h index 33d5531d83..f6840a4f33 100644 --- a/src/import-export/hbci/hbci-interactionP.h +++ b/src/import-export/hbci/hbci-interactionP.h @@ -26,6 +26,7 @@ #include #include +#include typedef enum { @@ -45,6 +46,7 @@ struct _inter_data GtkWidget *job_entry; GtkWidget *action_entry; GtkWidget *action_progress; + /* Counters for progress bar */ double action_max; /* Log window */ @@ -58,20 +60,14 @@ struct _inter_data const char *format_pin_user_bank; const char *format_pin_min_char; - /* PinKeypad dialog, if used */ - GtkWidget *pin_keypad_dialog; - + /* The iconv handler for utf8 -> latin1 conversion */ + iconv_t gnc_iconv_handler; + /* Flags to keep track on whether an HBCI action is running or not. */ gboolean keepAlive; PMon_state state; - /* Counters for progress bar */ - int jobs; - int current_job; - int actions; - int current_act; - /* Flag on Whether the PIN should be cached. */ gboolean cache_pin; /* The cached PIN and the HBCI_User it's cached for. */ @@ -92,4 +88,9 @@ void delete_GNCInteractor (GNCInteractor *data); void gnc_hbci_add_callbacks(AB_BANKING *ba, GNCInteractor *data); +/* Performs the full conversion from the (aaarg) utf8-combi-texts + passed from aqbanking into a "latin1-normal-text" format for + us. The returned string is owned by the caller. */ +gchar *gnc_hbci_utf8ToLatin1(GNCInteractor *data, const char *utf); + #endif