2002-10-27 Christian Stimming <stimming@tuhh.de>

* src/import-export/hbci/*.c: add #include config.h for correct
	i18n.

	* src/app-utils/prefs.scm, src/import-export/hbci/hbci.scm: Move
	preference creation into hbci module. Renamed that preference tab
	into "Online Banking & Importing".


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7406 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2002-10-27 22:11:35 +00:00
parent 65a4e06b07
commit 051a2bf798
10 changed files with 41 additions and 48 deletions

View File

@ -1,5 +1,12 @@
2002-10-27 Christian Stimming <stimming@tuhh.de> 2002-10-27 Christian Stimming <stimming@tuhh.de>
* src/import-export/hbci/*.c: add #include config.h for correct
i18n.
* src/app-utils/prefs.scm, src/import-export/hbci/hbci.scm: Move
preference creation into hbci module. Renamed that preference tab
into "Online Banking & Importing".
* src/import-export/hbci/*: Add Direct Debit HBCI action. More * src/import-export/hbci/*: Add Direct Debit HBCI action. More
work on error handling and user feedback. Make the caching of the work on error handling and user feedback. Make the caching of the
PIN a user preference. PIN a user preference.

View File

@ -521,16 +521,10 @@ without one.")
(gnc:register-configuration-option (gnc:register-configuration-option
(gnc:make-simple-boolean-option (gnc:make-simple-boolean-option
(N_ "Importing/Online") (N_ "QIF Verbose documentation") (N_ "Online Banking & Importing") (N_ "QIF Verbose documentation")
"a" (N_ "Show some documentation-only pages in QIF Import druid") "a" (N_ "Show some documentation-only pages in QIF Import druid")
#t)) #t))
(gnc:register-configuration-option
(gnc:make-simple-boolean-option
(N_ "Importing/Online") (N_ "HBCI Remember PIN in memory")
"b" (N_ "Remember the PIN for HBCI in memory during a session")
#f))
;; Network/security options ;; Network/security options
(gnc:register-configuration-option (gnc:register-configuration-option

View File

@ -20,6 +20,7 @@
* Boston, MA 02111-1307, USA gnu@gnu.org * * Boston, MA 02111-1307, USA gnu@gnu.org *
\********************************************************************/ \********************************************************************/
#include "config.h"
#include "gnc-hbci-gettrans.h" #include "gnc-hbci-gettrans.h"
#include <openhbci/api.h> #include <openhbci/api.h>

View File

@ -20,6 +20,7 @@
* Boston, MA 02111-1307, USA gnu@gnu.org * * Boston, MA 02111-1307, USA gnu@gnu.org *
\********************************************************************/ \********************************************************************/
#include "config.h"
#include "gnc-hbci-transfer.h" #include "gnc-hbci-transfer.h"
#include <openhbci/api.h> #include <openhbci/api.h>

View File

@ -20,6 +20,7 @@
* Boston, MA 02111-1307, USA gnu@gnu.org * * Boston, MA 02111-1307, USA gnu@gnu.org *
\********************************************************************/ \********************************************************************/
#include "config.h"
#include "gnc-hbci-utils.h" #include "gnc-hbci-utils.h"
#include <gnome.h> #include <gnome.h>

View File

@ -5,6 +5,7 @@
* Copyright (c) 2002 Christian <stimming@tuhh.de> * Copyright (c) 2002 Christian <stimming@tuhh.de>
*********************************************************************/ *********************************************************************/
#include "config.h"
#include <stdio.h> #include <stdio.h>
#include <guile/gh.h> #include <guile/gh.h>
#include <glib.h> #include <glib.h>
@ -15,7 +16,6 @@
#include "gnc-hbci-cb.h" #include "gnc-hbci-cb.h"
#include "druid-hbci-initial.h" #include "druid-hbci-initial.h"
//#include "druid-hbci-final.h"
/* version of the gnc module system interface we require */ /* version of the gnc module system interface we require */
int libgncmod_hbci_LTX_gnc_module_system_interface = 0; int libgncmod_hbci_LTX_gnc_module_system_interface = 0;

View File

@ -20,6 +20,8 @@
* * * *
***************************************************************************/ ***************************************************************************/
#include "config.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <locale.h> #include <locale.h>
@ -36,6 +38,8 @@
#include "dialog-pass.h" #include "dialog-pass.h"
#define PREF_TAB_ONLINE_BANKING "Online Banking & Importing"
/** Adds the interactor and progressmonitor classes to the api. */ /** Adds the interactor and progressmonitor classes to the api. */
GNCInteractor *gnc_hbci_api_interactors (HBCI_API *api, GtkWidget *parent) GNCInteractor *gnc_hbci_api_interactors (HBCI_API *api, GtkWidget *parent)
@ -46,12 +50,10 @@ GNCInteractor *gnc_hbci_api_interactors (HBCI_API *api, GtkWidget *parent)
data->parent = parent; data->parent = parent;
data->keepAlive = TRUE; data->keepAlive = TRUE;
data->cache_pin = data->cache_pin =
gnc_lookup_boolean_option("Importing/Online", gnc_lookup_boolean_option(PREF_TAB_ONLINE_BANKING,
"HBCI Remember PIN in memory", "HBCI Remember PIN in memory",
FALSE); FALSE);
/* setlocale (LC_ALL, ""); */
// set HBCI_Interactor // set HBCI_Interactor
HBCI_Hbci_setInteractor(HBCI_API_Hbci(api), HBCI_Hbci_setInteractor(HBCI_API_Hbci(api),
gnc_hbci_new_interactor(data), TRUE); gnc_hbci_new_interactor(data), TRUE);
@ -69,7 +71,7 @@ gboolean GNCInteractor_aborted(const GNCInteractor *i)
void GNCInteractor_show(GNCInteractor *i) void GNCInteractor_show(GNCInteractor *i)
{ {
gboolean cache_pin = gboolean cache_pin =
gnc_lookup_boolean_option("Importing/Online", gnc_lookup_boolean_option(PREF_TAB_ONLINE_BANKING,
"HBCI Remember PIN in memory", "HBCI Remember PIN in memory",
FALSE); FALSE);
g_assert(i); g_assert(i);
@ -137,10 +139,9 @@ static int msgInputPin(const HBCI_User *user,
bank = HBCI_User_bank (user); bank = HBCI_User_bank (user);
if (bank != NULL) { if (bank != NULL) {
/* xgettext:c-format */ /* xgettext:c-format */
const char *format = _("Please enter and confirm new PIN for \n" msgstr = g_strdup_printf (_("Please enter and confirm new PIN for \n"
"user '%s' at bank '%s',\n" "user '%s' at bank '%s',\n"
"with at least %d characters."); "with at least %d characters."),
msgstr = g_strdup_printf (format,
username, username,
HBCI_Bank_bankCode(bank), HBCI_Bank_bankCode(bank),
minsize); minsize);
@ -174,15 +175,16 @@ static int msgInputPin(const HBCI_User *user,
if (user != NULL) { if (user != NULL) {
bank = HBCI_User_bank (user); bank = HBCI_User_bank (user);
if (bank != NULL) { if (bank != NULL) {
msgstr = g_strdup_printf ( data->format_pin_user_bank, /* xgettext:c-format */
msgstr = g_strdup_printf (_("Please enter PIN for \n"
"user '%s' at bank '%s'."),
username, username,
HBCI_Bank_bankCode(bank)); HBCI_Bank_bankCode(bank));
} }
else { else {
/* xgettext:c-format */ /* xgettext:c-format */
const char *format = _("Please enter PIN for \n" msgstr = g_strdup_printf ( _("Please enter PIN for \n"
"user '%s' at unknown bank."); "user '%s' at unknown bank."),
msgstr = g_strdup_printf ( format,
username); username);
} }
} }
@ -203,7 +205,10 @@ static int msgInputPin(const HBCI_User *user,
if (strlen(passwd) < minsize) { if (strlen(passwd) < minsize) {
gboolean retval; gboolean retval;
char *msg = g_strdup_printf (data->format_pin_min_char, minsize); char *msg =
g_strdup_printf ( _("The PIN needs to be at least %d characters \n"
"long. Do you want to try again?"),
minsize);
retval = gnc_verify_dialog_parented (GTK_WIDGET (data->parent), retval = gnc_verify_dialog_parented (GTK_WIDGET (data->parent),
TRUE, TRUE,
msg); msg);
@ -360,17 +365,5 @@ gnc_hbci_new_interactor(GNCInteractor *data)
&keepAlive, &keepAlive,
data); data);
/* setlocale (LC_ALL, ""); */
/* xgettext:c-format */
data->format_pin_user_bank = _("Please enter PIN for \n"
"user '%s' at bank '%s'.");
/* xgettext:c-format */
data->format_pin_min_char = _("The PIN needs to be at least %d characters \n"
"long. Do you want to try again?");
return HBCI_InteractorCB_Interactor(inter); return HBCI_InteractorCB_Interactor(inter);
} }

View File

@ -20,6 +20,7 @@
* * * *
***************************************************************************/ ***************************************************************************/
#include "config.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "hbci-interaction.h" #include "hbci-interaction.h"

View File

@ -16,6 +16,7 @@
(lambda () (lambda ()
(gnc:hbci-initial-setup)))) (gnc:hbci-initial-setup))))
; (gnc:add-extension ; (gnc:add-extension
; (gnc:make-menu "Online" (list gnc:window-name-register "Actions" ""))) ; (gnc:make-menu "Online" (list gnc:window-name-register "Actions" "")))
@ -25,19 +26,13 @@
; (list gnc:window-name-register "Actions" "Online" "") ; (list gnc:window-name-register "Actions" "Online" "")
; (lambda () ; (lambda ()
; (gnc:hbci-initial-setup)))) ; (gnc:hbci-initial-setup))))
; (gnc:add-extension
; (gnc:make-menu-item (N_ "Get Transactions")
; (N_ "Get Transactions")
; (list gnc:window-name-register "Actions" "Online" "")
; (lambda ()
; (gnc:hbci-initial-setup))))
) )
; (gnc:add-extension
; (gnc:make-menu-item (N_ "Final HBCI Setup")
; (N_ "Finish the HBCI Setup")
; (list gnc:window-name-main "Tools" "HBCI" "")
; (lambda ()
; (gnc:hbci-finish-setup)))))
(gnc:hook-add-dangler gnc:*ui-startup-hook* add-hbci-menu-items) (gnc:hook-add-dangler gnc:*ui-startup-hook* add-hbci-menu-items)
;; Register Preferences
(gnc:register-configuration-option
(gnc:make-simple-boolean-option
(N_ "Online Banking & Importing") (N_ "HBCI Remember PIN in memory")
"b" (N_ "Remember the PIN for HBCI in memory during a session")
#f))

View File

@ -1887,7 +1887,7 @@ gnc_ui_qif_import_druid_make(void) {
retval->commodity_pages = NULL; retval->commodity_pages = NULL;
retval->show_doc_pages = retval->show_doc_pages =
gnc_lookup_boolean_option("Importing/Online", gnc_lookup_boolean_option("Online Banking & Importing",
"QIF Verbose documentation", "QIF Verbose documentation",
TRUE); TRUE);