[Gnucash-changes] Sync the g2 branch with the gnome2-merge-11 tag.

David Hampton hampton at cvs.gnucash.org
Thu Dec 30 16:37:59 EST 2004


Log Message:
-----------
Sync the g2 branch with the gnome2-merge-11 tag. (2004-12-30)

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash:
        ChangeLog
        GNOME2_STATUS
        Makefile.am
        README
        configure.in
    gnucash/doc:
        README.HBCI
    gnucash/macros:
        autogen.sh
    gnucash/po:
        POTFILES.in
        fr.po
    gnucash/src/app-utils:
        file-utils.c
        gnc-exp-parser.c
        option-util.c
    gnucash/src/app-utils/test:
        test-scm-query-string.c
    gnucash/src/backend/file:
        io-gncbin-r.c
        io-utils.c
        sixtp-dom-parsers.c
    gnucash/src/business/business-core:
        gncAddress.c
        gncAddress.h
        gncBillTerm.c
        gncCustomer.c
        gncCustomer.h
        gncEntry.h
        gncInvoice.c
        gncInvoice.h
        gncJob.h
        gncOrder.c
        gncTaxTable.c
        gncTaxTable.h
    gnucash/src/business/business-gnome:
        dialog-date-close.c
        dialog-date-close.h
        dialog-invoice.c
        dialog-vendor.c
    gnucash/src/business/business-gnome/glade:
        date-close.glade
    gnucash/src/business/business-ledger:
        Makefile.am
    gnucash/src/business/business-reports:
        Makefile.am
        business-reports.scm
    gnucash/src/business/business-utils:
        business-prefs.scm
        business-utils.scm
    gnucash/src/doc:
        doxygen.cfg.in
    gnucash/src/engine:
        Account.c
        Account.h
        Makefile.am
        cap-gains.c
        gnc-commodity.c
        gnc-lot.c
        gnc-numeric.c
        gnc-numeric.h
        gnc-pricedb.c
        gnc-trace.c
        gw-engine-spec.scm
        iso-4217-currencies.scm
        qofquerycore.c
    gnucash/src/engine/test:
        Makefile.am
        test-numeric.c
        test-transaction-reversal.c
    gnucash/src/engine/test-core:
        test-engine-stuff.c
    gnucash/src/gnome:
        Makefile.am
        dialog-find-transactions.c
        dialog-scheduledxaction.c
        dialog-sx-from-trans.c
        dialog-sxsincelast.c
        dialog-tax-info.c
        druid-hierarchy.c
        druid-hierarchy.h
        druid-loan.c
        gnc-plugin-page-account-tree.c
        window-main.c
        window-reconcile.c
        window-register.c
    gnucash/src/gnome/glade:
        Makefile.am
        register.glade
    gnucash/src/gnome/ui:
        gnc-plugin-page-account-tree-ui.xml
    gnucash/src/gnome-search:
        dialog-search.h
    gnucash/src/gnome-utils:
        dialog-account.c
        dialog-commodity.c
        gnc-mdi-utils.c
        gnc-query-list.c
    gnucash/src/import-export:
        import-backend.c
        import-match-map.c
    gnucash/src/import-export/hbci:
        Makefile.am
        dialog-hbcitrans.c
        dialog-hbcitrans.h
        dialog-pass.c
        dialog-pass.h
        druid-hbci-initial.c
        druid-hbci-utils.c
        druid-hbci-utils.h
        gnc-hbci-getbalance.c
        gnc-hbci-getbalance.h
        gnc-hbci-gettrans.c
        gnc-hbci-gettrans.h
        gnc-hbci-kvp.c
        gnc-hbci-kvp.h
        gnc-hbci-transfer.c
        gnc-hbci-transfer.h
        gnc-hbci-utils.c
        gnc-hbci-utils.h
        gncmod-hbci.c
        hbci-interaction.c
        hbci-interaction.h
        hbci-interactionP.h
    gnucash/src/import-export/hbci/glade:
        hbci.glade
    gnucash/src/import-export/ofx:
        gnc-ofx-import.c
    gnucash/src/import-export/ofx/test:
        test-link.c
    gnucash/src/import-export/qif:
        qif-parse.c
    gnucash/src/import-export/qif-import:
        qif-objects.scm
    gnucash/src/register/ledger-core:
        split-register-control.c
    gnucash/src/register/register-gnome:
        formulacell-gnome.c
    gnucash/src/report/locale-specific/us:
        taxtxf.scm
    gnucash/src/report/report-gnome:
        dialog-column-view.h
        window-report.c
    gnucash/src/report/stylesheets:
        Makefile.am
        stylesheets.scm
    gnucash/src/scm:
        main-window.scm
        main.scm
    gnucash/src/test-core:
        test-stuff.c

Added Files:
-----------
    gnucash/macros:
        aqbanking.m4
    gnucash/src/business/business-reports:
        easy-invoice.scm
    gnucash/src/engine:
        qof_book_merge.c
        qof_book_merge.h
    gnucash/src/engine/test:
        test-book-merge.c
    gnucash/src/gnome:
        druid-merge.c
        druid-merge.h
    gnucash/src/gnome/glade:
        merge.glade
    gnucash/src/report/stylesheets:
        stylesheet-easy.scm

Removed Files:
-------------
    gnucash/macros:
        openhbci2.m4
    gnucash/src/import-export/hbci:
        gnc-hbci-account.c
        gnc-hbci-account.h
        hbci-progressmon.c

Revision Data
-------------
Index: druid-hbci-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/druid-hbci-utils.c,v
retrieving revision 1.5.4.4
retrieving revision 1.5.4.5
diff -Lsrc/import-export/hbci/druid-hbci-utils.c -Lsrc/import-export/hbci/druid-hbci-utils.c -u -r1.5.4.4 -r1.5.4.5
--- src/import-export/hbci/druid-hbci-utils.c
+++ src/import-export/hbci/druid-hbci-utils.c
@@ -45,10 +45,6 @@
 /* #include "gnc-gui-query.h" */
 /* #include "io-example-account.h" */
 /* #include "top-level.h" */
-#include <openhbci2/api.h>
-#include <openhbci2/outboxjob.h>
-#include <openhbci2/mediumrdhbase.h>
-#include <openhbci2/rsakey.h>
 
 #include "gnc-hbci-utils.h"
 
@@ -58,37 +54,39 @@
 static void
 accounts_save_kvp_cb (gpointer key, gpointer value, gpointer user_data)
 {
-  gnc_HBCI_Account *hbci_acc = key;
+  AB_ACCOUNT *hbci_acc = key;
   Account *gnc_acc = value;
   g_assert(hbci_acc);
   g_assert(gnc_acc);
 
-  if ((gnc_hbci_get_account_accountid(gnc_acc) == NULL ) ||
-      (strcmp (gnc_hbci_get_account_accountid(gnc_acc), 
-	       gnc_HBCI_Account_accountId (hbci_acc)) != 0))
-    gnc_hbci_set_account_accountid 
-      (gnc_acc, gnc_HBCI_Account_accountId (hbci_acc));
-
-  if ((gnc_hbci_get_account_bankcode(gnc_acc) == NULL) ||
-      (strcmp (gnc_hbci_get_account_bankcode(gnc_acc), 
-	       HBCI_Bank_bankCode (gnc_HBCI_Account_bank (hbci_acc))) != 0))
+  if (gnc_hbci_get_account_uid(gnc_acc) !=
+      AB_Account_GetUniqueId(hbci_acc))
+    gnc_hbci_set_account_uid
+      (gnc_acc, AB_Account_GetUniqueId(hbci_acc));
+
+  if (AB_Account_GetAccountNumber(hbci_acc) && 
+      ((gnc_hbci_get_account_accountid(gnc_acc) == NULL) ||
+       (strcmp(gnc_hbci_get_account_accountid(gnc_acc), 
+	       AB_Account_GetAccountNumber(hbci_acc)) != 0)))
+    gnc_hbci_set_account_accountid
+      (gnc_acc, AB_Account_GetAccountNumber(hbci_acc));
+
+  if (AB_Account_GetBankCode(hbci_acc) && 
+      ((gnc_hbci_get_account_bankcode(gnc_acc) == NULL) ||
+       (strcmp(gnc_hbci_get_account_bankcode(gnc_acc), 
+	       AB_Account_GetBankCode(hbci_acc)) != 0)))
     gnc_hbci_set_account_bankcode
-      (gnc_acc, HBCI_Bank_bankCode (gnc_HBCI_Account_bank (hbci_acc)));
-
-  if (gnc_hbci_get_account_countrycode(gnc_acc) !=
-      HBCI_Bank_country (gnc_HBCI_Account_bank (hbci_acc)))
-    gnc_hbci_set_account_countrycode
-      (gnc_acc, HBCI_Bank_country (gnc_HBCI_Account_bank (hbci_acc)));
+      (gnc_acc, AB_Account_GetBankCode(hbci_acc));
 }
 
 static gpointer accounts_clear_kvp (Account *gnc_acc, gpointer user_data)
 {
+  if (gnc_hbci_get_account_uid(gnc_acc))
+    gnc_hbci_set_account_uid (gnc_acc, 0);
   if (gnc_hbci_get_account_accountid(gnc_acc))
     gnc_hbci_set_account_accountid (gnc_acc, "");
   if (gnc_hbci_get_account_bankcode(gnc_acc))
     gnc_hbci_set_account_bankcode (gnc_acc, "");
-  if (gnc_hbci_get_account_countrycode(gnc_acc))
-    gnc_hbci_set_account_countrycode (gnc_acc, 0);
   return NULL;
 }
 
@@ -112,109 +110,18 @@
 
 
 
-static void 
-update_accounts_forbank (GtkWidget *parent, HBCI_API *api, 
-			 const HBCI_Bank *bank, 
-			 GNCInteractor *inter);
-static void 
-update_accounts_foruser (GtkWidget *parent, HBCI_API *api, 
-			 const HBCI_User *user, 
-			 GNCInteractor *inter);
-static gboolean
-update_accounts_forcustomer (GtkWidget *parent, HBCI_API *api, 
-			     const HBCI_Customer *cust, 
-			     GNCInteractor *inter);
-
-
 void
-update_accounts (GtkWidget *parent, HBCI_API *api, GNCInteractor *inter) 
+update_accounts (GtkWidget *parent, AB_BANKING *api, GNCInteractor *inter) 
 {
-  const list_HBCI_Bank *banklist;
-  list_HBCI_Bank_iter *begin;
   g_assert(api);
 
-  banklist = HBCI_API_bankList (api);
-  /*printf("%d banks found.\n", list_HBCI_Bank_size (banklist)); */
-  if (list_HBCI_Bank_size (banklist) == 0) {
-    /* Zero banks? nothing to do. */
-    return;
-  }
-  else if (list_HBCI_Bank_size (banklist) == 1) {
-    begin = list_HBCI_Bank_begin (banklist);
-    update_accounts_forbank (parent, api, 
-			     list_HBCI_Bank_iter_get (begin), inter);
-    list_HBCI_Bank_iter_delete (begin);
-  }
-  else {
-    printf("Sorry, multiple banks not yet supported.\n");
-  }
-}
-static void 
-update_accounts_forbank (GtkWidget *parent, HBCI_API *api, 
-			 const HBCI_Bank *bank, 
-			 GNCInteractor *inter)
-{
-  const list_HBCI_User *userlist;
-  const HBCI_User *user;
-  g_assert(bank);
-
-  userlist = HBCI_Bank_users (bank);
-  if (list_HBCI_User_size (userlist) == 0) {
-    printf("update_accounts_forbank: Oops, zero users found.\n");
-    /* Zero users? nothing to do. */
-    return;
-  }
-  user = choose_one_user (GNCInteractor_parent(inter), userlist);
-  update_accounts_foruser (parent, api, user, inter);
-}
-static void 
-update_accounts_foruser (GtkWidget *parent, HBCI_API *api, 
-			 const HBCI_User *user, 
-			 GNCInteractor *inter)
-{
-  const list_HBCI_Customer *customerlist;
-  const HBCI_Customer *customer;
-  g_assert(user);
-
-  customerlist = HBCI_User_customers (user);
-  if (list_HBCI_Customer_size (customerlist) == 0) {
-    printf("update_accounts_foruser: Oops, zero customers found.\n");
-    /* Zero customers? nothing to do. */
-    return;
-  }
-  customer = choose_one_customer (GNCInteractor_parent(inter), customerlist);
-  update_accounts_forcustomer (parent, api, customer, inter);
-}
-
-static gboolean
-update_accounts_forcustomer (GtkWidget *parent, HBCI_API *api, 
-			     const HBCI_Customer *cust, GNCInteractor *inter)
-{
-  HBCI_OutboxJob *job;
-  HBCI_Outbox *outbox;
-  gboolean result;
-  g_assert(cust);
-  
-  /* this const-warning is okay and can be ignored. */
-  job = HBCI_OutboxJob_new("JobGetAccounts", (HBCI_Customer *)cust, ""); 
-  outbox = HBCI_Outbox_new();
-  
-  HBCI_Outbox_addJob(outbox, job);
-  
-  /* Execute Outbox. */
-  result = gnc_hbci_api_execute (parent, api, outbox, job, inter);
-
-  HBCI_Outbox_delete (outbox);
-  return result;
 }
 
 
 
-
-
 struct hbci_acc_cb_data 
 {
-  HBCI_API *api;
+  AB_BANKING *api;
   GHashTable *hash;
 };
 
@@ -222,9 +129,9 @@
 gnc_hbci_new_hash_from_kvp_cb (Account *gnc_acc, gpointer user_data)
 {
   struct hbci_acc_cb_data *data = user_data;
-  gnc_HBCI_Account *hbci_acc = NULL;
+  AB_ACCOUNT *hbci_acc = NULL;
 
-  hbci_acc = (gnc_HBCI_Account *) gnc_hbci_get_hbci_acc (data->api, gnc_acc);
+  hbci_acc = (AB_ACCOUNT *) gnc_hbci_get_hbci_acc (data->api, gnc_acc);
   if (hbci_acc) {
     g_hash_table_insert (data->hash, hbci_acc, gnc_acc);
   }
@@ -232,7 +139,7 @@
 }
 
 GHashTable *
-gnc_hbci_new_hash_from_kvp (HBCI_API *api)
+gnc_hbci_new_hash_from_kvp (AB_BANKING *api)
 {
   GHashTable *hash;
 
@@ -286,301 +193,3 @@
 }
 
 
-
-GList *
-gnc_processOutboxResponse(HBCI_API *api, HBCI_Outbox *outbox, 
-			  GList *accountlist)
-{
-  GWEN_DB_NODE *response, *n;
-
-  g_assert(api);
-  g_assert(outbox);
-  /*g_assert(accountlist);*/
-  
-  response = HBCI_Outbox_response(outbox);
-
-  /*printf("gnc_processOutboxResponse: Complete response:\n");
-    GWEN_DB_Dump(response, stdout, 1);*/
-
-  n=GWEN_DB_GetFirstGroup(response);
-  while (n){
-    if (strcasecmp(GWEN_DB_GroupName(n), "AccountData")==0) {
-      /* found account data, create account */
-      const char *accountId;
-      const char *accountSubId;
-      const char *bankCode;
-      int country;
-      const char *custid;
-      const char *currency;
-      const char *acc_name;
-      const char *acc_name1;
-      /*list_HBCI_Customer *customers;*/
-      /*HBCI_User *user;*/
-      HBCI_Bank *bank;
-
-      country=GWEN_DB_GetIntValue(n, "country", 0, 280);
-      custid=GWEN_DB_GetCharValue(n, "customer", 0, "");
-      bankCode=GWEN_DB_GetCharValue(n, "bankcode", 0, "");
-      accountId=GWEN_DB_GetCharValue(n, "accountid", 0, "");
-      accountSubId=GWEN_DB_GetCharValue(n, "accountsubid", 0, "");
-      if (strlen(bankCode)==0 || strlen(accountId)==0 || strlen(custid)==0) {
-	printf("gnc_processOutboxResponse: AccountData without bank code/account id/customer id\n");
-	continue;
-      }
-
-      currency = GWEN_DB_GetCharValue(n, "currency", 0, NULL);
-      acc_name =  GWEN_DB_GetCharValue(n, "name", 0, NULL);
-      acc_name1 = GWEN_DB_GetCharValue(n, "name1", 0, NULL);
-
-      bank = HBCI_API_findBank(api, country, bankCode);
-      if (bank) {
-        /* bank uses a different bank code for the accounts, so find
-         * the matching bank for the given customer */
-        /*customers=getCustomers(country, "*", custid);
-	  if (customers.empty()) {
-          DBG_ERROR(0, "Unknown customer %d/%s/%s",
-	  country, bankCode.c_str(), custid.c_str());
-          GWEN_DB_Group_free(db);
-          return Error("AqMoneyAPI::processOutboxResponse",
-	  ERROR_LEVEL_NORMAL,
-	  HBCI_ERROR_CODE_UNKNOWN,
-	  ERROR_ADVISE_DONTKNOW,
-	  "Unknown customer");
-	  }
-	  if (customers.size()!=1) {
-          DBG_ERROR(0, "Ambiguous customer %d/%s/%s",
-	  country, bankCode.c_str(), custid.c_str());
-          GWEN_DB_Group_free(db);
-          return Error("AqMoneyAPI::processOutboxResponse",
-	  ERROR_LEVEL_NORMAL,
-	  HBCI_ERROR_CODE_UNKNOWN,
-	  ERROR_ADVISE_DONTKNOW,
-	  "Ambiguous customer");
-	  }
-	  user=customers.front().ref().user();
-	  bank=user.ref().bank();*/
-      }
-
-      
-      {
-	/* Check if such an account already exists */
-	gnc_HBCI_Account *acc = 
-	  list_HBCI_Account_find(accountlist, bank, bankCode, accountId);
-	
-	if (acc) {
-	  /* Update account information */
-	  printf("gnc_processOutboxResponse: Account %d/%s/%s already exists, updating.\n",
-		 country, bankCode, accountId);
-	}
-	else {
-	  /* Create new account object */
-	  acc = gnc_HBCI_Account_new(bank, bankCode, accountId);
-
-	  /* Add it to our internal list. */
-	  accountlist = g_list_append(accountlist, acc);
-
-	  printf("gnc_processOutboxResponse: Added account %d/%s/%s\n",
-		 country, bankCode, accountId);
-	}
-	gnc_HBCI_Account_set_currency(acc, currency);
-	gnc_HBCI_Account_set_name(acc, acc_name);
-	gnc_HBCI_Account_set_name1(acc, acc_name1);
-	gnc_HBCI_Account_set_customer(acc, custid);
-      }
-      
-
-    } /* if "AccountData" */
-    else if (strcasecmp(GWEN_DB_GroupName(n), "bankmsg")==0) {
-      /* add to existing bank messages */
-      /*GWEN_DB_AddGroup(_bankMessages, GWEN_DB_Group_dup(n));
-      fprintf(stderr, "------------------------------------\n");
-      fprintf(stderr,
-              "Message from \"%s\":\n",
-              GWEN_DB_GetCharValue(n, "bankCode", 0, "<unknown>"));
-      fprintf(stderr, "Subject: %s\n",
-              GWEN_DB_GetCharValue(n, "subject", 0, "<empty>"));
-      fprintf(stderr, "\n%s\n\n",
-      GWEN_DB_GetCharValue(n, "text", 0, "<empty>"));*/
-    }
-    n=GWEN_DB_GetNextGroup(n);
-  } /* while n */
-
-  GWEN_DB_Group_free(response);
-  //printf("gnc_processOutboxResponse: accountlist.size: %d\n", g_list_length(accountlist));
-  
-  return accountlist;
-}
-
-
-gboolean
-gnc_hbci_evaluate_GetKeys(HBCI_Outbox *outbox, HBCI_OutboxJob *job,
-			  HBCI_Customer *newcustomer)
-{
-  GWEN_DB_NODE *rsp;
-  GWEN_DB_NODE *n;
-  /*HBCI_Error *err;*/
-  HBCI_RSAKey *_cryptKey = NULL;
-  HBCI_RSAKey *_signKey = NULL;
-
-  g_assert(outbox);
-  g_assert(newcustomer);
-  
-  rsp = HBCI_Job_responseData(HBCI_OutboxJob_Job(job));
-  if (!rsp) {
-    fprintf(stderr, "JobGetKeys::evaluate: no response data\n");
-    return FALSE;
-  }
-
-  /*printf("JobGetKeys: Complete response:\n");
-    GWEN_DB_Dump(rsp, stderr, 1);*/
-
-  n=GWEN_DB_GetFirstGroup(rsp);
-  while(n) {
-    if (strcasecmp(GWEN_DB_GroupName(n), "GetKeyResponse")==0) {
-      unsigned int bs;
-      const void *p;
-      GWEN_DB_NODE *keydb;
-      const char defaultExpo[3]={0x01, 0x00, 0x01};
-      gboolean iscrypt;
-
-      //DBG_NOTICE(0, "Found Key response");
-      iscrypt=FALSE;
-
-      keydb=GWEN_DB_Group_new("key");
-      GWEN_DB_SetCharValue(keydb,
-                           GWEN_DB_FLAGS_OVERWRITE_VARS,
-                           "type",
-                           "RSA");
-      // TODO: check for the correct exponent (for now assume 65537)
-      GWEN_DB_SetBinValue(keydb,
-                          GWEN_DB_FLAGS_OVERWRITE_VARS,
-                          "data/e",
-                          defaultExpo,
-                          sizeof(defaultExpo));
-
-      GWEN_DB_SetIntValue(keydb,
-                          GWEN_DB_FLAGS_OVERWRITE_VARS,
-                          "data/public",
-                          1);
-
-      iscrypt=(strcasecmp(GWEN_DB_GetCharValue(n,
-                                               "keyname/keytype", 0,
-                                               "V"), "V")==0);
-      GWEN_DB_SetCharValue(keydb,
-                           GWEN_DB_FLAGS_OVERWRITE_VARS,
-                           "name",
-                           GWEN_DB_GetCharValue(n,
-                                                "keyname/keytype", 0,
-                                                "V"));
-      GWEN_DB_SetCharValue(keydb,
-                           GWEN_DB_FLAGS_OVERWRITE_VARS,
-                           "owner",
-                           GWEN_DB_GetCharValue(n, "keyname/userId", 0, ""));
-      GWEN_DB_SetIntValue(keydb,
-                          GWEN_DB_FLAGS_OVERWRITE_VARS,
-                          "number",
-                          GWEN_DB_GetIntValue(n, "keyname/keynum", 0, 0));
-      GWEN_DB_SetIntValue(keydb,
-                          GWEN_DB_FLAGS_OVERWRITE_VARS,
-                          "version",
-                          GWEN_DB_GetIntValue(n, "keyname/keyversion", 0, 0));
-
-
-      p=GWEN_DB_GetBinValue(n, "key/modulus", 0, 0, 0 , &bs);
-      if (!p || !bs) {
-	fprintf(stderr, "JobGetKeys::evaluate: no modulus\n");
-	return FALSE;
-      }
-      GWEN_DB_SetBinValue(keydb,
-			  GWEN_DB_FLAGS_OVERWRITE_VARS,
-                          "data/n",
-			  p, bs);
-
-      if (iscrypt)
-	_cryptKey = HBCI_RSAKey_new(iscrypt, keydb);
-      else
-	_signKey = HBCI_RSAKey_new(iscrypt, keydb);
-      fprintf(stderr, "gnc_hbci_evaluate_GetKeys: Created %s key\n", iscrypt?"crypt":"sign");
-    } // if we have a key response
-    n=GWEN_DB_GetNextGroup(n);
-  } // while
-
-  // Key creation finished. Now add them to the medium @§%$!!!
-
-  if (!_cryptKey) {
-    printf("gnc_hbci_evaluate_GetKeys: Oops, no cryptKey received.\n");
-    return FALSE;
-  }
-  
-  
-  {
-    HBCI_MediumRDHBase *mrdh;
-    HBCI_Medium *medium;
-    const HBCI_Bank *bank;
-    const HBCI_User *user;
-    HBCI_Error *err;
-
-    // get some vars
-    user = HBCI_Customer_user(newcustomer);
-    bank = HBCI_User_bank(user);
-    medium = (HBCI_Medium *) HBCI_User_medium(user);
-    mrdh = HBCI_Medium_MediumRDHBase (medium);
-
-    // mount medium
-    err = HBCI_Medium_mountMedium(medium, "");
-    if (err && !HBCI_Error_isOk(err)) {
-      fprintf(stderr, "JobGetKeys::commit: 1\n");
-      return FALSE;
-    }
-
-    // select context
-    err = HBCI_Medium_selectContext(medium, HBCI_Bank_country(bank),
-				    HBCI_Bank_bankCode(bank),
-				    HBCI_User_userId(user));
-    if (err && !HBCI_Error_isOk(err)) {
-      HBCI_Medium_unmountMedium(medium, "");
-      fprintf(stderr, "JobGetKeys::commit: 2\n");
-      return FALSE;
-    }
-
-    // set crypt key
-    if (_cryptKey) {
-      fprintf(stderr, "Setting Institute Crypt Key\n");
-      if (!HBCI_RSAKey_isCryptoKey(_cryptKey)) {
-	fprintf(stderr, "Crypt key expected\n");
-	return FALSE;
-      }
-      err = HBCI_MediumRDHBase_setInstituteCryptKey(mrdh, _cryptKey);
-      if (err && !HBCI_Error_isOk(err)) {
-	HBCI_Medium_unmountMedium(medium, "");
-	fprintf(stderr, "JobGetKeys::commit: 3\n");
-	return FALSE;
-      }
-    }
-
-    // set sign key
-    if (_signKey) {
-      fprintf(stderr, "Setting Institute Sign Key\n");
-      err=HBCI_MediumRDHBase_setInstituteSignKey(mrdh, _signKey);
-      if (err && !HBCI_Error_isOk(err)) {
-	HBCI_Medium_unmountMedium(medium, "");
-	fprintf(stderr, "JobGetKeys::commit: 4\n");
-	return FALSE;
-      }
-      if (!HBCI_MediumRDHBase_hasInstSignKey(mrdh)) {
-	fprintf(stderr, "What ??? I just set the signkey but there is none ?!\n");
-      }
-    }
-
-    err = HBCI_Medium_unmountMedium(medium, "");
-    if (err && !HBCI_Error_isOk(err)) {
-      fprintf(stderr, "JobGetKeys::commit: 5\n");
-      return FALSE;
-    }
-    fprintf(stderr, "New institute keys activated\n");
-  }
-  
-  // use result returned from lower class
-  return TRUE;
-}
-
Index: dialog-hbcitrans.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/dialog-hbcitrans.c,v
retrieving revision 1.9.4.9
retrieving revision 1.9.4.10
diff -Lsrc/import-export/hbci/dialog-hbcitrans.c -Lsrc/import-export/hbci/dialog-hbcitrans.c -u -r1.9.4.9 -r1.9.4.10
--- src/import-export/hbci/dialog-hbcitrans.c
+++ src/import-export/hbci/dialog-hbcitrans.c
@@ -27,8 +27,8 @@
 #endif
 
 #include <gnome.h>
-#include <openhbci2/bank.h>
-#include <openhbci2.h>
+#include <aqbanking/account.h>
+#include <aqbanking/jobsingletransfer.h>
 
 #include "dialog-utils.h"
 #include "gnc-ui.h"
@@ -65,6 +65,8 @@
   /* Purpose, description */
   GtkWidget *purpose_entry;
   GtkWidget *purpose_cont_entry;
+  GtkWidget *purpose_cont2_entry;
+  GtkWidget *purpose_cont3_entry;
 
   /* Recipient's bank name (may be filled in automatically sometime later) */
   GtkWidget *recp_bankname_label;
@@ -82,7 +84,7 @@
   gboolean templ_changed;
   
   /* The HBCI transaction that got created here */
-  HBCI_Transaction *hbci_trans;
+  AB_TRANSACTION *hbci_trans;
   
   /* The gnucash transaction dialog where the user specifies the gnucash transaction. */
   XferDialog *gnc_trans_dialog;
@@ -104,7 +106,7 @@
   if (td->gnc_trans_dialog)
     gnc_xfer_dialog_set_txn_cb(td->gnc_trans_dialog, NULL, NULL);
   if (td->hbci_trans)
-    HBCI_Transaction_delete (td->hbci_trans);
+    AB_Transaction_free (td->hbci_trans);
 
   td->selected_template = NULL;
     
@@ -124,7 +126,7 @@
   g_assert(td);
   return td->parent;
 }
-const HBCI_Transaction *gnc_hbci_dialog_get_htrans(const HBCITransDialog *td)
+const AB_TRANSACTION *gnc_hbci_dialog_get_htrans(const HBCITransDialog *td)
 {
   g_assert(td);
   return td->hbci_trans;
@@ -155,11 +157,11 @@
 /* Prototypes; callbacks for dialog function */
 /* -------------------------------------- */
 
-HBCI_Transaction *
-hbci_trans_fill_values(const gnc_HBCI_Account *h_acc, HBCITransDialog *td);
+AB_TRANSACTION *
+hbci_trans_fill_values(const AB_ACCOUNT *h_acc, HBCITransDialog *td);
 gboolean
 check_ktoblzcheck(GtkWidget *parent, const HBCITransDialog *td, 
-		  const HBCI_Transaction *trans);
+		  const AB_TRANSACTION *trans);
 
 void on_template_list_select_child(GtkList  *list, GtkWidget  *widget, gpointer  user_data);
 void on_template_list_selection_changed(GtkList *list, gpointer  user_data);
@@ -204,14 +206,13 @@
 
 HBCITransDialog *
 gnc_hbci_dialog_new (GtkWidget *parent,
-		const gnc_HBCI_Account *h_acc,
-		const HBCI_Customer *customer,
+		const AB_ACCOUNT *h_acc,
 		Account *gnc_acc,
 		GNC_HBCI_Transtype trans_type,
 		GList *templates)
 {
   GladeXML *xml;
-  const HBCI_Bank *bank;
+  const char *hbci_bankid, *hbci_bankname;
   HBCITransDialog *td;
 
   td = g_new0(HBCITransDialog, 1);
@@ -220,9 +221,8 @@
   td->templ = templates;
   td->trans_type = trans_type;
   g_assert (h_acc);
-  g_assert (customer);
-  bank = gnc_HBCI_Account_bank (h_acc);
-  g_assert (bank);
+  hbci_bankid = AB_Account_GetBankCode(h_acc);
+  hbci_bankname = AB_Account_GetBankName(h_acc);
 #if HAVE_KTOBLZCHECK_H
   td->blzcheck = AccountNumberCheck_new();
 #endif
@@ -278,6 +278,10 @@
     g_assert
       ((td->purpose_cont_entry = glade_xml_get_widget (xml, "purpose_cont_entry")) != NULL);
     g_assert
+      ((td->purpose_cont2_entry = glade_xml_get_widget (xml, "purpose_cont2_entry")) != NULL);
+    g_assert
+      ((td->purpose_cont3_entry = glade_xml_get_widget (xml, "purpose_cont3_entry")) != NULL);
+    g_assert
       ((orig_name_label = glade_xml_get_widget (xml, "orig_name_label")) != NULL);
     g_assert
       ((orig_account_label = glade_xml_get_widget (xml, "orig_account_label")) != NULL);
@@ -354,17 +358,15 @@
     
     /* Fill in the values from the objects */
     gtk_label_set_text (GTK_LABEL (orig_name_label), 
-			(strlen(HBCI_Customer_name (customer)) > 0 ?
-			 HBCI_Customer_name (customer) :
-			 HBCI_Customer_custId (customer)));
+			AB_Account_GetOwnerName (h_acc));
     gtk_label_set_text (GTK_LABEL (orig_account_label), 
-			gnc_HBCI_Account_accountId (h_acc));
+			AB_Account_GetAccountNumber (h_acc));
     gtk_label_set_text (GTK_LABEL (orig_bankname_label), 
-			(strlen(HBCI_Bank_name (bank))>0 ?
-			 HBCI_Bank_name (bank) :
+			(hbci_bankname && (strlen(hbci_bankname)>0) ?
+			 hbci_bankname :
 			 _("(unknown)")));
     gtk_label_set_text (GTK_LABEL (orig_bankcode_label), 
-			HBCI_Bank_bankCode (bank));
+			hbci_bankid);
 
     /* fill list for choosing a transaction template */
     g_list_foreach(td->templ, fill_template_list_func, 
@@ -418,11 +420,27 @@
  */
 
 int gnc_hbci_dialog_run_until_ok(HBCITransDialog *td, 
-				 const gnc_HBCI_Account *h_acc)
+				 const AB_ACCOUNT *h_acc)
 {
   gint result;
+  int max_purpose_lines;
   gboolean values_ok;
 
+  {
+    AB_JOB *job = AB_JobSingleTransfer_new((AB_ACCOUNT *)h_acc);
+    if (AB_Job_CheckAvailability(job)) {
+      printf("gnc_hbci_trans_dialog_enqueue: Oops, job not available. Aborting.\n");
+      return -1;
+    }
+    max_purpose_lines = AB_JobSingleTransfer_GetMaxPurposeLines(job);
+    /* these are the number of fields, 27 characters each. */
+    AB_Job_free(job);
+  }
+  /* gtk_widget_set_sensitive (GTK_WIDGET (td->purpose_entry), max_purpose_lines > 0); */
+  gtk_widget_set_sensitive (GTK_WIDGET (td->purpose_cont_entry), max_purpose_lines > 1);
+  gtk_widget_set_sensitive (GTK_WIDGET (td->purpose_cont2_entry), max_purpose_lines > 2);
+  gtk_widget_set_sensitive (GTK_WIDGET (td->purpose_cont3_entry), max_purpose_lines > 3);
+
   /* Repeat until entered values make sense */
   do {
 
@@ -445,13 +463,13 @@
     }
 
     /* Now fill in the values from the entry fields into a new
-       HBCI_Transaction. */
+       AB_TRANSACTION. */
     td->hbci_trans = hbci_trans_fill_values(h_acc, td);
     values_ok = TRUE;
 
     /*printf("dialog-hbcitrans: Got value as %s .\n", 
-      HBCI_Value_toReadableString (HBCI_Transaction_value (trans)));*/
-    if (HBCI_Value_getValue (HBCI_Transaction_value (td->hbci_trans)) == 0.0) {
+      AB_VALUE_toReadableString (AB_TRANSACTION_value (trans)));*/
+    if (AB_Value_GetValue (AB_Transaction_GetValue (td->hbci_trans)) == 0.0) {
       gtk_widget_show_all (td->dialog); 
       values_ok = !gnc_verify_dialog
 	(td->dialog,
@@ -464,7 +482,7 @@
 	   "This does not result in a valid online transfer job.\n"
 	   "Do you want to enter the job again?"));
       if (values_ok) {
-	HBCI_Transaction_delete (td->hbci_trans);
+	AB_Transaction_free (td->hbci_trans);
 	return -1;
       }
       continue;
@@ -473,7 +491,7 @@
     /* FIXME: If this is a direct debit, set the textkey/ "Textschluessel"/
        transactionCode according to some GUI selection here!! */
     /*if (td->trans_type == SINGLE_DEBITNOTE)
-      HBCI_Transaction_setTransactionCode (td->hbci_trans, 05);*/
+      AB_TRANSACTION_setTextKey (td->hbci_trans, 05);*/
 
     /* And finally check the account code, if ktoblzcheck is available. */
     values_ok = check_ktoblzcheck(GTK_WIDGET (td->dialog), td, td->hbci_trans);
@@ -484,62 +502,72 @@
 }
 
 
-/** Create a new HBCI_Transaction, fill the values from the entry
+/** Create a new AB_TRANSACTION, fill the values from the entry
     fields into it and return it. The caller must
-    HBCI_Transaction_delete() it when finished. */
-HBCI_Transaction *
-hbci_trans_fill_values(const gnc_HBCI_Account *h_acc, HBCITransDialog *td)
+    AB_TRANSACTION_free() it when finished. */
+AB_TRANSACTION *
+hbci_trans_fill_values(const AB_ACCOUNT *h_acc, HBCITransDialog *td)
 {
-  GWEN_DB_NODE *xnode = GWEN_DB_Group_new("transaction");
   /* Fill in the user-entered values */
-  HBCI_Transaction *trans = HBCI_Transaction_new(xnode);
+  AB_TRANSACTION *trans = AB_Transaction_new();
 	
   /* OpenHBCI newer than 0.9.8: use account's bankCode values
    * instead of the bank's ones since this is what some banks
    * require. */
-  HBCI_Transaction_setOurBankCode (trans, 
-				   gnc_HBCI_Account_bankCode (h_acc));
-  HBCI_Transaction_setOurAccountId (trans, gnc_HBCI_Account_accountId (h_acc));
+  AB_Transaction_SetLocalBankCode (trans, 
+				   AB_Account_GetBankCode (h_acc));
+  AB_Transaction_SetLocalAccountNumber (trans, AB_Account_GetAccountNumber (h_acc));
+  AB_Transaction_SetLocalCountry (trans, "DE");
 	
-  HBCI_Transaction_setOtherBankCode 
+  AB_Transaction_SetRemoteBankCode
     (trans, gtk_entry_get_text (GTK_ENTRY (td->recp_bankcode_entry)));
   /* printf("Got otherBankCode %s.\n",
-     HBCI_Transaction_otherBankCode (trans)); */
-  HBCI_Transaction_setOtherAccountId
+     AB_Transaction_otherBankCode (trans)); */
+  AB_Transaction_SetRemoteAccountNumber
     (trans, gtk_entry_get_text (GTK_ENTRY (td->recp_account_entry)));
   /* printf("Got otherAccountId %s.\n",
-     HBCI_Transaction_otherAccountId (trans)); */
-  HBCI_Transaction_addOtherName
-    (trans, gtk_entry_get_text (GTK_ENTRY (td->recp_name_entry)));
+     AB_Transaction_otherAccountId (trans)); */
+  AB_Transaction_SetRemoteCountry (trans, "DE");
+  AB_Transaction_AddRemoteName
+    (trans, gtk_entry_get_text (GTK_ENTRY (td->recp_name_entry)), FALSE);
 	
-  HBCI_Transaction_addDescription
-    (trans, gtk_entry_get_text (GTK_ENTRY (td->purpose_entry)));
-  HBCI_Transaction_addDescription
-    (trans, gtk_entry_get_text (GTK_ENTRY (td->purpose_cont_entry)));
+  /* The last argument means: If TRUE, then the string will be only be
+     appended if it doesn't exist yet. */
+  AB_Transaction_AddPurpose
+    (trans, gtk_entry_get_text (GTK_ENTRY (td->purpose_entry)), FALSE);
+  AB_Transaction_AddPurpose
+    (trans, gtk_entry_get_text (GTK_ENTRY (td->purpose_cont_entry)), FALSE);
+  AB_Transaction_AddPurpose
+    (trans, gtk_entry_get_text (GTK_ENTRY (td->purpose_cont2_entry)), FALSE);
+  AB_Transaction_AddPurpose
+    (trans, gtk_entry_get_text (GTK_ENTRY (td->purpose_cont3_entry)), FALSE);
 	
   /* FIXME: Replace "EUR" by account-dependent string here. */
-  HBCI_Transaction_setValue 
-    (trans, HBCI_Value_new_double 
+  AB_Transaction_SetValue 
+    (trans, AB_Value_new
      (gnc_amount_edit_get_damount (GNC_AMOUNT_EDIT (td->amount_edit)), "EUR"));
 
   /* If this is a direct debit, a textkey/ "Textschluessel"/
      transactionCode different from the default has to be set. */
   switch(td->trans_type) {
   case SINGLE_DEBITNOTE:
-    HBCI_Transaction_setTransactionCode (trans, 05);
+    /* AB_Transaction_SetTransactionCode (trans, 05); */
+    AB_Transaction_SetTextKey (trans, 05);
+    break;
   default:
-    HBCI_Transaction_setTransactionCode (trans, 51);
+    /* AB_Transaction_SetTransactionCode (trans, 51); */
+    AB_Transaction_SetTextKey (trans, 51);
   }
 
   return trans;
 }
 
-/** Checks the account code in the HBCI_Transaction, if the
+/** Checks the account code in the AB_TRANSACTION, if the
     ktoblzcheck package is available. Returns TRUE if everything is
     fine, or FALSE if this transaction should be entered again. */
 gboolean
 check_ktoblzcheck(GtkWidget *parent, const HBCITransDialog *td, 
-		  const HBCI_Transaction *trans)	
+		  const AB_TRANSACTION *trans)	
 {
 #if HAVE_KTOBLZCHECK_H
   int blzresult;
@@ -548,8 +576,8 @@
   
   blzresult = AccountNumberCheck_check
     (td->blzcheck, 
-     HBCI_Transaction_otherBankCode (trans),
-     HBCI_Transaction_otherAccountId (trans));
+     AB_Transaction_GetRemoteBankCode (trans),
+     AB_Transaction_GetRemoteAccountNumber (trans));
   switch (blzresult) {
   case 2:
     gtk_widget_show_all (parent); 
@@ -560,8 +588,8 @@
 	 "at the specified bank with bank code '%s' failed. This means \n"
 	 "the account number might contain an error. Should the online \n"
 	 "transfer job be sent with this account number anyway?"),
-       HBCI_Transaction_otherAccountId (trans),
-       HBCI_Transaction_otherBankCode (trans));
+       AB_Transaction_GetRemoteAccountNumber (trans),
+       AB_Transaction_GetRemoteBankCode (trans));
     blztext = "Kontonummer wahrscheinlich falsch";
     break;
   case 0:
@@ -584,73 +612,53 @@
 #endif    
 }
 
-HBCI_OutboxJob *
-gnc_hbci_trans_dialog_enqueue(HBCITransDialog *td, HBCI_API *api,
-			      HBCI_Outbox *outbox,
-			      const HBCI_Customer *customer, 
-			      gnc_HBCI_Account *h_acc, 
+AB_JOB *
+gnc_hbci_trans_dialog_enqueue(HBCITransDialog *td, AB_BANKING *api,
+			      AB_ACCOUNT *h_acc, 
 			      GNC_HBCI_Transtype trans_type) 
 {
-  HBCI_OutboxJob *job;
-  const char *jobname;
+  AB_JOB *job;
 
   /* Create a Do-Transaction (Transfer) job. */
-  switch (trans_type) {
-  case SINGLE_DEBITNOTE:
-    { 
-      jobname = "JobSingleDebitNote";
-    }
-    break;
-  case SINGLE_TRANSFER:
-    {
-      jobname = "JobSingleTransfer";
-    }
-    break;
-  default:
-    {
-      /*printf("dialog-hbcitrans: Oops, unknown GNC_HBCI_Transtype %d.\n",
-	trans_type);*/
-      jobname = "JobSingleTransfer";
-    }
+  job = AB_JobSingleTransfer_new(h_acc);
+  if (AB_Job_CheckAvailability(job)) {
+    printf("gnc_hbci_trans_dialog_enqueue: Oops, job not available. Aborting.\n");
+    return NULL;
   }
-  job = HBCI_OutboxJob_new(jobname, (HBCI_Customer *)customer, 
-			   gnc_HBCI_Account_accountId(h_acc));
-  HBCI_Job_addRequestData(HBCI_OutboxJob_Job(job), 
-			  "", HBCI_Transaction_node(td->hbci_trans));
+  AB_JobSingleTransfer_SetTransaction(job, td->hbci_trans);
 
   /* Make really sure there is no other job in the queue */
-  HBCI_Outbox_removeByStatus (outbox, HBCI_JOB_STATUS_NONE);
+/*   HBCI_Outbox_removeByStatus (outbox, HBCI_JOB_STATUS_NONE); */
 
   /* Add job to queue */
-  HBCI_Outbox_addJob(outbox, job);
+  AB_Banking_EnqueueJob(api, job);
 
   return job;
 }
 
 gboolean 
-gnc_hbci_trans_dialog_execute(HBCITransDialog *td, HBCI_API *api, 
-			      HBCI_Outbox *outbox,
-			      HBCI_OutboxJob *job, GNCInteractor *interactor)
+gnc_hbci_trans_dialog_execute(HBCITransDialog *td, AB_BANKING *api, 
+			      AB_JOB *job, GNCInteractor *interactor)
 {
   gboolean successful;
   g_assert(td);
   g_assert(api);
   g_assert(job);
 
-  successful = gnc_hbci_api_execute (td->parent, api, outbox, job, interactor);
+  successful = gnc_AB_BANKING_execute (td->parent, api, job, interactor);
 
   /*printf("dialog-hbcitrans: Ok, result of api_execute was %d.\n", 
     successful);*/
 	  
   if (!successful) {
-    /* HBCI_API_executeOutbox failed. */
-    if ((HBCI_OutboxJob_status (job) == HBCI_JOB_STATUS_DONE) &&
-	(HBCI_OutboxJob_result (job) == HBCI_JOB_RESULT_FAILED)) 
+    /* AB_BANKING_executeOutbox failed. */
+    if ((AB_Job_GetStatus (job) == AB_Job_StatusPending) ||
+	(AB_Job_GetStatus (job) == AB_Job_StatusError)) 
       successful = !gnc_verify_dialog
 	(td->parent, 
 	 FALSE,
 	 "%s",
-	 _("The job was successfully sent to the bank, but the \n"
+	 _("The job was sent to the bank successfully, but the \n"
 	   "bank is refusing to execute the job. Please check \n"
 	   "the log window for the exact error message of the \n"
 	   "bank. The line with the error message contains a \n"
@@ -658,12 +666,15 @@
 	   "\n"
 	   "Do you want to enter the job again?"));
 
-    HBCI_Transaction_delete (td->hbci_trans);
+    if (AB_Job_GetStatus (job) == AB_Job_StatusPending)
+      AB_Banking_DelPendingJob(api, job);
+
+    AB_Transaction_free (td->hbci_trans);
     td->hbci_trans = NULL;
   }
   /* Watch out! The job *has* to be removed from the queue
      here because otherwise it might be executed again. */
-  HBCI_Outbox_removeByStatus (outbox, HBCI_JOB_STATUS_NONE);
+  /* FIXME: need to do AB_Banking_DequeueJob(api, job); */
   return successful;
 }
 
Index: gncmod-hbci.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gncmod-hbci.c,v
retrieving revision 1.16.4.3
retrieving revision 1.16.4.4
diff -Lsrc/import-export/hbci/gncmod-hbci.c -Lsrc/import-export/hbci/gncmod-hbci.c -u -r1.16.4.3 -r1.16.4.4
--- src/import-export/hbci/gncmod-hbci.c
+++ src/import-export/hbci/gncmod-hbci.c
@@ -13,6 +13,9 @@
 #include "gnc-module.h"
 #include "gnc-module-api.h"
 #include "gnc-plugin-hbci.h"
+#include "druid-hbci-initial.h"
+#include "gnc-hbci-utils.h"
+#include <gwenhywfar/gwenhywfar.h>
 
 /* version of the gnc module system interface we require */
 int libgncmod_hbci_LTX_gnc_module_system_interface = 0;
@@ -65,10 +68,18 @@
   /* Add menu items with C callbacks */
   gnc_plugin_hbci_create_plugin();
   
+  /* Initialize gwen library */
+  GWEN_Init();
+
   return TRUE;
 }
 
 int
 libgncmod_hbci_LTX_gnc_module_end(int refcount) {
+  gnc_AB_BANKING_delete(0);
+
+  /* Finalize gwen library */
+  GWEN_Fini();
+
   return TRUE;
 }
Index: gnc-hbci-getbalance.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-getbalance.h,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -Lsrc/import-export/hbci/gnc-hbci-getbalance.h -Lsrc/import-export/hbci/gnc-hbci-getbalance.h -u -r1.1.4.2 -r1.1.4.3
--- src/import-export/hbci/gnc-hbci-getbalance.h
+++ src/import-export/hbci/gnc-hbci-getbalance.h
@@ -25,9 +25,9 @@
 
 #include <gnome.h>
 #include "Account.h"
-#include <openhbci2/outboxjob.h>
+#include <aqbanking/jobgetbalance.h>
 
-/** Starts a GetBalance job, adds the job to the HBCI_API, and
+/** Starts a GetBalance job, adds the job to the AB_BANKING, and
  * (currently) calls executeOutbox. */
 void
 gnc_hbci_getbalance (GtkWidget *parent, Account *gnc_acc);
@@ -37,7 +37,7 @@
 gboolean
 gnc_hbci_getbalance_finish (GtkWidget *parent, 
 			    Account *gnc_acc,
-			    const HBCI_OutboxJob *job);
+			    const AB_JOB *job);
 
 
 #endif /* GNC_HBCI_GETBALANCE_H */
Index: gnc-hbci-kvp.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-kvp.h,v
retrieving revision 1.5.4.2
retrieving revision 1.5.4.3
diff -Lsrc/import-export/hbci/gnc-hbci-kvp.h -Lsrc/import-export/hbci/gnc-hbci-kvp.h -u -r1.5.4.2 -r1.5.4.3
--- src/import-export/hbci/gnc-hbci-kvp.h
+++ src/import-export/hbci/gnc-hbci-kvp.h
@@ -52,6 +52,14 @@
  * will be marked as "dirty". */
 void gnc_hbci_set_account_countrycode (Account *a, gint code);
 
+/** Returns the unique id for the AB_BANKING account in the Account
+ * a. */
+gint gnc_hbci_get_account_uid (Account *a);
+/** Set the unique id for the AB_BANKING account in the Account a. The
+    Account will be marked as "dirty". */
+void gnc_hbci_set_account_uid (Account *a, gint uid);
+
+
 /** Returns the time of last online transaction retrieval */
 Timespec gnc_hbci_get_account_trans_retrieval (Account *a);
 /** Set the time of last online transaction retrieval. The account
@@ -75,11 +83,13 @@
 GList *gnc_hbci_get_book_template_list (GNCBook *b);
 void gnc_hbci_set_book_template_list (GNCBook *b, GList *template_list);
 
+#if 0
 /** Returns a non-copied pointer to the GList of kvp_frames which
  * eventually are the available HBCI accounts, stored in the given
  * book. */
 GList *gnc_hbci_get_book_account_list (GNCBook *b);
 void gnc_hbci_set_book_account_list (GNCBook *b, GList *account_list);
+#endif
 
 /* lowlevel */
 
Index: hbci-interaction.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/hbci-interaction.h,v
retrieving revision 1.6.4.3
retrieving revision 1.6.4.4
diff -Lsrc/import-export/hbci/hbci-interaction.h -Lsrc/import-export/hbci/hbci-interaction.h -u -r1.6.4.3 -r1.6.4.4
--- src/import-export/hbci/hbci-interaction.h
+++ src/import-export/hbci/hbci-interaction.h
@@ -23,13 +23,13 @@
 #ifndef HBCI_INTERACTION_H
 #define HBCI_INTERACTION_H
 
-#include <openhbci2/api.h>
+#include <aqbanking/banking.h>
 #include <gnome.h>
 
 typedef struct _inter_data GNCInteractor;
 
 /** Adds the interactor and progressmonitor classes to the api. */
-GNCInteractor *gnc_hbci_api_interactors (HBCI_API *api, GtkWidget *parent);
+GNCInteractor *gnc_AB_BANKING_interactors (AB_BANKING *api, GtkWidget *parent);
 
 gboolean GNCInteractor_aborted(const GNCInteractor *i);
 void GNCInteractor_show(GNCInteractor *i);
@@ -38,6 +38,7 @@
 void GNCInteractor_delete(GNCInteractor *i);
 void GNCInteractor_erasePIN(GNCInteractor *i);
 void GNCInteractor_reparent (GNCInteractor *i, GtkWidget *new_parent);
+gboolean GNCInteractor_get_cache_valid(const GNCInteractor *i);
 void GNCInteractor_set_cache_valid(GNCInteractor *i, gboolean value);
 GtkWidget *GNCInteractor_parent(GNCInteractor *i);
 void GNCInteractor_add_log_text (GNCInteractor *i, const char *msg);
Index: dialog-pass.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/dialog-pass.h,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -Lsrc/import-export/hbci/dialog-pass.h -Lsrc/import-export/hbci/dialog-pass.h -u -r1.2 -r1.2.4.1
--- src/import-export/hbci/dialog-pass.h
+++ src/import-export/hbci/dialog-pass.h
@@ -27,11 +27,14 @@
 
 gboolean
 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,
 			       const char *heading,
 			       char **password);
 
Index: hbci-interactionP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/hbci-interactionP.h,v
retrieving revision 1.4.4.3
retrieving revision 1.4.4.4
diff -Lsrc/import-export/hbci/hbci-interactionP.h -Lsrc/import-export/hbci/hbci-interactionP.h -u -r1.4.4.3 -r1.4.4.4
--- src/import-export/hbci/hbci-interactionP.h
+++ src/import-export/hbci/hbci-interactionP.h
@@ -24,8 +24,9 @@
 #ifndef HBCI_INTERACTIONP_H
 #define HBCI_INTERACTIONP_H
 
-#include <openhbci2/interactor.h>
+#include <aqbanking/banking.h>
 #include <gnome.h>
+#include <iconv.h>
 
 
 typedef enum {
@@ -45,6 +46,8 @@
   GtkWidget *job_entry;
   GtkWidget *action_entry;
   GtkWidget *action_progress;
+  /* Counters for progress bar */
+  double action_max;
 
   /* Log window */
   GtkWidget *log_text;
@@ -57,32 +60,32 @@
   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. */
-  char *pw;
-  const HBCI_User *user;
-  /* Whether this PIN is really valid or not. */
-  gboolean cache_valid;
+
+  /* Dialogs */
+  int showbox_id;
+  GHashTable *showbox_hash; 
+  GtkWidget *showbox_last;
+
 };
 
 void delete_GNCInteractor (GNCInteractor *data);
 
-HBCI_Interactor *
-gnc_hbci_new_interactor(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
--- src/import-export/hbci/gnc-hbci-account.c
+++ /dev/null
@@ -1,346 +0,0 @@
-/********************************************************************\
- * gnc-hbci-account.c -- hbci account functions                     *
- * Copyright (C) 2004 Christian Stimming                            *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#include "config.h"
-#include "gnc-hbci-account.h"
-
-#include <gnome.h>
-#include <errno.h>
-#include <openhbci2.h>
-#include <openhbci2/error.h>
-#include "Account.h"
-
-#include "hbci-interaction.h"
-
-/* static short module = MOD_IMPORT; */
-
-struct _gnc_HBCI_Account 
-{
-  const HBCI_Bank *bank;
-  char *bankCode;
-  char *accountid;
-  char *name;
-  char *customer;
-  char *currency;
-  char *name1;
-};
-
-gnc_HBCI_Account *gnc_HBCI_Account_new(const HBCI_Bank *bank, 
-				       const char *bankCode,
-				       const char *accountid)
-{
-  gnc_HBCI_Account *r = g_new0(gnc_HBCI_Account, 1);
-  r->bank = bank;
-  r->bankCode = g_strdup (bankCode);
-  r->accountid = g_strdup (accountid);
-  return r;
-}
-void gnc_HBCI_Account_delete (gnc_HBCI_Account *h)
-{
-  if (!h) return;
-  g_free(h->bankCode);
-  g_free(h->accountid);
-  if (h->name) g_free(h->name);
-  if (h->customer) g_free(h->customer);
-  if (h->currency) g_free(h->currency);
-  if (h->name1) g_free(h->name1);
-  g_free(h);
-}
-
-const char *gnc_HBCI_Account_accountId (const gnc_HBCI_Account *hbci_acc)
-{
-  g_assert(hbci_acc);
-  return hbci_acc->accountid;
-}
-const char *gnc_HBCI_Account_bankCode (const gnc_HBCI_Account *hbci_acc)
-{
-  g_assert(hbci_acc);
-  return hbci_acc->bankCode;
-}
-const HBCI_Bank *
-gnc_HBCI_Account_bank (const gnc_HBCI_Account *hbci_acc)
-{
-  g_assert(hbci_acc);
-  return hbci_acc->bank;
-}
-
-
-void gnc_HBCI_Account_set_name (gnc_HBCI_Account *hbci_acc, const char *n)
-{
-  g_assert(hbci_acc);
-  if (hbci_acc->name) g_free(hbci_acc->name);
-  hbci_acc->name = g_strdup(n);
-}
-void gnc_HBCI_Account_set_customer (gnc_HBCI_Account *hbci_acc, const char *n)
-{
-  g_assert(hbci_acc);
-  if (hbci_acc->customer) g_free(hbci_acc->customer);
-  hbci_acc->customer = g_strdup(n);
-}
-void gnc_HBCI_Account_set_currency (gnc_HBCI_Account *hbci_acc, const char *n)
-{
-  g_assert(hbci_acc);
-  if (hbci_acc->currency) g_free(hbci_acc->currency);
-  hbci_acc->currency = g_strdup(n);
-}
-void gnc_HBCI_Account_set_name1 (gnc_HBCI_Account *hbci_acc, const char *n)
-{
-  g_assert(hbci_acc);
-  if (hbci_acc->name1) g_free(hbci_acc->name1);
-  hbci_acc->name1 = g_strdup(n);
-}
-const char *gnc_HBCI_Account_name (const gnc_HBCI_Account *hbci_acc)
-{
-  g_assert(hbci_acc);
-  return hbci_acc->name;
-}
-const char *gnc_HBCI_Account_customer (const gnc_HBCI_Account *hbci_acc)
-{
-  g_assert(hbci_acc);
-  return hbci_acc->customer;
-}
-const char *gnc_HBCI_Account_currency (const gnc_HBCI_Account *hbci_acc)
-{
-  g_assert(hbci_acc);
-  return hbci_acc->currency;
-}
-const char *gnc_HBCI_Account_name1 (const gnc_HBCI_Account *hbci_acc)
-{
-  g_assert(hbci_acc);
-  return hbci_acc->name1;
-}
-
-gchar *gnc_HBCI_Account_longname(const gnc_HBCI_Account *hacc)
-{
-  g_assert(hacc);
-  /* Translators: Strings are 1. Account code, 2. Bank name, 3. Bank code. */
-  return g_strdup_printf(_("%s at %s (code %s)"),
-			 gnc_HBCI_Account_accountId (hacc),
-			 gnc_HBCI_Account_bank (hacc) ? 
-			 HBCI_Bank_name (gnc_HBCI_Account_bank (hacc)) : 
-			 gnc_HBCI_Account_bankCode (hacc),
-			 gnc_HBCI_Account_bankCode (hacc));
-}
-
-void *list_HBCI_Account_foreach(GList *h_list, 
-				void*(*func_cb)(gnc_HBCI_Account *acc,
-						void *user_data), 
-				void *user_data)
-{
-  GList *iter;
-  void *res;
-
-  g_assert(func_cb);
-  res = NULL;
-
-  if (!h_list) return NULL;
-
-  for (iter = h_list; iter; iter = iter->next)
-    {
-      if (iter->data)
-	res = func_cb(iter->data, user_data);
-      if (res)
-	break;
-    }
-  return res;
-}
-
-
-static void* del_func(gnc_HBCI_Account *acc, void *user_data)
-{
-    gnc_HBCI_Account_delete(acc);
-    return NULL;
-}
-
-
-void list_HBCI_Account_delete(GList *list_HBCI_Account)
-{
-    list_HBCI_Account_foreach(list_HBCI_Account, del_func, NULL);
-    g_list_free (list_HBCI_Account);
-}
-
-
-static void *hbci_find_acc_cb(gnc_HBCI_Account *acc, void *user_data)
-{
-  gnc_HBCI_Account *new_acc = user_data;
-  if (gnc_HBCI_Account_bank(acc) == gnc_HBCI_Account_bank(new_acc)) {
-    if (strcmp(gnc_HBCI_Account_accountId(acc),
-	       gnc_HBCI_Account_accountId(new_acc))==0) {
-      return acc;
-    }
-  }
-  return NULL;
-}
-
-  
-gnc_HBCI_Account *list_HBCI_Account_find(GList *list,
-					 const HBCI_Bank *bank, 
-					 const char *bankCode,
-					 const char *accountid)
-{
-  gnc_HBCI_Account *acc;
-  gnc_HBCI_Account *res;
-
-  if (list == NULL) return NULL;
-  g_assert(bank);
-  g_assert(bankCode);
-  g_assert(accountid);
-  
-  /* Create the wrapper object */
-  acc = gnc_HBCI_Account_new(bank, bankCode, accountid);
-
-  /* Check if such an account already exists */
-  res = list_HBCI_Account_foreach(list, hbci_find_acc_cb, acc);
-
-  gnc_HBCI_Account_delete(acc);
-  return res;
-}
-
-
-
-
-/* ------------------------------------------------------------ */
-
-#define HBCI_ACCOUNT_ID "account-id"
-#define HBCI_BANK_CODE "bank-code"
-#define HBCI_COUNTRY_CODE "country-code"
-#define HBCI_ACCOUNT_CURRENCY "acc-currency"
-#define HBCI_ACCOUNT_NAME "acc-name"
-#define HBCI_ACCOUNT_NAME1 "acc-name1"
-#define HBCI_ACCOUNT_CUSTOMER "acc-customer"
-
-/** Constructor from a kvp_frame */
-gnc_HBCI_Account *gnc_HBCI_Account_from_kvp(kvp_frame *k, HBCI_API *api)
-{
-  gnc_HBCI_Account *res = NULL;
-  HBCI_Bank *bank;
-  char *bankcode;
-  int countrycode;
-  g_assert(k);
-
-  bankcode = kvp_value_get_string (kvp_frame_get_slot(k, HBCI_BANK_CODE));
-  countrycode = kvp_value_get_gint64 (kvp_frame_get_slot(k, HBCI_COUNTRY_CODE));
-
-  if (bankcode && (strlen(bankcode)>0) && (countrycode > 0)) {
-    bank = HBCI_API_findBank (api, countrycode, bankcode);
-    /*printf("gnc_HBCI_Account_from_kvp: kvpframe has blz %s and ccode %d and accountid %s, bank %p\n",
-      bankcode, countrycode, kvp_value_get_string
-      (kvp_frame_get_slot(k, HBCI_ACCOUNT_ID)), bank);*/
-    if (!bank) {
-      printf("gnc_HBCI_Account_from_kvp: oops, the file has a HBCI_Account but its bank could not be found in the HBCI_API. Ignoring this account.\n");
-      return NULL;
-    }
-    res = gnc_HBCI_Account_new(bank, 
-			       bankcode,
-			       kvp_value_get_string
-			       (kvp_frame_get_slot(k, HBCI_ACCOUNT_ID)));
-    gnc_HBCI_Account_set_currency(res, kvp_value_get_string
-				  (kvp_frame_get_slot(k, HBCI_ACCOUNT_CURRENCY)));
-    gnc_HBCI_Account_set_name(res, kvp_value_get_string
-			      (kvp_frame_get_slot(k, HBCI_ACCOUNT_NAME)));
-    gnc_HBCI_Account_set_name1(res, kvp_value_get_string
-			       (kvp_frame_get_slot(k, HBCI_ACCOUNT_NAME1)));
-    gnc_HBCI_Account_set_customer(res, kvp_value_get_string
-				  (kvp_frame_get_slot(k, HBCI_ACCOUNT_CUSTOMER)));
-  }
-  return res;
-}
-
-/** Creates a kvp_frame from this TransTempl */
-kvp_frame *gnc_HBCI_Account_to_kvp(const gnc_HBCI_Account *t)
-{
-  kvp_frame *k = kvp_frame_new();
-  g_assert(t);
-
-  kvp_frame_set_slot(k, HBCI_ACCOUNT_ID, 
-		     kvp_value_new_string(gnc_HBCI_Account_accountId(t)));
-  kvp_frame_set_slot(k, HBCI_BANK_CODE, 
-		     kvp_value_new_string(gnc_HBCI_Account_bankCode (t)));
-  kvp_frame_set_slot(k, HBCI_ACCOUNT_CURRENCY, 
-		     kvp_value_new_string(gnc_HBCI_Account_currency (t)));
-  kvp_frame_set_slot(k, HBCI_ACCOUNT_NAME, 
-		     kvp_value_new_string(gnc_HBCI_Account_name (t)));
-  kvp_frame_set_slot(k, HBCI_ACCOUNT_NAME1, 
-		     kvp_value_new_string(gnc_HBCI_Account_name1 (t)));
-  kvp_frame_set_slot(k, HBCI_ACCOUNT_CUSTOMER, 
-		     kvp_value_new_string(gnc_HBCI_Account_customer (t)));
-  if (gnc_HBCI_Account_bank(t))
-    kvp_frame_set_slot(k, HBCI_COUNTRY_CODE, 
-		       kvp_value_new_gint64(HBCI_Bank_country 
-					    (gnc_HBCI_Account_bank(t))));
-  return k;
-}
-
-struct _glistapi
-{
-  GList *res;
-  HBCI_API *api;
-};
-/** Creates a GList of gnc_HBCI_Account from a GList of kvp_values which
-    in turn contain a kvp_frame. */
-static void glist_from_kvp_func(gpointer data, gpointer user_data)
-{
-  struct _glistapi *mydata = user_data;
-  kvp_value *k = data;
-  gnc_HBCI_Account *new_acc = gnc_HBCI_Account_from_kvp(kvp_value_get_frame(k),
-							mydata->api);
-  if (new_acc)
-    mydata->res = g_list_append(mydata->res, new_acc);
-}
-
-/** Creates a GList of gnc_HBCI_Account from a GList of kvp_values which
-    in turn contain a kvp_frame. */
-GList *gnc_HBCI_Account_glist_from_kvp_glist(GList *v, HBCI_API *api)
-{
-  struct _glistapi mydata;
-  if (!v) return NULL;
-
-  mydata.res = NULL;
-  mydata.api = api;
-  
-  g_list_foreach (v, glist_from_kvp_func, &mydata);
-  return mydata.res;
-}
-
-
-/** Creates a GList of kvp_value (which in turn contain a kvp_frame)
-    from a GList of gnc_HBCI_Account. */
-static void glist_to_kvp_func(gpointer data, gpointer user_data)
-{
-  GList **tmp = user_data;
-  GList *res = *tmp;
-  gnc_HBCI_Account *g = data;
-  *tmp = g_list_append(res, 
-		       kvp_value_new_frame_nc(gnc_HBCI_Account_to_kvp(g)));
-}
-/** Creates a GList of kvp_value (which in turn contain a kvp_frame)
-    from a GList of gnc_HBCI_Account. */
-GList *gnc_HBCI_Account_kvp_glist_from_glist(GList *k)
-{
-  GList *res = NULL;
-  if (!k) return NULL;
-
-  g_list_foreach (k, glist_to_kvp_func, &res);
-  return res;
-}
-
-
Index: gnc-hbci-gettrans.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-gettrans.c,v
retrieving revision 1.20.4.6
retrieving revision 1.20.4.7
diff -Lsrc/import-export/hbci/gnc-hbci-gettrans.c -Lsrc/import-export/hbci/gnc-hbci-gettrans.c -u -r1.20.4.6 -r1.20.4.7
--- src/import-export/hbci/gnc-hbci-gettrans.c
+++ src/import-export/hbci/gnc-hbci-gettrans.c
@@ -23,8 +23,6 @@
 #include "config.h"
 #include "gnc-hbci-gettrans.h"
 
-#include <openhbci2/api.h>
-
 #include "gnc-ui.h"
 #include "gnc-numeric.h"
 #include "gnc-date.h"
@@ -46,10 +44,9 @@
 
 gboolean
 gettrans_dates(GtkWidget *parent, Account *gnc_acc, 
-	       HBCI_Date **from_date, HBCI_Date **to_date);
+	       GWEN_TIME **from_date, GWEN_TIME **to_date);
 
-static void *trans_list_cb (GWEN_DB_NODE *trans_node, void *user_data);
-static void *reports_cb(GWEN_DB_NODE *reportn, void *user_data);
+static AB_TRANSACTION *trans_list_cb(AB_TRANSACTION *reportn, void *user_data);
 
 struct trans_list_data 
 {
@@ -61,80 +58,60 @@
 void
 gnc_hbci_gettrans (GtkWidget *parent, Account *gnc_acc)
 {
-  HBCI_API *api = NULL;
-  HBCI_Outbox *outbox = NULL;
-  const gnc_HBCI_Account *h_acc = NULL;
+  AB_BANKING *api = NULL;
+  const AB_ACCOUNT *h_acc = NULL;
   GNCInteractor *interactor = NULL;
-  const HBCI_Customer *customer = NULL;
-  GList *hbci_accountlist = NULL;
   
   g_assert(parent);
   g_assert(gnc_acc);
 
   /* Get the api */
-  api = gnc_hbci_api_new_currentbook (parent, &interactor, &hbci_accountlist);
+  api = gnc_AB_BANKING_new_currentbook (parent, &interactor);
   if (api == NULL) {
     printf("gnc_hbci_gettrans: Couldn't get HBCI API.\n");
     return;
   }
   g_assert (interactor);
-  outbox = HBCI_Outbox_new();
 
-  /* Get the HBCI account */
+  /* Get HBCI account */
   h_acc = gnc_hbci_get_hbci_acc (api, gnc_acc);
   if (h_acc == NULL) {
-    printf("gnc_hbci_gettrans: No HBCI account found.\n");
+    printf("gnc_hbci_getbalance: No HBCI account found.\n");
+    /* FIXME: free unneeded data */
     return;
   }
-  /* printf("gnc_hbci_gettrans: HBCI account no. %s found.\n",
-     gnc_HBCI_Account_accountId (h_acc)); */
-
-  /* Get the customer that should be doing this job. */
-  customer = gnc_hbci_get_first_customer(h_acc);
-  if (!customer) 
-    return;
-
-  /* g_assert (customer); */
-  /* printf("gnc_hbci_gettrans: Customer id %s found.\n",
-     HBCI_Customer_custId ((HBCI_Customer *)customer)); */
 
   {
     /* Execute a GetTransactions job. */
-    HBCI_OutboxJob *job;
+    AB_JOB *job;
     Timespec until_timespec;
-    HBCI_Date *from_date, *to_date;
+    GWEN_TIME *from_date, *to_date;
 
     /* Get the start and end dates for the Gettrans job.  */
     if (!gettrans_dates(parent, gnc_acc, &from_date, &to_date))
       return;
     /* Use this as a local storage for the until_time below. */
-    timespecFromTime_t(&until_timespec, HBCI_Date_to_time_t(to_date));
+    timespecFromTime_t(&until_timespec, GWEN_Time_toTime_t(to_date));
     
     /* Create OutboxJob */
-    job = HBCI_OutboxJob_new("JobGetTransactions", (HBCI_Customer *)customer, 
-			     gnc_HBCI_Account_accountId(h_acc));
-    
-    {
-      HBCI_Job *jjob = HBCI_OutboxJob_Job(job);
-      char *tmp;
-      
-      tmp = HBCI_Date_toString(from_date);
-      HBCI_Job_setProperty(jjob, "fromDate", tmp);
-      free(tmp);
-      tmp = HBCI_Date_toString(to_date);
-      HBCI_Job_setProperty(jjob, "toDate", tmp);
-      free(tmp);
+    job = AB_JobGetTransactions_new((AB_ACCOUNT*)h_acc);
+    if (AB_Job_CheckAvailability(job)) {
+      printf("gnc_hbci_gettrans: Oops, job not available. Aborting.\n");
+      /* FIXME: free unneeded data */
+      return;
     }
-    HBCI_Date_delete (from_date);
-    HBCI_Date_delete (to_date);
+    AB_JobGetTransactions_SetFromTime(job, from_date);
+    AB_JobGetTransactions_SetToTime(job, to_date);
 
-    /* Add job to HBCI_API queue. */
-    HBCI_Outbox_addJob (outbox, job);
+    /* Add job to AB_BANKING queue. */
+    AB_Banking_EnqueueJob(api, job);
 
     /* Execute Outbox. */
-    if (!gnc_hbci_api_execute (parent, api, outbox, job, interactor)) {
-      /* HBCI_API_executeOutbox failed. */
-      HBCI_Outbox_removeByStatus (outbox, HBCI_JOB_STATUS_NONE);
+    if (!gnc_AB_BANKING_execute (parent, api, job, interactor)) {
+      /* AB_BANKING_executeOutbox failed. */
+      AB_Banking_DequeueJob(api, job);
+      AB_Banking_DelFinishedJob(api, job);
+      AB_Banking_DelPendingJob(api, job);
       return;
     }
 
@@ -145,10 +122,13 @@
     gnc_hbci_gettrans_final(parent, gnc_acc, job, FALSE);
 
     /* Clean up behind ourself. */
-    HBCI_Outbox_removeByStatus (outbox, HBCI_JOB_STATUS_NONE);
-    HBCI_Outbox_delete(outbox);
-    gnc_hbci_api_save (api);
+    AB_Banking_DequeueJob(api, job);
+    AB_Banking_DelFinishedJob(api, job);
+    AB_Banking_DelPendingJob(api, job);
+    gnc_AB_BANKING_fini (api);
     GNCInteractor_hide (interactor);
+    GWEN_Time_free (from_date);
+    GWEN_Time_free (to_date);
   }
 }
 
@@ -159,11 +139,10 @@
     deleted. */
 gboolean
 gettrans_dates(GtkWidget *parent, Account *gnc_acc, 
-	       HBCI_Date **from_date, HBCI_Date **to_date)
+	       GWEN_TIME **from_date, GWEN_TIME **to_date)
 {
   Timespec last_timespec, until_timespec;
-  time_t now = time(NULL), time_convert;
-  struct tm tm;
+  time_t now = time(NULL);
   gboolean use_last_date = TRUE, 
     use_earliest_date = TRUE, use_until_now = TRUE;
 
@@ -189,19 +168,17 @@
     
     /* Now calculate from date */
     if (use_earliest_date)
-      *from_date = HBCI_Date_new_blank();
+      *from_date = GWEN_Time_fromSeconds(0);
     else {
       if (use_last_date)
 	last_timespec = gnc_hbci_get_account_trans_retrieval (gnc_acc);
-      time_convert = timespecToTime_t(last_timespec);
-      *from_date = HBCI_Date_new (localtime_r (&time_convert, &tm));
+      *from_date = GWEN_Time_fromSeconds(timespecToTime_t(last_timespec));
     }
 
     /* Now calculate to date */
     if (use_until_now)
       timespecFromTime_t (&until_timespec, now);
-    time_convert = timespecToTime_t (until_timespec);
-    *to_date = HBCI_Date_new (localtime_r (&time_convert, &tm));
+    *to_date = GWEN_Time_fromSeconds(timespecToTime_t (until_timespec));
 
     return TRUE;
 }
@@ -212,24 +189,15 @@
 gboolean
 gnc_hbci_gettrans_final(GtkWidget *parent, 
 			Account *gnc_acc, 
-			const HBCI_OutboxJob *trans_job,
+			const AB_JOB *trans_job,
 			gboolean run_until_done)
 {
   /* Now add the retrieved transactions to the gnucash account. */
-  GWEN_DB_NODE *trans_list, *response;
-
+  AB_TRANSACTION_LIST2 *trans_list;
 
-  response = HBCI_Job_responseData((HBCI_Job*)HBCI_OutboxJob_Job_const(trans_job));
-  if (!response) {
-    printf("gnc_hbci_gettrans_final: Got no responseData.\n");
-    return FALSE;
-  }
-
-  trans_list = GWEN_DB_GetGroup(response, GWEN_PATH_FLAGS_NAMEMUSTEXIST, 
-				"transactions");
+  trans_list = AB_JobGetTransactions_GetTransactions(trans_job);
   if (!trans_list) {
     printf("gnc_hbci_gettrans_final: No transactions section. Response was:\n");
-    GWEN_DB_Dump(response, stdout, 1);
 
     gnome_ok_dialog_parented 
       (_("The HBCI import returned no transactions for the selected time period."),
@@ -237,15 +205,7 @@
     return TRUE;
   }
   
-  trans_list = GWEN_DB_GetGroup(trans_list,
-				GWEN_PATH_FLAGS_NAMEMUSTEXIST,
-				"booked");
-
-  if (!trans_list) {
-    printf("gnc_hbci_gettrans_final: No booked section. Response was:\n");
-    GWEN_DB_Dump(response, stdout, 1);
-  }
-  if (trans_list && (GWEN_DB_Groups_Count(trans_list) > 0)) {
+  if (trans_list && (AB_Transaction_List2_GetSize(trans_list) > 0)) {
     struct trans_list_data data;
     GNCImportMainMatcher *importer_generic_gui = 
       gnc_gen_trans_list_new(NULL, NULL, TRUE);
@@ -253,7 +213,7 @@
     data.importer_generic = importer_generic_gui;
     data.gnc_acc = gnc_acc;
 	
-    GWEN_DB_Groups_Foreach (trans_list, reports_cb, &data);
+    AB_Transaction_List2_ForEach (trans_list, trans_list_cb, &data);
 
     if (run_until_done)
       return gnc_gen_trans_list_run (importer_generic_gui);
@@ -269,144 +229,105 @@
 }
 
 
-static void *reports_cb(GWEN_DB_NODE *reportn, void *user_data)
-{
-  if (!reportn) {
-    /*DBG_INFO(0, "Oops: reportn is NULL");*/
-    return NULL;
-  }
-  if (strcasecmp(GWEN_DB_GroupName(reportn), "report")==0) {
-    return GWEN_DB_Groups_Foreach(reportn, trans_list_cb, user_data);
-  } // if report
-  else {
-    /*DBG_WARN(0, "Unknown section \"%s\"", GWEN_DB_GroupName(reportn));*/
-  }
-  return NULL;
-}
-
-
-/* list_HBCI_Transaction_foreach callback. The Conversion from HBCI to
-   GNC transaction is done here, once for each HBCI_Transaction.  */
-static void *trans_list_cb (GWEN_DB_NODE *trans_node, 
-			    void *user_data)
+/* list_AB_TRANSACTION_foreach callback. The Conversion from HBCI to
+   GNC transaction is done here, once for each AB_TRANSACTION.  */
+static AB_TRANSACTION *trans_list_cb(AB_TRANSACTION *h_trans, void *user_data)
 {
-  HBCI_Transaction *h_trans;
-  time_t current_time, tt1, tt2; 
+  time_t current_time;
+  /* time_t tt1, tt2; */
   /*struct tm tm1, tm2;*/
   Account *gnc_acc;
   GNCBook *book;
   Transaction *gnc_trans;
+  const GWEN_TIME *valutaDate, *normalDate;
   Split *split;
   struct trans_list_data *data = user_data;
   g_assert(data);
 
-  if (!trans_node) return NULL;
+  if (!h_trans) return NULL;
 
   gnc_acc = data->gnc_acc;
   g_assert(gnc_acc);
   book = xaccAccountGetBook(gnc_acc);
 
-  if (strcasecmp(GWEN_DB_GroupName(trans_node), "transaction")==0) {
-    /* Create wrapper HBCI_Transaction */
-    h_trans = HBCI_Transaction_new(trans_node);
-
-    gnc_trans = xaccMallocTransaction(book);
-    xaccTransBeginEdit(gnc_trans);
-
-    /*if(data.fi_id_valid==true){
-      gnc_import_set_trans_online_id(gnc_trans, data.fi_id);
-      }*/
-
-    tt1 = HBCI_Date_to_time_t (HBCI_Transaction_date(h_trans));
-    tt2 = HBCI_Date_to_time_t (HBCI_Transaction_valutaDate(h_trans));
-    /*printf("Date? %s ValutaDate? %s", ctime(&tt1), ctime(&tt2));*/
-    /*tm1 = HBCI_Date_to_tm (HBCI_Transaction_date(h_trans));
-      tm2 = HBCI_Date_to_tm (HBCI_Transaction_valutaDate(h_trans));
-      printf("Date asc %s ValutaDate asc %s", asctime(&tm1), asctime(&tm2));*/
+  /* Create new gnucash transaction for the given hbci one */
+  gnc_trans = xaccMallocTransaction(book);
+  xaccTransBeginEdit(gnc_trans);
+
+  /*if(data.fi_id_valid==true){
+    gnc_import_set_trans_online_id(gnc_trans, data.fi_id);
+    }*/
+
+  normalDate = AB_Transaction_GetDate(h_trans);
+  valutaDate = AB_Transaction_GetValutaDate(h_trans);
+  if (normalDate && !valutaDate)
+    valutaDate = normalDate;
+  /* Watch out -- any of the GWEN_TIME may be NULL */
+  /*   tt1 = GWEN_Time_toTime_t (normalDate); */
+  /*   tt2 = GWEN_Time_toTime_t (valutaDate); */
+  /*printf("Date? %s ValutaDate? %s", ctime(&tt1), ctime(&tt2));*/
   
   
-    /* Date / Time */
+  /* Date / Time */
+  if (valutaDate)
     xaccTransSetDateSecs
-      (gnc_trans, HBCI_Date_to_time_t (HBCI_Transaction_valutaDate (h_trans)));
+      (gnc_trans, GWEN_Time_toTime_t (valutaDate));
+  else
+    printf("trans_list_cb: Oops, date 'valutaDate' was NULL.\n");
     
-    current_time = time(NULL);
-    xaccTransSetDateEnteredSecs(gnc_trans, mktime(localtime(&current_time)));
+  current_time = time(NULL);
+  xaccTransSetDateEnteredSecs(gnc_trans, mktime(localtime(&current_time)));
     
-    /* Currency; we take simply the default currency of the gnucash account */
-    xaccTransSetCurrency(gnc_trans, xaccAccountGetCommodity(gnc_acc));
+  /* Currency; we take simply the default currency of the gnucash account */
+  xaccTransSetCurrency(gnc_trans, xaccAccountGetCommodity(gnc_acc));
     
-    {
-      /* Number. We use the "customer reference", if there is one. */
-      const char *custref = HBCI_Transaction_customerReference (h_trans);
-      if (custref && (strlen (custref) > 0) && 
-	  (g_strncasecmp (custref, "NONREF", 6) != 0))
-	xaccTransSetNum (gnc_trans, custref);
-    }
+  {
+    /* Number. We use the "customer reference", if there is one. */
+    const char *custref = AB_Transaction_GetCustomerReference (h_trans);
+    if (custref && (strlen (custref) > 0) && 
+	(g_strncasecmp (custref, "NONREF", 6) != 0))
+      xaccTransSetNum (gnc_trans, custref);
+  }
     
-    /* Description */
-    {
-      char *g_descr = gnc_hbci_descr_tognc (h_trans);
-      xaccTransSetDescription (gnc_trans, g_descr);
-      g_free (g_descr);
-    }
+  /* Description */
+  {
+    char *g_descr = gnc_hbci_descr_tognc (h_trans);
+    xaccTransSetDescription (gnc_trans, g_descr);
+    g_free (g_descr);
+  }
   
-    /* Notes. */
-    /*xaccTransSetNotes (gnc_trans, g_notes);*/
-    /* But Nobody ever uses the Notes field? */
-    
-    /* Add one split */
-    split=xaccMallocSplit(book);
-    xaccTransAppendSplit(gnc_trans, split);
-    xaccAccountInsertSplit(gnc_acc, split);
+  /* Notes. */
+  /*xaccTransSetNotes (gnc_trans, g_notes);*/
+  /* But Nobody ever uses the Notes field? */
+  
+  /* Add one split */
+  split=xaccMallocSplit(book);
+  xaccTransAppendSplit(gnc_trans, split);
+  xaccAccountInsertSplit(gnc_acc, split);
     
-    {
-      /* Amount into the split */
-      gnc_numeric gnc_amount = double_to_gnc_numeric
-	(HBCI_Value_getValue (HBCI_Transaction_value (h_trans)),
-	 xaccAccountGetCommoditySCU(gnc_acc),
-	 GNC_RND_ROUND);
+  {
+    /* Amount into the split */
+    const AB_VALUE *h_value = AB_Transaction_GetValue (h_trans);
+    gnc_numeric gnc_amount = double_to_gnc_numeric
+      (h_value ? AB_Value_GetValue (h_value) : 0.0,
+       xaccAccountGetCommoditySCU(gnc_acc),
+       GNC_RND_ROUND);
+    if (!h_value)
+      printf("trans_list_cb: Oops, value was NULL. Using 0.\n");
     xaccSplitSetBaseValue(split, gnc_amount, xaccAccountGetCommodity(gnc_acc));
-    }
+  }
     
-    /* Memo in the Split. */
-    {
-      char *g_memo = gnc_hbci_memo_tognc (h_trans);
-      xaccSplitSetMemo(split, g_memo);
-      g_free (g_memo);
-    }
+  /* Memo in the Split. */
+  {
+    char *g_memo = gnc_hbci_memo_tognc (h_trans);
+    xaccSplitSetMemo(split, g_memo);
+    g_free (g_memo);
+  }
     
-    /* Instead of xaccTransCommitEdit(gnc_trans)  */
-    g_assert (data->importer_generic);
-    gnc_gen_trans_list_add_trans (data->importer_generic, gnc_trans);
+  /* Instead of xaccTransCommitEdit(gnc_trans)  */
+  g_assert (data->importer_generic);
+  gnc_gen_trans_list_add_trans (data->importer_generic, gnc_trans);
 
-    HBCI_Transaction_delete(h_trans);
-  }
-  else if (strcasecmp(GWEN_DB_GroupName(trans_node), "startsaldo")==0) {
-    /*DBG_INFO(0, "Found opening balance");*/
-  }
-  else if (strcasecmp(GWEN_DB_GroupName(trans_node), "endsaldo")==0) {
-    /* Found closing balance */
-    trans_node = GWEN_DB_GetGroup(trans_node,
-				  GWEN_PATH_FLAGS_NAMEMUSTEXIST,
-				  "value");
-    /*if (trans_node) {
-      HBCI_Value *bal;
-      char *val;
-      DBG_INFO(0, "Found closing balance");
-      
-      bal = HBCI_Value_new(GWEN_DB_GetCharValue(trans_node, "value", 0, "0"),
-			   GWEN_DB_GetCharValue(trans_node, "currency", 0, "EUR"));
-      
-      val = HBCI_Value_toReadableString(bal);
-      printf("Got closing balance %s\n", val);
-      
-      free(val);
-      HBCI_Value_delete(bal);
-      }*/
-  }
-  else {
-    /*DBG_WARN(0, "Unknown section \"%s\"", GWEN_DB_GroupName(trans_node));*/
-  }
   return NULL;
   
 }
Index: gnc-hbci-transfer.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-transfer.h,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -Lsrc/import-export/hbci/gnc-hbci-transfer.h -Lsrc/import-export/hbci/gnc-hbci-transfer.h -u -r1.1.4.2 -r1.1.4.3
--- src/import-export/hbci/gnc-hbci-transfer.h
+++ src/import-export/hbci/gnc-hbci-transfer.h
@@ -24,7 +24,7 @@
 #define GNC_HBCI_TRANSFER_H
 
 #include <gnome.h>
-#include <openhbci2/transaction.h>
+#include <aqbanking/jobsingletransfer.h>
 #include "Account.h"
 #include "dialog-hbcitrans.h"
 
@@ -33,7 +33,7 @@
 		    GNC_HBCI_Transtype trans_type);
 
 /** Open a gnucash transfer dialog for gnucash Account gnc_acc and
- * fill in all the values from the HBCI_Transaction inside the
+ * fill in all the values from the AB_TRANSACTION inside the
  * HBCITransDialog. Returns TRUE if the gnucash transaction has been
  * successfully created, FALSE if e.g. the user pressed cancel. */
 gboolean
Index: druid-hbci-initial.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/druid-hbci-initial.c,v
retrieving revision 1.26.4.9
retrieving revision 1.26.4.10
diff -Lsrc/import-export/hbci/druid-hbci-initial.c -Lsrc/import-export/hbci/druid-hbci-initial.c -u -r1.26.4.9 -r1.26.4.10
--- src/import-export/hbci/druid-hbci-initial.c
+++ src/import-export/hbci/druid-hbci-initial.c
@@ -23,8 +23,10 @@
 #include "config.h"
 
 #include <gnome.h>
-#include <sys/stat.h>
 #include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <fcntl.h>
 #include <unistd.h>
 
 #include "druid-hbci-initial.h"
@@ -41,21 +43,13 @@
 //#include "import-account-matcher.h"
 #include "gnc-component-manager.h"
 
-#include <openhbci2/api.h>
-#include <openhbci2/outboxjob.h>
-#include <openhbci2/mediumrdhbase.h>
+#include <aqbanking/banking.h>
 
-#include <openhbci2.h>
-
-#define DEFAULT_HBCI_VERSION 201
+/* #define DEFAULT_HBCI_VERSION 201 */
 
 typedef enum _infostate {
-  INI_ADD_BANK,
-  INI_ADD_USER,
   INI_UPDATE_ACCOUNTS,
   INI_MATCH_ACCOUNTS,
-  ADD_BANK,
-  ADD_USER,
   UPDATE_ACCOUNTS,
   MATCH_ACCOUNTS
 } Infostate;
@@ -67,56 +61,13 @@
 
   /* configfile page */
   GtkWidget *filepage;
-  GtkWidget *configfileentry;
-  char *configfile;
-  
-  /* bank info page */
-  GtkWidget *bankpage;
-  GtkWidget *bankcode;
-  GtkWidget *countrycode;
-  GtkWidget *ipaddr;
-  /*GtkWidget *port;*/
-
-  /* user info page */
-  GtkWidget *userpage;
-  GtkWidget *user_bankcode;
-  GtkWidget *user_bankname;
-  GtkWidget *userid;
-  GtkWidget *username;
-  GtkWidget *customerid;
-  GtkWidget *customername;
-  GtkWidget *mediumrdh;
-  GtkWidget *mediumpath;
-  GtkWidget *mediumddv;
-
-  /* account update info page */
-  GtkWidget *accountinfopage;
   
   /* account match page */
   GtkWidget *accountpage;
   GtkWidget *accountlist;
     
-  /* server iniletter info page */
-  GtkWidget *serverinfopage;
-
-  /* iniletter server */
-  GtkWidget *serverpage;
-  GtkWidget *server_vbox;
-  GtkWidget *server_frame;
-  gnc_html *server_html;
-
-  /* user iniletter info page */
-  GtkWidget *userinfopage;
-  
-  /* iniletter user */
-  GtkWidget *user_vbox;
-  GtkWidget *user_frame;
-  gnc_html *user_html;
-
   /* OpenHBCI stuff */
-  HBCI_API *api;
-  HBCI_Outbox *outbox;
-  GList *hbci_accountlist;
+  AB_BANKING *api;
   GNCInteractor *interactor;
 
   /* account match: row_number (int) -> hbci_account */
@@ -127,14 +78,6 @@
   /* Status of user's movement through the wizard */
   Infostate state;
 
-  /* Newly created customer */
-  const HBCI_Customer *newcustomer;
-  /* Bank for which a new user is about to be created */
-  const HBCI_Bank *newbank;
-
-  /* Customer for which we already got the keys */
-  const HBCI_Customer *gotkeysforCustomer;
-  
 };
 
 static gboolean
@@ -157,29 +100,16 @@
 {
   if (info == NULL) return;
 
-  if (info->api != NULL) 
-    gnc_hbci_api_delete (info->api);
+  if (info->api != NULL) {
+    gnc_AB_BANKING_delete (info->api);
+  }
   info->api = NULL;
 
-  if (info->outbox != NULL)
-    HBCI_Outbox_delete(info->outbox);
-  info->outbox = NULL;
-
-  info->newcustomer = NULL;
-  info->newbank = NULL;
-  
-  if (info->configfile != NULL) 
-    g_free (info->configfile);
-  info->configfile = NULL;
-    
   delete_hash (info->hbci_hash);
   info->hbci_hash = NULL;
   if (info->gnc_hash != NULL)
     g_hash_table_destroy (info->gnc_hash);
   info->gnc_hash = NULL;
-
-  list_HBCI_Account_delete(info->hbci_accountlist);
-  info->hbci_accountlist = NULL;
 }
 
 static void
@@ -189,8 +119,8 @@
 
   reset_initial_info (info);
   
-  if (info->interactor)
-    GNCInteractor_delete(info->interactor);
+  /* if (info->interactor)
+     GNCInteractor_delete(info->interactor);  -- being destroyed by AB_BANKING*/
 
   if (info->window != NULL) 
     gtk_widget_destroy (info->window);
@@ -199,11 +129,32 @@
 }
 
 
+static gchar *gnc_hbci_account_longname(const AB_ACCOUNT *hacc)
+{
+  const char *bankname;
+  const char *bankcode;
+
+  g_assert(hacc);
+  bankname = AB_Account_GetBankName (hacc);
+  bankcode = AB_Account_GetBankCode (hacc);
+  /* Translators: Strings are 1. Account code, 2. Bank name, 3. Bank code. */
+  if (bankname)
+    return g_strdup_printf(_("%s at %s (code %s)"),
+			   AB_Account_GetAccountNumber (hacc),
+			   bankname,
+			   bankcode);
+  else
+    return g_strdup_printf(_("%s at bank code %s"),
+			   AB_Account_GetAccountNumber (hacc),
+			   bankcode);
+}
+
+
 /*******************************************************************
  * update_accountlist widget
  */
-static gpointer
-update_accountlist_acc_cb (gnc_HBCI_Account *hacc, gpointer user_data)
+static AB_ACCOUNT *
+update_accountlist_acc_cb (AB_ACCOUNT *hacc, gpointer user_data)
 {
   HBCIInitialInfo *info = user_data;
   gchar *row_text[3];
@@ -215,7 +166,7 @@
   g_assert(info);
   row_text[2] = "";
   
-  row_text[0] = gnc_HBCI_Account_longname(hacc);
+  row_text[0] = gnc_hbci_account_longname(hacc);
 		
   /* Get corresponding gnucash account */
   gacc = g_hash_table_lookup (info->gnc_hash, hacc);
@@ -237,7 +188,7 @@
   /* Store the row_number -> hbci_account hash reference. */
   row_key = g_new(gint, 1);
   *row_key = row;
-  g_hash_table_insert (info->hbci_hash, row_key, (gnc_HBCI_Account*)hacc);
+  g_hash_table_insert (info->hbci_hash, row_key, (AB_ACCOUNT*)hacc);
 
   return NULL;
 }
@@ -246,18 +197,15 @@
 static void
 update_accountlist (HBCIInitialInfo *info)
 {
-  const list_HBCI_Bank *banklist;
   int sel_row = 0;
+  AB_BANKING *banking;
+  AB_ACCOUNT_LIST2 *acclist;
 
   g_assert(info);
-  g_assert(info->api);
+  banking = info->api;
+  g_assert(banking);
   g_assert(info->gnc_hash);
 
-  banklist = HBCI_API_bankList (info->api);
-  /*printf("%d banks found.\n", list_HBCI_Bank_size (banklist));*/
-  if (list_HBCI_Bank_size (banklist) == 0) 
-    return;
-
   /* Store old selected row here. */
   sel_row = (GTK_CLIST(info->accountlist))->focus_row;
 
@@ -271,12 +219,16 @@
   g_hash_table_freeze (info->hbci_hash);
   
   /* Go through all HBCI accounts */
-  list_HBCI_Account_foreach (info->hbci_accountlist,
-			     update_accountlist_acc_cb,
-			     info);
+  acclist = AB_Banking_GetAccounts(banking);
+  if (acclist)
+    AB_Account_List2_ForEach (acclist,
+			      update_accountlist_acc_cb,
+			      info);
+  else
+    printf("update_accountlist: Oops, account list from AB_Banking is NULL.\n");
 
-  //printf("update_accountlist: HBCI hash has %d entries.\n", g_hash_table_size(info->hbci_hash));
-  //printf("update_accountlist: GNC hash has %d entries.\n", g_hash_table_size(info->gnc_hash));
+  /* printf("update_accountlist: HBCI hash has %d entries.\n", g_hash_table_size(info->hbci_hash)); */
+  /* printf("update_accountlist: GNC hash has %d entries.\n", g_hash_table_size(info->gnc_hash)); */
   
   g_hash_table_thaw (info->hbci_hash);
   gtk_clist_thaw (GTK_CLIST (info->accountlist));
@@ -310,302 +262,40 @@
  * end button enabling
  *******************************************************************/
 
-/******************************************************************
- * string conversion 
- */
-static char *
-to_hexstring (const char *str)
-{
-  int i, bytes = strlen(str)/2;
-  char *res = g_strnfill (3*bytes, ' ');
-  for (i=0; i < bytes; i++) {
-    res[3*i+0] = str[2*i+0];
-    res[3*i+1] = str[2*i+1];
-    if (i % 16 == 15)
-      res[3*i+2] = '\n';
-  }
-  res [3*i+2] = '\0';
-  /*printf ("Converted -%s- to -%s-.\n", str, res);*/
-  return res;
-}
-static char *
-to_hexstring_hash (const char *str)
-{
-  int i, bytes = strlen(str)/2;
-  char *res = g_strnfill (3*bytes, ' ');
-  for (i=0; i < bytes; i++) {
-    res[3*i+0] = str[2*i+0];
-    res[3*i+1] = str[2*i+1];
-    if (i % 10 == 9)
-      res[3*i+2] = '\n';
-  }
-  res [3*i+2] = '\0';
-  /*printf ("Converted -%s- to -%s-.\n", str, res);*/
-  return res;
-}
-/*
- * end string conversion 
- ***************************************************************/
-
-
 
 
-
-
-static const HBCI_Customer *
-choose_customer (HBCIInitialInfo *info)
-{
-  const HBCI_Bank *bank;
-  const HBCI_User *user;
-  g_assert (info);
-
-  /* Get HBCI bank from the banklist */
-  bank = choose_one_bank (info->window, HBCI_API_bankList (info->api) );
-
-  if (bank == 0) 
-    return NULL;
-  
-  /* Get User from user list. */
-  user = choose_one_user (info->window, HBCI_Bank_users (bank) );
-
-  if (user == NULL)
-    return NULL;
-
-  /* Get customer from customer list. */
-  return choose_one_customer(info->window, HBCI_User_customers (user) );
-}
-
-/*********************************************************************
- * HBCI Version Picking dialog
+/*************************************************************
+ * GUI callbacks
  */
-static void *hbciversion_cb (int value, void *user_data) 
-{
-  GtkWidget *clist = user_data;
-  gchar *text;
-  int row;
-  g_assert (clist);
 
-  switch (value) 
-    {
-    case 2:
-      text = g_strdup ("HBCI 2.0");
-      break;
-    case 201:
-      text = g_strdup ("HBCI 2.0.1");
-      break;
-    case 210:
-      text = g_strdup ("HBCI 2.1");
-      break;
-    case 220:
-      text = g_strdup ("HBCI 2.2");
-      break;
-    case 300:
-      text = g_strdup ("FinTS (HBCI 3.0)");
-      break;
-    default:
-      text = g_strdup_printf ("HBCI %d", value);
-    }
-  
-  row = gtk_clist_append (GTK_CLIST (clist), &text);
-  gtk_clist_set_row_data (GTK_CLIST (clist), row, GINT_TO_POINTER (value));
-  
-  return NULL;
-}
-static void hbciversion_select_row (GtkCList *clist,
-				    gint row, gint column,
-				    GdkEventButton *event, gpointer user_data)
+static gboolean banking_has_accounts(AB_BANKING *banking)
 {
-  int *pointer = user_data;
-  *pointer = row;
-}
-static void hbciversion_unselect_row (GtkCList *clist,
-				      gint row, gint column,
-				      GdkEventButton *event, 
-				      gpointer user_data)
-{
-  int *pointer = user_data;
-  *pointer = 0;
+  AB_ACCOUNT_LIST2 *accl;
+  gboolean result;
+  g_assert(banking);
+
+  accl = AB_Banking_GetAccounts(banking);
+  
+  if (accl && (AB_Account_List2_GetSize(accl) > 0))
+    result = TRUE;
+  else
+    result = FALSE;
+
+  if (accl)
+    AB_Account_List2_free(accl);
+  return result;
 }
 
-static gboolean 
-choose_hbciversion_dialog (GtkWindow *parent, HBCI_Bank *bank,
-			   HBCIInitialInfo *info)
-{
-  int retval = -1;
-  int selected_row = 0;
-  int initial_selection;
-  GladeXML *xml;
-  GtkWidget *version_clist;
-  GtkWidget *dialog;
-  g_assert (bank);
-  
-  xml = gnc_glade_xml_new ("hbci.glade", "HBCI_version_dialog");
-
-  dialog = glade_xml_get_widget (xml, "HBCI_version_dialog");
-  version_clist = glade_xml_get_widget (xml, "version_clist");
-  gtk_signal_connect (GTK_OBJECT (version_clist), "select_row",
-		      GTK_SIGNAL_FUNC (hbciversion_select_row), &selected_row);
-  gtk_signal_connect (GTK_OBJECT (version_clist), "unselect_row",
-		      GTK_SIGNAL_FUNC (hbciversion_unselect_row),
-		      &selected_row);
-
-  gnome_dialog_set_parent (GNOME_DIALOG (dialog), parent);
-  gtk_clist_freeze (GTK_CLIST (version_clist));
-  {
-    list_int *supported_v = HBCI_Bank_supportedVersions (bank);
-    g_assert (supported_v);
-    if (list_int_size (supported_v) == 0) {
-      list_int_delete (supported_v);
-      return FALSE;
-    }
-    list_int_foreach (supported_v, hbciversion_cb, version_clist);
-    list_int_delete (supported_v);
-  }
-
-  /* Initial selection */
-  initial_selection = HBCI_Bank_hbciVersion (bank);
-  gtk_clist_select_row 
-    (GTK_CLIST (version_clist), 
-     gtk_clist_find_row_from_data
-     (GTK_CLIST (version_clist), GINT_TO_POINTER (initial_selection)), 
-     0);
-
-  gtk_clist_thaw (GTK_CLIST (version_clist));
-  gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE);
-
-  retval = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));  
-
-  /*fprintf (stderr, "retval = %d, selected_row = %d\n", retval, selected_row);*/
-  if ((retval == 0) && (selected_row > 0))
-    {
-      int newversion = 
-	GPOINTER_TO_INT (gtk_clist_get_row_data
-			 (GTK_CLIST (version_clist), selected_row));
-      if (newversion != initial_selection) 
-	{
-	  HBCI_OutboxJob *job;
-
-	  gtk_widget_destroy (dialog);
-	  /*fprintf (stderr, "Setting new HBCI version %d\n", newversion); */
-	  HBCI_Bank_setHbciVersion (bank, newversion);
-	  /*HBCI_Bank_setBPDVersion (bank, 0);*/
-	  job = HBCI_OutboxJob_new("JobUpdateBankInfo", 
-				   (HBCI_Customer*)info->newcustomer, "");
-	  HBCI_Outbox_addJob(info->outbox, job);
-	  
-	  {
-	    HBCI_Job *jjob = HBCI_OutboxJob_Job(job);
-	    /* copied from aqmoney-tng/src/libaqmoney/adminjobs.cpp
-	       JobUpdateBankInfo */
-	    HBCI_Job_setIntProperty(jjob, "open/ident/country", 
-				    HBCI_Bank_country(bank));
-	    HBCI_Job_setProperty(jjob, "open/ident/bankcode", 
-				 HBCI_Bank_bankCode(bank));
-	    HBCI_Job_setIntProperty(jjob, "open/prepare/bpdversion",0);
-	    HBCI_Job_setIntProperty(jjob, "open/prepare/updversion",0);
-	  }
-	  
-	  gnome_ok_dialog_parented 
-	    /* Translators: Strings from this file are really only
-	     * needed inside Germany (HBCI is not supported anywhere
-	     * else). You may safely ignore strings from the
-	     * import-export/hbci subdirectory in other countries. */
-	    (_("You have changed the HBCI version. GnuCash will now need to \n"
-	       "update various system parameters, including the account list.\n"
-	       "Press 'Ok' now to proceed to updating the system and the account list."), parent);
-	  return TRUE;
-	}
-    }
-  
-  gtk_widget_destroy (dialog);
-  return FALSE;
-}
-
-
-/* -------------------------------------- */
-/* Copied from window-help.c */
-static void
-goto_string_cb(char * string, gpointer data)
-{
-  if(!data) return;
-  if(!string) {
-    *(char **)data = NULL;
-  }
-  else {
-    *(char **)data = g_strdup(string);
-  }
-}
-static void gnc_hbci_addaccount(HBCIInitialInfo *info, 
-				const HBCI_Customer *cust)
-{
-  HBCI_Bank *bank;
-  const HBCI_User *user;
-  gnc_HBCI_Account *acc;
-
-  GtkWidget *dlg;
-  char *prompt;
-  char *accnr = NULL;
-  int retval = -1;
-
-  g_assert(info);
-  user = HBCI_Customer_user (cust);
-  bank = (HBCI_Bank *) HBCI_User_bank (user);
-
-  /* Ask for new account id by opening a request_dialog -- a druid
-     page would be better from GUI design, but I'm too lazy. */
-  prompt = g_strdup_printf(_("Enter account id for new account \n"
-			     "at bank %s (bank code %s):"), 
-			   HBCI_Bank_name (bank), HBCI_Bank_bankCode (bank));
-  
-  dlg = gnome_request_dialog(FALSE, prompt, "", 20,
-			     &goto_string_cb, &accnr, GTK_WINDOW(info->window));
-  retval = gnome_dialog_run_and_close(GNOME_DIALOG(dlg));
-  
-  if ((retval == 0) && accnr && (strlen(accnr) > 0)) {
-    
-    /* Search for existing duplicate */
-    acc = list_HBCI_Account_find(info->hbci_accountlist, 
-				 bank, HBCI_Bank_bankCode (bank), accnr);
-
-    /* Check if such an account already exists */
-    if (acc)
-      {
-	/* Yes, then don't create it again */
-	gnc_error_dialog
-	  (info->window,
-	   _("An account with this account id at this bank already exists."));
-      }
-    else
-      {
-	/* No, then create it and add it to our internal list. */
-	acc = gnc_HBCI_Account_new (bank, HBCI_Bank_bankCode (bank), accnr);
-	info->hbci_accountlist = g_list_append(info->hbci_accountlist, acc);
-
-	/* Don't forget to update the account list, otherwise the new
-	   accounts won't show up. */
-	update_accountlist(info);
-      }
-  }
-    
-  g_free(prompt);
-  if (accnr) 
-    g_free (accnr);
-}
-/* -------------------------------------- */
-
-
-
-/*************************************************************
- * GUI callbacks
- */
-
 
 static void
 on_cancel (GnomeDruid *gnomedruid,
 	   gpointer user_data)
 {
   HBCIInitialInfo *info = user_data;
-  
+
+  /* FIXME: Need to choose a fixed ending procedure here */
+  /* probably not saving because of 'cancel', but for now we save too */
+  gnc_AB_BANKING_fini (info->api);
   delete_initial_druid(info);
 }
 
@@ -618,636 +308,28 @@
   gboolean successful = TRUE;
   g_assert (info);
 
-  if (info->configfile) {
-    //printf("on_finish: Got configfile %s, but the book has %s.\n", info->configfile, gnc_hbci_get_book_configfile (gnc_get_current_book ()));
-    if (!gnc_hbci_get_book_configfile (gnc_get_current_book ()) ||
-	(strcmp(info->configfile, 
-		gnc_hbci_get_book_configfile (gnc_get_current_book ())) != 0)) {
-      /* Name of configfile has changed */
-      gnc_hbci_set_book_configfile (gnc_get_current_book (), info->configfile);
-      if ((gnc_hbci_get_book_configfile (gnc_get_current_book ()) == 0) ||
-	  strcmp(info->configfile, 
-		 gnc_hbci_get_book_configfile (gnc_get_current_book ())) != 0) 
-	printf("on_finish: OOOPS: I just setted the book_configfile to %s, but the book now still has %s.\n", info->configfile, gnc_hbci_get_book_configfile (gnc_get_current_book ()));
-    }
-  }
-  
-  {
-    HBCI_Error *err;
-    //printf("on_finish: trying to save openhbci data to file %s.\n", gnc_hbci_get_book_configfile (gnc_get_current_book ()));
-    
-    err = gnc_hbci_api_save (info->api);
-    //printf("on_finish: finished saving openhbci data to file.\n");
-
-    if (err != NULL) {
-      if (!HBCI_Error_isOk (err)) {
-	successful = FALSE;
-	printf("on_finish: Error at saving OpenHBCI data: %s.\n",
-	       HBCI_Error_message (err));
-      }
-      HBCI_Error_delete (err);
-    }
-  }
-  
   if (successful && info->gnc_hash)
     accounts_save_kvp (info->gnc_hash);
-  if (successful && info->hbci_accountlist)
-    {
-      GList *kvplist = 
-	gnc_HBCI_Account_kvp_glist_from_glist(info->hbci_accountlist);
-      gnc_hbci_set_book_account_list (gnc_get_current_book (), kvplist);
-    }
   
+  gnc_AB_BANKING_fini (info->api);
   delete_initial_druid(info);
 }
 
 
-static gboolean 
-on_configfile_next (GnomeDruidPage *gnomedruidpage,
-		    gpointer arg1,
-		    gpointer user_data)
-{
-  HBCIInitialInfo *info = user_data;
-  char *filename;
-  HBCI_API *api;
-
-  filename = g_strstrip(gnome_file_entry_get_full_path 
-			(GNOME_FILE_ENTRY (info->configfileentry), FALSE));
-
-  if (!gnc_verify_exist_or_new_file (GTK_WIDGET (info->window), filename)) {
-    g_free (filename);
-    return TRUE;
-  }
-  /* file doesn't need to be created here since OpenHBCI will create
-     it automatically.*/
-
-  if (!gnc_test_dir_exist_error (GTK_WINDOW (info->window), filename)) {
-    g_free (filename);
-    return TRUE;
-  }
-  
-  {
-    if ((info->configfile == NULL) ||
-	(strcmp(filename, info->configfile) != 0)) {
-      /* Name of configfile has changed, so reset everything */
-      reset_initial_info (info);
-      info->configfile = g_strdup (filename);
-      /* Create new HBCI_API object, loading its data from filename */
-      info->api = gnc_hbci_api_new (filename, TRUE, 
-				    GTK_WIDGET (info->window), 
-				    &(info->interactor),
-				    &(info->hbci_accountlist));
-    }
-    else if (info->api == NULL)
-      /* Create new HBCI_API object, loading its data from filename */
-      info->api = gnc_hbci_api_new (filename, TRUE, 
-				    GTK_WIDGET (info->window), 
-				    &(info->interactor),
-				    &(info->hbci_accountlist));
-
-    api = info->api;
-    g_free (filename);
-    if (api == NULL)
-      return TRUE;
-  }
-  /* no libchipcard? Make that button greyed out*/
-  if (HBCI_API_mediumType(info->api, "DDVCard") != MediumTypeCard)
-    {
-      gtk_widget_set_sensitive (GTK_WIDGET (info->mediumddv),
-				FALSE);
-    } else {
-      gtk_widget_set_sensitive (GTK_WIDGET (info->mediumddv),
-				TRUE);
-    }
-
-  /* Together with the api, create a new outbox queue */
-  info->outbox = HBCI_Outbox_new();
-  
-  /* Get HBCI bank and account list */
-  {
-    const list_HBCI_Bank *banklist;
-
-    banklist = HBCI_API_bankList (api);
-    /*printf("%d banks found.\n", list_HBCI_Bank_size (banklist));*/
-    if (list_HBCI_Bank_size (banklist) == 0) {
-      /* Zero banks? go to next page (create_bank)*/
-      info->state = INI_ADD_BANK;
-      gnome_druid_set_page (GNOME_DRUID (info->druid), 
-			    GNOME_DRUID_PAGE (info->bankpage));
-      return TRUE;
-    }
-
-    if (HBCI_API_totalUsers(api) == 0) {
-      /* zero users? go to user-creation page*/
-      info->state = INI_ADD_USER;
-      info->newbank = choose_one_bank (info->window, 
-				       HBCI_API_bankList (info->api) );
-      gnome_druid_set_page (GNOME_DRUID (info->druid), 
-			    GNOME_DRUID_PAGE (info->userpage));
-      return TRUE;
-    }
-    
-    if (g_list_length(gnc_hbci_get_book_account_list
-		      (gnc_get_current_book ())) == 0) {
-      /* still no accounts? go to account update page*/
-      info->state = INI_UPDATE_ACCOUNTS;
-      info->newcustomer = choose_customer (info);
-      gnome_druid_set_page (GNOME_DRUID (info->druid), 
-			    GNOME_DRUID_PAGE (info->accountinfopage));
-      return TRUE;
-    }
-  }
-
-  info->state = INI_MATCH_ACCOUNTS;
-  /* accounts already exist? Then go to account matching page*/
-  gnome_druid_set_page (GNOME_DRUID (info->druid), 
-			GNOME_DRUID_PAGE (info->accountpage));
-  return TRUE;
-}
-static void
-on_configfile_activate (GtkEditable *editable,
-			gpointer user_data)
-{
-  on_configfile_next (NULL, NULL, user_data);
-}
-
-
-static gboolean 
-on_bankpage_back (GnomeDruidPage  *gnomedruidpage,
-		  gpointer         arg1,
-		  gpointer         user_data)
-{
-  HBCIInitialInfo *info = user_data;
-  g_assert(info);
-  
-  switch (info->state) {
-  case INI_ADD_BANK:
-    return FALSE;
-  case ADD_BANK:
-    gnome_druid_set_page (GNOME_DRUID (info->druid), 
-			  GNOME_DRUID_PAGE (info->accountpage));
-    return TRUE;
-  default:
-    return FALSE;
-  }
-}
-static gboolean 
-on_bankpage_next (GnomeDruidPage  *gnomedruidpage,
-		  gpointer         arg1,
-		  gpointer         user_data)
-{
-  HBCIInitialInfo *info = user_data;
-  const char *bankcode = NULL;
-  int countrycode = 0;
-  const char *ipaddr = NULL;/*, *port;*/
-  HBCI_Bank *bank = NULL;
-  g_assert (info);
-  g_assert (info->api);
-  
-  bankcode = gtk_entry_get_text (GTK_ENTRY (info->bankcode));
-  countrycode = atoi (gtk_entry_get_text (GTK_ENTRY (info->countrycode)));
-  ipaddr = gtk_entry_get_text (GTK_ENTRY (info->ipaddr));
-  
-  bank = HBCI_API_findBank(info->api, countrycode, bankcode);
-  if (bank == NULL) {
-    /*printf("on_bankpage_next: Creating bank with code %s.\n", bankcode);*/
-    bank = HBCI_API_bankFactory (info->api, countrycode, bankcode, ipaddr,
-				 "");
-    {
-      HBCI_Error *err;
-      HBCI_Transporter *tr;
-      HBCI_MessageEngine *me;
-
-      me = HBCI_API_engineFactory(info->api, 
-				  countrycode,
-				  bankcode,
-				  DEFAULT_HBCI_VERSION,
-				  "msgxml");
-      tr = HBCI_API_transporterFactory(info->api,
-				       ipaddr,
-				       "3000" /* DEFAULT_PORT */,
-				       500 /*AQMONEY_DEFAULT_CONN_TIMEOUT*/,
-				       "xptcp");
-      HBCI_Bank_setMessageEngine(bank, me, TRUE);
-      HBCI_Bank_setTransporter(bank, tr, TRUE);
-
-      err = HBCI_API_addBank (info->api, bank, TRUE);
-      if (err != NULL) {
-	printf("on_bankpage_next-CRITICAL: Error at addBank: %s.\n",
-	       HBCI_Error_message (err));
-	HBCI_Error_delete (err);
-	return TRUE;
-      }
-
-    }
-  } 
-  /*else {
-    printf("on_bankpage_next: Found bank, name %s.\n", HBCI_Bank_name(bank));
-    };*/
-  info->newbank = bank;
-
-  gnome_druid_set_page (GNOME_DRUID (info->druid), 
-			GNOME_DRUID_PAGE (info->userpage));
-  return TRUE;
-}
-/*static void
-on_ipaddr_activate (GtkEditable *editable,
-		    gpointer user_data)
-{
-  HBCIInitialInfo *info;
-  g_assert (info);
-  
-  if ((strlen(gtk_entry_get_text (GTK_ENTRY (info->bankcode))) > 0) &&
-      (strlen(gtk_entry_get_text (GTK_ENTRY (info->countrycode))) > 0) &&
-      (strlen(gtk_entry_get_text (GTK_ENTRY (info->ipaddr))) > 0))
-    on_bankpage_next (NULL, NULL, info);
-    }*/
-
 static void
-on_userid_prepare (GnomeDruidPage *gnomedruidpage,
-		   gpointer arg1,
-		   gpointer user_data)
-{
-  HBCIInitialInfo *info = user_data;
-  const char *bankcode, *bankname;
-  g_assert (info);
-  g_assert (info->newbank);
-    
-  bankcode = HBCI_Bank_bankCode (info->newbank);
-  bankname = HBCI_Bank_name (info->newbank);
-  
-  gtk_label_set_text (GTK_LABEL (info->user_bankcode),
-		      bankcode);
-  if (bankname && (strlen (bankname) > 0))
-    gtk_label_set_text (GTK_LABEL (info->user_bankname), bankname);
-  else {
-    gtk_label_set_text (GTK_LABEL (info->user_bankname), _("Unknown"));
-    gtk_widget_set_sensitive (GTK_WIDGET (info->user_bankname), FALSE);
-  }
-  /* Let the widgets be redrawn */
-  while (g_main_iteration (FALSE));
-}
-
-static gboolean 
-on_userid_back (GnomeDruidPage  *gnomedruidpage,
-		gpointer         arg1,
-		gpointer         user_data)
-{
-  HBCIInitialInfo *info = user_data;
-  g_assert(info);
-  
-  switch (info->state) {
-  case INI_ADD_BANK:
-  case ADD_BANK:
-    return FALSE;
-  case INI_ADD_USER:
-    gnome_druid_set_page (GNOME_DRUID (info->druid), 
-			  GNOME_DRUID_PAGE (info->filepage));
-    return TRUE;
-  case ADD_USER:
-    gnome_druid_set_page (GNOME_DRUID (info->druid), 
-			  GNOME_DRUID_PAGE (info->accountpage));
-    return TRUE;
-  default:
-    return FALSE;
-  }
-}
-static gboolean
-on_userid_focus_out (GtkWidget *widget,
-		     GdkEventFocus *event,
+on_aqbutton_prepare (GnomeDruidPage *gnomedruidpage,
+		     gpointer arg1,
 		     gpointer user_data)
 {
   HBCIInitialInfo *info = user_data;
-  const char *userid = NULL;
-  const char *customerid = NULL;
-  g_assert(info);
-  
-  userid = gtk_entry_get_text (GTK_ENTRY (info->userid));
-  customerid = gtk_entry_get_text (GTK_ENTRY (info->customerid));
-
-  if (strlen(customerid)==0)
-    gtk_entry_set_text (GTK_ENTRY (info->customerid), userid);
+  AB_BANKING *banking = info->api;
+  g_assert(banking);
 
-  return FALSE;
+  if (banking_has_accounts(banking))
+    druid_enable_next_button(info);
+  else
+    druid_disable_next_button(info);
 }
-static gboolean
-on_userid_next (GnomeDruidPage  *gnomedruidpage,
-		gpointer         arg1,
-		gpointer         user_data)
-{
-  HBCIInitialInfo *info = user_data;
-  const char *userid = NULL, *username = NULL;
-  const char *customerid = NULL, *customername = NULL;
-  HBCI_API *api = NULL;
-  HBCI_Bank *bank = NULL;
-  const HBCI_User *user = NULL;
-
-  g_assert (info);
-  api = info->api;
-  g_assert (api);
-  bank = (HBCI_Bank *)info->newbank;
-  g_assert (bank);
-  on_userid_focus_out (NULL, NULL, info);
-      
-  userid = gtk_entry_get_text (GTK_ENTRY (info->userid));
-  username = gtk_entry_get_text (GTK_ENTRY (info->username));
-  customerid = gtk_entry_get_text (GTK_ENTRY (info->customerid));
-  customername = gtk_entry_get_text (GTK_ENTRY (info->customername));
-
-  /*user = HBCI_Bank_findUser(bank, userid);
-    if (user == NULL)*/ 
-  user = NULL;
-  {
-    gboolean is_rdh;
-    HBCI_Medium *medium;
-    HBCI_User *newuser;
-    HBCI_Error *err;
-    char *mediumname;
-    const char *mediumtype;
-    int secmode;
-
-    /*printf("on_userid_next: Didn't find user with userid %s.\n", userid);*/
-    is_rdh = gtk_toggle_button_get_active 
-      (GTK_TOGGLE_BUTTON (info->mediumrdh));
-
-    if (is_rdh) {
-      /* Create RDH Medium */ 
-      mediumname = gnome_file_entry_get_full_path 
-	(GNOME_FILE_ENTRY (info->mediumpath), FALSE);
-
-      /* Some sanity checks on the filename*/
-      if (!gnc_verify_exist_or_new_file 
-	  (GTK_WIDGET (info->window), mediumname)) {
-	g_free (mediumname);
-	return TRUE;
-      }
-      if (!gnc_test_dir_exist_error (GTK_WINDOW (info->window), 
-				     mediumname)) {
-	g_free (mediumname);
-	return TRUE;
-      }
-      secmode = HBCI_SECURITY_RDH;
-      mediumtype = "RDHFile";
-    }
-    else {
-      /* Create DDV Medium */
-      mediumname = g_strdup("");
-      secmode = HBCI_SECURITY_DDV;
-      mediumtype = "DDVCard";
-    }
-
-    medium = HBCI_API_createNewMedium (api, 
-				       mediumtype,
-				       FALSE,
-				       280,
-				       HBCI_Bank_bankCode (bank),
-				       userid, 
-				       mediumname, &err);
-    g_free(mediumname);
-
-    if (medium == NULL) {
-      printf("on_userid_next: Couldn't create medium: %s\n", 
-	     HBCI_Error_message (err));
-      HBCI_Error_delete (err);
-      return TRUE;
-    }
-    
-    newuser = HBCI_API_userFactory (bank, medium, TRUE, userid, username);
-    /*HBCI_User_setUserName (newuser, username);*/
-    /*printf("on_userid_next: Created user with userid %s.\n", userid);*/
-    g_assert(newuser);
-    err = HBCI_Bank_addUser (bank, newuser, TRUE);
-    if (err != NULL) {
-      printf("on_userid_next-CRITICAL: Error at addUser: %s.\n",
-	     HBCI_Error_message (err));
-      HBCI_Error_delete (err);
-      return TRUE;
-    }
-      
-    /* Test mounting only for DDV cards. RDH files should work... */
-    if (secmode == HBCI_SECURITY_DDV) {
-      err = HBCI_Medium_mountMedium (medium, NULL);
-      if (err != NULL) {
-	printf("on_userid_next: Mounting medium failed: %s.\n",
-	       HBCI_Error_message (err));
-	HBCI_Error_delete (err);
-	return TRUE;
-      } 
-      printf("on_userid_next: Mounting medium was successful.\n");
-      HBCI_Medium_unmountMedium (medium, NULL);
-    }
-      
-
-    {
-      HBCI_Customer *cust;
-      cust = HBCI_API_customerFactory (newuser, customerid, customername);
-      g_assert (cust);
-      HBCI_User_addCustomer (newuser, cust, TRUE);
-      info->newcustomer = cust;
-    }
-
-    if (is_rdh) {
-      gnome_druid_set_page (GNOME_DRUID (info->druid), 
-			    GNOME_DRUID_PAGE (info->serverinfopage));
-      return TRUE;
-    } 
-    else
-      return FALSE;
-
-  }/*
-  else {
-    printf("on_userid_next: Found user, name %s.\n", HBCI_User_userName(user));
-    }*/
-
-  return FALSE;
-}
-
-static gboolean 
-on_accountinfo_back (GnomeDruidPage  *gnomedruidpage,
-		     gpointer         arg1,
-		     gpointer         user_data)
-{
-  HBCIInitialInfo *info = user_data;
-  g_assert(info);
-  
-  switch (info->state) {
-  case UPDATE_ACCOUNTS:
-    gnome_druid_set_page (GNOME_DRUID (info->druid), 
-			  GNOME_DRUID_PAGE (info->accountpage));
-    return TRUE;
-  case INI_UPDATE_ACCOUNTS:
-    gnome_druid_set_page (GNOME_DRUID (info->druid), 
-			  GNOME_DRUID_PAGE (info->filepage));
-    return TRUE;
-  default:
-    return FALSE;
-  }
-}
-static gboolean 
-on_accountinfo_next (GnomeDruidPage  *gnomedruidpage,
-		     gpointer         arg1,
-		     gpointer         user_data)
-{
-  HBCIInitialInfo *info = user_data;
-  const HBCI_Customer *customer = NULL;
-  const HBCI_User *user = NULL;
-  const HBCI_Medium *medium = NULL;
-  const HBCI_Bank *bank = NULL;
-  g_assert(info);
-  
-  /* of course we need to know for which customer we do this */
-  if (info->newcustomer == NULL) 
-    info->newcustomer = choose_customer (info);
-  
-  if (info->newcustomer == NULL) 
-    return FALSE;
-
-  customer = info->newcustomer;
-  user = HBCI_Customer_user(customer);
-  bank = HBCI_User_bank(user);
-  medium = HBCI_User_medium(user);
-  
-  {
-    HBCI_OutboxJob *job;
-      
-    /* Execute a Synchronize job, then a GetAccounts job. */
-    if (HBCI_Medium_securityMode(medium) == 
-	HBCI_SECURITY_RDH) {
-      /* Only do this sync job if this is a rdh medium. */
-      if ((strlen(HBCI_User_systemId(user)) == 0) ||
-	  (strcmp(HBCI_User_systemId(user), "0") == 0)) {
-	/* Only do this sync job if we don't have a systemId yet (not
-	   sure whether this is a good idea though */
-	job = HBCI_OutboxJob_new("JobSync", 
-				 (HBCI_Customer *)customer, "");
-	HBCI_Outbox_addJob (info->outbox, job);
-      
-	{
-	  HBCI_Job *jjob = HBCI_OutboxJob_Job(job);
-	  HBCI_Job_setIntProperty
-	    (jjob, "open/ident/country", HBCI_Bank_country(bank));
-	  HBCI_Job_setProperty
-	    (jjob, "open/ident/bankcode", HBCI_Bank_bankCode(bank));
-	  HBCI_Job_setProperty
-	    (jjob, "open/ident/customerid", HBCI_Customer_custId(customer));
-
-	  /* for getting a system id */
-	  HBCI_Job_setIntProperty(jjob, "open/sync/mode",0);
-	  HBCI_Job_setProperty(jjob, "open/ident/systemid", "0");
-	}
-
-	/* Execute Outbox. */
-	if (!gnc_hbci_api_execute (info->window, info->api, info->outbox, 
-				   job, info->interactor)) {
-	  /* HBCI_API_executeOutbox failed. */
-	  GWEN_DB_NODE *rsp = HBCI_Outbox_response(info->outbox);
-	  printf("on_accountinfo_next: oops, executeOutbox of JobSync failed.\n");
-
-	  printf("on_accountinfo_next: Complete HBCI_Outbox response:\n");
-	  GWEN_DB_Dump(rsp, stdout, 1);
-	  GWEN_DB_Group_free(rsp);
-
-	  rsp = HBCI_Job_responseData(HBCI_OutboxJob_Job(job));
-	  printf("on_accountinfo_next: Complete HBCI_Job response:\n");
-	  if (rsp) 
-	    GWEN_DB_Dump(rsp, stderr, 1);
-	  /*return FALSE;*/
-	  /* -- it seems to be no problem if this fails ?! */
-	}
-
-	/* Now process the response of the JobSync */
-	{
-	  const char *sysid = 
-	    HBCI_Job_getProperty(HBCI_OutboxJob_Job(job), 
-				 "response/syncresponse/systemid", "");
-	  g_assert(sysid);
-
-	  if (strlen(sysid) > 0) {
-	    HBCI_User_setSystemId((HBCI_User*) user, sysid);
-	    printf("on_accountinfo_next: Ok. Got sysid '%s'.\n", sysid);
-	  }
-	  else {
-	    /* Got no sysid. */
-	    GWEN_DB_NODE *rsp = HBCI_Outbox_response(info->outbox);
-	    printf("on_accountinfo_next: oops, got no sysid.\n");
-	
-	    printf("on_accountinfo_next: Complete HBCI_Outbox response:\n");
-	    GWEN_DB_Dump(rsp, stdout, 1);
-	    GWEN_DB_Group_free(rsp);
-
-	    rsp = HBCI_Job_responseData(HBCI_OutboxJob_Job(job));
-	    printf("on_accountinfo_next: Complete HBCI_Job response:\n");
-	    if (rsp) 
-	      GWEN_DB_Dump(rsp, stderr, 1);
-	    return FALSE;
-	  }
-	}
-      } /* if strlen(systemid)==0 */
-    } /* if securityMode == RDH */
-    
-  
-    /* Now the GetAccounts job. */
-    job = HBCI_OutboxJob_new("JobGetAccounts", 
-			     (HBCI_Customer *)customer, "");
-    HBCI_Outbox_addJob (info->outbox, job);
-    
-    {
-      HBCI_Job *jjob = HBCI_OutboxJob_Job(job);
-      HBCI_Job_setIntProperty
-	(jjob, "open/ident/country", HBCI_Bank_country(bank));
-      HBCI_Job_setProperty
-	(jjob, "open/ident/bankcode", HBCI_Bank_bankCode(bank));
-      HBCI_Job_setProperty
-	(jjob, "open/ident/customerid", HBCI_Customer_custId(customer));
-      HBCI_Job_setIntProperty(jjob, "open/prepare/updversion",0);
-
-      if (HBCI_Medium_securityMode(medium) == 
-	  HBCI_SECURITY_RDH) {
-	/* Only set this for RDH medium */
-	char *mediumid = HBCI_Medium_mediumId((HBCI_Medium *)medium);
-	g_assert(mediumid);
-	if (strlen(mediumid)==0)
-	  HBCI_Job_setProperty(jjob, "open/ident/systemId", "0");
-	else
-	  HBCI_Job_setProperty(jjob, "open/ident/systemId", mediumid);
-	free(mediumid);
-      }
-    }
-    
-
-    /* Execute Outbox. */
-    if (!gnc_hbci_api_execute (info->window, info->api, info->outbox, 
-			       job, info->interactor)) {
-      /* HBCI_API_executeOutbox failed. */
-      GWEN_DB_NODE *rsp = HBCI_Outbox_response(info->outbox);
-      printf("on_accountinfo_next: oops, executeOutbox of JobGetAccounts failed.\n");
-
-      printf("on_accountinfo_next: Complete HBCI_Outbox response:\n");
-      GWEN_DB_Dump(rsp, stdout, 1);
-      GWEN_DB_Group_free(rsp);
-
-      rsp = HBCI_Job_responseData(HBCI_OutboxJob_Job(job));
-      printf("on_accountinfo_next: Complete HBCI_Job response:\n");
-      if (rsp) 
-	GWEN_DB_Dump(rsp, stderr, 1);
-
-      /* And clean everything up */
-      HBCI_Outbox_removeByStatus (info->outbox, HBCI_JOB_STATUS_NONE);
-      return FALSE;
-    }
-
-    /* Now evaluate the GetAccounts job. */
-    info->hbci_accountlist =
-      gnc_processOutboxResponse(info->api, info->outbox, info->hbci_accountlist);
-    
-    /* And clean everything up */
-    HBCI_Outbox_removeByStatus (info->outbox, HBCI_JOB_STATUS_NONE);
-  }
-  
-  return FALSE;
-}
-
-
 
 
 static gboolean 
@@ -1275,6 +357,10 @@
 			gpointer user_data)
 {
   HBCIInitialInfo *info = user_data;
+  
+  /* Make sure the api reads in the current data */
+  AB_Banking_Fini (info->api);
+  AB_Banking_Init (info->api);
 
   if (info->gnc_hash == NULL)
     info->gnc_hash = gnc_hbci_new_hash_from_kvp (info->api);
@@ -1285,13 +371,14 @@
   update_accountlist(info);
 }
 
+
 static void
 on_accountlist_select_row (GtkCList *clist, gint row,
 			   gint column, GdkEvent *event,
 			   gpointer user_data)
 {
   HBCIInitialInfo *info = user_data;
-  gnc_HBCI_Account *hbci_acc;
+  AB_ACCOUNT *hbci_acc;
   Account *gnc_acc, *old_value;
   gchar *longname;
   gnc_commodity *currency = NULL;
@@ -1300,16 +387,16 @@
   if (hbci_acc) {
     old_value = g_hash_table_lookup (info->gnc_hash, hbci_acc);
 
-    /*printf("on_accountlist_select_row: Selected hbci_acc id %s; old_value %p \n",
-	   gnc_HBCI_Account_accountId(hbci_acc),
-	   old_value);*/
-
-    longname = gnc_HBCI_Account_longname(hbci_acc);
-    if (gnc_HBCI_Account_currency(hbci_acc) && 
-	(strlen(gnc_HBCI_Account_currency(hbci_acc)) > 0)) {
+    printf("on_accountlist_select_row: Selected hbci_acc id %s; old_value %p \n",
+	   AB_Account_GetAccountNumber(hbci_acc),
+	   old_value);
+
+    longname = gnc_hbci_account_longname(hbci_acc);
+    if (AB_Account_GetCurrency (hbci_acc) && 
+	(strlen(AB_Account_GetCurrency (hbci_acc)) > 0)) {
       currency = gnc_commodity_table_lookup 
 	(gnc_book_get_commodity_table (gnc_get_current_book ()), 
-	 GNC_COMMODITY_NS_ISO, gnc_HBCI_Account_currency(hbci_acc));
+	 GNC_COMMODITY_NS_ISO, AB_Account_GetCurrency (hbci_acc));
     }
 
     gnc_acc = gnc_import_select_account(NULL, TRUE, longname, currency, BANK,
@@ -1332,403 +419,6 @@
 
 
 
-static gboolean
-on_iniletter_info_back (GnomeDruidPage  *gnomedruidpage,
-			  gpointer arg1,
-			  gpointer user_data)
-{
-  HBCIInitialInfo *info = user_data;
-  g_assert(info);
-
-  if (info->interactor)
-    GNCInteractor_hide (info->interactor);
-  
-  gnome_druid_set_page (GNOME_DRUID (info->druid), 
-			GNOME_DRUID_PAGE (info->userpage));
-  return TRUE;
-}
-
-
-
-
-static gboolean
-on_iniletter_info_next (GnomeDruidPage  *gnomedruidpage,
-			  gpointer arg1,
-			  gpointer user_data)
-{
-  HBCIInitialInfo *info = user_data;
-  const HBCI_Customer *customer = NULL;
-  const HBCI_User *user = NULL;
-  const HBCI_Bank *bank = NULL;
-  g_assert(info);
-
-  if (info->newcustomer == NULL) 
-    return FALSE;
-
-  customer = info->newcustomer;
-  user = HBCI_Customer_user(customer);
-  bank = HBCI_User_bank(user);
-  
-  if (info->gotkeysforCustomer == NULL) {
-    /* Execute a GetKey job. */
-    HBCI_OutboxJob *job;
-    
-    job = HBCI_OutboxJob_new("JobGetKeys", (HBCI_Customer*)customer, "");
-    
-    {
-      HBCI_Job *jjob = HBCI_OutboxJob_Job(job);
-      /* Copied from libaqmoney's JobGetKeys::JobGetKeys(Pointer<Customer> c) */
-      HBCI_Job_setIntProperty(jjob, "open/ident/country", HBCI_Bank_country(bank));
-      HBCI_Job_setProperty(jjob, "open/ident/bankcode", HBCI_Bank_bankCode(bank));
-      HBCI_Job_setProperty(jjob, "open/ident/customerId", "9999999999");
-      HBCI_Job_setProperty(jjob, "open/ident/systemId", "0");
-
-      HBCI_Job_setIntProperty(jjob, "open/signkey/key/country", 
-			      HBCI_Bank_country(bank));
-      HBCI_Job_setProperty(jjob, "open/signkey/key/bankcode", 
-			   HBCI_Bank_bankCode(bank));
-      /*HBCI_Job_setProperty(jjob, "open/signkey/key/userid", "9999999999");*/
-
-      HBCI_Job_setIntProperty(jjob, "open/cryptkey/key/country", 
-			      HBCI_Bank_country(bank));
-      HBCI_Job_setProperty(jjob, "open/cryptkey/key/bankcode", 
-			   HBCI_Bank_bankCode(bank));
-      /*HBCI_Job_setProperty(jjob, "open/cryptkey/key/userid", "9999999999");*/
-    }
-    HBCI_Outbox_addJob (info->outbox, job);
-
-    /* Execute Outbox. */
-    if (!gnc_hbci_api_execute (info->window, info->api, info->outbox, 
-			       job, info->interactor)) {
-      /* HBCI_API_executeOutbox failed. */
-      GWEN_DB_NODE *rsp = HBCI_Outbox_response(info->outbox);
-      printf("on_iniletter_info_next: oops, executeOutbox failed.\n");
-
-      printf("Complete HBCI_Outbox response:\n");
-      GWEN_DB_Dump(rsp, stdout, 1);
-      GWEN_DB_Group_free(rsp);
-
-      rsp = HBCI_Job_responseData(HBCI_OutboxJob_Job(job));
-      printf("Complete HBCI_Job response:\n");
-      if (rsp) 
-	GWEN_DB_Dump(rsp, stderr, 1);
-
-      /* And clean everything up */
-      HBCI_Outbox_removeByStatus (info->outbox, HBCI_JOB_STATUS_NONE);
-      return FALSE;
-    }
-
-    /* Get keys from Job; store them in the customer's medium @§%&! */
-    if (!gnc_hbci_evaluate_GetKeys(info->outbox, job,
-				   (HBCI_Customer *)customer)) {
-      return FALSE;
-    }
-    
-    HBCI_Outbox_removeByStatus (info->outbox, HBCI_JOB_STATUS_NONE);
-    info->gotkeysforCustomer = customer;
-
-  }
-  else if (info->gotkeysforCustomer != customer) {
-    printf("on_iniletter_info_next: Oops, already got keys for another customer. Not yet implemented.\n");
-
-    /* And clean everything up */
-    HBCI_Outbox_removeByStatus (info->outbox, HBCI_JOB_STATUS_NONE);
-    return TRUE;
-  }
-
-  /* Create Ini-Letter */
-  {
-    char *res;
-    const HBCI_Medium *med;
-    const HBCI_MediumRDHBase *medr;
-    gboolean use_cryptkey;
-    char *tmp, *hash, *exponent, *modulus;
-    const char *bankcode, *bankname, *bankip;
-    int keynumber, keyversion;
-    time_t now = time(NULL);
-    char *time_now = ctime(&now);
-
-    bankcode = HBCI_Bank_bankCode (bank);
-    bankname = HBCI_Bank_name (bank);
-    bankname = (strlen (bankname) > 0 ? bankname : _("Unknown"));
-    bankip = HBCI_Bank_addr (bank);    
-
-    med = HBCI_User_medium (user);
-    medr = HBCI_Medium_MediumRDHBase ((HBCI_Medium *)med);
-    g_assert (medr);
-
-    use_cryptkey = !HBCI_MediumRDHBase_hasInstSignKey (medr);
-    tmp = HBCI_MediumRDHBase_getInstIniLetterHash(medr, use_cryptkey);
-    hash = to_hexstring_hash (tmp);
-    free (tmp);
-    tmp = HBCI_MediumRDHBase_getInstIniLetterExponent(medr, use_cryptkey);
-    exponent = to_hexstring (tmp);
-    free (tmp);
-    tmp = HBCI_MediumRDHBase_getInstIniLetterModulus(medr, use_cryptkey);
-    modulus = to_hexstring (tmp);
-    free (tmp);
-    keynumber = HBCI_MediumRDHBase_getInstKeyNumber(medr, use_cryptkey);
-    keyversion = HBCI_MediumRDHBase_getInstKeyVersion(medr, use_cryptkey);
-
-    res = g_strdup_printf("<html><body><h1>Ini-Brief der Bank %s</h1>\n"
-"<h2>Bankdaten</h2><table>\n"
-"<tr><td>Bankleitzahl</td><td>%s</td></tr>\n"
-"<tr><td>IP-Adresse</td><td>%s</td></tr>\n"
-"<tr><td>Datum, Uhrzeit</td><td>%s</td></tr>\n"
-"<tr><td>Schl&uuml;sselnummer</td><td>%d</td></tr>\n"
-"<tr><td>Schl&uuml;sselversion</td><td>%d</td></tr>\n"
-"</table>\n"
-"<h2>Oeffentlicher Schl&uuml;ssel f&uuml;r die elektronische\n"
-"Signatur</h2>\n"
-"<h3>Exponent (768 Bit)</h3>\n"
-"<pre>%s</pre>\n"
-"<h3>Modulus (768 Bit)</h3>\n"
-"<pre>%s</pre>\n"
-"<h3>Hashwert</h3>\n"
-"<pre>%s</pre>\n"
-"</body></html>",
-			  bankname, 
-			  bankcode,
-			  bankip,
-			  time_now,
-			  keynumber, keyversion,
-			  exponent, modulus, hash);
-
-    g_free (exponent);
-    g_free (modulus);
-    g_free (hash);
-    
-    gnc_html_show_data (info->server_html, res, strlen(res));
-    gnc_html_reload (info->server_html);
-    
-    g_free (res);
-  }
-  
-  return FALSE;
-}
-
-
-static void
-on_iniletter_server_prepare (GnomeDruidPage *gnomedruidpage,
-			     gpointer arg1,
-			     gpointer user_data)
-{
-  HBCIInitialInfo *info = user_data;
-  g_assert(info);
-
-  /* Workaround to get let the GtkHTML scrollbars appear. */
-  gtk_box_set_spacing (GTK_BOX (info->server_vbox), 1);
-  gtk_widget_queue_resize (GTK_WIDGET (info->server_vbox));
-  while (g_main_iteration (FALSE));
-  gtk_box_set_spacing (GTK_BOX (info->server_vbox), 0);
-  gtk_widget_queue_resize (GTK_WIDGET (info->server_vbox));
-  
-  druid_disable_next_button (info);
-
-  /* Let the widgets be redrawn */
-  while (g_main_iteration (FALSE));
-}
-
-static gboolean
-on_iniletter_userinfo_next (GnomeDruidPage  *gnomedruidpage,
-			  gpointer arg1,
-			  gpointer user_data)
-{
-  HBCIInitialInfo *info = user_data;
-  char *res;
-  g_assert (info);
-
-  if (info->newcustomer == NULL)
-    return FALSE;
-
-  if (info->gotkeysforCustomer == info->newcustomer) {
-    /* Execute a SendKey job. */
-    HBCI_OutboxJob *job;
-    
-    job = HBCI_OutboxJob_new("JobSendKeys", 
-			     (HBCI_Customer*)info->newcustomer, "");
-
-    {
-      HBCI_Job *jjob = HBCI_OutboxJob_Job(job);
-      const HBCI_Customer *customer = info->newcustomer;
-      const HBCI_User *user = HBCI_Customer_user(customer);
-      const HBCI_Bank *bank = HBCI_User_bank(user);
-      const HBCI_Medium *med = HBCI_User_medium (user);
-      const HBCI_MediumRDHBase *medr = HBCI_Medium_MediumRDHBase ((HBCI_Medium*)med);
-      const HBCI_RSAKey *signkey = HBCI_MediumRDHBase_userPubSignKey(medr);
-      const HBCI_RSAKey *cryptkey = HBCI_MediumRDHBase_userPubCryptKey(medr);
-#define MY_MAXBUF_SIZE 1024
-      unsigned tmp_bufsize = MY_MAXBUF_SIZE;
-      unsigned tmp_actual;
-      char tmp[MY_MAXBUF_SIZE];
-      g_assert (medr);
-      /* Copied from libaqmoney's JobSendKeys::JobSendKeys(Pointer<Customer> c) */
-
-      // prepare identification
-      HBCI_Job_setProperty(jjob, "open/ident/systemid", "0");
-      HBCI_Job_setIntProperty(jjob, "open/ident/country", HBCI_Bank_country(bank));
-      HBCI_Job_setProperty(jjob, "open/ident/bankcode", HBCI_Bank_bankCode(bank));
-      HBCI_Job_setProperty(jjob, "open/ident/customerid", HBCI_Customer_custId(customer));
-
-      // prepare sign key
-      HBCI_Job_setProperty(jjob, "open/signkey/keyname/bankCode", HBCI_Bank_bankCode(bank));
-      HBCI_Job_setProperty(jjob, "open/signkey/keyname/userid", HBCI_User_userId(user));
-      HBCI_Job_setIntProperty(jjob, "open/signkey/keyname/keynum", HBCI_RSAKey_number(signkey));
-      HBCI_Job_setIntProperty(jjob, "open/signkey/keyname/keyversion", HBCI_RSAKey_version(signkey));
-      tmp_actual = HBCI_RSAKey_getModulusData(signkey, tmp, tmp_bufsize);
-      HBCI_Job_setBinProperty(jjob, "open/signkey/key/modulus", tmp, tmp_actual);
-      tmp_actual = HBCI_RSAKey_getExpData(signkey, tmp, tmp_bufsize);
-      HBCI_Job_setBinProperty(jjob, "open/signkey/key/exponent", tmp, tmp_actual);
-
-      // prepare crypt key
-      HBCI_Job_setProperty(jjob, "open/cryptkey/keyname/bankCode", HBCI_Bank_bankCode(bank));
-      HBCI_Job_setProperty(jjob, "open/cryptkey/keyname/userid", HBCI_User_userId(user));
-      HBCI_Job_setIntProperty(jjob, "open/cryptkey/keyname/keynum", HBCI_RSAKey_number(cryptkey));
-      HBCI_Job_setIntProperty(jjob, "open/cryptkey/keyname/keyversion", HBCI_RSAKey_version(cryptkey));
-      tmp_actual = HBCI_RSAKey_getModulusData(cryptkey, tmp, tmp_bufsize);
-      HBCI_Job_setBinProperty(jjob, "open/cryptkey/key/modulus", tmp, tmp_actual);
-      tmp_actual = HBCI_RSAKey_getExpData(cryptkey, tmp, tmp_bufsize);
-      HBCI_Job_setBinProperty(jjob, "open/cryptkey/key/exponent", tmp, tmp_actual);
-    }
-
-    HBCI_Outbox_addJob (info->outbox, job);
-
-    /* Execute Outbox. */
-    if (!gnc_hbci_api_execute (info->window, info->api, info->outbox, 
-			       job, info->interactor)) {
-      /* HBCI_API_executeOutbox failed. */
-      GWEN_DB_NODE *rsp = HBCI_Outbox_response(info->outbox);
-      printf("on_iniletter_userinfo_next: Oops, api_execute failed.\n");
-      printf("on_iniletter_userinfo_next: Complete HBCI_Outbox response:\n");
-      GWEN_DB_Dump(rsp, stdout, 1);
-      GWEN_DB_Group_free(rsp);
-
-      rsp = HBCI_Job_responseData(HBCI_OutboxJob_Job(job));
-      printf("on_iniletter_userinfo_next: Complete HBCI_Job response:\n");
-      if (rsp) 
-	GWEN_DB_Dump(rsp, stderr, 1);
-
-      /* And clean everything up */
-      HBCI_Outbox_removeByStatus (info->outbox, HBCI_JOB_STATUS_NONE);
-      return FALSE;
-    }
-    
-    {
-      GWEN_DB_NODE *rsp = HBCI_Outbox_response(info->outbox);
-      printf("on_iniletter_userinfo_next: Complete HBCI_Outbox response:\n");
-      GWEN_DB_Dump(rsp, stdout, 1);
-      GWEN_DB_Group_free(rsp);
-
-      rsp = HBCI_Job_responseData(HBCI_OutboxJob_Job(job));
-      printf("on_iniletter_userinfo_next: Complete HBCI_Job response:\n");
-      if (rsp) 
-	GWEN_DB_Dump(rsp, stderr, 1);
-    }
-    
-
-    HBCI_Outbox_removeByStatus (info->outbox, HBCI_JOB_STATUS_NONE);
-  }
-  else {
-    printf("on_iniletter_userinfo_next: Oops, already got keys for another customer. Not yet implemented.\n");
-    return TRUE;
-  }
-
-  {
-    const HBCI_Medium *med;
-    const HBCI_MediumRDHBase *medr;
-    int keynumber, keyversion;
-    char *tmp, *hash, *exponent, *modulus;
-    const HBCI_User *user;
-    HBCI_Customer *cust;
-    time_t now = time(NULL);
-    char *time_now = ctime(&now);
-
-    cust = (HBCI_Customer *)info->newcustomer;
-    user = HBCI_Customer_user (cust);
-    med = HBCI_User_medium (user);
-    medr = HBCI_Medium_MediumRDHBase ((HBCI_Medium *)med);
-    g_assert (medr);
-
-    tmp = HBCI_MediumRDHBase_getUserIniLetterHash(medr);
-    hash = to_hexstring_hash (tmp);
-    g_free (tmp);
-    tmp = HBCI_MediumRDHBase_getUserIniLetterExponent(medr);
-    exponent = to_hexstring (tmp);
-    g_free (tmp);
-    tmp = HBCI_MediumRDHBase_getUserIniLetterModulus(medr);
-    modulus = to_hexstring (tmp);
-    g_free (tmp);
-    keynumber = HBCI_MediumRDHBase_getUserKeyNumber(medr);
-    keyversion = HBCI_MediumRDHBase_getUserKeyVersion(medr);
-
-    res = g_strdup_printf("<html><body><h1>Ini-Brief</h1>\n"
-"<h2>Benutzerdaten</h2><table>\n"
-"<tr><td>Benutzername</td><td>%s</td></tr>\n"
-"<tr><td>Datum, Uhrzeit</td><td>%s</td></tr>\n"
-"<tr><td>Benutzerkennung</td><td>%s</td></tr>\n"
-"<tr><td>Schl&uuml;sselnummer</td><td>%d</td></tr>\n"
-"<tr><td>Schl&uuml;sselversion</td><td>%d</td></tr>\n"
-"<tr><td>Kundensystemkennung</td><td>%s</td></tr>\n"
-"</table>\n"
-"<h2>Oeffentlicher Schl&uuml;ssel f&uuml;r die elektronische\n"
-"Signatur</h2>\n"
-"<h3>Exponent</h3>\n"
-"<pre>%s</pre>\n"
-"<h3>Modulus</h3>\n"
-"<pre>%s</pre>\n"
-"<h3>Hash</h3>\n"
-"<pre>%s</pre>\n"
-"<p>&nbsp;</p>\n"
-"<hr>\n"
-"Ort, Datum, Unterschrift</body></html>",
-			  HBCI_User_name (user),
-			  time_now,
-			  HBCI_User_userId (user),
-			  keynumber, keyversion,
-			  HBCI_Hbci_systemName (HBCI_API_Hbci (info->api)),
-			  exponent, modulus, hash);
-    
-    g_free (exponent);
-    g_free (modulus);
-    g_free (hash);
-  }
-  gnc_html_show_data (info->user_html, res, strlen(res));
-  gnc_html_reload (info->user_html);
-
-  g_free (res);
-
-  return FALSE;
-}
-
-static void
-on_iniletter_user_prepare (GnomeDruidPage  *gnomedruidpage,
-			gpointer arg1,
-			gpointer user_data)
-{
-  HBCIInitialInfo *info = user_data;
-  g_assert (info);
-  
-  /* Workaround to get let the GtkHTML scrollbars appear. */
-  gtk_box_set_spacing (GTK_BOX (info->user_vbox), 1);
-  gtk_widget_queue_resize (GTK_WIDGET (info->user_vbox));
-  while (g_main_iteration (FALSE));
-  gtk_box_set_spacing (GTK_BOX (info->user_vbox), 0);
-  gtk_widget_queue_resize (GTK_WIDGET (info->user_vbox));
-
-  druid_disable_next_button (info);
-
-  while (g_main_iteration (FALSE));
-}
-static gboolean
-on_iniletter_user_next (GnomeDruidPage  *gnomedruidpage,
-			gpointer arg1,
-			gpointer user_data)
-{
-  /*HBCIInitialInfo *info = user_data;*/
-  return FALSE;
-}
-
-
 
 
 static void
@@ -1738,60 +428,15 @@
   HBCIInitialInfo *info = user_data;
   const char *name;
   g_assert(info->druid);
-  g_assert(info->userpage);
   
   name = gtk_widget_get_name (GTK_WIDGET (button));
-  if (strcmp (name, "addbank_button") == 0) {
-    info->state = ADD_BANK;
-    gnome_druid_set_page (GNOME_DRUID (info->druid), 
-			  GNOME_DRUID_PAGE (info->bankpage));
-  } else if (strcmp (name, "adduser_button") == 0) {
-    info->state = ADD_USER;
-    info->newbank = choose_one_bank (info->window, 
-				     HBCI_API_bankList (info->api) );
-    gnome_druid_set_page (GNOME_DRUID (info->druid), 
-			  GNOME_DRUID_PAGE (info->userpage));
-  } else if (strcmp (name, "hbciversion_button") == 0) {
-    /* Choose hbci version */
-    info->state = UPDATE_ACCOUNTS;
-    info->newcustomer = choose_customer (info);
-    if (info->newcustomer == NULL)
-      return;
-    if (choose_hbciversion_dialog 
-	(GTK_WINDOW (info->window),
-	 (HBCI_Bank *) 
-	 HBCI_User_bank (HBCI_Customer_user (info->newcustomer)),
-	 info))
-      gnome_druid_set_page (GNOME_DRUID (info->druid), 
-			    GNOME_DRUID_PAGE (info->accountinfopage));
+  if (strcmp (name, "aqhbci_button") == 0) {
+/*     info->state = ADD_BANK; */
+    /* gnome_druid_set_page (GNOME_DRUID (info->druid), 
+       GNOME_DRUID_PAGE (info->bankpage)); */
   } else if (strcmp (name, "updatelist_button") == 0) {
     info->state = UPDATE_ACCOUNTS;
-    info->newcustomer = choose_customer (info);
     /* Nothing else to do. */
-    gnome_druid_set_page (GNOME_DRUID (info->druid), 
-			  GNOME_DRUID_PAGE (info->accountinfopage));
-  } else if (strcmp (name, "addaccount_button") == 0) {
-    /* manually adding HBCI account is not yet implemented (should be
-       rather easy, though) */
-    info->newcustomer = choose_customer (info);
-    gnc_hbci_addaccount(info, info->newcustomer);
-    /* Nothing else to do. Stay at this druid page. */
-  } else if (strcmp (name, "serveryes_button") == 0) {
-    druid_enable_next_button (info);
-  } else if (strcmp (name, "serverno_button") == 0) {
-    druid_disable_next_button (info);
-    gnc_error_dialog(info->window,
-		     _("Since the cryptographic keys of the bank cannot be verified,\n"
-		       "you should stop contacting this Server Internet Address\n"
-		       "and contact your bank. To help your bank figure out the\n"
-		       "problem, you should print out this erroneous Ini-Letter\n"
-		       "and show it to your bank. Please abort the HBCI setup\n"
-		       "druid now."));
-  } else if (strcmp (name, "serverprint_button") == 0) {
-    gnc_html_print (info->server_html);
-  } else if (strcmp (name, "userprint_button") == 0) {
-    druid_enable_next_button (info);
-    gnc_html_print (info->user_html);
   } else {
     printf("on_button_clicked: Oops, unknown button: %s\n",
 	   name);
@@ -1799,6 +444,127 @@
 }
 
 
+static void
+on_aqhbci_button (GtkButton *button,
+		  gpointer user_data)
+{
+  HBCIInitialInfo *info = user_data;
+  GWEN_BUFFER *buf;
+  int res;
+  const char *backend_name = "aqhbci";
+
+  /* NOTE NOTE NOTE: This is the name for the external application
+     shipped with aqhbci that contains the setup druid for HBCI
+     related stuff. The name is misleading -- it requires qt but not
+     kde). This application contains the very verbose step-by-step
+     setup wizard for the HBCI account, and the application is shared
+     with other AqBanking-based financial managers that offer the HBCI
+     features (e.g. KMyMoney). See gnucash-devel discussion here
+     https://lists.gnucash.org/pipermail/gnucash-devel/2004-December/012351.html 
+  */
+  const char *wizard_name = "kde_wizard";
+  gboolean wizard_exists;
+  const char *wizard_path;
+  int fd;
+  AB_BANKING *banking = info->api;
+  g_assert(info->druid);
+
+  buf = GWEN_Buffer_new(NULL, 200, 0, 0);
+  AB_Banking_GetWizardPath(banking, backend_name, buf);
+  wizard_exists = (strlen(GWEN_Buffer_GetStart(buf)) > 0);
+
+  GWEN_Buffer_AppendString(buf, "/");
+  /* {
+    GWEN_PLUGIN_DESCRIPTION_LIST2 *l = 
+      AB_Banking_GetWizardDescrs(banking, backend_name);
+    const GWEN_PLUGIN_DESCRIPTION *x = GWEN_PluginDescription_List2_GetFront(l);
+    // There needs to be a way to find the file name here. Currently
+    // this doesnt work yet.
+    wizard_name = GWEN_PluginDescription_GetName(x);
+    GWEN_Buffer_AppendString(buf, wizard_name);
+    GWEN_PluginDescription_List2_freeAll(l);
+    } */
+  GWEN_Buffer_AppendString(buf, wizard_name);
+  wizard_path = GWEN_Buffer_GetStart(buf);
+
+  /* Really check whether the file exists */
+  fd = open( wizard_path, O_RDONLY );
+  if ( fd == -1)
+    wizard_exists = FALSE;
+  else
+    close( fd );
+
+  druid_disable_next_button(info);
+  AB_Banking_DeactivateProvider(banking, backend_name);
+  if (wizard_exists) {
+    int wait_status;
+    int wait_result = 0;
+
+    /* Call the qt wizard (called kde wizard). See the note above
+       about why this approach is chosen. */
+
+    /* In gtk2, this would be g_spawn_async or similar. */
+    AB_Banking_Fini (info->api);
+    {
+      pid_t pid;
+      pid = fork();
+      switch (pid) {
+      case -1:
+	printf("Fork call failed. Cannot start AqHBCI setup wizard.");
+	res = -1;
+	AB_Banking_Init (info->api);
+	break;
+      case 0: /* child */
+	execl(wizard_path, wizard_path, NULL);
+	printf("Fork call failed. Cannot start AqHBCI setup wizard.");
+	_exit(0);
+      default: /* parent */
+	res = 0;
+	while (wait_result == 0) {
+	  gtk_main_iteration();
+	  wait_result = waitpid(pid, &wait_status, WNOHANG);
+	  if ((wait_result == pid) && WIFEXITED(wait_status))
+	    res = WEXITSTATUS(wait_status);
+	  else
+	    res = -8;
+	}
+	AB_Banking_Init (info->api);
+      }
+    }
+
+    if (res == 0) {
+      res = AB_Banking_ActivateProvider(banking, backend_name);
+      if (res == 0)
+	druid_enable_next_button(info);
+      else {
+	printf("on_aqhbci_button: Oops, after successful wizard the activation return nonzero value: %d. \n", res);
+	druid_disable_next_button(info);
+      }
+    }
+    else {
+      printf("on_aqhbci_button: Oops, aqhbci wizard return nonzero value: %d. The called program was \"%s\".\n", res, wizard_path);
+      gnc_error_dialog
+	(info->window, "%s",
+	 _("The external program \"AqHBCI Setup Wizard\" returned a nonzero \n"
+	   "exit code which means it has not been finished successfully. \n"
+	   "The further HBCI setup can only be finished if the AqHBCI \n"
+	   "Setup Wizard is run successfully. Please try to start and \n"
+	   "successfully finish the AqHBCI Setup Wizard program again."));
+      druid_disable_next_button(info);
+    }
+  } else {
+    printf("on_aqhbci_button: Oops, no aqhbci setup wizard found.");
+    gnc_error_dialog
+      (info->window, "%s",
+       _("The external program \"AqHBCI Setup Wizard\" has not been found. \n\n"
+	 "Did you install the package \"kde_wizard\" of AqHBCI? \n"
+	 "If not, please install it now. (The name of that package \n"
+	 "is misleading, as it does not require the KDE desktop \n"
+	 "environment but only the Qt toolkit libraries.)"));
+    druid_disable_next_button(info);
+  }
+  GWEN_Buffer_free(buf);
+}
 
 
 
@@ -1811,8 +577,7 @@
   GtkWidget *page;
   
   info = g_new0 (HBCIInitialInfo, 1);
-  info->hbci_accountlist = NULL;
-  
+
   xml = gnc_glade_xml_new ("hbci.glade", "HBCI Init Druid");
 
   info->window = glade_xml_get_widget (xml, "HBCI Init Druid");
@@ -1825,93 +590,19 @@
   glade_xml_signal_connect_data (xml, "on_cancel", 
 				 GTK_SIGNAL_FUNC (on_cancel), info);
   
+  info->api = gnc_AB_BANKING_new_currentbook(info->window, &(info->interactor));
+  g_assert(info->api);
 
   {
     /* Page with config file entry widget */
     page = glade_xml_get_widget(xml, "configfile_page");
     info->filepage = page;
-    info->configfileentry = 
-      glade_xml_get_widget(xml, "configfile_fileentry");
-    gtk_signal_connect 
-      (GTK_OBJECT (gnome_file_entry_gtk_entry
-		  (GNOME_FILE_ENTRY (info->configfileentry))), 
-       "activate", 
-       GTK_SIGNAL_FUNC (on_configfile_activate), info);
-    /* Set the saved filename, if that is a valid file */
-    if (gnc_hbci_get_book_configfile (gnc_get_current_book ()))
-      info->configfile =
-	g_strdup (gnc_hbci_get_book_configfile (gnc_get_current_book () ));
-    if (info->configfile && 
-	g_file_test (info->configfile, 
-		     G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_SYMLINK)) 
-      gtk_entry_set_text 
-	(GTK_ENTRY (gnome_file_entry_gtk_entry
-		    (GNOME_FILE_ENTRY (info->configfileentry))), 
-	 info->configfile);
-    else {
-      const char *homedir = g_get_home_dir();
-      char *file = NULL;
-      g_assert(homedir);
-      file = g_strdup_printf("%s/.openhbci", homedir);
-      gtk_entry_set_text 
-	(GTK_ENTRY (gnome_file_entry_gtk_entry
-		    (GNOME_FILE_ENTRY (info->configfileentry))), 
-	 file);
-      g_free (file);
-    }
-      
-    gtk_signal_connect (GTK_OBJECT (page), "next", 
-			GTK_SIGNAL_FUNC (on_configfile_next), info);
-  }
-  {
-    page = glade_xml_get_widget(xml, "bank_page");
-    info->bankpage = page;
-    info->bankcode = glade_xml_get_widget(xml, "bank_code_entry");
-    info->countrycode = glade_xml_get_widget(xml, "country_code_entry");
-    info->ipaddr = glade_xml_get_widget(xml, "ip_address_entry");
-    /*gtk_signal_connect (GTK_OBJECT (info->ipaddr), "activate", 
-			GTK_SIGNAL_FUNC (on_ipaddr_activate), info);*/
-    gtk_signal_connect (GTK_OBJECT (page), "back", 
-			GTK_SIGNAL_FUNC (on_bankpage_back), info);
-    gtk_signal_connect (GTK_OBJECT (page), "next", 
-			GTK_SIGNAL_FUNC (on_bankpage_next), info);
-  }
-  {
-    page = glade_xml_get_widget(xml, "user_page");
-    info->userpage = page;
-    info->user_bankcode = glade_xml_get_widget(xml, "user_bankcode_label");
-    info->user_bankname = glade_xml_get_widget(xml, "user_bankname_label");
-    info->userid = glade_xml_get_widget(xml, "user_id_entry");
-    info->username = glade_xml_get_widget(xml, "user_name_entry");
-    gtk_signal_connect (GTK_OBJECT (info->userid), "focus-out-event", 
-			GTK_SIGNAL_FUNC (on_userid_focus_out), info);
-    info->customerid = glade_xml_get_widget(xml, "customer_id_entry");
-    info->customername = glade_xml_get_widget(xml, "customer_name_entry");
-    info->mediumrdh = glade_xml_get_widget(xml, "rdh_radiobutton");
-    info->mediumpath = glade_xml_get_widget(xml, "keyfile_fileentry");
-    info->mediumddv = glade_xml_get_widget(xml, "ddv_radiobutton");
-    {
-      char *curdir = g_get_current_dir();
-      gtk_entry_set_text 
-	(GTK_ENTRY (gnome_file_entry_gtk_entry
-		    (GNOME_FILE_ENTRY (info->mediumpath))), 
-	 curdir);
-      g_free (curdir);
-    }
-    gtk_signal_connect (GTK_OBJECT (page), "back", 
-			GTK_SIGNAL_FUNC (on_userid_back), info);
-    gtk_signal_connect (GTK_OBJECT (page), "prepare", 
-			GTK_SIGNAL_FUNC (on_userid_prepare), info);
-    gtk_signal_connect (GTK_OBJECT (page), "next", 
-			GTK_SIGNAL_FUNC (on_userid_next), info);
-  }
-  {
-    page = glade_xml_get_widget(xml, "account_info_page");
-    info->accountinfopage = page;
-    gtk_signal_connect (GTK_OBJECT (page), "back", 
-			GTK_SIGNAL_FUNC (on_accountinfo_back), info);
-    gtk_signal_connect (GTK_OBJECT (page), "next", 
-			GTK_SIGNAL_FUNC (on_accountinfo_next), info);
+    gtk_signal_connect (GTK_OBJECT (page), "prepare",
+			GTK_SIGNAL_FUNC (on_aqbutton_prepare), info);
+    gtk_signal_connect (GTK_OBJECT 
+			(glade_xml_get_widget (xml, "aqhbci_button")), 
+			"clicked",
+			GTK_SIGNAL_FUNC (on_aqhbci_button), info);
   }
   {
     page = glade_xml_get_widget(xml, "account_match_page");
@@ -1920,88 +611,18 @@
     gtk_signal_connect (GTK_OBJECT (info->accountlist), "select_row",
 			GTK_SIGNAL_FUNC (on_accountlist_select_row), info);
     gtk_signal_connect (GTK_OBJECT 
-			(glade_xml_get_widget (xml, "addbank_button")), 
+			(glade_xml_get_widget (xml, "aqhbci_again_button")), 
 			"clicked",
-			GTK_SIGNAL_FUNC (on_button_clicked), info);
-    gtk_signal_connect (GTK_OBJECT 
-			(glade_xml_get_widget (xml, "adduser_button")), 
-			"clicked",
-			GTK_SIGNAL_FUNC (on_button_clicked), info);
-    gtk_signal_connect (GTK_OBJECT 
-			(glade_xml_get_widget (xml, "hbciversion_button")), 
-			"clicked",
-			GTK_SIGNAL_FUNC (on_button_clicked), info);
+			GTK_SIGNAL_FUNC (on_aqhbci_button), info);
     gtk_signal_connect (GTK_OBJECT 
 			(glade_xml_get_widget (xml, "updatelist_button")), 
 			"clicked",
 			GTK_SIGNAL_FUNC (on_button_clicked), info);
-    gtk_signal_connect (GTK_OBJECT 
-			(glade_xml_get_widget (xml, "addaccount_button")), 
-			"clicked",
-			GTK_SIGNAL_FUNC (on_button_clicked), info);
     gtk_signal_connect (GTK_OBJECT (page), "prepare", 
 			GTK_SIGNAL_FUNC (on_accountlist_prepare), info);
     gtk_signal_connect (GTK_OBJECT (page), "back", 
 			GTK_SIGNAL_FUNC (on_accountlist_back), info);
   }
-  {
-    page = glade_xml_get_widget (xml, "iniletter_info_page");
-    info->serverinfopage = page;
-    gtk_signal_connect (GTK_OBJECT (page), "back", 
-			GTK_SIGNAL_FUNC (on_iniletter_info_back), info);
-    gtk_signal_connect (GTK_OBJECT (page), "next", 
-			GTK_SIGNAL_FUNC (on_iniletter_info_next), info);
-  }
-  {
-    page = glade_xml_get_widget(xml, "iniletter_server_page");
-    info->serverpage = page;
-    info->server_vbox = glade_xml_get_widget(xml, "iniletter_server_vbox");
-    info->server_frame = glade_xml_get_widget(xml, "iniletter_server_frame");
-    info->server_html = gnc_html_new(GTK_WINDOW(info->window));
-    gtk_container_add (GTK_CONTAINER (info->server_frame), 
-		       gnc_html_get_widget (info->server_html));
-
-    gtk_signal_connect (GTK_OBJECT 
-			(glade_xml_get_widget (xml, "serveryes_button")), 
-			"clicked",
-			GTK_SIGNAL_FUNC (on_button_clicked), info);
-    gtk_signal_connect (GTK_OBJECT 
-			(glade_xml_get_widget (xml, "serverno_button")), 
-			"clicked",
-			GTK_SIGNAL_FUNC (on_button_clicked), info);
-    gtk_signal_connect (GTK_OBJECT 
-			(glade_xml_get_widget (xml, "serverprint_button")), 
-			"clicked",
-			GTK_SIGNAL_FUNC (on_button_clicked), info);
-    gtk_signal_connect (GTK_OBJECT (page), "prepare", 
-			GTK_SIGNAL_FUNC (on_iniletter_server_prepare), info);
-    /*gtk_signal_connect (GTK_OBJECT (page), "next", 
-      GTK_SIGNAL_FUNC (on_iniletter_server_next), info);*/
-  }
-  {
-    page = glade_xml_get_widget (xml, "iniletter_userinfo_page");
-    info->userinfopage = page;
-    gtk_signal_connect (GTK_OBJECT (page), "next", 
-			GTK_SIGNAL_FUNC (on_iniletter_userinfo_next), info);
-  }
-  {
-    page = glade_xml_get_widget(xml, "iniletter_user_page");
-    info->user_vbox = glade_xml_get_widget(xml, "iniletter_user_vbox");
-    info->user_frame = glade_xml_get_widget(xml, "iniletter_user_frame");
-    info->user_html = gnc_html_new(GTK_WINDOW(info->window));
-    gtk_container_add (GTK_CONTAINER (info->user_frame), 
-		       gnc_html_get_widget (info->user_html));
-
-    gtk_signal_connect (GTK_OBJECT 
-			(glade_xml_get_widget (xml, "userprint_button")), 
-			"clicked",
-			GTK_SIGNAL_FUNC (on_button_clicked), info);
-    gtk_signal_connect (GTK_OBJECT (page), "next", 
-			GTK_SIGNAL_FUNC (on_iniletter_user_next), info);
-    gtk_signal_connect (GTK_OBJECT (page), "prepare", 
-			GTK_SIGNAL_FUNC (on_iniletter_user_prepare), info);
-  }
-  
 
 
   /*gtk_signal_connect (GTK_OBJECT(dialog), "destroy",*/
--- src/import-export/hbci/hbci-progressmon.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* hbci-progressmon.c
-   Copyright 2002 by Christian Stimming <stimming at tuhh.de> */
-
-/***************************************************************************
- *                                                                         *
- *   This library is free software; you can redistribute it and/or         *
- *   modify it under the terms of the GNU Lesser General Public            *
- *   License as published by the Free Software Foundation; either          *
- *   version 2.1 of the License, or (at your option) any later version.    *
- *                                                                         *
- *   This library is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
- *   Lesser General Public License for more details.                       *
- *                                                                         *
- *   You should have received a copy of the GNU Lesser General Public      *
- *   License along with this library; if not, write to the Free Software   *
- *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
- *   MA  02111-1307  USA                                                   *
- *                                                                         *
- ***************************************************************************/
-
-#include "config.h"
-#include <stdio.h>
-#include <string.h>
-#include "hbci-interaction.h"
-#include "hbci-interactionP.h"
-
-#include <openhbci2/interactorcb.h>
-#include <openhbci2.h>
-#include "dialog-utils.h"
-#include "druid-utils.h"
-#include "gnc-ui-util.h"
-#include "gnc-ui.h"
-#include "global-options.h"
-
-/* currently empty */
Index: gnc-hbci-utils.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-utils.h,v
retrieving revision 1.12.4.3
retrieving revision 1.12.4.4
diff -Lsrc/import-export/hbci/gnc-hbci-utils.h -Lsrc/import-export/hbci/gnc-hbci-utils.h -u -r1.12.4.3 -r1.12.4.4
--- src/import-export/hbci/gnc-hbci-utils.h
+++ src/import-export/hbci/gnc-hbci-utils.h
@@ -25,114 +25,94 @@
 
 #include <glib.h>
 #include <gnome.h>
-/*#include <openhbci2/account.h>*/
-#include <openhbci2/api.h>
-#include <openhbci2/transaction.h>
+
+#include <aqbanking/banking.h>
+#include <aqbanking/transaction.h>
+#include <aqbanking/account.h>
+
 #include "gnc-ui.h"
 #include "Account.h"
 #include "Transaction.h"
 #include "gnc-book.h"
 
 #include "hbci-interaction.h"
-#include "gnc-hbci-account.h"
 
 
-/** Create a new HBCI_API and let it load its environment from the
- * configuration file filename. If the file doesn't exist and
- * allowNewFile is set to FALSE, this function returns NULL. If the
- * file exists, but OpenHBCI encountered an error upon opening, then
- * an error will be displayed, and NULL will be returned. 
- * 
- * @param filename The name of the OpenHBCI configuration file to use.
- * @param allowNewFile If true, non-existent filename is accepted as well.
- * @param parent When displaying dialogs, use this GtkWidget as parent.
- * @param inter Reference to a GNCInteractor-pointer in order to use this later. 
- * May be NULL.
- */
-HBCI_API * gnc_hbci_api_new (const char *filename, 
-			     gboolean allowNewFile, 
-			     GtkWidget *parent,
-			     GNCInteractor **inter,
-			     GList **list_accounts);
-
-/** Same as above, but takes the filename already from the current
- * book's kvp frame AND caches a pointer to the api. Returns NULL if
- * the file from the book's kvp frame doesn't exist. Returns NULL also
- * when there was an error upon opening that file.
+/** Create a new AB_BANKING and let it load its environment from its
+ * default configuration. 
  *
  * @param parent When displaying dialogs, use this GtkWidget as parent.
  * @param inter Reference to a GNCInteractor-pointer in order to use this later. 
  * May be NULL.
  */ 
-HBCI_API * gnc_hbci_api_new_currentbook (GtkWidget *parent,
-					 GNCInteractor **inter,
-					 GList **list_accounts);
-
-/** Delete the given HBCI_API. If this is also the one that was cached
-    by gnc_hbci_api_new_currentbook, then that reference is deleted, too. */
-void gnc_hbci_api_delete (HBCI_API *api);
+AB_BANKING * gnc_AB_BANKING_new_currentbook (GtkWidget *parent,
+					     GNCInteractor **inter);
+
+/** Delete the given AB_BANKING. If this is also the one that was cached
+    by gnc_AB_BANKING_new_currentbook, then that reference is deleted, too. */
+void gnc_AB_BANKING_delete (AB_BANKING *api);
 
 
-/** Save this API to the config file given in the current book. Return
- * an error if one occurred, or if no filename was found in the
- * current book. */
-HBCI_Error * gnc_hbci_api_save (const HBCI_API *api);
+/* Finish using the API for now. Let the API save its current
+ * state. Return nonzero if an error occurred. After this call, you
+ * may only call gnc_AB_BANKING_new_currentbook to get the api again
+ * in a properly initialized state. */
+int gnc_AB_BANKING_fini (AB_BANKING *api);
 
 
 /* Get the corresponding HBCI account to a gnucash account. Of course
  * this only works after the gnucash account has been set up for HBCI
  * use, i.e. the kvp_frame "hbci/..." have been filled with
- * information. Returns NULL if no gnc_HBCI_Account was found.
+ * information. Returns NULL if no AB_ACCOUNT was found.
  *
- * @param api The HBCI_API to get the gnc_HBCI_Account from.
- * @param gnc_acc The gnucash account to query for gnc_HBCI_Account reference data. */
-const gnc_HBCI_Account *
-gnc_hbci_get_hbci_acc (const HBCI_API *api, Account *gnc_acc);
+ * @param api The AB_BANKING to get the AB_ACCOUNT from.
+ * @param gnc_acc The gnucash account to query for AB_ACCOUNT reference data. */
+AB_ACCOUNT *
+gnc_hbci_get_hbci_acc (const AB_BANKING *api, Account *gnc_acc);
 
 /* Return the HBCI return code of the given 'job', or zero if none was
  * found. If 'verbose' is TRUE, make a lot of debugging messages about
  * this outboxjob. */
 int
-gnc_hbci_debug_outboxjob (HBCI_OutboxJob *job, gboolean verbose);
+gnc_hbci_debug_outboxjob (AB_JOB *job, gboolean verbose);
 
-/* Check HBCI_Error on whether some feedback should be given to the
+/* Check int on whether some feedback should be given to the
  * user. Returns true if the HBCI action should be tried again; on the
  * other hand, returns false if the user can't do anything about this
  * error right now. */
 gboolean
-gnc_hbci_error_retry (GtkWidget *parent, HBCI_Error *error, 
+gnc_hbci_Error_retry (GtkWidget *parent, int error, 
 		      GNCInteractor *inter);
 
-/* Calls HBCI_API_executeQueue with some supplementary stuff around
+/* Calls AB_BANKING_executeQueue with some supplementary stuff around
  * it: set the debugLevel, show the GNCInteractor, and do some error
  * checking. Returns TRUE upon success or FALSE if the calling dialog
  * should abort. */
 gboolean
-gnc_hbci_api_execute (GtkWidget *parent, HBCI_API *api,
-		      HBCI_Outbox *queue,
-		      HBCI_OutboxJob *job, GNCInteractor *inter);
+gnc_AB_BANKING_execute (GtkWidget *parent, AB_BANKING *api,
+			AB_JOB *job, GNCInteractor *inter);
 
 
 /* Create the appropriate description field for a Gnucash Transaction
- * by the information given in the HBCI_Transaction h_trans. The
+ * by the information given in the AB_TRANSACTION h_trans. The
  * returned string must be g_free'd by the caller. */
-char *gnc_hbci_descr_tognc (const HBCI_Transaction *h_trans);
+char *gnc_hbci_descr_tognc (const AB_TRANSACTION *h_trans);
 
 /* Create the appropriate memo field for a Gnucash Split by the
- * information given in the HBCI_Transaction h_trans. The returned
+ * information given in the AB_TRANSACTION h_trans. The returned
  * string must be g_free'd by the caller. */
-char *gnc_hbci_memo_tognc (const HBCI_Transaction *h_trans);
+char *gnc_hbci_memo_tognc (const AB_TRANSACTION *h_trans);
 
 /** Return the first customer that can act on the specified account,
     or NULL if none was found (and an error message is printed on
     stdout). */
-const HBCI_Customer *
-gnc_hbci_get_first_customer(const gnc_HBCI_Account *h_acc);
+/* const HBCI_Customer * */
+/* gnc_hbci_get_first_customer(const AB_ACCOUNT *h_acc); */
 
 /** Returns the name of this bank. This function is helpful because it
  * always makes sure to return a valid const char pointer, even if no
  * bankName is available. */
-const char *bank_to_str (const HBCI_Bank *bank);
+/* const char *bank_to_str (const HBCI_Bank *bank); */
 
 /** Chooses one bank out of the given list. 
  *
@@ -140,8 +120,8 @@
  * dialog so that the user can choose one bank. If the list has only
  * one bank, it returns it. If the list has zero banks, it returns
  * NULL. */ 
-const HBCI_Bank *
-choose_one_bank (gncUIWidget parent, const list_HBCI_Bank *banklist);
+/* const HBCI_Bank * */
+/* choose_one_bank (gncUIWidget parent, const list_HBCI_Bank *banklist); */
 
 /** Chooses one customer out of the given list. 
  *
@@ -149,8 +129,8 @@
  * dialog so that the user can choose one customer. If the list has only
  * one customer, it returns it. If the list has zero customers, it returns
  * NULL. */ 
-const HBCI_Customer *
-choose_one_customer (gncUIWidget parent, const list_HBCI_Customer *custlist);
+/* const HBCI_Customer * */
+/* choose_one_customer (gncUIWidget parent, const list_HBCI_Customer *custlist); */
 
 /** Chooses one user out of the given list. 
  *
@@ -158,9 +138,10 @@
  * dialog so that the user can choose one user. If the list has only
  * one user, it returns it. If the list has zero users, it returns
  * NULL. */ 
-const HBCI_User *
-choose_one_user (gncUIWidget parent, const list_HBCI_User *userlist);
-
+/* const HBCI_User * */
+/* choose_one_user (gncUIWidget parent, const list_HBCI_User *userlist); */
 
+/** Return a newly allocated string. */
+char *gnc_AB_VALUE_toReadableString(const AB_VALUE *v);
 
 #endif
Index: gnc-hbci-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-utils.c,v
retrieving revision 1.23.4.6
retrieving revision 1.23.4.7
diff -Lsrc/import-export/hbci/gnc-hbci-utils.c -Lsrc/import-export/hbci/gnc-hbci-utils.c -u -r1.23.4.6 -r1.23.4.7
--- src/import-export/hbci/gnc-hbci-utils.c
+++ src/import-export/hbci/gnc-hbci-utils.c
@@ -25,8 +25,6 @@
 
 #include <gnome.h>
 #include <errno.h>
-#include <openhbci2.h>
-#include <openhbci2/error.h>
 #include <gwenhywfar/directory.h>
 
 #include "gnc-ui.h"
@@ -36,219 +34,120 @@
 #include "global-options.h"
 
 #include "hbci-interaction.h"
+#include <aqbanking/version.h>
 
 /* static short module = MOD_IMPORT; */
 
-/* Globale variables for HBCI_API caching. */
-static HBCI_API *gnc_hbci_api = NULL;
-static char *gnc_hbci_configfile = NULL;
+/* Globale variables for AB_BANKING caching. */
+static AB_BANKING *gnc_AB_BANKING = NULL;
+static int gnc_AB_BANKING_refcnt = 0;
 static GNCInteractor *gnc_hbci_inter = NULL;
-static GList *gnc_hbci_accountlist = NULL;
 
 
-/* ------------------------------------------------------------ */
-HBCI_API *
-gnc_hbci_api_new (const char *filename, gboolean allowNewFile,
-		  GtkWidget *parent, GNCInteractor **inter,
-		  GList **list_accounts)
+AB_BANKING * gnc_AB_BANKING_new_currentbook (GtkWidget *parent, 
+					     GNCInteractor **inter)
 {
-  HBCI_API *api = NULL;
-  HBCI_Error *err = NULL;
-  char *errstring;
-  
-  g_assert(inter);
+  if (gnc_AB_BANKING == NULL) {
+    /* No API cached -- create new one. */
+    AB_BANKING *api = NULL;
   
-  if (!filename)
-      return NULL;
-  if (!allowNewFile && 
-      (!g_file_test (filename, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_SYMLINK))) 
+    api = AB_Banking_new ("gnucash", 0);
+    g_assert(api);
     {
-      /* ENOENT is "No such file or directory" */
-      gchar *errstring = g_strdup_printf ("%s: %s", filename, strerror (ENOENT));
-      gnc_warning_dialog
-	(parent,
-	 /* Translators: Strings from this file are really only needed
-	  * inside Germany (HBCI is not supported anywhere else). You
-	  * may safely ignore strings from the import-export/hbci
-	  * subdirectory in other countries. */
-	 _("Error while loading OpenHBCI config file:\n  %s\n"), errstring);
-      g_free (errstring);
-      return NULL;
+      int r = AB_Banking_Init(api);
+      if (r != 0)
+	printf("gnc_AB_BANKING_new: Warning: Error %d on AB_Banking_init\n", r);
     }
-  
-
-  api = HBCI_API_new (FALSE, TRUE);
-  
-  {
-    unsigned hbci_major, hbci_minor;
-    HBCI_Error *er;
-    er = HBCI_API_configHbciVersion(filename, &hbci_major, &hbci_minor);
-    if (er) {
-      HBCI_Error_delete(er);
-      /* do nothing else; new file */
-    }
-    else {
-      if ((hbci_major == 0) && (hbci_minor == 9)) {
-	gnc_warning_dialog
-	  (parent,
-	   _(
-"The file %s seems to be from a previous version of OpenHBCI.\n"
-"With the new version of OpenHBCI, you need to run the HBCI Setup \n"
-"Druid again and create a new configuration file before you can work \n"
-"with HBCI. You need to create \n"
-"your User and Customer in the HBCI Setup Druid, but you can \n"
-"directly re-use your existing keyfile or chip card."), filename);
-	HBCI_API_delete (api);
-	return NULL;
-      }
-    }
-  }
-  
-  
-  err = HBCI_API_loadEnvironment (api, filename);
-  if (!HBCI_Error_isOk (err) && !allowNewFile) {
-    errstring = HBCI_Error_errorString (err);
-    HBCI_Error_delete (err);
-    gnc_warning_dialog
-	(parent,
-	 /* Translators: Strings from this file are really only needed
-	  * inside Germany (HBCI is not supported anywhere else). You
-	  * may safely ignore strings from the import-export/hbci
-	  * subdirectory in other countries. */
-	 _("Error while loading OpenHBCI config file:\n  %s\n"), errstring);
-    free (errstring);
-    HBCI_API_delete (api);
-    return NULL;
-  }
-  HBCI_Error_delete (err);
-
-  *inter = gnc_hbci_api_interactors (api, parent);
-
-  gnc_hbci_accountlist =
-      gnc_HBCI_Account_glist_from_kvp_glist
-      (gnc_hbci_get_book_account_list(gnc_get_current_book ()),
-       api);
-  if (list_accounts)
-    *list_accounts = gnc_hbci_accountlist;
-
-  {
-    /* Well, currently gnucash doesn't offer a way to uniformly ask
-       for the ~/.gnucash directory, so we have to generate that path
-       here by hand. */
-    gchar *homebuffer;
-    gchar *databuffer;
-
-    /* Get home directory */
-    gnc_init_default_directory(&homebuffer);
-
-    /* Join it with the directory name */
-    databuffer = g_strjoin("", homebuffer, "/.gnucash/hbci");
-
-    /*fprintf(stderr, "Setting log dir to %s\n", databuffer);*/
-    HBCI_Hbci_setApplicationDataDir(HBCI_API_Hbci(api), databuffer);
-
-    g_free(databuffer);
-    g_free(homebuffer);
-  }
-
-  return api;
-}
-
-HBCI_API * gnc_hbci_api_new_currentbook (GtkWidget *parent, 
-					 GNCInteractor **inter,
-					 GList **list_accounts)
-{
-  if (gnc_hbci_api == NULL) {
-    /* No API cached -- create new one. */
-    gnc_hbci_configfile = 
-      g_strdup (gnc_hbci_get_book_configfile (gnc_get_current_book ()));
-    gnc_hbci_api = gnc_hbci_api_new (gnc_hbci_configfile, 
-				     FALSE, parent, &gnc_hbci_inter, 
-				     list_accounts);
+    
+    gnc_hbci_inter = gnc_AB_BANKING_interactors (api, parent);
+    gnc_AB_BANKING = api;
+    
     if (inter)
       *inter = gnc_hbci_inter;
 
-    return gnc_hbci_api;
-
-  } else if ((gnc_hbci_configfile != NULL) && 
-	     (strcmp(gnc_hbci_configfile, 
-		     gnc_hbci_get_book_configfile (gnc_get_current_book ()))
-	      != 0)) {
-    /* Wrong API cached -- delete old and create new. */
-    gnc_hbci_api_delete (gnc_hbci_api);
-    fprintf(stderr,
-	    "gnc_hbci_api_new_currentbook: Wrong HBCI_API cached; creating new one.\n");
-    return gnc_hbci_api_new_currentbook (parent, inter, list_accounts);
+    gnc_AB_BANKING_refcnt = 1;
+    return gnc_AB_BANKING;
   } else {
-    /* Correct API cached. */
+    /* API cached. */
+
+    /* Init the API again. */
+    if (gnc_AB_BANKING_refcnt == 0)
+      AB_Banking_Init(gnc_AB_BANKING);
+
     if (inter) {
       *inter = gnc_hbci_inter;
       GNCInteractor_reparent (*inter, parent);
     }
-    if (list_accounts)
-      *list_accounts = gnc_hbci_accountlist;
     
-    return gnc_hbci_api;
+    gnc_AB_BANKING_refcnt++;
+    return gnc_AB_BANKING;
   }
 }
 
-void gnc_hbci_api_delete (HBCI_API *api)
+void gnc_AB_BANKING_delete (AB_BANKING *api)
 {
-  if (api == gnc_hbci_api) {
-    gnc_hbci_api = NULL;
-    gnc_hbci_inter = NULL;
-    g_free (gnc_hbci_configfile);
-    gnc_hbci_configfile = NULL;
-    list_HBCI_Account_delete (gnc_hbci_accountlist);
-    gnc_hbci_accountlist = NULL;
+  if (api == 0)
+    api = gnc_AB_BANKING;
+
+  if (api) {
+    if (api == gnc_AB_BANKING) {
+      gnc_AB_BANKING = NULL;
+      gnc_hbci_inter = NULL;
+      if (gnc_AB_BANKING_refcnt > 0)
+	AB_Banking_Fini(api);
+    }
+
+    AB_Banking_free(api);
   }
-  HBCI_API_delete (api);
 }
 
 
-HBCI_Error * gnc_hbci_api_save (const HBCI_API *api)
+int gnc_AB_BANKING_fini (AB_BANKING *api) 
 {
-  const char *file = gnc_hbci_get_book_configfile (gnc_get_current_book ());
-  if ((file == NULL) || (strlen (file) == 0)) 
-    return HBCI_Error_new ("gnc_hbci_api_save", ERROR_LEVEL_NORMAL, 0, 
-			   ERROR_ADVISE_ABORT, 
-			   "No filename for config file in gnc_book.", "");
-  
-  return HBCI_API_saveEnvironment (api, file);
+  if (api == gnc_AB_BANKING) {
+    gnc_AB_BANKING_refcnt--;
+    if (gnc_AB_BANKING_refcnt == 0)
+      return AB_Banking_Fini(api);
+  }
+  else
+    return AB_Banking_Fini(api);
+  return 0;
 }
 
 
 
-const gnc_HBCI_Account *
-gnc_hbci_get_hbci_acc (const HBCI_API *api, Account *gnc_acc) 
+
+AB_ACCOUNT *
+gnc_hbci_get_hbci_acc (const AB_BANKING *api, Account *gnc_acc) 
 {
+  int account_uid = 0;
+  AB_ACCOUNT *hbci_acc = NULL;
   const char *bankcode = NULL, *accountid = NULL;
-  int countrycode = 0;
-  const HBCI_Bank *bank;
-  gnc_HBCI_Account *hbci_acc = NULL;
 
   bankcode = gnc_hbci_get_account_bankcode (gnc_acc);
-  countrycode = gnc_hbci_get_account_countrycode (gnc_acc);
-  if (bankcode && (strlen(bankcode)>0) && (countrycode > 0)) {
+  accountid = gnc_hbci_get_account_accountid (gnc_acc);
+  account_uid = gnc_hbci_get_account_uid (gnc_acc);
+  if (account_uid > 0) {
     /*printf("gnc_hbci_get_hbci_acc: gnc_acc %s has blz %s and ccode %d\n",
       xaccAccountGetName (gnc_acc), bankcode, countrycode);*/
-    bank = HBCI_API_findBank (api, countrycode, bankcode);
-    if (bank) {
-      accountid = gnc_hbci_get_account_accountid (gnc_acc);
-      /*printf("gnc_hbci_get_hbci_acc: gnc_acc %s found blz %s and ccode %d and accountid %s, bank %p\n",
-	xaccAccountGetName (gnc_acc), bankcode, countrycode, accountid, bank);*/
-      if (accountid && (strlen(accountid)>0)) {
-	hbci_acc = list_HBCI_Account_find(gnc_hbci_accountlist, 
-					  bank, bankcode, accountid);
-	/*printf("gnc_hbci_get_hbci_acc: return HBCI_Account %p\n", hbci_acc);*/
-	return hbci_acc;
-      }
-    }
+    hbci_acc = AB_Banking_GetAccount(api, account_uid);
+
+    if (!hbci_acc && bankcode && (strlen(bankcode)>0) &&
+	accountid && (strlen(accountid) > 0)) {
+      printf("gnc_hbci_get_hbci_acc: No AB_ACCOUNT found for UID %d, trying bank code\n", account_uid);
+      hbci_acc = AB_Banking_GetAccountByCodeAndNumber(api, bankcode, accountid);
+    }
+    /*printf("gnc_hbci_get_hbci_acc: return HBCI_Account %p\n", hbci_acc);*/
+    return hbci_acc;
+  } else if (bankcode && (strlen(bankcode)>0) && accountid && (strlen(accountid) > 0)) {
+    hbci_acc = AB_Banking_GetAccountByCodeAndNumber(api, bankcode, accountid);
+    return hbci_acc;
   }
+
   return NULL;
 }
 
-
+#if 0
 static void *
 print_list_int_cb (int value, void *user_data)
 {
@@ -281,52 +180,29 @@
   cause = (int) list_int_foreach (list, &get_resultcode_error_cb, &tmp_result);
   return MAX(tmp_result, cause);
 }
-
+#endif
 int
-gnc_hbci_debug_outboxjob (HBCI_OutboxJob *job, gboolean verbose)
+gnc_hbci_debug_outboxjob (AB_JOB *job, gboolean verbose)
 {
-  list_int *list;
-  const char *msg;
+/*   list_int *list; */
+/*   const char *msg; */
   int cause = 0;
   
   g_assert (job);
-/*   if (HBCI_OutboxJob_status (job) != HBCI_JOB_STATUS_DONE) */
+/*   if (AB_JOB_status (job) != HBCI_JOB_STATUS_DONE) */
 /*     return; */
-/*   if (HBCI_OutboxJob_result (job) != HBCI_JOB_RESULT_FAILED) */
+/*   if (AB_JOB_result (job) != HBCI_JOB_RESULT_FAILED) */
 /*     return; */
 
   if (verbose) {
-    printf("OutboxJob status: ");
-    switch(HBCI_OutboxJob_status (job)) {
-    case HBCI_JOB_STATUS_TODO:
-      printf("todo");
-      break;
-    case HBCI_JOB_STATUS_DONE:
-      printf("done");
-      break;
-    default:
-    case HBCI_JOB_STATUS_NONE:
-      printf("none");
-      break;
-    }
-
-    printf(", result: ");
-    switch(HBCI_OutboxJob_result (job)) {
-    case HBCI_JOB_RESULT_SUCCESS:
-      printf("success");
-      break;
-    case HBCI_JOB_RESULT_FAILED:
-      printf("failed");
-      break;
-    default:
-    case HBCI_JOB_STATUS_NONE:
-      printf("none");
-      break;
-    }
+    printf("OutboxJob status: %s", AB_Job_Status2Char(AB_Job_GetStatus(job)));
+
+    printf(", result: %s", AB_Job_GetResultText(job));
     printf("\n");
   }
-  
-  list = HBCI_OutboxJob_resultCodes (job);
+
+#if 0  
+  list = AB_JOB_resultCodes (job);
   if (list_int_size (list) > 0) {
 
     cause = get_resultcode_error (list);
@@ -358,84 +234,88 @@
       printf("OutboxJob's resultCodes list has zero length.\n");
   }
   list_int_delete (list);
+#endif
 
   return cause;
 }
 
 
 gboolean
-gnc_hbci_error_retry (GtkWidget *parent, HBCI_Error *error,
+gnc_hbci_Error_retry (GtkWidget *parent, int error, 
 		      GNCInteractor *inter)
 {
-  int code = HBCI_Error_code (error);
+  int code = error;
 
   switch (code) {
-  case HBCI_ERROR_CODE_PIN_WRONG:
+#if 0
+  case AB_ERROR_PIN_WRONG:
     GNCInteractor_erasePIN (inter);
     return gnc_verify_dialog (parent,
 				       TRUE,
 				       _("The PIN you entered was wrong.\n"
 					 "Do you want to try again?"));
-  case HBCI_ERROR_CODE_PIN_WRONG_0:
+  case AB_ERROR_PIN_WRONG_0:
     GNCInteractor_erasePIN (inter);
     return gnc_verify_dialog (parent,
 				       TRUE,
 				       _("The PIN you entered was wrong.\n"
 					 "ATTENTION: You have zero further wrong retries left!\n"
 					 "Do you want to try again?"));
-  case HBCI_ERROR_CODE_PIN_WRONG_1:
+  case AB_ERROR_PIN_WRONG_1:
     GNCInteractor_erasePIN (inter);
     return gnc_verify_dialog (parent,
 				       TRUE,
 				       _("The PIN you entered was wrong.\n"
 					 "You have one further wrong retry left.\n"
 					 "Do you want to try again?"));
-  case HBCI_ERROR_CODE_PIN_WRONG_2:
+  case AB_ERROR_PIN_WRONG_2:
     GNCInteractor_erasePIN (inter);
     return gnc_verify_dialog (parent,
 				       TRUE,
 				       _("The PIN you entered was wrong.\n"
 					 "You have two further wrong retries left.\n"
 					 "Do you want to try again?"));
-  case HBCI_ERROR_CODE_PIN_ABORTED:
-    /*     printf("gnc_hbci_error_feedback: PIN dialog was aborted.\n"); */
+  case AB_ERROR_PIN_ABORTED:
+    /*     printf("gnc_hbci_Error_feedback: PIN dialog was aborted.\n"); */
     return FALSE;
-  case HBCI_ERROR_CODE_PIN_TOO_SHORT:
+  case AB_ERROR_PIN_TOO_SHORT:
     GNCInteractor_erasePIN (inter);
     return gnc_verify_dialog (parent,
 				       TRUE,
 				       _("The PIN you entered was too short.\n"
 					 "Do you want to try again?"));
-  case HBCI_ERROR_CODE_CARD_DESTROYED:
+  case AB_ERROR_CARD_DESTROYED:
     GNCInteractor_hide (inter);
     gnc_error_dialog
       (parent,
        _("Unfortunately you entered a wrong PIN for too many times.\n"
 	 "Your chip card is therefore destroyed. Aborting."));
     return FALSE;
-  case HBCI_ERROR_CODE_FILE_NOT_FOUND:
-    /*     printf("gnc_hbci_error_feedback: File not found error.\n"); */
+  case AB_ERROR_FILE_NOT_FOUND:
+    /*     printf("gnc_hbci_Error_feedback: File not found error.\n"); */
     return FALSE;
-  case HBCI_ERROR_CODE_NO_CARD:
+  case AB_ERROR_NO_CARD:
     return gnc_verify_dialog (parent,
 				       TRUE,
 				       _("No chip card has been found in the chip card reader.\n"
 					 "Do you want to try again?"));
-  case HBCI_ERROR_CODE_JOB_NOT_SUPPORTED:
+  case AB_ERROR_JOB_NOT_SUPPORTED:
     GNCInteractor_hide (inter);
     gnc_error_dialog 
       (parent,
        _("Unfortunately this HBCI job is not supported \n"
 	 "by your bank or for your account. Aborting."));
     return FALSE;
-  case HBCI_ERROR_CODE_SOCKET_NO_CONNECT:
+#endif
+  case AB_ERROR_NETWORK:
     GNCInteractor_hide (inter);
     gnc_error_dialog 
       (parent,
        _("The server of your bank refused the HBCI connection.\n"
 	 "Please try again later. Aborting."));
     return FALSE;
-  case HBCI_ERROR_CODE_MEDIUM:
+#if 0
+  case AB_ERROR_MEDIUM:
     gnc_error_dialog 
       (parent,
        _("There was an error when loading the plugin for your security medium \n"
@@ -444,13 +324,14 @@
 	 "to recompile and reinstall the plugin again. Aborting now."));
     GNCInteractor_hide (inter);
     return FALSE;
-  case HBCI_ERROR_CODE_BAD_MEDIUM:
+  case AB_ERROR_BAD_MEDIUM:
     gnc_error_dialog 
       (parent,
        _("Your security medium is not supported. No appropriate plugin \n"
 	 "has been found for that medium. Aborting."));
     GNCInteractor_hide (inter);
     return FALSE;
+#endif
       
   default:
     return FALSE;
@@ -458,6 +339,7 @@
   
 }
 
+#if 0
 /* Prints all results that can be found in the outbox into the interactor */
 static void gnc_hbci_printresult(HBCI_Outbox *outbox, GNCInteractor *inter)
 {
@@ -503,18 +385,26 @@
       }
     } 
     n=GWEN_DB_GetNextGroup(n);
-  } // while
+  } /* while */
 
   GWEN_DB_Group_free(rsp);
 }
+#endif
 
+static gboolean hbci_Error_isOk(int err) {
+  switch (err) {
+  case 0:
+    return TRUE;
+  default:
+    return FALSE;
+  };
+}
 
 gboolean
-gnc_hbci_api_execute (GtkWidget *parent, HBCI_API *api,
-		      HBCI_Outbox *queue,
-		      HBCI_OutboxJob *job, GNCInteractor *inter)
+gnc_AB_BANKING_execute (GtkWidget *parent, AB_BANKING *api,
+			AB_JOB *job, GNCInteractor *inter)
 {
-  HBCI_Error *err;
+  int err;
   int resultcode;
 	  
   if (inter)
@@ -522,33 +412,39 @@
 
   if (gnc_lookup_boolean_option("_+Advanced", 
 				"HBCI Verbose Debug Messages", FALSE)) {
-    GWEN_Logger_SetLevel(0, GWEN_LoggerLevelDebug);
-    HBCI_Hbci_setDebugLevel (4);
+/*     GWEN_Logger_SetLevel(0, GWEN_LoggerLevelDebug); */
+/*     HBCI_Hbci_setDebugLevel (4); */
   }
-  else
-    HBCI_Hbci_setDebugLevel (0);
+/*   else */
+/*     HBCI_Hbci_setDebugLevel (0); */
 
   do {
-    if (inter)
+    if (inter) {
       GNCInteractor_show_nodelete (inter);
-    err = HBCI_API_executeQueue (api, queue);
-    g_assert (err);
+#if (AQBANKING_VERSION_MAJOR > 0) || (AQBANKING_VERSION_MINOR > 9) || \
+  ((AQBANKING_VERSION_MINOR == 9) && \
+   ((AQBANKING_VERSION_PATCHLEVEL > 7) || \
+    ((AQBANKING_VERSION_PATCHLEVEL == 7) && (AQBANKING_VERSION_BUILD > 1))))
+      AB_Banking_SetPinCacheEnabled (api, GNCInteractor_get_cache_valid(inter));
+#endif
+    }
+
+    err = AB_Banking_ExecuteQueue (api);
 
     /* Print result codes to interactor */
-    gnc_hbci_printresult(queue, inter);
+/*     gnc_hbci_printresult(queue, inter); */
     
-  } while (gnc_hbci_error_retry (parent, err, inter));
+  } while (gnc_hbci_Error_retry (parent, err, inter));
   
   resultcode = gnc_hbci_debug_outboxjob (job, FALSE);
-  if (!HBCI_Error_isOk(err)) {
-    char *errstr = 
-      g_strdup_printf("gnc_hbci_api_execute: Error at executeQueue: %s",
-		      HBCI_Error_message (err));
-    printf("%s\n", errstr);
-    HBCI_Interactor_msgStateResponse (HBCI_Hbci_interactor 
-				      (HBCI_API_Hbci (api)), errstr);
-    g_free (errstr);
-    HBCI_Error_delete (err);
+  if (!hbci_Error_isOk(err)) {
+/*     char *errstr =  */
+/*       g_strdup_printf("gnc_AB_BANKING_execute: Error at executeQueue: %s", */
+/* 		      hbci_Error_message (err)); */
+/*     printf("%s\n", errstr); */
+/*     HBCI_Interactor_msgStateResponse (HBCI_Hbci_interactor  */
+/* 				      (AB_BANKING_Hbci (api)), errstr); */
+/*     g_free (errstr); */
     gnc_hbci_debug_outboxjob (job, TRUE);
     GNCInteractor_show_nodelete (inter);
     return FALSE;
@@ -556,13 +452,11 @@
 
   GNCInteractor_set_cache_valid (inter, TRUE);
   if (resultcode <= 20) {
-    HBCI_Error_delete (err);
     return TRUE;
   }
   else {
-    printf("gnc_hbci_api_execute: Some message at executeQueue: %s",
-	   HBCI_Error_message (err));
-    HBCI_Error_delete (err);
+/*     printf("gnc_AB_BANKING_execute: Some message at executeQueue: %s", */
+/* 	   hbci_Error_message (err)); */
     GNCInteractor_show_nodelete (inter);
     return TRUE; /* <- This used to be a FALSE but this was probably
 		  * as wrong as it could get. @§%$! */
@@ -575,6 +469,7 @@
   gchar **res = user_data;
   gchar *tmp1, *tmp2;
 
+  if (!string) return NULL;
   tmp1 = g_strdup (string);
   g_strstrip (tmp1);
 
@@ -596,23 +491,27 @@
 }
 
 
-char *gnc_hbci_descr_tognc (const HBCI_Transaction *h_trans)
+char *gnc_hbci_descr_tognc (const AB_TRANSACTION *h_trans)
 {
   /* Description */
   char *h_descr = NULL;
   char *othername = NULL;
   char *g_descr;
+  const GWEN_STRINGLIST *h_purpose = AB_Transaction_GetPurpose (h_trans);
+  const GWEN_STRINGLIST *h_remotename = AB_Transaction_GetRemoteName (h_trans);
 
   /* Don't use list_string_concat_delim here since we need to
      g_strstrip every single element of the string list, which is
      only done in our callback gnc_list_string_cb. The separator is
      also set there. */
-  list_string_foreach (HBCI_Transaction_description (h_trans), 
-		       &gnc_list_string_cb,
-		       &h_descr);
-  list_string_foreach (HBCI_Transaction_otherName (h_trans), 
-		       &gnc_list_string_cb,
-		       &othername);
+  if (h_purpose)
+    GWEN_StringList_ForEach (h_purpose,
+			     &gnc_list_string_cb,
+			     &h_descr);
+  if (h_remotename)
+    GWEN_StringList_ForEach (h_remotename,
+			     &gnc_list_string_cb,
+			     &othername);
   /*DEBUG("HBCI Description '%s'", h_descr);*/
 
   if (othername && (strlen (othername) > 0))
@@ -633,16 +532,20 @@
   return g_descr;
 }
 
-char *gnc_hbci_memo_tognc (const HBCI_Transaction *h_trans)
+char *gnc_hbci_memo_tognc (const AB_TRANSACTION *h_trans)
 {
   /* Memo in the Split. HBCI's transactionText contains strings like
    * "STANDING ORDER", "UEBERWEISUNGSGUTSCHRIFT", etc.  */
   /*   char *h_transactionText =  */
-  /*     g_strdup (HBCI_Transaction_transactionText (h_trans)); */
+  /*     g_strdup (AB_TRANSACTION_transactionText (h_trans)); */
+  const char *h_remoteAccountNumber = 
+    AB_Transaction_GetRemoteAccountNumber (h_trans);
+  const char *h_remoteBankCode = 
+    AB_Transaction_GetRemoteBankCode (h_trans);
   char *h_otherAccountId =
-    g_strdup (HBCI_Transaction_otherAccountId (h_trans));
+    g_strdup (h_remoteAccountNumber ? h_remoteAccountNumber : _("unknown"));
   char *h_otherBankCode =
-    g_strdup (HBCI_Transaction_otherBankCode (h_trans));
+    g_strdup (h_remoteBankCode ? h_remoteBankCode : _("unknown"));
   char *g_memo;
 
   /*   g_strstrip (h_transactionText); */
@@ -662,10 +565,11 @@
 }
 
 
+#if 0
 /** Return the only customer that can act on the specified account, or
     NULL if none was found. */
 const HBCI_Customer *
-gnc_hbci_get_first_customer(const gnc_HBCI_Account *h_acc)
+gnc_hbci_get_first_customer(const AB_ACCOUNT *h_acc)
 {
   /* Get one customer. */
   const list_HBCI_User *userlist;
@@ -673,7 +577,7 @@
   const HBCI_User *user;
   g_assert(h_acc);
   
-  bank = gnc_HBCI_Account_bank (h_acc);
+  bank = AB_ACCOUNT_bank (h_acc);
   userlist = HBCI_Bank_users (bank);
   g_assert (userlist);
   user = choose_one_user(gnc_ui_get_toplevel (), userlist);
@@ -919,3 +823,14 @@
   g_assert_not_reached();
   return NULL;
 }
+#endif
+
+char *gnc_AB_VALUE_toReadableString(const AB_VALUE *v)
+{
+  char tmp[100];
+  if (v)
+    sprintf(tmp, "%.2f %s", AB_Value_GetValue(v), AB_Value_GetCurrency(v));
+  else
+    sprintf(tmp, "%.2f", 0.0);
+  return g_strdup(tmp);
+}
Index: gnc-hbci-getbalance.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-getbalance.c,v
retrieving revision 1.13.4.7
retrieving revision 1.13.4.8
diff -Lsrc/import-export/hbci/gnc-hbci-getbalance.c -Lsrc/import-export/hbci/gnc-hbci-getbalance.c -u -r1.13.4.7 -r1.13.4.8
--- src/import-export/hbci/gnc-hbci-getbalance.c
+++ src/import-export/hbci/gnc-hbci-getbalance.c
@@ -23,7 +23,7 @@
 #include "config.h"
 #include "gnc-hbci-getbalance.h"
 
-#include <openhbci2/api.h>
+#include <aqbanking/banking.h>
 
 #include "gnc-ui.h"
 #include "gnc-numeric.h"
@@ -32,45 +32,44 @@
 
 #include "hbci-interaction.h"
 #include "gnc-hbci-utils.h"
-#include "dialog-hbcitrans.h"
+/* #include "dialog-hbcitrans.h" */
 
 
-void gnc_hbci_getbalance_debugprint(HBCI_OutboxJob *balance_job,
-				    const gnc_HBCI_Account *h_acc);
+void gnc_hbci_getbalance_debugprint(AB_JOB *balance_job,
+				    const AB_ACCOUNT *h_acc);
 
+#if 0
 static void 
 bal_print_debug(const char *name,
-		const HBCI_Value *val,
+		const AB_VALUE *val,
 		gboolean negative,
 		const char *date_str,
 		const char *time_str)
 {
-  char *str = HBCI_Value_toReadableString (val);
+  char *str = gnc_AB_VALUE_toReadableString (val);
   printf("GetBalance: %s%s %s at date %s %s",
 	 (negative ? "-" : ""), str, 
 	 name, date_str, time_str);
   free (str);
 }
+#endif 
 
 
 void
 gnc_hbci_getbalance (GtkWidget *parent, Account *gnc_acc)
 {
-  HBCI_API *api = NULL;
-  HBCI_Outbox *outbox = NULL;
-  const gnc_HBCI_Account *h_acc = NULL;
+  AB_BANKING *api = NULL;
+  const AB_ACCOUNT *h_acc = NULL;
   GNCInteractor *interactor = NULL;
-  const HBCI_Customer *customer = NULL;
-  GList *hbci_accountlist = NULL;
   
   g_assert(parent);
   if (gnc_acc == NULL)
     return;
 
   /* Get API */
-  api = gnc_hbci_api_new_currentbook (parent, &interactor, &hbci_accountlist);
+  api = gnc_AB_BANKING_new_currentbook (parent, &interactor);
   if (api == NULL) {
-    printf("gnc_hbci_getbalance: Couldn't get HBCI API.\n");
+    printf("gnc_hbci_getbalance: Couldn't get AB_BANKING API.\n");
     return;
   }
   g_assert (interactor);
@@ -79,35 +78,34 @@
   h_acc = gnc_hbci_get_hbci_acc (api, gnc_acc);
   if (h_acc == NULL) {
     printf("gnc_hbci_getbalance: No HBCI account found.\n");
+    /* FIXME: free unneeded data */
     return;
   }
   /* printf("gnc_hbci_getbalance: HBCI account no. %s found.\n",
-     gnc_HBCI_Account_accountId (h_acc)); */
+     AB_ACCOUNT_accountId (h_acc)); */
   
-  /* Get the customer that should be doing this job. */
-  customer = gnc_hbci_get_first_customer(h_acc);
-  if (!customer) 
-    return;
-  /* printf("gnc_hbci_getbalance: Customer id %s found.\n",
-     HBCI_Customer_custId ((HBCI_Customer *)customer)); */
-
   {
     /* Execute a GetBalance job. */
-    HBCI_OutboxJob *job;
+    AB_JOB *job;
 
-    job = HBCI_OutboxJob_new("JobGetBalance", (HBCI_Customer *)customer, 
-			     gnc_HBCI_Account_accountId(h_acc));
-    HBCI_Job_setProperty(HBCI_OutboxJob_Job(job), "allAccounts", "N");
+    job = AB_JobGetBalance_new((AB_ACCOUNT*)h_acc);
+    if (AB_Job_CheckAvailability(job)) {
+      printf("gnc_hbci_getbalance: JobGetBalance not avaiable for this account.\n");
+      /* FIXME: free unneeded data */
+      return;
+    }
     
     /* Add job to API queue */
-    outbox = HBCI_Outbox_new();
-    HBCI_Outbox_addJob (outbox, job);
+    AB_Banking_EnqueueJob(api, job);
 
     /* Execute Outbox. */
-    if (!gnc_hbci_api_execute (parent, api, outbox, job, interactor)) {
+    if (!gnc_AB_BANKING_execute (parent, api, job, interactor)) {
 
-      /* HBCI_API_executeOutbox failed. */
-      HBCI_Outbox_removeByStatus (outbox, HBCI_JOB_STATUS_NONE);
+      /* AB_BANKING_executeOutbox failed. */
+      AB_Banking_DequeueJob(api, job);
+      AB_Banking_DelFinishedJob(api, job);
+      AB_Banking_DelPendingJob(api, job);
+      /* FIXME: free unneeded data */
       return;
     }
 
@@ -119,24 +117,25 @@
 				job);
 
     /* Clean up after ourselves. */
-    HBCI_Outbox_removeByStatus (outbox, HBCI_JOB_STATUS_NONE);
-    HBCI_Outbox_delete(outbox);
-    gnc_hbci_api_save (api);
+    AB_Banking_DequeueJob(api, job);
+    AB_Banking_DelFinishedJob(api, job);
+    AB_Banking_DelPendingJob(api, job);
+    gnc_AB_BANKING_fini (api);
     GNCInteractor_hide (interactor);
   }
 }
 
 
-
-void gnc_hbci_getbalance_debugprint(HBCI_OutboxJob *job,
-				    const gnc_HBCI_Account *h_acc)
+#if 0
+void gnc_hbci_getbalance_debugprint(AB_JOB *job,
+				    const AB_ACCOUNT *h_acc)
 {
   GWEN_DB_NODE *response, *acc_bal;
   GWEN_DB_NODE *noted_grp, *booked_grp;
-  HBCI_Value *booked_val, *noted_val;
+  AB_VALUE *booked_val, *noted_val;
   /* time_t balance_tt, noted_tt, booked_tt; */
 	
-  response = HBCI_Job_responseData(HBCI_OutboxJob_Job(job));
+  response = HBCI_Job_responseData(AB_JOB_Job(job));
   if (!response)
     return;
   acc_bal =GWEN_DB_GetGroup(response, 
@@ -147,13 +146,13 @@
   noted_grp = GWEN_DB_GetGroup(response, GWEN_PATH_FLAGS_NAMEMUSTEXIST, "noted");
   booked_grp = GWEN_DB_GetGroup(response, GWEN_PATH_FLAGS_NAMEMUSTEXIST, "booked");
 
-  booked_val = HBCI_Value_new(GWEN_DB_GetCharValue(booked_grp, "value", 0, "0"),
+  booked_val = AB_VALUE_new(GWEN_DB_GetCharValue(booked_grp, "value", 0, "0"),
 			      GWEN_DB_GetCharValue(booked_grp, "currency", 0, "EUR"));
-  noted_val = HBCI_Value_new(GWEN_DB_GetCharValue(noted_grp, "value", 0, "0"),
+  noted_val = AB_VALUE_new(GWEN_DB_GetCharValue(noted_grp, "value", 0, "0"),
 			     GWEN_DB_GetCharValue(noted_grp, "currency", 0, "EUR"));
     
   printf("GetBalance: Balances for account %s :\n",
-	 gnc_HBCI_Account_accountId (h_acc));
+	 AB_ACCOUNT_accountId (h_acc));
   bal_print_debug("Booked balance",
 		  booked_val,
 		  (strcasecmp(GWEN_DB_GetCharValue(booked_grp, "debitmark", 0, "C"),"D")==0),
@@ -165,26 +164,25 @@
 		  GWEN_DB_GetCharValue(noted_grp, "date", 0, ""),
 		  GWEN_DB_GetCharValue(noted_grp, "time", 0, ""));
 /*   bal_print_debug("Bank Line",  */
-/* 		  gnc_HBCI_AccountBalance_bankLine (acc_bal), FALSE, */
+/* 		  AB_ACCOUNTBalance_bankLine (acc_bal), FALSE, */
 /* 		  balance_tt); */
 /*   bal_print_debug("Disposable amount", */
-/* 		  gnc_HBCI_AccountBalance_disposable (acc_bal), FALSE, */
+/* 		  AB_ACCOUNTBalance_disposable (acc_bal), FALSE, */
 /* 		  balance_tt); */
 /*   bal_print_debug("Already disposed", */
-/* 		  gnc_HBCI_AccountBalance_disposed (acc_bal), FALSE, */
+/* 		  AB_ACCOUNTBalance_disposed (acc_bal), FALSE, */
 /* 		  balance_tt); */
-  HBCI_Value_delete(booked_val);
-  HBCI_Value_delete(noted_val);
+  AB_VALUE_delete(booked_val);
+  AB_VALUE_delete(noted_val);
 }
+#endif
 
 static gchar*
 bal_print_balance(const char *format,
-		  const HBCI_Value *val,
-		  gboolean negative)
+		  const AB_VALUE *val)
 {
-  char *str = HBCI_Value_toReadableString (val);
+  char *str = gnc_AB_VALUE_toReadableString (val);
   char *res = g_strdup_printf(format, 
-			      (negative ? "-" : ""), 
 			      str);
   free (str);
   return res;
@@ -195,55 +193,56 @@
 gboolean
 gnc_hbci_getbalance_finish (GtkWidget *parent, 
 			    Account *gnc_acc,
-			    const HBCI_OutboxJob *job)
+			    const AB_JOB *job)
 {
-  GWEN_DB_NODE *response, *acc_bal;
-  GWEN_DB_NODE *noted_grp, *booked_grp;
-  HBCI_Value *booked_val, *noted_val;
-
+  const AB_ACCOUNT_STATUS *response;
+  const AB_BALANCE *noted_grp, *booked_grp;
+  const AB_VALUE *booked_val, *noted_val;
   time_t booked_tt;
-
-  gboolean booked_debit, noted_debit;
   gboolean dialogres;
-	    
-  response = HBCI_Job_responseData((HBCI_Job*)HBCI_OutboxJob_Job_const(job));
+  double booked_value, noted_value;
+
+  response = AB_JobGetBalance_GetAccountStatus((AB_JOB*)job);
   if (!response) {
     printf("gnc_hbci_getbalance_finish: Oops, response == NULL.\n");
     return TRUE;
   }
-  acc_bal = GWEN_DB_GetGroup(response, 
-			    GWEN_PATH_FLAGS_NAMEMUSTEXIST, "balance");
-  if (!acc_bal) {
-    printf("gnc_hbci_getbalance_finish: Oops, acc_bal == NULL. Response was:\n");
-    GWEN_DB_Dump(response, stdout, 1);
-    return TRUE;
-  }
 
-  noted_grp = GWEN_DB_GetGroup(acc_bal, GWEN_PATH_FLAGS_NAMEMUSTEXIST, "noted");
-  booked_grp = GWEN_DB_GetGroup(acc_bal, GWEN_PATH_FLAGS_NAMEMUSTEXIST, "booked");
+  noted_grp = AB_AccountStatus_GetNotedBalance(response);
+  booked_grp = AB_AccountStatus_GetBookedBalance(response);
 
-  if (!booked_grp || !noted_grp) {
-    printf("gnc_hbci_getbalance_finish: Oops, booked_grp or noted_grp == NULL. Response was:\n");
-    GWEN_DB_Dump(response, stdout, 1);
-    return TRUE;
+  if (booked_grp) {
+    booked_val = AB_Balance_GetValue(booked_grp);
+    booked_tt = GWEN_Time_toTime_t (AB_Balance_GetTime(booked_grp));
+    if (booked_val)
+      booked_value = AB_Value_GetValue (booked_val);
+    else {
+      printf("gnc_hbci_getbalance_finish: Warning: booked_val == NULL. Assuming 0.\n");
+      booked_value = 0.0;
+    }
+  } else {
+    printf("gnc_hbci_getbalance_finish: Warning: booked_grp == NULL. Assuming 0.\n");
+    booked_value = 0.0;
+    booked_val = NULL;
+    booked_tt = 0;
   }
-  booked_val = HBCI_Value_new(GWEN_DB_GetCharValue(booked_grp, "value", 0, "0"),
-			      GWEN_DB_GetCharValue(booked_grp, "currency", 0, "EUR"));
-  booked_debit = (strcasecmp(GWEN_DB_GetCharValue(booked_grp, "debitmark", 0, "C"),"D")==0);
-  
-  noted_val = HBCI_Value_new(GWEN_DB_GetCharValue(noted_grp, "value", 0, "0"),
-			     GWEN_DB_GetCharValue(noted_grp, "currency", 0, "EUR"));
-  noted_debit = (strcasecmp(GWEN_DB_GetCharValue(noted_grp, "debitmark", 0, "C"),"D")==0);
-  
-  {
-    HBCI_Date *a = HBCI_Date_new_string(GWEN_DB_GetCharValue(booked_grp, "date", 0, ""), 4);
-    
-    booked_tt = HBCI_Date_to_time_t (a);
-    HBCI_Date_delete(a);
+
+  if (noted_grp) {
+    noted_val = AB_Balance_GetValue(noted_grp);
+    /* noted_tt = GWEN_Time_toTime_t (AB_Balance_GetTime(noted_grp)); */
+    if (noted_val)
+      noted_value = AB_Value_GetValue (noted_val);
+    else {
+      printf("gnc_hbci_getbalance_finish: Warning: noted_val == NULL. Assuming 0.\n");
+      noted_value = 0.0;
+    }
+  } else {
+    printf("gnc_hbci_getbalance_finish: Warning: noted_grp == NULL. Assuming 0.\n");
+    noted_value = 0.0;
+    noted_val = NULL;
   }
-    
-  if ((HBCI_Value_getValue (noted_val) == 0) &&
-      (HBCI_Value_getValue (booked_val) == 0))
+
+  if ((noted_value == 0.0) && (booked_value == 0.0))
     {
       gnome_ok_dialog_parented 
 	/* Translators: Strings from this file are really only
@@ -261,27 +260,19 @@
     }
   else
     {
-      char *booked_str = HBCI_Value_toReadableString (booked_val);
+      char *booked_str = gnc_AB_VALUE_toReadableString (booked_val);
       char *message1 = g_strdup_printf
 	(
-	 /* Translators: The first %s is "-" if this amount is
-	  * negative or "" if it is positive. The second %s is the
-	  * amount. */
 	 _("Result of HBCI job: \n"
-	   "Account booked balance is %s%s\n"),
-	 (booked_debit ? "-" : ""),
+	   "Account booked balance is %s\n"),
 	 booked_str);
       char *message2 = 
-	((HBCI_Value_getValue (noted_val) == 0) ?
+	((noted_value == 0.0) ?
 	 g_strdup_printf("%s", "") :
 	 bal_print_balance
-	 /* Translators: The first %s is "-" if this amount is
-	  * negative or "" if it is positive. The second %s is the
-	  * amount. */
 	 (_("For your information: This account also \n"
-	    "has a noted balance of %s%s\n"),
-	  noted_val,
-	  noted_debit));
+	    "has a noted balance of %s\n"),
+	  noted_val));
       const char *message3 = _("Reconcile account now?");
 
       dialogres = gnc_verify_dialog
@@ -298,15 +289,13 @@
       
   if (dialogres) 
     {
-      gnc_numeric abs_value =
-	double_to_gnc_numeric (HBCI_Value_getValue (booked_val),
+      gnc_numeric value =
+	double_to_gnc_numeric (booked_value,
 			       xaccAccountGetCommoditySCU(gnc_acc),
 			       GNC_RND_ROUND);
       recnWindowWithBalance (parent, 
 			     gnc_acc, 
-			     (booked_debit 
-			      ? gnc_numeric_neg (abs_value)
-			      : abs_value),
+			     value,
 			     booked_tt);
     }
       
Index: dialog-hbcitrans.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/dialog-hbcitrans.h,v
retrieving revision 1.3.4.3
retrieving revision 1.3.4.4
diff -Lsrc/import-export/hbci/dialog-hbcitrans.h -Lsrc/import-export/hbci/dialog-hbcitrans.h -u -r1.3.4.3 -r1.3.4.4
--- src/import-export/hbci/dialog-hbcitrans.h
+++ src/import-export/hbci/dialog-hbcitrans.h
@@ -27,10 +27,9 @@
 
 #include <gnome.h>
 
-#include <openhbci2/api.h>
-#include <openhbci2/customer.h>
-#include <openhbci2/transaction.h>
-#include <openhbci2/outboxjob.h>
+#include <aqbanking/banking.h>
+#include <aqbanking/transaction.h>
+#include <aqbanking/job.h>
 
 #include "Account.h"
 #include "gnc-hbci-utils.h"
@@ -44,11 +43,11 @@
 } GNC_HBCI_Transtype;
 
 
-/*HBCI_Transaction *
+/*AB_TRANSACTION *
 gnc_hbci_trans (GtkWidget *parent,
-		HBCI_API *api,
+		AB_BANKING *api,
 		GNCInteractor *interactor,
-		const gnc_HBCI_Account *h_acc,
+		const AB_ACCOUNT *h_acc,
 		const HBCI_Customer *customer,
 		Account *gnc_acc,
 		GNC_HBCI_Transtype type,
@@ -58,8 +57,7 @@
  * specified by the arguments, and return a pointer to it. */
 HBCITransDialog *
 gnc_hbci_dialog_new (GtkWidget *parent,
-		     const gnc_HBCI_Account *h_acc,
-		     const HBCI_Customer *customer,
+		     const AB_ACCOUNT *h_acc,
 		     Account *gnc_acc,
 		     GNC_HBCI_Transtype trans_type,
 		     GList *templ);
@@ -72,8 +70,8 @@
 GList *gnc_hbci_dialog_get_templ(const HBCITransDialog *td);
 /** Return the change status of the template list */
 gboolean gnc_hbci_dialog_get_templ_changed(const HBCITransDialog *td) ;
-/** Return the HBCI_Transaction. */
-const HBCI_Transaction *gnc_hbci_dialog_get_htrans(const HBCITransDialog *td);
+/** Return the AB_TRANSACTION. */
+const AB_TRANSACTION *gnc_hbci_dialog_get_htrans(const HBCITransDialog *td);
 /** Return the gnucash Transaction. */
 Transaction *gnc_hbci_dialog_get_gtrans(const HBCITransDialog *td);
 /** Hide the dialog */
@@ -84,12 +82,10 @@
 
 
 int gnc_hbci_dialog_run_until_ok(HBCITransDialog *td, 
-				 const gnc_HBCI_Account *h_acc);
-HBCI_OutboxJob *
-gnc_hbci_trans_dialog_enqueue(HBCITransDialog *td, HBCI_API *api,
-			      HBCI_Outbox *outbox,
-			      const HBCI_Customer *customer, 
-			      gnc_HBCI_Account *h_acc, 
+				 const AB_ACCOUNT *h_acc);
+AB_JOB *
+gnc_hbci_trans_dialog_enqueue(HBCITransDialog *td, AB_BANKING *api,
+			      AB_ACCOUNT *h_acc, 
 			      GNC_HBCI_Transtype trans_type);
 /** Callback function for gnc_xfer_dialog_set_txn_cb(). The user_data
  * has to be a pointer to a HBCITransDialog structure.  */
@@ -99,9 +95,8 @@
  * the application should continue, and FALSE if the user wants to
  * enter this job again.  */
 gboolean 
-gnc_hbci_trans_dialog_execute(HBCITransDialog *td, HBCI_API *api, 
-			      HBCI_Outbox *outbox,
-			      HBCI_OutboxJob *job, GNCInteractor *interactor);
+gnc_hbci_trans_dialog_execute(HBCITransDialog *td, AB_BANKING *api, 
+			      AB_JOB *job, GNCInteractor *interactor);
 
 
 #endif
Index: gnc-hbci-gettrans.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-gettrans.h,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.4
diff -Lsrc/import-export/hbci/gnc-hbci-gettrans.h -Lsrc/import-export/hbci/gnc-hbci-gettrans.h -u -r1.1.4.3 -r1.1.4.4
--- src/import-export/hbci/gnc-hbci-gettrans.h
+++ src/import-export/hbci/gnc-hbci-gettrans.h
@@ -24,7 +24,7 @@
 #define GNC_HBCI_GETTRANS_H
 
 #include <gnome.h>
-#include <openhbci2/outboxjob.h>
+#include <aqbanking/jobgettransactions.h>
 #include "Account.h"
 
 /** Start a GetTrans job. */
@@ -36,7 +36,7 @@
 gboolean
 gnc_hbci_gettrans_final(GtkWidget *parent, 
 			Account *gnc_acc, 
-			const HBCI_OutboxJob *trans_job,
+			const AB_JOB *trans_job,
 			gboolean run_until_done);
 
 
Index: hbci-interaction.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/hbci-interaction.c,v
retrieving revision 1.16.4.8
retrieving revision 1.16.4.9
diff -Lsrc/import-export/hbci/hbci-interaction.c -Lsrc/import-export/hbci/hbci-interaction.c -u -r1.16.4.8 -r1.16.4.9
--- src/import-export/hbci/hbci-interaction.c
+++ src/import-export/hbci/hbci-interaction.c
@@ -28,7 +28,7 @@
 #include "hbci-interaction.h"
 #include "hbci-interactionP.h"
 
-#include <openhbci2/interactorcb.h>
+#include <aqbanking/banking.h>
 #include "dialog-utils.h"
 #include "druid-utils.h"
 #include "gnc-ui-util.h"
@@ -38,32 +38,57 @@
 #include "dialog-pass.h"
 #include "gnc-hbci-utils.h"
 
-#include <openhbci2.h>
+#include <gwenhywfar/bio_buffer.h>
+#include <gwenhywfar/xml.h>
 
-#define PREF_TAB_ONLINE_BANKING N_("Online Banking & Importing")
+#include <iconv.h>
 
+#define PREF_TAB_ONLINE_BANKING N_("Online Banking & Importing")
 
+gchar *gnc__extractText(const char *text);
 
 /** Adds the interactor and progressmonitor classes to the api. */
-GNCInteractor *gnc_hbci_api_interactors (HBCI_API *api, GtkWidget *parent)
+GNCInteractor *gnc_AB_BANKING_interactors (AB_BANKING *api, GtkWidget *parent)
 {
   GNCInteractor *data;
   
   data = g_new0 (GNCInteractor, 1);
   data->parent = parent;
+  data->gnc_iconv_handler = iconv_open("ISO8859-1", "UTF-8");
+  g_assert(data->gnc_iconv_handler != (iconv_t)(-1));
   data->keepAlive = TRUE;
-  data->cache_valid = FALSE;
   data->cache_pin = 
     gnc_lookup_boolean_option(PREF_TAB_ONLINE_BANKING,
 			      "HBCI Remember PIN in memory",
                               FALSE);
+  data->showbox_id = 1;
+  data->showbox_hash = g_hash_table_new(NULL, NULL); 
 
   /* set HBCI_Interactor */
-  HBCI_Hbci_setInteractor(HBCI_API_Hbci(api), 
-			  gnc_hbci_new_interactor(data), TRUE);
+  gnc_hbci_add_callbacks(api, data);
   return data;
 }
 
+void GNCInteractor_delete(GNCInteractor *data)
+{
+  if (data == NULL)
+    return;
+  if (data->dialog != NULL) {
+    gnc_set_boolean_option ("__gui", "hbci_close_on_finish",
+			    gtk_toggle_button_get_active 
+			    (GTK_TOGGLE_BUTTON (data->close_checkbutton)));
+    gtk_object_unref (GTK_OBJECT (data->dialog));
+    gtk_widget_destroy (data->dialog);
+  }
+  
+  data->dialog = NULL;
+
+  g_hash_table_destroy(data->showbox_hash);
+  iconv_close(data->gnc_iconv_handler);
+
+  g_free (data);
+}
+
 
 
 /* ************************************************************
@@ -121,6 +146,7 @@
 
   /* Make sure the cache_pin option is up to date. */
   if (cache_pin != i->cache_pin) {
+    /* AB_Banking_SetEnablePinCaching (ab, cache_pin); */
     i->cache_pin = cache_pin;
     if (cache_pin == FALSE)
       GNCInteractor_erasePIN (i);
@@ -146,35 +172,21 @@
 			  (GTK_TOGGLE_BUTTON (i->close_checkbutton)));
 }
 
-void GNCInteractor_delete(GNCInteractor *data)
+gboolean GNCInteractor_get_cache_valid(const GNCInteractor *i)
 {
-  if (data == NULL)
-    return;
-  if (data->dialog != NULL) {
-    gnc_set_boolean_option ("__gui", "hbci_close_on_finish",
-			    gtk_toggle_button_get_active 
-			    (GTK_TOGGLE_BUTTON (data->close_checkbutton)));
-    gtk_object_unref (GTK_OBJECT (data->dialog));
-    gtk_widget_destroy (data->dialog);
-  }
-  
-  data->dialog = NULL;
+  g_assert(i);
+  return i->cache_pin;
 }
-
 void GNCInteractor_set_cache_valid(GNCInteractor *i, gboolean value)
 {
   g_assert(i);
-  i->cache_valid = value;
+  /* Nothing to be done right now. */
 }
 
 void GNCInteractor_erasePIN(GNCInteractor *i)
 {
   g_assert(i);
-  if (i->pw != NULL)
-    g_free (memset (i->pw, 0, strlen (i->pw)));
-  i->pw = NULL;
-  i->cache_valid = FALSE;
-  i->user = NULL;
+  /* Nothing to be done right now. */
 }
 void GNCInteractor_reparent (GNCInteractor *i, GtkWidget *new_parent)
 {
@@ -191,103 +203,133 @@
     }
 }
 
-/********************************************************
- * Now all the callback functions 
+/* ************************************************************ 
  */
-static const char *username_from_user(const HBCI_User *user)
+
+/* This function extracts the normal text part out of the
+   combi-strings that are passed from aqbanking. */
+gchar *gnc__extractText(const char *text) 
+{
+  gchar *res;
+  GWEN_BUFFEREDIO *bio;
+  GWEN_XMLNODE *xmlNode;
+  GWEN_BUFFER *buf;
+  int rv;
+
+  if (!text)
+    text = "";
+
+  buf=GWEN_Buffer_new(0, 256, 0, 1);
+  GWEN_Buffer_AppendString(buf, text);
+  GWEN_Buffer_Rewind(buf);
+
+  /* check whether there is a html tag */
+  bio=GWEN_BufferedIO_Buffer2_new(buf, 1);
+  GWEN_BufferedIO_SetReadBuffer(bio, 0, 256);
+  xmlNode=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "html");
+  rv=GWEN_XML_Parse(xmlNode, bio,
+		    GWEN_XML_FLAGS_DEFAULT |
+		    GWEN_XML_FLAGS_HANDLE_OPEN_HTMLTAGS |
+		    GWEN_XML_FLAGS_NO_CONDENSE |
+		    GWEN_XML_FLAGS_KEEP_CNTRL);
+  GWEN_BufferedIO_Close(bio);
+  GWEN_BufferedIO_free(bio);
+
+  if (rv) {
+    res = g_strdup(text);
+  }
+  else {
+    GWEN_XMLNODE *nn;
+
+    nn=GWEN_XMLNode_GetFirstData(xmlNode);
+    if (nn) {
+      res = g_strdup(GWEN_XMLNode_GetData(nn));
+    }
+    else {
+      res = g_strdup(text);
+    }
+  }
+  GWEN_XMLNode_free(xmlNode);
+  return res;
+}
+
+
+char *gnc_hbci_utf8ToLatin1(GNCInteractor *data, const char *utf)
 {
-  return (user ? 
-	  (HBCI_User_name (user) ? HBCI_User_name (user) :
-	   (HBCI_User_userId (user) ? HBCI_User_userId (user) :
-	    _("Unknown"))) :
-	  _("Newly created user"));
+  int inbytes, outbytes;
+  char *utf8extracted, *latin1;
+  char *inbuffer, *outbuffer;
+
+  g_assert(data);
+  if (!utf) return g_strdup("");
+
+  /* Get rid of the aaaarg html-combi-text part */
+  utf8extracted = gnc__extractText(utf);
+/*   printf("Extracted \"%s\" into \"%s\"\n", utf, utf8extracted); */
+
+  inbuffer = utf8extracted;
+  inbytes = strlen(inbuffer);
+  outbytes = inbytes + 2;
+  latin1 = g_strndup(inbuffer, outbytes);
+  outbuffer = latin1;
+
+  iconv(data->gnc_iconv_handler, &inbuffer, &inbytes,
+	&outbuffer, &outbytes);
+  if (outbytes > 0)
+    *outbuffer = '\0';
+
+/*   printf("Converted \"%s\" into \"%s\"\n", utf8extracted, latin1); */
+  g_free(utf8extracted);
+  return latin1;
 }
 
-static int msgInputPin(const HBCI_User *user,
-		       char **pinbuf,
-		       int minsize,
-		       int newPin,
-		       void *user_data)
+/********************************************************
+ * Now all the callback functions 
+ */
+
+static int inputBoxCB(AB_BANKING *ab,
+		      GWEN_TYPE_UINT32 flags,
+		      const char *utf8title,
+		      const char *utf8text,
+		      char *resultbuffer,
+		      int minsize,
+		      int maxLen)
 {
-  GNCInteractor *data = user_data;
-  const HBCI_Bank *bank = NULL;
-  char *msgstr = NULL, *passwd = NULL;
+  GNCInteractor *data;
+  char *passwd = NULL;
   int retval = 0;
+  int newPin;
+  int hideInput;
+  gchar *title, *text;
+
+  g_assert(ab);
+  data = AB_Banking_GetUserData(ab);
   g_assert(data);
+  g_assert(maxLen > minsize);
+
+  text = gnc_hbci_utf8ToLatin1(data, utf8text);
+  title = gnc_hbci_utf8ToLatin1(data, utf8title);
+
+  newPin = (flags | AB_BANKING_INPUT_FLAGS_CONFIRM) == 0;
+  hideInput = (flags | AB_BANKING_INPUT_FLAGS_SHOW) != 0;
 
   while (TRUE) {
-    const char *username = username_from_user(user);
-    g_assert (username);
-    
-    if (newPin) {
-      if (user != NULL) {
-	bank = HBCI_User_bank (user);
-	if (bank != NULL) {
-	  /* Translators: Strings from this file are really only
-	   * needed inside Germany (HBCI is not supported anywhere
-	   * else). You may safely ignore strings from the
-	   * import-export/hbci subdirectory in other countries.
-	   *
-	   * xgettext:c-format */	    
-	  msgstr = g_strdup_printf (_("Please enter and confirm new PIN for \n"
-				      "user '%s' at bank '%s',\n"
-				      "with at least %d characters."),
-				    username, 
-				    bank_to_str (bank),
-				    minsize);
-	}
-	else 
-	  /* xgettext:c-format */	    
-	  msgstr = g_strdup_printf ( _("Please enter and confirm a new PIN for \n"
-				       "user '%s',\n"
-				       "with at least %d characters."), 
-				     username, minsize);
-      }
-      else 
-	/* xgettext:c-format */	    
-	msgstr = g_strdup_printf ( _("Please enter and confirm a new PIN\n"
-				     "with at least %d characters."), 
-				   minsize);
 
+    if (newPin) {
+      if (!hideInput)
+	printf("inputBoxCB: Oops, hideInput==false and newPin==true, i.e. the input is supposed to be readable -- not implemented (since I thought this does not make sense when entering a new PIN).\n");
       retval = gnc_hbci_get_initial_password (data->parent,
-					      msgstr,
+					      title,
+					      text,
 					      &passwd);
-      g_free (msgstr);
     }
     else {
-      if (data->cache_valid && user && (user == data->user)) {
-	/* Cached user matches, so use cached PIN. */
-	/*printf("Got the cached PIN for user %s.\n", HBCI_User_userId (user));*/
-	*pinbuf = g_strdup (data->pw);
-	return 1;
-      }
-      else {
-	if (user != NULL) {
-	  bank = HBCI_User_bank (user);
-	  if (bank != NULL) {
-	    /* xgettext:c-format */	    
-	    msgstr = g_strdup_printf (_("Please enter PIN for \n"
-					"user '%s' at bank '%s'."),
-				      username, 
-				      bank_to_str (bank));
-	  }
-	  else {
-	    /* xgettext:c-format */	    
-	    msgstr = g_strdup_printf ( _("Please enter PIN for \n"
-					 "user '%s' at unknown bank."),
-				       username);
-	  }
-	}
-	else 
-	  msgstr = g_strdup ( _("Please enter the PIN for \n"
-				"the newly created user."));
-	
-	retval = gnc_hbci_get_password (data->parent,
-					msgstr,
-					NULL,
-					&passwd);
-	g_free (msgstr);
-      } /* user == data->user */
+      retval = gnc_hbci_get_password (data->parent,
+				      title,
+				      text,
+				      NULL,
+				      &passwd,
+				      hideInput);
     } /* newPin */
     
     if (!retval)
@@ -307,172 +349,91 @@
 	break;
     }
     else {
-      *pinbuf = g_strdup (passwd);
-      if (user && data->cache_pin) {
-	/*printf("Cached the PIN for user %s.\n", HBCI_User_userId (user));*/
-	data->user = user;
-	if (data->pw)
-	  g_free (memset (data->pw, 0, strlen (data->pw)));
-	data->pw = passwd;
-      }
-      else 
-	g_free (memset (passwd, 0, strlen (passwd)));
-      return 1;
+      g_assert (maxLen > strlen(resultbuffer));
+      strcpy(resultbuffer, passwd);
+      g_free (memset (passwd, 0, strlen (passwd)));
+      g_free(title);
+      g_free(text);
+      return 0;
     }
   }
   
   /* User wanted to abort. */
-  return 0;
+  g_free(title);
+  g_free(text);
+  return 1;
 }
 
+/* **************************************** 
+ */
+
 
-static int msgInsertMediumOrAbort(const HBCI_User *user, 
-				MediumType mtype, 
-				void *user_data)
+static int getTanCB(AB_BANKING *ab,
+		    const char *token,
+		    const char *utf8title,
+		    const char *utf8text,
+		    char *resultbuffer,
+		    int minsize,
+		    int maxLen)
 {
-  GNCInteractor *data = user_data;
-  const HBCI_Bank * b = NULL;
-  char *msgstr = NULL;
-  gint retval;
-  g_assert(data);
-
-  if (user != NULL) {
-    const char *username = username_from_user(user);
-    b = HBCI_User_bank (user);
-    switch (mtype) 
-      {
-      case MediumTypeFile:
-	if (b != NULL) 
-	  /* xgettext:c-format */	    
-	  msgstr = g_strdup_printf 
-	    ( _("Please make sure the key file for user '%s' at bank '%s' can be \n"
-		"accessed. If the key file is on your harddisk, simply press 'Ok'. If \n"
-		"the key file is on a floppy disk or other removable media, please make \n"
-		"sure the floppy disk or medium is correctly mounted."), 
-	      username, bank_to_str (b));
-	else 
-	  /* xgettext:c-format */	    
-	  msgstr = g_strdup_printf 
-	    ( _("Please make sure the key file for user '%s' can be \n"
-		"accessed. If the key file is on your harddisk, simply press 'Ok'. If \n"
-		"the key file is on a floppy disk or other removable media, please make \n"
-		"sure the floppy disk or medium is correctly mounted."), 
-				     username);
-	break;
-      case MediumTypeCard:
-      default:
-	if (b != NULL) 
-	  /* xgettext:c-format */	    
-	  msgstr = g_strdup_printf ( _("Please insert chip card for \n"
-				       "user '%s' at bank '%s'."), 
-				     username, bank_to_str (b));
-	else 
-	  /* xgettext:c-format */	    
-	  msgstr = g_strdup_printf ( _("Please insert chip card for \n"
-				       "user '%s'."), 
-				     username);
-    }
-  }
-  else 
-    switch (mtype) 
-      {
-      case MediumTypeFile:
-	msgstr = g_strdup 
-	  (_("Please make sure the key file for the newly created user can be \n"
-	     "accessed. If you want to create the key file on your harddisk, simply \n"
-	     "press 'Ok'. If you want to create the key on a floppy disk or other \n"
-	     "removable media, please make sure the floppy disk or medium is \n"
-	     "correctly mounted."));
-	break;
-      case MediumTypeCard:
-      default:
-	msgstr = g_strdup ( _("Please insert chip card for \n"
-			      "the newly created user."));
-      }
-    
-  retval = gnc_ok_cancel_dialog (data->parent,
-					  GTK_RESPONSE_OK, 
-					  "%s", msgstr);
-  g_free (msgstr);
-  
-  return (retval == GTK_RESPONSE_OK);
-}
+  GNCInteractor *data;
+  char *passwd = NULL;
+  int retval = 0;
+  gchar *title, *text;
 
+  g_assert(ab);
+  data = AB_Banking_GetUserData(ab);
+  g_assert(data);
+  g_assert(maxLen > minsize);
 
-static int msgInsertCorrectMediumOrAbort(const HBCI_User *user, 
-				       MediumType mtype, 
-				       void *user_data)
-{
-  GNCInteractor *data = user_data;
-  const HBCI_Bank * b = NULL;
-  char *msgstr = NULL;
-  gint retval;
-  g_assert(data);
-
-  if (user != NULL) {
-    const char *username = username_from_user(user);
-    b = HBCI_User_bank (user);
-    switch (mtype) 
-      {
-      case MediumTypeFile: 
-	if (b != NULL) 
-	  /* xgettext:c-format */	    
-	  msgstr = g_strdup_printf ( _("The key file does not seem to be the correct \n"
-				       "file for user '%s' at bank '%s'. Please make \n"
-				       "sure the correct key file can be accessed."), 
-				     username, bank_to_str (b));
-	else 
-	  /* xgettext:c-format */	    
-	  msgstr = g_strdup_printf ( _("The key file does not seem to be the correct \n"
-				       "file for user '%s'. Please make sure the \n"
-				       "correct key file can be accessed."), 
-				     username);
-	break;
-      case MediumTypeCard: 
-      default:
-	if (b != NULL) 
-	  /* xgettext:c-format */	    
-	  msgstr = g_strdup_printf ( _("Please insert the correct chip card for \n"
-				       "user '%s' at bank '%s'."), 
-				     username, bank_to_str (b));
-	else 
-	  /* xgettext:c-format */	    
-	  msgstr = g_strdup_printf ( _("Please insert the correct chip card for \n"
-				       "user '%s'."), 
-				     username);
-      }
-  }
-  else 
-    switch (mtype) 
-      {
-      case MediumTypeFile: 
-	msgstr = g_strdup ( _("The key file does not seem to be the correct \n"
-			      "file for the newly created user. Please make \n"
-			      "sure the correct key file can be accessed."));
+  text = gnc_hbci_utf8ToLatin1(data, utf8text);
+  title = gnc_hbci_utf8ToLatin1(data, utf8title);
+
+  while (TRUE) {
+
+    retval = gnc_hbci_get_password (data->parent,
+				    title,
+				    text,
+				    NULL,
+				    &passwd,
+				    FALSE);
+
+    if (!retval)
+      break;
+    
+    if (strlen(passwd) < (unsigned int)minsize) {
+      gboolean retval;
+      char *msg = 
+	g_strdup_printf (  _("This TAN needs to be at least %d characters \n"
+			     "long. Do you want to try again?"),
+			   minsize);
+      retval = gnc_verify_dialog (GTK_WIDGET (data->parent), 
+					   TRUE,
+					   msg);
+      g_free (msg);
+      if (!retval)
 	break;
-      case MediumTypeCard: 
-      default:
-	msgstr = g_strdup ( _("Please insert the correct chip card for \n"
-			      "the newly created user."));
-      }
-  
-  retval = gnc_ok_cancel_dialog (data->parent,
-					  GTK_RESPONSE_OK,
-					  "%s", msgstr);
-  g_free (msgstr);
+    }
+    else {
+      g_assert (maxLen > strlen(resultbuffer));
+      strcpy(resultbuffer, passwd);
+
+      g_free (memset (passwd, 0, strlen (passwd)));
+      g_free(title);
+      g_free(text);
+      return 0;
+    }
+  }
   
-  return (retval == GTK_RESPONSE_OK);
+  /* User wanted to abort. */
+  g_free(title);
+  g_free(text);
+  return 1;
 }
 
 
-/*static void msgStateResponse(const char *msg, void *user_data)
-{
-  GNCInteractor *data = user_data;
-  g_assert(data);
-
-  GNCInteractor_add_log_text (data, msg);
-  while (g_main_iteration (FALSE));
-  }*/
+/* ************************************************************ 
+ */
 
 static int keepAlive(void *user_data)
 {
@@ -486,215 +447,241 @@
   return data->keepAlive;
 }
 
-static void destr(void *user_data) 
+
+static void destr(void *bp, void *user_data)
 {
   GNCInteractor *data = user_data;
   if (data == NULL)
     return;
 
-  if (data->pw) {
-    memset (data->pw, 0, strlen(data->pw));
-    g_free (data->pw);
-  }
+  GNCInteractor_delete (data);
 }
 
+
+/* ************************************************************ 
+ */
+
 static void 
-msgEndInputPinViaKeypadCB(const HBCI_User *user, void *user_data)
+hideBoxCB(AB_BANKING *ab, GWEN_TYPE_UINT32 id)
 {
-  GNCInteractor *data = user_data;
+  GNCInteractor *data;
+  GtkWidget *dialog;
+  g_assert(ab);
+  data = AB_Banking_GetUserData(ab);
   g_assert(data);
-  if (data->pin_keypad_dialog) {
-    gnome_dialog_close (GNOME_DIALOG (data->pin_keypad_dialog));
-    gtk_widget_destroy (data->pin_keypad_dialog);
-    data->pin_keypad_dialog = NULL;
+
+  if (id > 0) {
+    dialog = g_hash_table_lookup(data->showbox_hash, (gpointer)id);
+  } else {
+    dialog = data->showbox_last;
+  }
+  if (dialog) {
+    gnome_dialog_close (GNOME_DIALOG (dialog));
+    gtk_widget_destroy (dialog);
+    g_hash_table_remove(data->showbox_hash, (gpointer)id);
   }
 }
 
-static void 
-msgStartInputPinViaKeypadCB(const HBCI_User *user, void *user_data)
+static GWEN_TYPE_UINT32
+showBoxCB(AB_BANKING *ab, GWEN_TYPE_UINT32 flags,
+	  const char *utf8title, const char *utf8text)
 {
-  const HBCI_Bank *bank;
-  char *msgstr;
   GtkWidget *dialog;
-  GNCInteractor *data = user_data;
-  
-  g_assert(data);
+  GNCInteractor *data;
+  GWEN_TYPE_UINT32 result;
+  gchar *title, *text;
 
-  /* Already an existing dialog? Shouldn't happen. Better delete
-     existing dialog first. */
-  if (data->pin_keypad_dialog != NULL)
-    msgEndInputPinViaKeypadCB(user, user_data);
-
-  /* Create message string */
-  if (user != NULL) {
-    const char *username = username_from_user(user);
-    bank = HBCI_User_bank (user);
-    if (bank != NULL) {
-      /* xgettext:c-format */	    
-      msgstr = g_strdup_printf (_("Please enter PIN for \n"
-				  "user '%s' at bank '%s'\n"
-				  "at the keypad of your chip card reader."),
-				username, 
-				bank_to_str (bank));
-    }
-    else {
-      /* xgettext:c-format */	    
-      msgstr = g_strdup_printf ( _("Please enter PIN for \n"
-				   "user '%s'\n"
-				   "at the keypad of your chip card reader."),
-				 username);
-    }
-  }
-  else 
-    msgstr = g_strdup ( _("Please enter PIN for \n"
-			  "the newly created user \n"
-			  "at the keypad of your chip card reader."));
+  g_assert(ab);
+  data = AB_Banking_GetUserData(ab);
+  g_assert(data);
+  
+  text = gnc_hbci_utf8ToLatin1(data, utf8text);
+  title = gnc_hbci_utf8ToLatin1(data, utf8title);
 
   /* Create new dialog */
-  dialog = gnome_ok_dialog_parented (msgstr, GTK_WINDOW (data->parent));
+  dialog = gnome_ok_dialog_parented (text, GTK_WINDOW (data->parent));
+  if (title && (strlen(title) > 0))
+    gtk_window_set_title (GTK_WINDOW (dialog), title);
   gnome_dialog_close_hides (GNOME_DIALOG(dialog), TRUE);
   gtk_widget_show_all (dialog);
-  data->pin_keypad_dialog = dialog;
 
-  g_free (msgstr);
+  result = data->showbox_id;
+  g_hash_table_insert(data->showbox_hash, (gpointer)result, dialog);
+  data->showbox_id++;
+  data->showbox_last = dialog;
+
+  g_free(title);
+  g_free(text);
+  return result;
 }
 
 /* ************************************************************ 
  */
 
-int debug_pmonitor = FALSE;
+static int messageBoxCB(AB_BANKING *ab, GWEN_TYPE_UINT32 flags, 
+			const char *utf8title, const char *utf8text, 
+			const char *b1, const char *b2, const char *b3)
+{
+  GNCInteractor *data;
+  GtkWidget *dialog, *label;
+  int result;
+  gchar *text, *title, *b1text, *b2text, *b3text;
+
+  g_assert(ab);
+  data = AB_Banking_GetUserData(ab);
+  g_assert(data);
+
+  text = gnc_hbci_utf8ToLatin1(data, utf8text);
+  title = gnc_hbci_utf8ToLatin1(data, utf8title);
+  b1text = gnc_hbci_utf8ToLatin1(data, b1);
+  b2text = gnc_hbci_utf8ToLatin1(data, b2);
+  b3text = gnc_hbci_utf8ToLatin1(data, b3);
+
+  dialog = gnome_dialog_new (title, 
+			     b1 ? b1text : NULL,
+			     b2 ? b2text : NULL,
+			     b3 ? b3text : NULL,
+			     NULL);
+  gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (data->parent));
+  gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
+  label = gtk_label_new (text);
+  gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
+  gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label, TRUE, TRUE, 0);
+  gtk_widget_show (label);
+
+  result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
+  if (result<0 || result>2) {
+    printf("messageBoxCB: Bad result %d", result);
+    g_free(title);
+    g_free(text);
+    g_free(b1text);
+    g_free(b2text);
+    g_free(b3text);
+    return 0;
+  }
+  g_free(title);
+  g_free(text);
+  g_free(b1text);
+  g_free(b2text);
+  g_free(b3text);
+  return result+1;
+}
 
 
-/* old ProgressMonitor callbacks
+/* ************************************************************ 
  */
 
-static void actStarted (ActionProgressType type, void *user_data)
+#define progress_id 4711
+
+static GWEN_TYPE_UINT32 progressStartCB(AB_BANKING *ab, const char *utf8title, 
+					const char *utf8text, GWEN_TYPE_UINT32 total)
 {
-  GNCInteractor *data = user_data;
-  const char *msg = NULL;
+  GNCInteractor *data;
+  gchar *title, *text;
+
+  g_assert(ab);
+  data = AB_Banking_GetUserData(ab);
   g_assert(data);
-  switch (type) {
-    /** Creating HBCI job. Number of Job will follow in string argument. */
-  case ACT_FILLINGQUEUE:
-    msg = _("Creating HBCI Job");
-    break;
-    /** Contacting server. Server IP address will follow in string argument. */
-  case ACT_CONTACTINGSERVER:
-    msg = _("Contacting Server");
-    break;
-    /** Checking Job result. */
-  case ACT_CHKRESULT:
-    msg = _("Checking Job result");
-    break;
-    /** Updating local system. */
-  case ACT_UPDATESYSTEM:
-    msg = _("Updating local system");
-    break;
-    /** Closing connection. */
-  case ACT_CLOSECONNECTION:
-    msg = _("Closing connection");
-    break;
-  case ACT_OPENSESSION:
-    msg = _("Open session");
-    break;
-  case ACT_CLOSESESSION:
-    msg = _("Close session");
-    break;
-  case ACT_OPENDIALOG:
-    msg = _("Open dialog");
-    break;
-  case ACT_CLOSEDIALOG:
-    msg = _("Close dialog");
-    break;
-  case ACT_PROCESSMSG:
-    msg = _("Process message");
-    break;
-  case ACT_CREATEJOB:
-    msg = _("Create job");
-    break;
-  case ACT_HANDLEJOBS:
-    msg = _("Handle jobs");
-    break;
-  case ACT_SIGNMSG:
-    msg = _("Sign message");
-    break;
-  case ACT_ENCRYPTMSG:
-    msg = _("Encrypt message");
-    break;
-  case ACT_VERIFYMSG:
-    msg = _("Verify message");
-    break;
-  case ACT_DECRYPTMSG:
-    msg = _("Decrypt message");
-    break;
-  case ACT_ENCODEMSG:
-    msg = _("Encode message");
-    break;
-  case ACT_DECODEMSG:
-    msg = _("Decode message");
-    break;
-    /** Sending message. */
-  case ACT_SENDINGMESSAGE:
-    /* Note: the ACT_SENDINGMESSAGE doesn't seem to be used. */
-  case ACT_LOW_SENDMSG:
-    msg = _("Sending message");
-    break;
-  case ACT_LOW_RECEIVEMSG:
-    msg = _("Receiving message");
-    break;
-    /*default:
-      msg = _("Unknown");
-      break;*/
-  }
   
-  g_assert(msg);
-  gtk_entry_set_text (GTK_ENTRY (data->action_entry), msg);
-  /* Let the widgets be redrawn */
-  while (g_main_iteration (FALSE));
-  if (debug_pmonitor)
-    printf("actStarted-cb: current_job %d, jobs %d, current_act %d, actions %d, msg %s.\n", 
-	   data->current_job, data->jobs, data->current_act, data->actions, msg);
+  text = gnc_hbci_utf8ToLatin1(data, utf8text);
+  title = gnc_hbci_utf8ToLatin1(data, utf8title);
 
-  GNCInteractor_setRunning (data);
- 
-  /* Let the widgets be redrawn */
-  while (g_main_iteration (FALSE));
+  /* Now set the text etc */
+  gtk_entry_set_text (GTK_ENTRY (data->job_entry), title);
+  gtk_entry_set_text (GTK_ENTRY (data->action_entry), text);
+
+  /*   printf("progressLogCB: Logging msg: %s\n", text); */
+  /*   GNCInteractor_add_log_text (data, text); */
+
+  /* Set progress bar */
+  gtk_progress_set_percentage (GTK_PROGRESS (data->action_progress), 
+			       0.0);
+  data->action_max = total;
+  GNCInteractor_setRunning(data);
+  /* printf("progressStartCB: Action \"%s\" started, total %d.\n",
+     text, total); */
+
+  /* Show the dialog */
+  GNCInteractor_show(data);
+
+  g_free(title);
+  g_free(text);
+  return progress_id;
 }
 
-static void closeConnection(TransportType t, void *user_data)
+static int progressAdvanceCB(AB_BANKING *ab, GWEN_TYPE_UINT32 id, 
+			     GWEN_TYPE_UINT32 progress)
 {
-  GNCInteractor *data = user_data;
+  GNCInteractor *data;
+
+  g_assert(ab);
+  data = AB_Banking_GetUserData(ab);
   g_assert(data);
-  data->current_act++;
-  gtk_entry_set_text (GTK_ENTRY (data->action_entry), _("Done"));
-  /*gtk_progress_set_percentage (GTK_PROGRESS (data->action_progress), 
-    1.0);*/
-
-  if (debug_pmonitor)
-    printf("actFinished-cb: current_job %d, jobs %d, current_act %d, actions %d.\n", 
-	   data->current_job, data->jobs, data->current_act, data->actions);
-  /*if (data->current_act > data->actions) {
-    printf("actFinished-cb: oops, current_act==%d is > than actions==%d.\n",
-    data->current_act, data->actions);
-    }*/
-  
-  GNCInteractor_setFinished (data);
- 
-  while (g_main_iteration (FALSE));
+
+  if ((id != 0) && (id != progress_id)) {
+/*     printf("progressLogCB: Oops, wrong progress id %d -- ignored.\n", id); */
+  }
+
+  if (progress != AB_BANKING_PROGRESS_NONE) {
+    /* printf("progressLogCB: Progress set to %d out of %f.\n", 
+       progress, data->action_max); */
+    if (progress <= data->action_max) 
+      gtk_progress_set_percentage (GTK_PROGRESS (data->action_progress), 
+				   progress/data->action_max);
+  }
+
+  keepAlive(data);
+  return 0;
 }
-static void logMsg (const char *msg, void *user_data)
+
+
+static int progressLogCB(AB_BANKING *ab, GWEN_TYPE_UINT32 id, 
+			 AB_BANKING_LOGLEVEL level, const char *utf8text)
 {
-  /* Note: this isn't used anyway. */
-  GNCInteractor *data = user_data;
+  GNCInteractor *data;
+  gchar *text;
+
+  g_assert(ab);
+  data = AB_Banking_GetUserData(ab);
   g_assert(data);
-  
-  printf("logMsg: Logging msg: %s\n", msg);
-  GNCInteractor_add_log_text (data, msg);
-			    
-  /* Let the widgets be redrawn */
-  while (g_main_iteration (FALSE));
+
+  text = gnc_hbci_utf8ToLatin1(data, utf8text);
+
+  if ((id != 0) && (id != progress_id)) {
+/*     printf("progressLogCB: Oops, wrong progress id %d -- ignored.\n", id); */
+  }
+
+  /* printf("progressLogCB: Logging msg: %s\n", text); */
+  GNCInteractor_add_log_text (data, text);
+
+  g_free(text);
+  keepAlive(data);
+  return 0;
+}
+
+static int progressEndCB(AB_BANKING *ab, GWEN_TYPE_UINT32 id)
+{
+  GNCInteractor *data;
+  g_assert(ab);
+  data = AB_Banking_GetUserData(ab);
+  g_assert(data);
+
+  if ((id != 0) && (id != progress_id)) {
+/*     printf("progressLogCB: Oops, wrong progress id %d -- ignored.\n", id); */
+  }
+
+  GNCInteractor_setFinished(data);
+
+  keepAlive(data);
+  return 0;
 }
 
+
+
+/* ************************************************************ 
+ */
+
+int debug_pmonitor = FALSE;
 void GNCInteractor_add_log_text (GNCInteractor *data, const char *msg)
 {
   int pos;
@@ -738,14 +725,14 @@
   while (g_main_iteration (FALSE));
 }
 
+GWEN_INHERIT(AB_BANKING, GNCInteractor)
 
 /********************************************************
  * Constructor 
  */
-HBCI_Interactor *
-gnc_hbci_new_interactor(GNCInteractor *data)
+void
+gnc_hbci_add_callbacks(AB_BANKING *ab, GNCInteractor *data)
 {
-  HBCI_InteractorCB *inter;
   GtkWidget *dialog;
   GladeXML *xml;
 
@@ -783,19 +770,22 @@
   gtk_object_ref (GTK_OBJECT (dialog));
   gtk_widget_hide_all (dialog);
 
+  GWEN_INHERIT_SETDATA(AB_BANKING, GNCInteractor,
+                       ab, data,
+                       &destr);
+
+  AB_Banking_SetMessageBoxFn(ab, messageBoxCB);
+  AB_Banking_SetInputBoxFn(ab, inputBoxCB);
+  AB_Banking_SetShowBoxFn(ab, showBoxCB);
+  AB_Banking_SetHideBoxFn(ab, hideBoxCB);
+  AB_Banking_SetProgressStartFn(ab, progressStartCB);
+  AB_Banking_SetProgressAdvanceFn(ab, progressAdvanceCB);
+  AB_Banking_SetProgressLogFn(ab, progressLogCB);
+  AB_Banking_SetProgressEndFn(ab, progressEndCB);
+
+  /* AB_Banking_SetGetPinFn(ab,); */
+  AB_Banking_SetGetTanFn(ab, getTanCB);
 
-  inter = HBCI_InteractorCB_new4(&destr,
-				 &msgInputPin,
-				 &msgInsertMediumOrAbort,
-				 &msgInsertCorrectMediumOrAbort,
-				 &keepAlive,
-				 &msgStartInputPinViaKeypadCB,
-				 &msgEndInputPinViaKeypadCB,
-				 NULL,
-				 &closeConnection,
-				 &actStarted,
-				 &logMsg,
-				 data);
+  AB_Banking_SetUserData(ab, data);
 
-  return HBCI_InteractorCB_Interactor(inter);
 }
Index: gnc-hbci-transfer.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-transfer.c,v
retrieving revision 1.7.4.4
retrieving revision 1.7.4.5
diff -Lsrc/import-export/hbci/gnc-hbci-transfer.c -Lsrc/import-export/hbci/gnc-hbci-transfer.c -u -r1.7.4.4 -r1.7.4.5
--- src/import-export/hbci/gnc-hbci-transfer.c
+++ src/import-export/hbci/gnc-hbci-transfer.c
@@ -25,8 +25,7 @@
 #include "config.h"
 #include "gnc-hbci-transfer.h"
 
-#include <openhbci2/api.h>
-#include <openhbci2/outboxjob.h>
+#include <aqbanking/banking.h>
 
 #include "gnc-ui.h"
 #include "gnc-numeric.h"
@@ -48,24 +47,20 @@
 gnc_hbci_maketrans (GtkWidget *parent, Account *gnc_acc,
 		    GNC_HBCI_Transtype trans_type)
 {
-  HBCI_API *api = NULL;
-  HBCI_Outbox *outbox = NULL;
-  const gnc_HBCI_Account *h_acc = NULL;
+  AB_BANKING *api = NULL;
+  const AB_ACCOUNT *h_acc = NULL;
   GNCInteractor *interactor = NULL;
-  const HBCI_Customer *customer = NULL;
-  GList *hbci_accountlist = NULL;
   
   g_assert(parent);
   g_assert(gnc_acc);
 
   /* Get API */
-  api = gnc_hbci_api_new_currentbook (parent, &interactor, &hbci_accountlist);
+  api = gnc_AB_BANKING_new_currentbook (parent, &interactor);
   if (api == NULL) {
     printf("gnc_hbci_maketrans: Couldn't get HBCI API. Nothing will happen.\n");
     return;
   }
   g_assert (interactor);
-  outbox = HBCI_Outbox_new();
 
   /* Get HBCI account */
   h_acc = gnc_hbci_get_hbci_acc (api, gnc_acc);
@@ -74,13 +69,8 @@
     return;
   }
   /*printf("gnc_hbci_maketrans: HBCI account no. %s found.\n",
-    gnc_HBCI_Account_accountId (h_acc));*/
+    AB_ACCOUNT_accountId (h_acc));*/
   
-  /* Get the customer that should be doing this job. */
-  customer = gnc_hbci_get_first_customer(h_acc);
-  if (!customer) 
-    return;
-
   {
     GList *template_list = 
       gnc_trans_templ_glist_from_kvp_glist
@@ -91,10 +81,10 @@
     HBCITransDialog *td;
 
     /* Now open the HBCI_trans_dialog, which also calls
-       HBCI_API_executeQueue. */
+       AB_BANKING_executeQueue. */
       
     /* Create new HBCIDialogTrans */
-    td = gnc_hbci_dialog_new(parent, h_acc, customer, gnc_acc, 
+    td = gnc_hbci_dialog_new(parent, h_acc, gnc_acc, 
 			     trans_type, template_list);
 	
     /* Repeat until HBCI action was successful or user pressed cancel */
@@ -117,23 +107,26 @@
       gnc_hbci_dialog_hide(td);
 
       {
-	HBCI_OutboxJob *job = 
-	  gnc_hbci_trans_dialog_enqueue(td, api, outbox, customer, 
-					(gnc_HBCI_Account *)h_acc, trans_type);
+	AB_JOB *job = 
+	  gnc_hbci_trans_dialog_enqueue(td, api,
+					(AB_ACCOUNT *)h_acc, trans_type);
       
 	/* HBCI Transaction has been created and enqueued, so now open
 	 * the gnucash transaction dialog and fill in all values. */
 	successful = gnc_hbci_maketrans_final (td, gnc_acc, trans_type);
 
 	/* User pressed cancel? Then go back to HBCI transaction */
-	if (!successful)
+	if (!successful) {
+	  AB_Banking_DequeueJob (api, job);
+	  AB_Job_free (job);
 	  continue;
+	}
 
 	if (result == 0) {
 
 	  /* If the user pressed "execute now", then execute this job
 	     now. This function already delete()s the job. */
-	  successful = gnc_hbci_trans_dialog_execute(td, api, outbox, 
+	  successful = gnc_hbci_trans_dialog_execute(td, api, 
 						     job, interactor);
 
 	  if (!successful) {
@@ -142,8 +135,15 @@
 	    xaccTransBeginEdit(gtrans);
 	    xaccTransDestroy(gtrans);
 	    xaccTransCommitEdit(gtrans);
+
+/* 	    AB_Banking_DequeueJob(api, job); */
+/* 	    AB_Banking_DelFinishedJob(api, job); */
+/* 	    AB_Banking_DelPendingJob(api, job); */
 	  }
 	  
+	  AB_Banking_DequeueJob(api, job);
+	  AB_Banking_DelFinishedJob(api, job);
+	  AB_Banking_DelPendingJob(api, job);
 	} /* result == 0 */
 	else {
 	  /* huh? Only result == 0 should be possible. Simply ignore
@@ -163,9 +163,7 @@
       }*/
 
     /* Just to be on the safe side, clear queue once again. */
-    HBCI_Outbox_removeByStatus (outbox, HBCI_JOB_STATUS_NONE);
-    HBCI_Outbox_delete(outbox);
-    gnc_hbci_api_save (api);
+    gnc_AB_BANKING_fini (api);
     gnc_hbci_dialog_delete(td);
     gnc_trans_templ_delete_glist (template_list);
     
@@ -201,7 +199,7 @@
 {
   gnc_numeric amount;
   XferDialog *transdialog;
-  const HBCI_Transaction *h_trans;
+  const AB_TRANSACTION *h_trans;
   gboolean run_until_done = TRUE;
   g_assert(td);
 
@@ -222,7 +220,7 @@
       
   /* Amount */
   amount = double_to_gnc_numeric 
-    (HBCI_Value_getValue (HBCI_Transaction_value (h_trans)),
+    (AB_Value_GetValue (AB_Transaction_GetValue (h_trans)),
      xaccAccountGetCommoditySCU(gnc_acc),
      GNC_RND_ROUND); 
   /*switch (trans_type) {
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/Makefile.am,v
retrieving revision 1.22.4.5
retrieving revision 1.22.4.6
diff -Lsrc/import-export/hbci/Makefile.am -Lsrc/import-export/hbci/Makefile.am -u -r1.22.4.5 -r1.22.4.6
--- src/import-export/hbci/Makefile.am
+++ src/import-export/hbci/Makefile.am
@@ -3,21 +3,22 @@
 pkglib_LTLIBRARIES = libgncmod-hbci.la
 
 libgncmod_hbci_la_SOURCES = \
-  gncmod-hbci.c \
-  druid-hbci-utils.c \
-  dialog-pass.c \
-  dialog-hbcitrans.c \
   dialog-daterange.c \
-  gnc-hbci-account.c \
-  gnc-hbci-kvp.c \
-  gnc-hbci-utils.c \
-  gnc-hbci-transfer.c \
-  gnc-hbci-trans-templ.c \
+  dialog-hbcitrans.c \
+  dialog-pass.c \
   gnc-hbci-getbalance.c \
   gnc-hbci-gettrans.c \
+  gnc-hbci-kvp.c \
+  gnc-hbci-trans-templ.c \
+  gnc-hbci-transfer.c \
+  gnc-hbci-utils.c \
   gnc-plugin-hbci.c \
   hbci-interaction.c \
-  druid-hbci-initial.c 
+  druid-hbci-utils.c \
+  druid-hbci-initial.c \
+  gncmod-hbci.c
+
+
 
 # Must be included in tarball because they are listed in POTFILES.in
 libgncmod_hbci_la_empty = \
@@ -29,8 +30,6 @@
   dialog-pass.h \
   druid-hbci-initial.h \
   druid-hbci-utils.h \
-  gnc-hbci-actions.h \
-  gnc-hbci-account.h \
   gnc-hbci-getbalance.h \
   gnc-hbci-gettrans.h \
   gnc-hbci-kvp.h \
@@ -54,6 +53,7 @@
   ${GLIB_LIBS} \
   ${GNOME_LIBS} \
   ${HBCI_LIBS}
+  ${XML_LIB}
 
 gncscmdir = ${GNC_SCM_INSTALL_DIR}/hbci
 
@@ -83,7 +83,8 @@
   ${GLADE_CFLAGS} \
   ${GNOME_CFLAGS} \
   ${GTKHTML_CFLAGS} \
-  ${HBCI_CFLAGS}
+  ${HBCI_CFLAGS} \
+  ${GNOME_XML_CFLAGS}
 
 #gladedir = $(GNC_GLADE_DIR)
 #glade_DATA = 
--- src/import-export/hbci/gnc-hbci-account.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/********************************************************************\
- * gnc-hbci-account.h -- hbci account definition                    *
- * Copyright (C) 2004 Christian Stimming                            *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-/** @file 
-    Hbci account definition
-*/
-
-#ifndef GNC_HBCI_ACCOUNT_H
-#define GNC_HBCI_ACCOUNT_H
-
-#include <glib.h>
-#include <gnome.h>
-#include <openhbci2/api.h>
-
-#include "gnc-book.h"
-
-typedef struct _gnc_HBCI_Account gnc_HBCI_Account;
-/** @name HBCI_Account wrapper class */
-/*@{*/
-/** Constructor */
-gnc_HBCI_Account *gnc_HBCI_Account_new(const HBCI_Bank *bank, 
-				       const char *bankCode,
-				       const char *accountid);
-/** Returns the account id */
-const char *gnc_HBCI_Account_accountId (const gnc_HBCI_Account *hbci_acc);
-/** Returns the bank code -- this might be different than the actual
- * bank's bank code */
-const char *gnc_HBCI_Account_bankCode (const gnc_HBCI_Account *hbci_acc);
-
-void gnc_HBCI_Account_set_name (gnc_HBCI_Account *hbci_acc, const char *n);
-void gnc_HBCI_Account_set_customer (gnc_HBCI_Account *hbci_acc, const char *n);
-void gnc_HBCI_Account_set_currency (gnc_HBCI_Account *hbci_acc, const char *n);
-void gnc_HBCI_Account_set_name1 (gnc_HBCI_Account *hbci_acc, const char *n);
-const char *gnc_HBCI_Account_name (const gnc_HBCI_Account *hbci_acc);
-const char *gnc_HBCI_Account_customer (const gnc_HBCI_Account *hbci_acc);
-const char *gnc_HBCI_Account_currency (const gnc_HBCI_Account *hbci_acc);
-const char *gnc_HBCI_Account_name1 (const gnc_HBCI_Account *hbci_acc);
-
-/** Returns the bank this account belongs to */
-const HBCI_Bank *
-gnc_HBCI_Account_bank (const gnc_HBCI_Account *hbci_acc);
-/** Destructor for this account object */
-void gnc_HBCI_Account_delete (gnc_HBCI_Account *hbci_acc);
-
-/** Returns a newly allocated string that is a human-readable
- * description of this account. The returned string will be owned by
- * the caller. */
-gchar *gnc_HBCI_Account_longname(const gnc_HBCI_Account *hbci_acc);
-/*@}*/
-
-/** @name List of hbci accounts */
-/*@{*/
-/** Foreach function */
-void *list_HBCI_Account_foreach(GList *list_HBCI_Account, 
-				void*(*func_cb)(gnc_HBCI_Account *acc,
-						void *user_data), 
-				void *user_data);
-/** Delete each element of a GList of HBCI_Accounts and finally the
- * list itself.  */
-void list_HBCI_Account_delete(GList *list_HBCI_Account);
-
-/** Searches for an account with the given data fields. Returns this
- * account, or NULL if none was found. */
-gnc_HBCI_Account *list_HBCI_Account_find(GList *list_HBCI_Account,
-					 const HBCI_Bank *bank, 
-					 const char *bankCode,
-					 const char *accountid);
-/*@}*/
-
-/** @name Serialization -- List of gnc_HBCI_Accounts to kvp_frame and
- * back */
-/*@{*/
-/** Constructor from a kvp_frame (the kvp_frame is left unchanged) */
-gnc_HBCI_Account *gnc_HBCI_Account_from_kvp(kvp_frame *k, HBCI_API *api);
-/** Creates a kvp_frame from this TransTempl */
-kvp_frame *gnc_HBCI_Account_to_kvp(const gnc_HBCI_Account *t);
-
-/** Creates a GList of gnc_HBCI_Account from a GList of kvp_values which
-    in turn contain a kvp_frame. */
-GList *gnc_HBCI_Account_glist_from_kvp_glist(GList *v, HBCI_API *api);
-/** Creates a GList of kvp_value (which in turn contain a kvp_frame)
-    from a GList of gnc_HBCI_Account. */
-GList *gnc_HBCI_Account_kvp_glist_from_glist(GList *k);
-/*@}*/
-
-
-#endif /* GNC_HBCI_ACCOUNT_H */
Index: druid-hbci-utils.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/druid-hbci-utils.h,v
retrieving revision 1.3.4.2
retrieving revision 1.3.4.3
diff -Lsrc/import-export/hbci/druid-hbci-utils.h -Lsrc/import-export/hbci/druid-hbci-utils.h -u -r1.3.4.2 -r1.3.4.3
--- src/import-export/hbci/druid-hbci-utils.h
+++ src/import-export/hbci/druid-hbci-utils.h
@@ -24,7 +24,7 @@
 #define DRUID_HBCI_UTILS_H
 
 #include <gnome.h>
-#include <openhbci2/api.h>
+#include <aqbanking/banking.h>
 #include "hbci-interaction.h"
 #include "gnc-hbci-utils.h"
 
@@ -36,17 +36,17 @@
 
 
 /** Update the account list in all the banks stored in this
- * HBCI_API. Straightforward, if we have only one bank and one user
+ * AB_BANKING. Straightforward, if we have only one bank and one user
  * with one customer. All other cases are not currently
  * implemented. */
-void update_accounts (GtkWidget *parent, HBCI_API *api, 
+void update_accounts (GtkWidget *parent, AB_BANKING *api, 
 		      GNCInteractor *inter);
 
 /** Builds a new hash table mapping all HBCI accounts to Gnucash
  * accounts, where the Gnucash accounts already have the reference
  * strings stored in their kvp's. */
 GHashTable *
-gnc_hbci_new_hash_from_kvp (HBCI_API *api);
+gnc_hbci_new_hash_from_kvp (AB_BANKING *api);
 
 gboolean 
 gnc_verify_exist_or_new_file (GtkWidget *parent, const char *filename);
@@ -54,13 +54,5 @@
 gboolean
 gnc_test_dir_exist_error (GtkWindow *parent, const char *filename);
 
-GList *
-gnc_processOutboxResponse(HBCI_API *api, HBCI_Outbox *outbox, 
-			  GList *accountlist);
-
-/* Get keys from Job; store them in the customer's medium @§%&! */
-gboolean
-gnc_hbci_evaluate_GetKeys(HBCI_Outbox *outbox, HBCI_OutboxJob *job,
-			  HBCI_Customer *newcustomer);
 
 #endif
Index: dialog-pass.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/dialog-pass.c,v
retrieving revision 1.3.4.2
retrieving revision 1.3.4.3
diff -Lsrc/import-export/hbci/dialog-pass.c -Lsrc/import-export/hbci/dialog-pass.c -u -r1.3.4.2 -r1.3.4.3
--- src/import-export/hbci/dialog-pass.c
+++ src/import-export/hbci/dialog-pass.c
@@ -31,9 +31,11 @@
 
 gboolean
 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;
@@ -54,11 +56,20 @@
   password_entry = glade_xml_get_widget (xml, "password_entry");
   g_assert(heading_label && password_entry);
 
+  gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
+
+  gnome_dialog_editable_enters (GNOME_DIALOG (dialog),
+                                GTK_EDITABLE (password_entry));
+
+  if (windowtitle)
+    gtk_window_set_title (GTK_WINDOW (dialog), windowtitle);
+
   if (heading)
     gtk_label_set_text (GTK_LABEL (heading_label), heading);
 
   if (initial_password)
     gtk_entry_set_text (GTK_ENTRY (password_entry), initial_password);
+  gtk_entry_set_visibility (GTK_ENTRY (password_entry), !hide_input);
 
   result = gtk_dialog_run (GTK_DIALOG (dialog));
   gtk_widget_destroy(dialog);
@@ -76,6 +87,7 @@
 
 gboolean
 gnc_hbci_get_initial_password (GtkWidget *parent,
+			       const char *windowtitle,
 			       const char *heading,
 			       char **password)
 {
@@ -100,6 +112,16 @@
   confirm_entry = glade_xml_get_widget (xml, "confirm_entry");
   g_assert(heading_label && password_entry && confirm_entry);
 
+  gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
+
+  gnome_dialog_editable_enters (GNOME_DIALOG (dialog),
+                                GTK_EDITABLE (password_entry));
+  gnome_dialog_editable_enters (GNOME_DIALOG (dialog),
+                                GTK_EDITABLE (confirm_entry));
+
+  if (windowtitle)
+    gtk_window_set_title (GTK_WINDOW (dialog), windowtitle);
+
   if (heading)
     gtk_label_set_text (GTK_LABEL (heading_label), heading);
 
Index: gnc-hbci-kvp.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-kvp.c,v
retrieving revision 1.4.4.3
retrieving revision 1.4.4.4
diff -Lsrc/import-export/hbci/gnc-hbci-kvp.c -Lsrc/import-export/hbci/gnc-hbci-kvp.c -u -r1.4.4.3 -r1.4.4.4
--- src/import-export/hbci/gnc-hbci-kvp.c
+++ src/import-export/hbci/gnc-hbci-kvp.c
@@ -25,6 +25,7 @@
 
 #define HBCI_KEY "hbci"
 #define HBCI_ACCOUNT_ID "account-id"
+#define HBCI_ACCOUNT_UID "account-uid"
 #define HBCI_BANK_CODE "bank-code"
 #define HBCI_COUNTRY_CODE "country-code"
 #define HBCI_TRANS_RETRIEVAL "trans-retrieval"
@@ -49,12 +50,6 @@
   kvp_value *value = kvp_frame_get_slot (frame, HBCI_COUNTRY_CODE);
   return kvp_value_get_gint64 (value);
 }
-Timespec gnc_hbci_get_account_trans_retrieval (Account *a)
-{
-  kvp_frame *frame = gnc_hbci_get_account_kvp (a);
-  kvp_value *value = kvp_frame_get_slot (frame, HBCI_TRANS_RETRIEVAL);
-  return kvp_value_get_timespec (value);
-}
 void gnc_hbci_set_account_accountid (Account *a, const char *id)
 {
   kvp_frame *frame = gnc_hbci_get_account_kvp (a);
@@ -79,6 +74,26 @@
   kvp_frame_set_slot_nc (frame, HBCI_COUNTRY_CODE, value);
   xaccAccountCommitEdit (a);
 }
+gint gnc_hbci_get_account_uid (Account *a)
+{
+  kvp_frame *frame = gnc_hbci_get_account_kvp (a);
+  kvp_value *value = kvp_frame_get_slot (frame, HBCI_ACCOUNT_UID);
+  return kvp_value_get_gint64 (value);
+}
+void gnc_hbci_set_account_uid (Account *a, gint uid)
+{
+  kvp_frame *frame = gnc_hbci_get_account_kvp (a);
+  kvp_value *value = kvp_value_new_gint64 (uid);
+  xaccAccountBeginEdit (a);
+  kvp_frame_set_slot_nc (frame, HBCI_ACCOUNT_UID, value);
+  xaccAccountCommitEdit (a);
+}
+Timespec gnc_hbci_get_account_trans_retrieval (Account *a)
+{
+  kvp_frame *frame = gnc_hbci_get_account_kvp (a);
+  kvp_value *value = kvp_frame_get_slot (frame, HBCI_TRANS_RETRIEVAL);
+  return kvp_value_get_timespec (value);
+}
 void gnc_hbci_set_account_trans_retrieval (Account *a, Timespec time)
 {
   kvp_frame *frame = gnc_hbci_get_account_kvp (a);
@@ -121,6 +136,7 @@
   qof_book_kvp_changed (b);
 }
 
+#if 0
 GList *gnc_hbci_get_book_account_list (GNCBook *b)
 {
   kvp_frame *frame = gnc_hbci_get_book_kvp (b);
@@ -134,6 +150,7 @@
   kvp_frame_set_slot_nc (frame, HBCI_ACCOUNTS, value);
   qof_book_kvp_changed (b);
 }
+#endif
 
 
 /* lowlevel */
Index: hbci.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/glade/hbci.glade,v
retrieving revision 1.27.2.10
retrieving revision 1.27.2.11
diff -Lsrc/import-export/hbci/glade/hbci.glade -Lsrc/import-export/hbci/glade/hbci.glade -u -r1.27.2.10 -r1.27.2.11
--- src/import-export/hbci/glade/hbci.glade
+++ src/import-export/hbci/glade/hbci.glade
@@ -1,33 +1,32 @@
 <?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" >
 
 <glade-interface>
-<requires lib="gnome"/>
+  <requires lib="gnome" />
 
-<widget class="GtkWindow" id="HBCI Init Druid">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Initial HBCI Setup</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="default_width">650</property>
-  <property name="default_height">580</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-
-  <child>
-    <widget class="GnomeDruid" id="hbci_init_druid">
-      <property name="border_width">4</property>
-      <property name="visible">True</property>
-      <property name="show_help">False</property>
-      <signal name="cancel" handler="on_cancel"/>
-
-      <child>
-	<widget class="GnomeDruidPageEdge" id="druidpagestart1">
-	  <property name="visible">True</property>
-	  <property name="position">GNOME_EDGE_START</property>
-	  <property name="title" translatable="yes">Initial HBCI Setup</property>
-	  <property name="text" translatable="yes">This druid helps you setting up your HBCI connection with your bank.
+  <widget class="GtkWindow" id="HBCI Init Druid">
+    <property name="title" translatable="yes">Initial HBCI Setup</property>
+    <property name="type">GTK_WINDOW_TOPLEVEL</property>
+    <property name="modal">no</property>
+    <property name="default_width">650</property>
+    <property name="default_height">580</property>
+    <property name="allow_shrink">no</property>
+    <property name="allow_grow">yes</property>
+    <property name="width-request">540</property>
+    <property name="height-request">380</property>
+    <property name="window-position">GTK_WIN_POS_MOUSE</property>
+    <property name="visible">yes</property>
+
+    <child>
+      <widget class="GnomeDruid" id="hbci_init_druid">
+        <property name="visible">yes</property>
+
+        <signal name="cancel" handler="on_cancel" />
+
+        <child>
+          <widget class="GnomeDruidPageEdge" id="druidpagestart1">
+            <property name="title" translatable="yes">Initial HBCI Setup</property>
+            <property name="text" translatable="yes">This druid helps you setting up your HBCI connection with your bank.
 
 You first need to apply for HBCI access at your bank. If your bank 
 decides to grant you HBCI access, the bank will send you a letter, 
@@ -47,1363 +46,316 @@
 
 Press 'Cancel' if you do not wish to setup any 
 HBCI connection now.</property>
-	  <property name="title_color">#ffffffffffff</property>
-	  <property name="text_color">#000000000000</property>
-	  <property name="background_color">#666666669999</property>
-	  <property name="logo_background_color">#666666669999</property>
-	  <property name="textbox_color">#ffffffffffff</property>
-	</widget>
-      </child>
-
-      <child>
-	<widget class="GnomeDruidPageStandard" id="configfile_page">
-	  <property name="visible">True</property>
-	  <property name="title" translatable="yes">Enter OpenHBCI Configuration File</property>
-	  <property name="title_foreground">#ffffffffffff</property>
-	  <property name="background">#666666669999</property>
-	  <property name="logo_background">#666666669999</property>
-
-	  <child internal-child="vbox">
-	    <widget class="GtkVBox" id="vbox132">
-	      <property name="border_width">10</property>
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">5</property>
-
-	      <child>
-		<widget class="GtkFrame" id="frame56">
-		  <property name="visible">True</property>
-		  <property name="label_xalign">4.84288e-08</property>
-		  <property name="label_yalign">0.5</property>
-		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-		  <child>
-		    <widget class="GtkVBox" id="vbox156">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
-
-		      <child>
-			<widget class="GtkHBox" id="hbox108">
-			  <property name="border_width">5</property>
-			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">5</property>
-
-			  <child>
-			    <widget class="GtkLabel" id="label8477402">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Configuration File</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_CENTER</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">5</property>
-			      <property name="ypad">0</property>
-			      <property name="mnemonic_widget">configfile-entry</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GnomeFileEntry" id="configfile_fileentry">
-			      <property name="visible">True</property>
-			      <property name="history_id">openhbci_configfile</property>
-			      <property name="max_saved">10</property>
-			      <property name="browse_dialog_title" translatable="yes">Choose OpenHBCI Configuration File</property>
-			      <property name="directory_entry">False</property>
-			      <property name="modal">False</property>
-
-			      <child internal-child="entry">
-				<widget class="GtkEntry" id="configfile-entry">
-				  <property name="visible">True</property>
-				  <property name="can_focus">True</property>
-				  <property name="editable">True</property>
-				  <property name="visibility">True</property>
-				  <property name="max_length">0</property>
-				  <property name="text" translatable="yes"></property>
-				  <property name="has_frame">True</property>
-				  <property name="invisible_char" translatable="yes">*</property>
-				  <property name="activates_default">False</property>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">True</property>
-			      <property name="fill">True</property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label8877441">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">If you already have an OpenHBCI configuration file (e.g. from 'aqmoney'), 
-please select it here. GnuCash will continue to use your existing configuration.
-
-If you do not yet have an OpenHBCI configuration file, please specify a file name here. 
-A new OpenHBCI configuration file with that name will be created when this HBCI 
-Setup finishes.</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">10</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label1">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">OpenHBCI Configuration File</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="type">label_item</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-	    </widget>
-	  </child>
-	</widget>
-      </child>
-
-      <child>
-	<widget class="GnomeDruidPageStandard" id="bank_page">
-	  <property name="visible">True</property>
-	  <property name="title" translatable="yes">Enter Bank Information</property>
-	  <property name="title_foreground">#ffffffffffff</property>
-	  <property name="background">#666666669999</property>
-	  <property name="logo_background">#666666669999</property>
-
-	  <child internal-child="vbox">
-	    <widget class="GtkVBox" id="vbox130">
-	      <property name="border_width">10</property>
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">5</property>
-
-	      <child>
-		<widget class="GtkFrame" id="frame54">
-		  <property name="visible">True</property>
-		  <property name="label_xalign">0</property>
-		  <property name="label_yalign">0.5</property>
-		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-		  <child>
-		    <widget class="GtkTable" id="table1">
-		      <property name="border_width">20</property>
-		      <property name="visible">True</property>
-		      <property name="n_rows">2</property>
-		      <property name="n_columns">2</property>
-		      <property name="homogeneous">False</property>
-		      <property name="row_spacing">5</property>
-		      <property name="column_spacing">0</property>
-
-		      <child>
-			<widget class="GtkLabel" id="label8477399">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Country Code (Germany: 280)</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_CENTER</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="mnemonic_widget">country_code_entry</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkEntry" id="country_code_entry">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="editable">True</property>
-			  <property name="visibility">True</property>
-			  <property name="max_length">0</property>
-			  <property name="text" translatable="yes">280</property>
-			  <property name="has_frame">True</property>
-			  <property name="invisible_char" translatable="yes">*</property>
-			  <property name="activates_default">False</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			  <property name="x_options">expand</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkEntry" id="bank_code_entry">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="editable">True</property>
-			  <property name="visibility">True</property>
-			  <property name="max_length">0</property>
-			  <property name="text" translatable="yes"></property>
-			  <property name="has_frame">True</property>
-			  <property name="invisible_char" translatable="yes">*</property>
-			  <property name="activates_default">False</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">0</property>
-			  <property name="bottom_attach">1</property>
-			  <property name="x_options">expand</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label8477398">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Bank Code</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="mnemonic_widget">bank_code_entry</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">0</property>
-			  <property name="bottom_attach">1</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label8877442">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Bank Identification</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="type">label_item</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkFrame" id="frame55">
-		  <property name="visible">True</property>
-		  <property name="label_xalign">0</property>
-		  <property name="label_yalign">0.5</property>
-		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-		  <child>
-		    <widget class="GtkTable" id="table2">
-		      <property name="border_width">10</property>
-		      <property name="visible">True</property>
-		      <property name="n_rows">1</property>
-		      <property name="n_columns">2</property>
-		      <property name="homogeneous">False</property>
-		      <property name="row_spacing">0</property>
-		      <property name="column_spacing">0</property>
-
-		      <child>
-			<widget class="GtkLabel" id="label8477400">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Internet Address</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_CENTER</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="mnemonic_widget">ip_address_entry</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">0</property>
-			  <property name="bottom_attach">1</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkEntry" id="ip_address_entry">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="editable">True</property>
-			  <property name="visibility">True</property>
-			  <property name="max_length">0</property>
-			  <property name="text" translatable="yes">www.hbci-kernel.de</property>
-			  <property name="has_frame">True</property>
-			  <property name="invisible_char" translatable="yes">*</property>
-			  <property name="activates_default">False</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">0</property>
-			  <property name="bottom_attach">1</property>
-			  <property name="x_options">expand</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label8877443">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Server Address</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="type">label_item</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-	    </widget>
-	  </child>
-	</widget>
-      </child>
-
-      <child>
-	<widget class="GnomeDruidPageStandard" id="user_page">
-	  <property name="visible">True</property>
-	  <property name="title" translatable="yes">Enter User Information</property>
-	  <property name="title_foreground">#ffffffffffff</property>
-	  <property name="background">#666666669999</property>
-	  <property name="logo_background">#666666669999</property>
-
-	  <child internal-child="vbox">
-	    <widget class="GtkVBox" id="vbox141">
-	      <property name="border_width">10</property>
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">10</property>
-
-	      <child>
-		<widget class="GtkFrame" id="frame61">
-		  <property name="visible">True</property>
-		  <property name="label_xalign">0</property>
-		  <property name="label_yalign">0.5</property>
-		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox114">
-		      <property name="border_width">5</property>
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">5</property>
-
-		      <child>
-			<widget class="GtkLabel" id="label8477419">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Bank Code:</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_CENTER</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkFrame" id="frame62">
-			  <property name="visible">True</property>
-			  <property name="label_xalign">0</property>
-			  <property name="label_yalign">0.5</property>
-			  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-			  <child>
-			    <widget class="GtkLabel" id="user_bankcode_label">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">10010010</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_CENTER</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label8477421">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Name:</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_CENTER</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkFrame" id="frame63">
-			  <property name="visible">True</property>
-			  <property name="label_xalign">0</property>
-			  <property name="label_yalign">0.5</property>
-			  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-			  <child>
-			    <widget class="GtkLabel" id="user_bankname_label">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">my-bank</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_CENTER</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label8877444">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Bank</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="type">label_item</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkFrame" id="frame59">
-		  <property name="visible">True</property>
-		  <property name="label_xalign">0</property>
-		  <property name="label_yalign">0.5</property>
-		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-		  <child>
-		    <widget class="GtkTable" id="table3">
-		      <property name="border_width">10</property>
-		      <property name="visible">True</property>
-		      <property name="n_rows">5</property>
-		      <property name="n_columns">4</property>
-		      <property name="homogeneous">False</property>
-		      <property name="row_spacing">5</property>
-		      <property name="column_spacing">0</property>
-
-		      <child>
-			<widget class="GtkLabel" id="label8477402">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">User ID (&quot;Benutzerkennung&quot;)</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="mnemonic_widget">user_id_entry</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkEntry" id="user_id_entry">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="editable">True</property>
-			  <property name="visibility">True</property>
-			  <property name="max_length">0</property>
-			  <property name="text" translatable="yes"></property>
-			  <property name="has_frame">True</property>
-			  <property name="invisible_char" translatable="yes">*</property>
-			  <property name="activates_default">False</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			  <property name="x_options">expand</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label8477417">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Name (optional)</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="mnemonic_widget">user_name_entry</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">2</property>
-			  <property name="right_attach">3</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkEntry" id="user_name_entry">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="editable">True</property>
-			  <property name="visibility">True</property>
-			  <property name="max_length">0</property>
-			  <property name="text" translatable="yes"></property>
-			  <property name="has_frame">True</property>
-			  <property name="invisible_char" translatable="yes">*</property>
-			  <property name="activates_default">False</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">3</property>
-			  <property name="right_attach">4</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			  <property name="x_options">expand</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label8477410">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Customer ID (&quot;Kundennummer&quot;)</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="mnemonic_widget">customer_id_entry</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">3</property>
-			  <property name="bottom_attach">4</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label8477418">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Name (optional)</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_CENTER</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="mnemonic_widget">customer_name_entry</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">2</property>
-			  <property name="right_attach">3</property>
-			  <property name="top_attach">3</property>
-			  <property name="bottom_attach">4</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkHSeparator" id="hseparator3">
-			  <property name="visible">True</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">4</property>
-			  <property name="top_attach">2</property>
-			  <property name="bottom_attach">3</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkEntry" id="customer_id_entry">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="editable">True</property>
-			  <property name="visibility">True</property>
-			  <property name="max_length">0</property>
-			  <property name="text" translatable="yes"></property>
-			  <property name="has_frame">True</property>
-			  <property name="invisible_char" translatable="yes">*</property>
-			  <property name="activates_default">False</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">3</property>
-			  <property name="bottom_attach">4</property>
-			  <property name="x_options">expand</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkEntry" id="customer_name_entry">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="editable">True</property>
-			  <property name="visibility">True</property>
-			  <property name="max_length">0</property>
-			  <property name="text" translatable="yes"></property>
-			  <property name="has_frame">True</property>
-			  <property name="invisible_char" translatable="yes">*</property>
-			  <property name="activates_default">False</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">3</property>
-			  <property name="right_attach">4</property>
-			  <property name="top_attach">3</property>
-			  <property name="bottom_attach">4</property>
-			  <property name="x_options">expand</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label8877438">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">If your bank did not specify a Customer ID, enter the User ID here.</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="mnemonic_widget">customer_id_entry</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">4</property>
-			  <property name="top_attach">4</property>
-			  <property name="bottom_attach">5</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label8877440">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Enter the IDs given from your bank here. Please make sure the spelling is correct. </property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_CENTER</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">4</property>
-			  <property name="top_attach">0</property>
-			  <property name="bottom_attach">1</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label8877445">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">User Identification</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="type">label_item</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkFrame" id="frame58">
-		  <property name="visible">True</property>
-		  <property name="label_xalign">0</property>
-		  <property name="label_yalign">0.5</property>
-		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-		  <child>
-		    <widget class="GtkVBox" id="vbox142">
-		      <property name="border_width">5</property>
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
-
-		      <child>
-			<widget class="GtkRadioButton" id="rdh_radiobutton">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">RDH Medium (Key File)</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="active">True</property>
-			  <property name="inconsistent">False</property>
-			  <property name="draw_indicator">True</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkVBox" id="vbox143">
-			  <property name="border_width">5</property>
-			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">0</property>
-
-			  <child>
-			    <widget class="GtkHBox" id="hbox110">
-			      <property name="visible">True</property>
-			      <property name="homogeneous">False</property>
-			      <property name="spacing">0</property>
-
-			      <child>
-				<widget class="GtkLabel" id="label8477408">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">Path to Key File</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_CENTER</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">12</property>
-				  <property name="ypad">0</property>
-				  <property name="mnemonic_widget">entry1</property>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">False</property>
-				  <property name="fill">False</property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GnomeFileEntry" id="keyfile_fileentry">
-				  <property name="visible">True</property>
-				  <property name="history_id">keyfile</property>
-				  <property name="max_saved">10</property>
-				  <property name="browse_dialog_title" translatable="yes">Choose file for secret key</property>
-				  <property name="directory_entry">False</property>
-				  <property name="modal">False</property>
-
-				  <child internal-child="entry">
-				    <widget class="GtkEntry" id="entry1">
-				      <property name="visible">True</property>
-				      <property name="can_focus">True</property>
-				      <property name="editable">True</property>
-				      <property name="visibility">True</property>
-				      <property name="max_length">0</property>
-				      <property name="text" translatable="yes"></property>
-				      <property name="has_frame">True</property>
-				      <property name="invisible_char" translatable="yes">*</property>
-				      <property name="activates_default">False</property>
-				    </widget>
-				  </child>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">True</property>
-				  <property name="fill">True</property>
-				</packing>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="label8477409">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">If you already have a key file, please choose it here and make sure the User ID and
-Customer ID match the ones when you created that key file earlier. 
-If you do not have one yet, choose a filename, and a key file will be created there. Make
-sure to remember the exact User ID and Customer ID specified now.</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">4.47035e-08</property>
-			      <property name="yalign">1</property>
-			      <property name="xpad">12</property>
-			      <property name="ypad">0</property>
-			      <property name="mnemonic_widget">entry1</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkRadioButton" id="ddv_radiobutton">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">DDV Medium (Chip Card)</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="active">False</property>
-			  <property name="inconsistent">False</property>
-			  <property name="draw_indicator">True</property>
-			  <property name="group">rdh_radiobutton</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label8877439">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">If you have a Chip Card but are not sure about the exact User ID and Customer ID, you can 
-use the tool 'hbcicard' from the libchipcard package to read these numbers from the Chip Card.</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_FILL</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0</property>
-			  <property name="yalign">0</property>
-			  <property name="xpad">17</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label8877446">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Security Medium</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="type">label_item</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-	    </widget>
-	  </child>
-	</widget>
-      </child>
-
-      <child>
-	<widget class="GnomeDruidPageStandard" id="account_info_page">
-	  <property name="visible">True</property>
-	  <property name="title" translatable="yes">Account list will be updated</property>
-	  <property name="title_foreground">#ffffffffffff</property>
-	  <property name="background">#666666669999</property>
-	  <property name="logo_background">#666666669999</property>
-
-	  <child internal-child="vbox">
-	    <widget class="GtkVBox" id="druid-vbox10">
-	      <property name="border_width">16</property>
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<widget class="GtkLabel" id="label8437423">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">In order to update your list of HBCI-enabled accounts, your bank
-server will be contacted and will be queried for the 
-HBCI-accessible accounts.
-
-Press 'Next' now to contact the bank server. You can then see the 
-progress of the HBCI connection in the HBCI connection window.</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-	    </widget>
-	  </child>
-	</widget>
-      </child>
-
-      <child>
-	<widget class="GnomeDruidPageStandard" id="account_match_page">
-	  <property name="visible">True</property>
-	  <property name="title" translatable="yes">Match HBCI accounts with GnuCash accounts</property>
-	  <property name="title_foreground">#ffffffffffff</property>
-	  <property name="background">#666666669999</property>
-	  <property name="logo_background">#666666669999</property>
-
-	  <child internal-child="vbox">
-	    <widget class="GtkVBox" id="druid-vbox3">
-	      <property name="border_width">10</property>
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox112">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkVBox" id="vbox157">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
-
-		      <child>
-			<widget class="GtkScrolledWindow" id="scrolledwindow25">
-			  <property name="visible">True</property>
-			  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
-			  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
-			  <property name="shadow_type">GTK_SHADOW_IN</property>
-			  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-			  <child>
-			    <widget class="GtkCList" id="account_page_list">
-			      <property name="visible">True</property>
-			      <property name="n_columns">3</property>
-			      <property name="column_widths">281,242,53</property>
-			      <property name="selection_mode">GTK_SELECTION_SINGLE</property>
-			      <property name="show_titles">True</property>
-			      <property name="shadow_type">GTK_SHADOW_IN</property>
-
-			      <child>
-				<widget class="GtkLabel" id="label834">
-				  <property name="label" translatable="yes">HBCI account name</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_CENTER</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkLabel" id="label835">
-				  <property name="label" translatable="yes">GnuCash account name</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_CENTER</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkLabel" id="label836">
-				  <property name="label" translatable="yes">New?</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_CENTER</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label828">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Click on the line of a HBCI account name if you want to match it to a GnuCash account.
+            <property name="position">GNOME_EDGE_START</property>
+            <property name="visible">yes</property>
+            <property name="title_color">#ffffff</property>
+            <property name="text_color">#000000</property>
+            <property name="background_color">#99bf99</property>
+            <property name="logo_background_color">#ffffff</property>
+            <property name="textbox_color">#ffffff</property>
+          </widget>
+        </child>
+
+        <child>
+          <widget class="GnomeDruidPageStandard" id="configfile_page">
+            <property name="title" translatable="yes">Start AqHBCI Wizard</property>
+            <property name="visible">yes</property>
+            <property name="title_foreground">#ffffff</property>
+            <property name="background">#99bf99</property>
+            <property name="logo_background">#ffffff</property>
+
+            <child internal-child="vbox">
+              <widget class="GtkVBox" id="vbox132">
+                <property name="border_width">10</property>
+                <property name="homogeneous">no</property>
+                <property name="spacing">5</property>
+                <property name="visible">yes</property>
+
+                <child>
+                  <widget class="GtkFrame" id="frame56">
+                    <property name="label" translatable="yes">Start AqHBCI Setup Wizard</property>
+                    <property name="label_xalign">4.84288e-08</property>
+                    <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
+                    <property name="visible">yes</property>
+
+                    <child>
+                      <widget class="GtkVBox" id="vbox156">
+                        <property name="homogeneous">no</property>
+                        <property name="spacing">0</property>
+                        <property name="visible">yes</property>
+
+                        <child>
+                          <widget class="GtkLabel" id="label8877441">
+                            <property name="label" translatable="yes">The Setup of your HBCI connection is handled by the external program &quot;AqHBCI Setup Wizard&quot;. Please press the button below to start this program.	</property>
+                            <property name="justify">GTK_JUSTIFY_LEFT</property>
+                            <property name="wrap">yes</property>
+                            <property name="xalign">0</property>
+                            <property name="yalign">0.5</property>
+                            <property name="xpad">10</property>
+                            <property name="ypad">0</property>
+                            <property name="visible">yes</property>
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">no</property>
+                            <property name="fill">no</property>
+                          </packing>
+                        </child>
+
+                        <child>
+                          <widget class="GtkHBox" id="hbox118">
+                            <property name="border_width">9</property>
+                            <property name="homogeneous">no</property>
+                            <property name="spacing">0</property>
+                            <property name="visible">yes</property>
+
+                            <child>
+                              <widget class="GtkButton" id="aqhbci_button">
+                                <property name="can_focus">yes</property>
+                                <property name="label" translatable="yes">Start AqHBCI Wizard</property>
+                                <property name="relief">GTK_RELIEF_NORMAL</property>
+                                <property name="visible">yes</property>
+                              </widget>
+                              <packing>
+                                <property name="padding">0</property>
+                                <property name="expand">no</property>
+                                <property name="fill">no</property>
+                              </packing>
+                            </child>
+
+                            <child>
+                              <placeholder />
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">no</property>
+                            <property name="fill">no</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="padding">0</property>
+                    <property name="expand">no</property>
+                    <property name="fill">no</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">yes</property>
+                <property name="fill">yes</property>
+              </packing>
+            </child>
+          </widget>
+        </child>
+
+        <child>
+          <widget class="GnomeDruidPageStandard" id="account_match_page">
+            <property name="title" translatable="yes">Match HBCI accounts with GnuCash accounts</property>
+            <property name="visible">yes</property>
+            <property name="title_foreground">#ffffff</property>
+            <property name="background">#99bf99</property>
+            <property name="logo_background">#ffffff</property>
+
+            <child internal-child="vbox">
+              <widget class="GtkVBox" id="druid-vbox3">
+                <property name="border_width">10</property>
+                <property name="homogeneous">no</property>
+                <property name="spacing">0</property>
+                <property name="visible">yes</property>
+
+                <child>
+                  <widget class="GtkHBox" id="hbox112">
+                    <property name="homogeneous">no</property>
+                    <property name="spacing">0</property>
+                    <property name="visible">yes</property>
+
+                    <child>
+                      <widget class="GtkVBox" id="vbox157">
+                        <property name="homogeneous">no</property>
+                        <property name="spacing">0</property>
+                        <property name="visible">yes</property>
+
+                        <child>
+                          <widget class="GtkScrolledWindow" id="scrolledwindow25">
+                            <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+                            <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+                            <property name="shadow_type">GTK_SHADOW_IN</property>
+                            <property name="visible">yes</property>
+
+                            <child>
+                              <widget class="GtkTreeView" id="account_page_list">
+                                <property name="can_focus">yes</property>
+                                <property name="headers-visible">yes</property>
+                                <property name="visible">yes</property>
+
+                                <child>
+                                  <widget class="GtkLabel" id="label834">
+                                    <property name="child_name">CList:title</property>
+                                    <property name="label" translatable="yes">HBCI account name</property>
+                                    <property name="justify">GTK_JUSTIFY_CENTER</property>
+                                    <property name="wrap">no</property>
+                                    <property name="xalign">0.5</property>
+                                    <property name="yalign">0.5</property>
+                                    <property name="xpad">0</property>
+                                    <property name="ypad">0</property>
+                                    <property name="visible">yes</property>
+                                  </widget>
+                                </child>
+
+                                <child>
+                                  <widget class="GtkLabel" id="label835">
+                                    <property name="child_name">CList:title</property>
+                                    <property name="label" translatable="yes">GnuCash account name</property>
+                                    <property name="justify">GTK_JUSTIFY_CENTER</property>
+                                    <property name="wrap">no</property>
+                                    <property name="xalign">0.5</property>
+                                    <property name="yalign">0.5</property>
+                                    <property name="xpad">0</property>
+                                    <property name="ypad">0</property>
+                                    <property name="visible">yes</property>
+                                  </widget>
+                                </child>
+
+                                <child>
+                                  <widget class="GtkLabel" id="label836">
+                                    <property name="child_name">CList:title</property>
+                                    <property name="label" translatable="yes">New?</property>
+                                    <property name="justify">GTK_JUSTIFY_CENTER</property>
+                                    <property name="wrap">no</property>
+                                    <property name="xalign">0.5</property>
+                                    <property name="yalign">0.5</property>
+                                    <property name="xpad">0</property>
+                                    <property name="ypad">0</property>
+                                    <property name="visible">yes</property>
+                                  </widget>
+                                </child>
+                              </widget>
+                            </child>
+
+                            <child internal-child="hscrollbar">
+                              <widget class="GtkHScrollbar" id="convertwidget1">
+                                <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+                                <property name="visible">yes</property>
+                              </widget>
+                            </child>
+
+                            <child internal-child="vscrollbar">
+                              <widget class="GtkVScrollbar" id="convertwidget2">
+                                <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+                                <property name="visible">yes</property>
+                              </widget>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">yes</property>
+                            <property name="fill">yes</property>
+                          </packing>
+                        </child>
+
+                        <child>
+                          <widget class="GtkLabel" id="label828">
+                            <property name="label" translatable="yes">Click on the line of a HBCI account name if you want to match it to a GnuCash account.
 Click &quot;Next&quot; when all desired accounts are matching.</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_CENTER</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkVBox" id="vbox144">
-		      <property name="border_width">5</property>
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">5</property>
-
-		      <child>
-			<widget class="GtkButton" id="hbciversion_button">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">HBCI
-Version</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="updatelist_button">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Update 
+                            <property name="justify">GTK_JUSTIFY_LEFT</property>
+                            <property name="wrap">no</property>
+                            <property name="xalign">0.5</property>
+                            <property name="yalign">0.5</property>
+                            <property name="xpad">0</property>
+                            <property name="ypad">0</property>
+                            <property name="visible">yes</property>
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">no</property>
+                            <property name="fill">no</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="padding">0</property>
+                        <property name="expand">yes</property>
+                        <property name="fill">yes</property>
+                      </packing>
+                    </child>
+
+                    <child>
+                      <widget class="GtkFrame" id="frame72">
+                        <property name="label" translatable="yes">HBCI Setup</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
+                        <property name="visible">yes</property>
+
+                        <child>
+                          <widget class="GtkVBox" id="vbox144">
+                            <property name="border_width">5</property>
+                            <property name="homogeneous">no</property>
+                            <property name="spacing">5</property>
+                            <property name="visible">yes</property>
+
+                            <child>
+                              <widget class="GtkButton" id="updatelist_button">
+                                <property name="can_focus">yes</property>
+                                <property name="label" translatable="yes">Update 
 account list</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="addaccount_button">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Manually add
-Account</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="addbank_button">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Add 
-Bank</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="adduser_button">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Add 
-User</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-	    </widget>
-	  </child>
-	</widget>
-      </child>
-
-      <child>
-	<widget class="GnomeDruidPageEdge" id="initial_finish_page">
-	  <property name="visible">True</property>
-	  <property name="position">GNOME_EDGE_FINISH</property>
-	  <property name="title" translatable="yes">HBCI Setup Finished</property>
-	  <property name="text" translatable="yes">Now the setup for all HBCI accounts that are matching
+                                <property name="relief">GTK_RELIEF_NORMAL</property>
+                                <property name="visible">yes</property>
+                              </widget>
+                              <packing>
+                                <property name="padding">0</property>
+                                <property name="expand">no</property>
+                                <property name="fill">no</property>
+                              </packing>
+                            </child>
+
+                            <child>
+                              <widget class="GtkButton" id="aqhbci_again_button">
+                                <property name="can_focus">yes</property>
+                                <property name="label" translatable="yes">AqHBCI 
+Setup</property>
+                                <property name="relief">GTK_RELIEF_NORMAL</property>
+                                <property name="visible">yes</property>
+                              </widget>
+                              <packing>
+                                <property name="padding">0</property>
+                                <property name="expand">no</property>
+                                <property name="fill">no</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="padding">0</property>
+                        <property name="expand">no</property>
+                        <property name="fill">yes</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="padding">0</property>
+                    <property name="expand">yes</property>
+                    <property name="fill">yes</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">yes</property>
+                <property name="fill">yes</property>
+              </packing>
+            </child>
+          </widget>
+        </child>
+
+        <child>
+          <widget class="GnomeDruidPageEdge" id="initial_finish_page">
+            <property name="title" translatable="yes">HBCI Setup Finished</property>
+            <property name="text" translatable="yes">Now the setup for all HBCI accounts that are matching
 to a Gnucash account is finished. You can now invoke HBCI actions
 on those accounts.
 
@@ -1411,2094 +363,1636 @@
 start this druid again anytime.
 
 Press 'Finish' now.</property>
-	  <property name="title_color">#ffffffffffff</property>
-	  <property name="text_color">#000000000000</property>
-	  <property name="background_color">#666666669999</property>
-	  <property name="logo_background_color">#666666669999</property>
-	  <property name="textbox_color">#ffffffffffff</property>
-	  <signal name="finish" handler="on_finish"/>
-	</widget>
-      </child>
-
-      <child>
-	<widget class="GnomeDruidPageStandard" id="iniletter_info_page">
-	  <property name="visible">True</property>
-	  <property name="title" translatable="yes">Public Keys will be retrieved</property>
-	  <property name="title_foreground">#ffffffffffff</property>
-	  <property name="background">#666666669999</property>
-	  <property name="logo_background">#666666669999</property>
-
-	  <child internal-child="vbox">
-	    <widget class="GtkVBox" id="druid-vbox10">
-	      <property name="border_width">16</property>
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<widget class="GtkLabel" id="label8877423">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">In order to setup HBCI access to your bank, OpenHBCI first has to 
-retrieve the cryptographic public keys of your bank. You will need 
-to enter your PIN for this to happen. After the successful key 
-retrieval, you need to verify those against the Ini-Letter that 
-your bank gave to you on paper.
-
-Press 'Next' now to retrieve the keys from the bank. If you have just
-created a new key file, you have to enter its PIN again. 
-
-You can then see the progress of the HBCI connection in the HBCI
-connection window. Please do not close the HBCI connection window
-before this whole druid has finished.</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-	    </widget>
-	  </child>
-	</widget>
-      </child>
-
-      <child>
-	<widget class="GnomeDruidPageStandard" id="iniletter_server_page">
-	  <property name="visible">True</property>
-	  <property name="title" translatable="yes">Verify Ini-Letter from Server</property>
-	  <property name="title_foreground">#ffffffffffff</property>
-	  <property name="background">#666666669999</property>
-	  <property name="logo_background">#666666669999</property>
-
-	  <child internal-child="vbox">
-	    <widget class="GtkVBox" id="druid-vbox8">
-	      <property name="border_width">16</property>
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<widget class="GtkVBox" id="iniletter_server_vbox">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkFrame" id="iniletter_server_frame">
-		      <property name="border_width">10</property>
-		      <property name="visible">True</property>
-		      <property name="label_xalign">0</property>
-		      <property name="label_yalign">0.5</property>
-		      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-		      <child>
-			<placeholder/>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label8877447">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Ini-Letter Server</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="type">label_item</property>
-			</packing>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox113">
-		      <property name="border_width">10</property>
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">10</property>
-
-		      <child>
-			<widget class="GtkLabel" id="label8477411">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Do these values match the values on your paper Ini-Letter?
-(If you cannot see anything, press the 'Print' button.)</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_CENTER</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="serveryes_button">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label">gtk-yes</property>
-			  <property name="use_stock">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="serverno_button">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label">gtk-no</property>
-			  <property name="use_stock">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkVSeparator" id="vseparator1">
-			  <property name="visible">True</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="serverprint_button">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Print</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-	    </widget>
-	  </child>
-	</widget>
-      </child>
-
-      <child>
-	<widget class="GnomeDruidPageStandard" id="iniletter_userinfo_page">
-	  <property name="visible">True</property>
-	  <property name="title" translatable="yes">User Keys will be sent</property>
-	  <property name="title_foreground">#ffffffffffff</property>
-	  <property name="background">#666666669999</property>
-	  <property name="logo_background">#666666669999</property>
-
-	  <child internal-child="vbox">
-	    <widget class="GtkVBox" id="druid-vbox10">
-	      <property name="border_width">16</property>
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<widget class="GtkLabel" id="label8877423">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Now you need to send your cryptographic public keys to the bank
-server. Once you press 'Next', you public keys are sent to the 
-bank. ATTENTION: This step cannot be undone. Once you have sent 
-your keys to the bank, you cannot generate new ones but instead 
-have to use these for months to come (unless you personally ask 
-your bank to reset them).
-
-AGAIN ATTENTION: If you happen to encounter a bug in this unstable
-Gnucash version and/or OpenHBCI, these keys might get broken and you
-might actually have ask your bank to reset them and generate new ones.
-
-If you are really sure to proceed, then press 'Next' now to send 
-the keys to the bank. You can then see the progress of the HBCI 
-connection in the HBCI connection window.</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-	    </widget>
-	  </child>
-	</widget>
-      </child>
-
-      <child>
-	<widget class="GnomeDruidPageStandard" id="iniletter_user_page">
-	  <property name="visible">True</property>
-	  <property name="title" translatable="yes">Print Ini-Letter of User</property>
-	  <property name="title_foreground">#ffffffffffff</property>
-	  <property name="background">#666666669999</property>
-	  <property name="logo_background">#666666669999</property>
-
-	  <child internal-child="vbox">
-	    <widget class="GtkVBox" id="iniletter_user_vbox">
-	      <property name="border_width">10</property>
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">5</property>
-
-	      <child>
-		<widget class="GtkFrame" id="iniletter_user_frame">
-		  <property name="visible">True</property>
-		  <property name="label_xalign">0</property>
-		  <property name="label_yalign">0.5</property>
-		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-		  <child>
-		    <placeholder/>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label8877448">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Ini-Letter User</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="type">label_item</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox114">
-		  <property name="border_width">10</property>
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">20</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label8477345">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">This is the Ini-Letter of you, the user. (If you cannot see anything, please 
-press the 'Print' button.)  Please print out a paper copy 
-by pressing 'Print'. Then press 'Next'.</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="userprint_button">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Print</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-	    </widget>
-	  </child>
-	</widget>
-      </child>
-
-      <child>
-	<widget class="GnomeDruidPageEdge" id="initial_finish_page">
-	  <property name="visible">True</property>
-	  <property name="position">GNOME_EDGE_FINISH</property>
-	  <property name="title" translatable="yes">Initial HBCI Setup Finished</property>
-	  <property name="text" translatable="yes">Now you need to sign your (the User's) Ini-Letter and send it to your bank. 
-
-The initial HBCI setup is now finished.
-
-Once your bank has received and processed your Ini-Letter, you
-have to execute this &quot;HBCI Setup&quot; druid again in order 
-to use the HBCI functionality in your accounts.
-
-Press 'Finish' now.</property>
-	  <property name="title_color">#ffffffffffff</property>
-	  <property name="text_color">#000000000000</property>
-	  <property name="background_color">#666666669999</property>
-	  <property name="logo_background_color">#666666669999</property>
-	  <property name="textbox_color">#ffffffffffff</property>
-	  <signal name="finish" handler="on_finish"/>
-	</widget>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkDialog" id="HBCI_trans_dialog">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Online Transaction</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="has_separator">True</property>
-
-  <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox2">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">8</property>
-
-      <child internal-child="action_area">
-	<widget class="GtkHButtonBox" id="dialog-action_area2">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_END</property>
-
-	  <child>
-	    <widget class="GtkButton" id="exec_later_button">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label" translatable="yes">Execute Later (unimpl.)</property>
-	      <property name="use_underline">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="response_id">0</property>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="cancel_button">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-cancel</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="response_id">-6</property>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="exec_now_button">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="response_id">-5</property>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment1">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox118">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image1">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-execute</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label8877454">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Execute Now</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkVBox" id="vbox151">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">1</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="heading_label">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Enter an Online Transaction</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkHSeparator" id="hseparator7">
-	      <property name="visible">True</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkTable" id="table6">
-	      <property name="visible">True</property>
-	      <property name="n_rows">21</property>
-	      <property name="n_columns">3</property>
-	      <property name="homogeneous">False</property>
-	      <property name="row_spacing">0</property>
-	      <property name="column_spacing">0</property>
-
-	      <child>
-		<widget class="GtkEntry" id="recp_account_entry">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="editable">True</property>
-		  <property name="visibility">True</property>
-		  <property name="max_length">0</property>
-		  <property name="text" translatable="yes"></property>
-		  <property name="has_frame">True</property>
-		  <property name="invisible_char" translatable="yes">*</property>
-		  <property name="activates_default">False</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">3</property>
-		  <property name="bottom_attach">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="recp_account_heading">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Recipient Account Number</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkEntry" id="recp_bankcode_entry">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="editable">True</property>
-		  <property name="visibility">True</property>
-		  <property name="max_length">0</property>
-		  <property name="text" translatable="yes"></property>
-		  <property name="has_frame">True</property>
-		  <property name="invisible_char" translatable="yes">*</property>
-		  <property name="activates_default">False</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">3</property>
-		  <property name="bottom_attach">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="recp_bankcode_heading">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Recipient Bank Code</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkEntry" id="recp_name_entry">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="has_focus">True</property>
-		  <property name="editable">True</property>
-		  <property name="visibility">True</property>
-		  <property name="max_length">0</property>
-		  <property name="text" translatable="yes"></property>
-		  <property name="has_frame">True</property>
-		  <property name="invisible_char" translatable="yes">*</property>
-		  <property name="activates_default">False</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="recp_name_heading">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Recipient Name</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_CENTER</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">0</property>
-		  <property name="bottom_attach">1</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="recp_bankname_heading">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">at Bank</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">4</property>
-		  <property name="bottom_attach">5</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="recp_bankname_label">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">(filled in automatically)</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_CENTER</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">5</property>
-		  <property name="bottom_attach">6</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label8877434">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Amount</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_CENTER</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">7</property>
-		  <property name="bottom_attach">8</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkHSeparator" id="hseparator6">
-		  <property name="visible">True</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">9</property>
-		  <property name="bottom_attach">10</property>
-		  <property name="x_options">fill</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label8877433">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Payment Purpose (only for recipient)</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_CENTER</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">10</property>
-		  <property name="bottom_attach">11</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkEntry" id="purpose_entry">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="editable">True</property>
-		  <property name="visibility">True</property>
-		  <property name="max_length">0</property>
-		  <property name="text" translatable="yes"></property>
-		  <property name="has_frame">True</property>
-		  <property name="invisible_char" translatable="yes">*</property>
-		  <property name="activates_default">False</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">11</property>
-		  <property name="bottom_attach">12</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label8877435">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Payment Purpose continued</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_CENTER</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">12</property>
-		  <property name="bottom_attach">13</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkEntry" id="purpose_cont_entry">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="editable">True</property>
-		  <property name="visibility">True</property>
-		  <property name="max_length">0</property>
-		  <property name="text" translatable="yes"></property>
-		  <property name="has_frame">True</property>
-		  <property name="invisible_char" translatable="yes">*</property>
-		  <property name="activates_default">False</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">13</property>
-		  <property name="bottom_attach">14</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="orig_name_heading">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Originator Name</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">15</property>
-		  <property name="bottom_attach">16</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="orig_name_label">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">something</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">16</property>
-		  <property name="bottom_attach">17</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="orig_bankname_heading">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">at Bank</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">17</property>
-		  <property name="bottom_attach">18</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="orig_bankname_label">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">something</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">18</property>
-		  <property name="bottom_attach">19</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="orig_account_heading">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Originator Account Number</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">15</property>
-		  <property name="bottom_attach">16</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="orig_account_label">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">something</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">16</property>
-		  <property name="bottom_attach">17</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="orig_bankcode_heading">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Bank Code</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">17</property>
-		  <property name="bottom_attach">18</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="orig_bankcode_label">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">something</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">18</property>
-		  <property name="bottom_attach">19</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkHSeparator" id="hseparator4">
-		  <property name="visible">True</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">14</property>
-		  <property name="bottom_attach">15</property>
-		  <property name="x_options">fill</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkHBox" id="amount_hbox">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <placeholder/>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">8</property>
-		  <property name="bottom_attach">9</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox117">
-		  <property name="border_width">2</property>
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">4</property>
-
-		  <child>
-		    <widget class="GtkVBox" id="vbox158">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
-
-		      <child>
-			<widget class="GtkButton" id="add_templ_button">
-			  <property name="border_width">2</property>
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Add current</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <signal name="clicked" handler="add_template_cb"/>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="moveup_templ_button">
-			  <property name="border_width">2</property>
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label">gtk-go-up</property>
-			  <property name="use_stock">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <signal name="clicked" handler="moveup_templ_cb"/>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="movedown_templ_button">
-			  <property name="border_width">2</property>
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label">gtk-go-down</property>
-			  <property name="use_stock">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <signal name="clicked" handler="movedown_templ_cb"/>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="sort_templ_button">
-			  <property name="border_width">2</property>
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Sort</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <signal name="clicked" handler="sort_templ_cb"/>
-			</widget>
-			<packing>
-			  <property name="padding">10</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="del_templ_button">
-			  <property name="border_width">2</property>
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Delete</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <signal name="clicked" handler="del_template_cb"/>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		      <property name="pack_type">GTK_PACK_END</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkScrolledWindow" id="template_scrolledwindow">
-		      <property name="visible">True</property>
-		      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-		      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-		      <property name="shadow_type">GTK_SHADOW_NONE</property>
-		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-		      <child>
-			<widget class="GtkViewport" id="viewport1">
-			  <property name="visible">True</property>
-			  <property name="shadow_type">GTK_SHADOW_IN</property>
-
-			  <child>
-			    <widget class="GtkList" id="template_list">
-			      <property name="selection_mode">GTK_SELECTION_SINGLE</property>
-			      <signal name="select_child" handler="on_template_list_select_child"/>
-			      <signal name="selection_changed" handler="on_template_list_selection_changed"/>
-			      <signal name="unselect_child" handler="on_template_list_unselect_child"/>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		      <property name="pack_type">GTK_PACK_END</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label8877453">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Use Transaction Template</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_CENTER</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		      <property name="pack_type">GTK_PACK_END</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">20</property>
-		  <property name="bottom_attach">21</property>
-		  <property name="x_options">fill</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkHSeparator" id="hseparator8">
-		  <property name="visible">True</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">19</property>
-		  <property name="bottom_attach">20</property>
-		  <property name="y_padding">1</property>
-		  <property name="x_options">fill</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkHSeparator" id="hseparator5">
-		  <property name="visible">True</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">6</property>
-		  <property name="bottom_attach">7</property>
-		  <property name="y_padding">1</property>
-		  <property name="x_options">fill</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkDialog" id="HBCI_connection_dialog">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">HBCI Connection Window</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="default_width">350</property>
-  <property name="default_height">420</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="has_separator">True</property>
-
-  <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox3">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child internal-child="action_area">
-	<widget class="GtkHButtonBox" id="dialog-action_area3">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_END</property>
-
-	  <child>
-	    <widget class="GtkButton" id="abort_button">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-cancel</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="response_id">0</property>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="close_button">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-close</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="response_id">0</property>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkVBox" id="vbox149">
-	  <property name="border_width">8</property>
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">8</property>
-
-	  <child>
-	    <widget class="GtkFrame" id="frame68">
-	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	      <child>
-		<widget class="GtkTable" id="table5">
-		  <property name="visible">True</property>
-		  <property name="n_rows">3</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label8877424">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Current Job</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_CENTER</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label8877425">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Current Action</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_CENTER</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label8877426">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Progress</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_CENTER</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkProgressBar" id="action_progress">
-		      <property name="visible">True</property>
-		      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-		      <property name="fraction">0</property>
-		      <property name="pulse_step">0.1</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkEntry" id="job_entry">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="editable">True</property>
-		      <property name="visibility">True</property>
-		      <property name="max_length">0</property>
-		      <property name="text" translatable="yes"></property>
-		      <property name="has_frame">True</property>
-		      <property name="invisible_char" translatable="yes">*</property>
-		      <property name="activates_default">False</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkEntry" id="action_entry">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="editable">True</property>
-		      <property name="visibility">True</property>
-		      <property name="max_length">0</property>
-		      <property name="text" translatable="yes"></property>
-		      <property name="has_frame">True</property>
-		      <property name="invisible_char" translatable="yes">*</property>
-		      <property name="activates_default">False</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label8877449">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Progress</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="type">label_item</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkFrame" id="frame69">
-	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	      <child>
-		<widget class="GtkScrolledWindow" id="scrolledwindow30">
-		  <property name="visible">True</property>
-		  <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-		  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
-		  <property name="shadow_type">GTK_SHADOW_NONE</property>
-		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-		  <child>
-		    <widget class="GtkTextView" id="log_text">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="editable">False</property>
-		      <property name="justification">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap_mode">GTK_WRAP_NONE</property>
-		      <property name="cursor_visible">True</property>
-		      <property name="pixels_above_lines">0</property>
-		      <property name="pixels_below_lines">0</property>
-		      <property name="pixels_inside_wrap">0</property>
-		      <property name="left_margin">0</property>
-		      <property name="right_margin">0</property>
-		      <property name="indent">0</property>
-		      <property name="text" translatable="yes"></property>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label8877450">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Log Messages</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="type">label_item</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkCheckButton" id="close_checkbutton">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label" translatable="yes">Close when finished</property>
-	      <property name="use_underline">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="active">True</property>
-	      <property name="inconsistent">False</property>
-	      <property name="draw_indicator">True</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkDialog" id="HBCI_daterange_dialog">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Get Transactions Online</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="has_separator">True</property>
-
-  <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox4">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">8</property>
-
-      <child internal-child="action_area">
-	<widget class="GtkHButtonBox" id="dialog-action_area4">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_END</property>
-
-	  <child>
-	    <widget class="GtkButton" id="cancel_button">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-cancel</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="response_id">0</property>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="ok_button">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="response_id">0</property>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkVBox" id="vbox152">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="heading_label">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Date range of transactions to retrieve:</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkFrame" id="frame70">
-	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	      <child>
-		<widget class="GtkVBox" id="vbox153">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="last_retrieval_button">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Last retrieval date</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="active">True</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox115">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
-
-		      <child>
-			<widget class="GtkRadioButton" id="enter_from_button">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Enter date:</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="active">False</property>
-			  <property name="inconsistent">False</property>
-			  <property name="draw_indicator">True</property>
-			  <property name="group">last_retrieval_button</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkHBox" id="enter_from_box">
-			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">0</property>
-
-			  <child>
-			    <placeholder/>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="first_button">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Earliest possible date</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">last_retrieval_button</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label8877451">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">From</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="type">label_item</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkFrame" id="frame71">
-	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	      <child>
-		<widget class="GtkVBox" id="vbox154">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="now_button">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Now</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox116">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
-
-		      <child>
-			<widget class="GtkRadioButton" id="enter_to_button">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Enter date:</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="active">False</property>
-			  <property name="inconsistent">False</property>
-			  <property name="draw_indicator">True</property>
-			  <property name="group">now_button</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkHBox" id="enter_to_box">
-			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">0</property>
-
-			  <child>
-			    <placeholder/>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label8877452">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">To</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="type">label_item</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkDialog" id="HBCI_version_dialog">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">HBCI Version</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="has_separator">True</property>
-
-  <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox5">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">8</property>
-
-      <child internal-child="action_area">
-	<widget class="GtkHButtonBox" id="dialog-action_area5">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_END</property>
-
-	  <child>
-	    <widget class="GtkButton" id="button4">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-cancel</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="response_id">0</property>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="button2">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="response_id">0</property>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkVBox" id="vbox155">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="label8877436">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Choose a HBCI Version to use with the selected bank:</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkScrolledWindow" id="scrolledwindow31">
-	      <property name="visible">True</property>
-	      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-	      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-	      <property name="shadow_type">GTK_SHADOW_IN</property>
-	      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-	      <child>
-		<widget class="GtkTreeView" id="version_clist">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="headers_visible">True</property>
-		  <property name="rules_hint">False</property>
-		  <property name="reorderable">False</property>
-		  <property name="enable_search">True</property>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
+            <property name="position">GNOME_EDGE_FINISH</property>
+            <property name="visible">yes</property>
+            <property name="title_color">#ffffff</property>
+            <property name="text_color">#000000</property>
+            <property name="background_color">#99bf99</property>
+            <property name="logo_background_color">#ffffff</property>
+            <property name="textbox_color">#ffffff</property>
+
+            <signal name="finish" handler="on_finish" />
+          </widget>
+        </child>
+      </widget>
+    </child>
+  </widget>
+  <widget class="GtkDialog" id="HBCI_trans_dialog">
+    <property name="title" translatable="yes">Online Transaction</property>
+    <property name="type">GTK_WINDOW_TOPLEVEL</property>
+    <property name="modal">no</property>
+    <property name="allow_shrink">yes</property>
+    <property name="allow_grow">yes</property>
+    <property name="visible">yes</property>
+    <property name="window-position">GTK_WIN_POS_NONE</property>
+
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox2">
+        <property name="homogeneous">no</property>
+        <property name="spacing">8</property>
+        <property name="visible">yes</property>
+
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area2">
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <property name="spacing">0</property>
+            <property name="visible">yes</property>
+
+            <child>
+              <widget class="GtkButton" id="exec_now_button">
+                <property name="can_default">yes</property>
+                <property name="can_focus">yes</property>
+                <property name="label" translatable="yes">Execute Now</property>
+                <property name="visible">yes</property>
+              </widget>
+            </child>
+
+            <child>
+              <widget class="GtkButton" id="exec_later_button">
+                <property name="can_default">yes</property>
+                <property name="can_focus">yes</property>
+                <property name="label" translatable="yes">Execute Later (unimpl.)</property>
+                <property name="visible">yes</property>
+              </widget>
+            </child>
+
+            <child>
+              <widget class="GtkButton" id="cancel_button">
+                <property name="can_default">yes</property>
+                <property name="can_focus">yes</property>
+                <property name="visible">yes</property>
+                <property name="label">gtk-cancel</property>
+                <property name="use_stock">yes</property>
+                <property name="use_underline">yes</property>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">no</property>
+            <property name="fill">yes</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+
+        <child>
+          <widget class="GtkVBox" id="vbox151">
+            <property name="homogeneous">no</property>
+            <property name="spacing">1</property>
+            <property name="visible">yes</property>
+
+            <child>
+              <widget class="GtkLabel" id="heading_label">
+                <property name="label" translatable="yes">Enter an Online Transaction</property>
+                <property name="justify">GTK_JUSTIFY_CENTER</property>
+                <property name="wrap">no</property>
+                <property name="xalign">0.5</property>
+                <property name="yalign">0.5</property>
+                <property name="xpad">0</property>
+                <property name="ypad">0</property>
+                <property name="visible">yes</property>
+              </widget>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">no</property>
+                <property name="fill">no</property>
+              </packing>
+            </child>
+
+            <child>
+              <widget class="GtkHSeparator" id="hseparator7">
+                <property name="visible">yes</property>
+              </widget>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">yes</property>
+                <property name="fill">yes</property>
+              </packing>
+            </child>
+
+            <child>
+              <widget class="GtkTable" id="table6">
+                <property name="homogeneous">no</property>
+                <property name="row_spacing">0</property>
+                <property name="column_spacing">0</property>
+                <property name="n-rows">21</property>
+                <property name="n-columns">3</property>
+                <property name="visible">yes</property>
+
+                <child>
+                  <widget class="GtkEntry" id="recp_account_entry">
+                    <property name="can_focus">yes</property>
+                    <property name="editable">yes</property>
+                    <property name="text" translatable="yes"></property>
+                    <property name="max-length">12</property>
+                    <property name="visibility">yes</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">1</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">expand|fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkLabel" id="recp_account_heading">
+                    <property name="label" translatable="yes">Recipient Account Number</property>
+                    <property name="justify">GTK_JUSTIFY_LEFT</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">1</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkEntry" id="recp_bankcode_entry">
+                    <property name="can_focus">yes</property>
+                    <property name="editable">yes</property>
+                    <property name="text" translatable="yes"></property>
+                    <property name="max-length">8</property>
+                    <property name="visibility">yes</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">expand|fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkLabel" id="recp_bankcode_heading">
+                    <property name="label" translatable="yes">Recipient Bank Code</property>
+                    <property name="justify">GTK_JUSTIFY_LEFT</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkEntry" id="recp_name_entry">
+                    <property name="can_focus">yes</property>
+                    <property name="editable">yes</property>
+                    <property name="text" translatable="yes"></property>
+                    <property name="max-length">27</property>
+                    <property name="visibility">yes</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">expand|fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkLabel" id="recp_name_heading">
+                    <property name="label" translatable="yes">Recipient Name</property>
+                    <property name="justify">GTK_JUSTIFY_CENTER</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">0</property>
+                    <property name="bottom_attach">1</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkLabel" id="recp_bankname_heading">
+                    <property name="label" translatable="yes">at Bank</property>
+                    <property name="justify">GTK_JUSTIFY_LEFT</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">5</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkLabel" id="recp_bankname_label">
+                    <property name="label" translatable="yes">(filled in automatically)</property>
+                    <property name="justify">GTK_JUSTIFY_CENTER</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">5</property>
+                    <property name="bottom_attach">6</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkLabel" id="label8877434">
+                    <property name="label" translatable="yes">Amount</property>
+                    <property name="justify">GTK_JUSTIFY_CENTER</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">1</property>
+                    <property name="top_attach">7</property>
+                    <property name="bottom_attach">8</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkHSeparator" id="hseparator6">
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">9</property>
+                    <property name="bottom_attach">10</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options">expand|fill</property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkLabel" id="label8877433">
+                    <property name="label" translatable="yes">Payment Purpose (only for recipient)</property>
+                    <property name="justify">GTK_JUSTIFY_CENTER</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">10</property>
+                    <property name="bottom_attach">11</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkLabel" id="label8877435">
+                    <property name="label" translatable="yes">Payment Purpose continued</property>
+                    <property name="justify">GTK_JUSTIFY_CENTER</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">12</property>
+                    <property name="bottom_attach">13</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkLabel" id="orig_name_heading">
+                    <property name="label" translatable="yes">Originator Name</property>
+                    <property name="justify">GTK_JUSTIFY_LEFT</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">1</property>
+                    <property name="top_attach">15</property>
+                    <property name="bottom_attach">16</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkLabel" id="orig_name_label">
+                    <property name="label" translatable="yes">something</property>
+                    <property name="justify">GTK_JUSTIFY_LEFT</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">1</property>
+                    <property name="top_attach">16</property>
+                    <property name="bottom_attach">17</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkLabel" id="orig_bankname_heading">
+                    <property name="label" translatable="yes">at Bank</property>
+                    <property name="justify">GTK_JUSTIFY_LEFT</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">1</property>
+                    <property name="top_attach">17</property>
+                    <property name="bottom_attach">18</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkLabel" id="orig_bankname_label">
+                    <property name="label" translatable="yes">something</property>
+                    <property name="justify">GTK_JUSTIFY_LEFT</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">1</property>
+                    <property name="top_attach">18</property>
+                    <property name="bottom_attach">19</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkLabel" id="orig_account_heading">
+                    <property name="label" translatable="yes">Originator Account Number</property>
+                    <property name="justify">GTK_JUSTIFY_LEFT</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">15</property>
+                    <property name="bottom_attach">16</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkLabel" id="orig_account_label">
+                    <property name="label" translatable="yes">something</property>
+                    <property name="justify">GTK_JUSTIFY_LEFT</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">16</property>
+                    <property name="bottom_attach">17</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkLabel" id="orig_bankcode_heading">
+                    <property name="label" translatable="yes">Bank Code</property>
+                    <property name="justify">GTK_JUSTIFY_LEFT</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">17</property>
+                    <property name="bottom_attach">18</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkLabel" id="orig_bankcode_label">
+                    <property name="label" translatable="yes">something</property>
+                    <property name="justify">GTK_JUSTIFY_LEFT</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">18</property>
+                    <property name="bottom_attach">19</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkHSeparator" id="hseparator4">
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">14</property>
+                    <property name="bottom_attach">15</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options">expand|fill</property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkHBox" id="amount_hbox">
+                    <property name="homogeneous">no</property>
+                    <property name="spacing">0</property>
+                    <property name="visible">yes</property>
+
+                    <child>
+                      <placeholder />
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">1</property>
+                    <property name="top_attach">8</property>
+                    <property name="bottom_attach">9</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">expand|fill</property>
+                    <property name="y_options">expand|fill</property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkHBox" id="hbox117">
+                    <property name="border_width">2</property>
+                    <property name="homogeneous">no</property>
+                    <property name="spacing">4</property>
+                    <property name="visible">yes</property>
+
+                    <child>
+                      <widget class="GtkVBox" id="vbox158">
+                        <property name="homogeneous">no</property>
+                        <property name="spacing">0</property>
+                        <property name="visible">yes</property>
+
+                        <child>
+                          <widget class="GtkButton" id="add_templ_button">
+                            <property name="border_width">2</property>
+                            <property name="can_focus">yes</property>
+                            <property name="label" translatable="yes">Add current</property>
+                            <property name="relief">GTK_RELIEF_NORMAL</property>
+                            <property name="visible">yes</property>
+
+                            <signal name="clicked" handler="add_template_cb" />
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">no</property>
+                            <property name="fill">no</property>
+                          </packing>
+                        </child>
+
+                        <child>
+                          <widget class="GtkButton" id="moveup_templ_button">
+                            <property name="border_width">2</property>
+                            <property name="can_focus">yes</property>
+                            <property name="relief">GTK_RELIEF_NORMAL</property>
+                            <property name="visible">yes</property>
+                            <property name="label">gtk-go-up</property>
+                            <property name="use_stock">yes</property>
+                            <property name="use_underline">yes</property>
+
+                            <signal name="clicked" handler="moveup_templ_cb" />
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">no</property>
+                            <property name="fill">no</property>
+                          </packing>
+                        </child>
+
+                        <child>
+                          <widget class="GtkButton" id="movedown_templ_button">
+                            <property name="border_width">2</property>
+                            <property name="can_focus">yes</property>
+                            <property name="relief">GTK_RELIEF_NORMAL</property>
+                            <property name="visible">yes</property>
+                            <property name="label">gtk-go-down</property>
+                            <property name="use_stock">yes</property>
+                            <property name="use_underline">yes</property>
+
+                            <signal name="clicked" handler="movedown_templ_cb" />
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">no</property>
+                            <property name="fill">no</property>
+                          </packing>
+                        </child>
+
+                        <child>
+                          <widget class="GtkButton" id="sort_templ_button">
+                            <property name="border_width">2</property>
+                            <property name="can_focus">yes</property>
+                            <property name="label" translatable="yes">Sort</property>
+                            <property name="relief">GTK_RELIEF_NORMAL</property>
+                            <property name="visible">yes</property>
+
+                            <signal name="clicked" handler="sort_templ_cb" />
+                          </widget>
+                          <packing>
+                            <property name="padding">10</property>
+                            <property name="expand">no</property>
+                            <property name="fill">no</property>
+                          </packing>
+                        </child>
+
+                        <child>
+                          <widget class="GtkButton" id="del_templ_button">
+                            <property name="border_width">2</property>
+                            <property name="can_focus">yes</property>
+                            <property name="label" translatable="yes">Delete</property>
+                            <property name="relief">GTK_RELIEF_NORMAL</property>
+                            <property name="visible">yes</property>
+
+                            <signal name="clicked" handler="del_template_cb" />
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">no</property>
+                            <property name="fill">no</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="padding">0</property>
+                        <property name="expand">no</property>
+                        <property name="fill">no</property>
+                        <property name="pack_type">GTK_PACK_END</property>
+                      </packing>
+                    </child>
+
+                    <child>
+                      <widget class="GtkScrolledWindow" id="template_scrolledwindow">
+                        <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                        <property name="width-request">350</property>
+                        <property name="height-request">142</property>
+                        <property name="visible">yes</property>
+
+                        <child>
+                          <widget class="GtkViewport" id="viewport1">
+                            <property name="shadow_type">GTK_SHADOW_IN</property>
+                            <property name="visible">yes</property>
+
+                            <child>
+                              <widget class="GtkTreeView" id="template_list">
+                                <property name="visible">no</property>
+
+                                <signal name="select_child" handler="on_template_list_select_child" />
+                                <signal name="selection_changed" handler="on_template_list_selection_changed" />
+                                <signal name="unselect_child" handler="on_template_list_unselect_child" />
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+
+                        <child internal-child="hscrollbar">
+                          <widget class="GtkHScrollbar" id="convertwidget3">
+                            <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+                            <property name="visible">yes</property>
+                          </widget>
+                        </child>
+
+                        <child internal-child="vscrollbar">
+                          <widget class="GtkVScrollbar" id="convertwidget4">
+                            <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+                            <property name="visible">yes</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="padding">0</property>
+                        <property name="expand">no</property>
+                        <property name="fill">no</property>
+                        <property name="pack_type">GTK_PACK_END</property>
+                      </packing>
+                    </child>
+
+                    <child>
+                      <widget class="GtkLabel" id="label8877442">
+                        <property name="label" translatable="yes">Use Transaction Template</property>
+                        <property name="justify">GTK_JUSTIFY_CENTER</property>
+                        <property name="wrap">no</property>
+                        <property name="xalign">0.5</property>
+                        <property name="yalign">0.5</property>
+                        <property name="xpad">0</property>
+                        <property name="ypad">0</property>
+                        <property name="visible">yes</property>
+                      </widget>
+                      <packing>
+                        <property name="padding">0</property>
+                        <property name="expand">no</property>
+                        <property name="fill">no</property>
+                        <property name="pack_type">GTK_PACK_END</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">20</property>
+                    <property name="bottom_attach">21</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options">expand|fill</property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkHSeparator" id="hseparator8">
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">19</property>
+                    <property name="bottom_attach">20</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">1</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options">expand|fill</property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkHSeparator" id="hseparator5">
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">6</property>
+                    <property name="bottom_attach">7</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">1</property>
+                    <property name="x_options">fill</property>
+                    <property name="y_options">expand|fill</property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkEntry" id="purpose_entry">
+                    <property name="can_focus">yes</property>
+                    <property name="editable">yes</property>
+                    <property name="text" translatable="yes"></property>
+                    <property name="max-length">27</property>
+                    <property name="visibility">yes</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">1</property>
+                    <property name="top_attach">11</property>
+                    <property name="bottom_attach">12</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">expand|fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkEntry" id="purpose_cont2_entry">
+                    <property name="can_focus">yes</property>
+                    <property name="editable">yes</property>
+                    <property name="text" translatable="yes"></property>
+                    <property name="max-length">27</property>
+                    <property name="visibility">yes</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="right_attach">1</property>
+                    <property name="top_attach">13</property>
+                    <property name="bottom_attach">14</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">expand|fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkEntry" id="purpose_cont_entry">
+                    <property name="can_focus">yes</property>
+                    <property name="editable">yes</property>
+                    <property name="text" translatable="yes"></property>
+                    <property name="max-length">27</property>
+                    <property name="visibility">yes</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">11</property>
+                    <property name="bottom_attach">12</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">expand|fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+
+                <child>
+                  <widget class="GtkEntry" id="purpose_cont3_entry">
+                    <property name="can_focus">yes</property>
+                    <property name="editable">yes</property>
+                    <property name="text" translatable="yes"></property>
+                    <property name="max-length">27</property>
+                    <property name="visibility">yes</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">13</property>
+                    <property name="bottom_attach">14</property>
+                    <property name="x_padding">0</property>
+                    <property name="y_padding">0</property>
+                    <property name="x_options">expand|fill</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">no</property>
+                <property name="fill">yes</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">yes</property>
+            <property name="fill">yes</property>
+          </packing>
+        </child>
+      </widget>
+      <packing>
+        <property name="padding">4</property>
+        <property name="expand">yes</property>
+        <property name="fill">yes</property>
+      </packing>
+    </child>
+  </widget>
+  <widget class="GtkDialog" id="HBCI_connection_dialog">
+    <property name="title" translatable="yes">HBCI Connection Window</property>
+    <property name="type">GTK_WINDOW_DIALOG</property>
+    <property name="modal">no</property>
+    <property name="default_width">350</property>
+    <property name="default_height">420</property>
+    <property name="allow_shrink">yes</property>
+    <property name="allow_grow">yes</property>
+    <property name="visible">yes</property>
+    <property name="window-position">GTK_WIN_POS_NONE</property>
+
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox3">
+        <property name="homogeneous">no</property>
+        <property name="spacing">0</property>
+        <property name="visible">yes</property>
+
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area3">
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <property name="spacing">8</property>
+            <property name="visible">yes</property>
+
+            <child>
+              <widget class="GtkButton" id="close_button">
+                <property name="can_default">yes</property>
+                <property name="can_focus">yes</property>
+                <property name="visible">yes</property>
+                <property name="label">gtk-close</property>
+                <property name="use_stock">yes</property>
+                <property name="use_underline">yes</property>
+              </widget>
+            </child>
+
+            <child>
+              <widget class="GtkButton" id="abort_button">
+                <property name="can_default">yes</property>
+                <property name="can_focus">yes</property>
+                <property name="visible">yes</property>
+                <property name="label">gtk-cancel</property>
+                <property name="use_stock">yes</property>
+                <property name="use_underline">yes</property>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">no</property>
+            <property name="fill">yes</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+
+        <child>
+          <widget class="GtkVBox" id="vbox149">
+            <property name="border_width">8</property>
+            <property name="homogeneous">no</property>
+            <property name="spacing">8</property>
+            <property name="visible">yes</property>
+
+            <child>
+              <widget class="GtkFrame" id="frame68">
+                <property name="label" translatable="yes">Progress</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
+                <property name="visible">yes</property>
+
+                <child>
+                  <widget class="GtkTable" id="table5">
+                    <property name="homogeneous">no</property>
+                    <property name="row_spacing">0</property>
+                    <property name="column_spacing">0</property>
+                    <property name="n-rows">3</property>
+                    <property name="n-columns">2</property>
+                    <property name="visible">yes</property>
+
+                    <child>
+                      <widget class="GtkLabel" id="label8877424">
+                        <property name="label" translatable="yes">Current Job</property>
+                        <property name="justify">GTK_JUSTIFY_CENTER</property>
+                        <property name="wrap">no</property>
+                        <property name="xalign">0</property>
+                        <property name="yalign">0.5</property>
+                        <property name="xpad">0</property>
+                        <property name="ypad">0</property>
+                        <property name="visible">yes</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="right_attach">1</property>
+                        <property name="top_attach">0</property>
+                        <property name="bottom_attach">1</property>
+                        <property name="x_padding">0</property>
+                        <property name="y_padding">0</property>
+                        <property name="x_options">fill</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+
+                    <child>
+                      <widget class="GtkLabel" id="label8877425">
+                        <property name="label" translatable="yes">Current Action</property>
+                        <property name="justify">GTK_JUSTIFY_CENTER</property>
+                        <property name="wrap">no</property>
+                        <property name="xalign">0</property>
+                        <property name="yalign">0.5</property>
+                        <property name="xpad">0</property>
+                        <property name="ypad">0</property>
+                        <property name="visible">yes</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="right_attach">1</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_padding">0</property>
+                        <property name="y_padding">0</property>
+                        <property name="x_options">fill</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+
+                    <child>
+                      <widget class="GtkLabel" id="label8877426">
+                        <property name="label" translatable="yes">Progress</property>
+                        <property name="justify">GTK_JUSTIFY_CENTER</property>
+                        <property name="wrap">no</property>
+                        <property name="xalign">0</property>
+                        <property name="yalign">0.5</property>
+                        <property name="xpad">0</property>
+                        <property name="ypad">0</property>
+                        <property name="visible">yes</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="right_attach">1</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_padding">0</property>
+                        <property name="y_padding">0</property>
+                        <property name="x_options">fill</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+
+                    <child>
+                      <widget class="GtkProgressBar" id="action_progress">
+                        <property name="bar_style">GTK_PROGRESS_CONTINUOUS</property>
+                        <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
+                        <property name="activity_mode">no</property>
+                        <property name="show_text">yes</property>
+                        <property name="format" translatable="yes">%P %%</property>
+                        <property name="text_xalign">0.5</property>
+                        <property name="text_yalign">0.5</property>
+                        <property name="visible">yes</property>
+                        <property name="adjustment">0 0 100 1 10 10</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_padding">0</property>
+                        <property name="y_padding">0</property>
+                        <property name="x_options">fill</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+
+                    <child>
+                      <widget class="GtkEntry" id="job_entry">
+                        <property name="can_focus">yes</property>
+                        <property name="editable">yes</property>
+                        <property name="text" translatable="yes"></property>
+                        <property name="max-length">0</property>
+                        <property name="visibility">yes</property>
+                        <property name="visible">yes</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">0</property>
+                        <property name="bottom_attach">1</property>
+                        <property name="x_padding">0</property>
+                        <property name="y_padding">0</property>
+                        <property name="x_options">expand|fill</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+
+                    <child>
+                      <widget class="GtkEntry" id="action_entry">
+                        <property name="can_focus">yes</property>
+                        <property name="editable">yes</property>
+                        <property name="text" translatable="yes"></property>
+                        <property name="max-length">0</property>
+                        <property name="visibility">yes</property>
+                        <property name="visible">yes</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_padding">0</property>
+                        <property name="y_padding">0</property>
+                        <property name="x_options">expand|fill</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">no</property>
+                <property name="fill">yes</property>
+              </packing>
+            </child>
+
+            <child>
+              <widget class="GtkFrame" id="frame69">
+                <property name="label" translatable="yes">Log Messages</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
+                <property name="visible">yes</property>
+
+                <child>
+                  <widget class="GtkScrolledWindow" id="scrolledwindow30">
+                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+                    <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+                    <property name="shadow_type">GTK_SHADOW_IN</property>
+                    <property name="visible">yes</property>
+
+                    <child>
+                      <widget class="GtkTextView" id="log_text">
+                        <property name="can_focus">yes</property>
+                        <property name="editable">no</property>
+                        <property name="text" translatable="yes"></property>
+                        <property name="wrap_mode">GTK_WRAP_WORD</property>
+                        <property name="visible">yes</property>
+                      </widget>
+                    </child>
+
+                    <child internal-child="hscrollbar">
+                      <widget class="GtkHScrollbar" id="convertwidget5">
+                        <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+                        <property name="visible">yes</property>
+                      </widget>
+                    </child>
+
+                    <child internal-child="vscrollbar">
+                      <widget class="GtkVScrollbar" id="convertwidget6">
+                        <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+                        <property name="visible">yes</property>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">yes</property>
+                <property name="fill">yes</property>
+              </packing>
+            </child>
+
+            <child>
+              <widget class="GtkCheckButton" id="close_checkbutton">
+                <property name="can_focus">yes</property>
+                <property name="label" translatable="yes">Close when finished</property>
+                <property name="active">yes</property>
+                <property name="draw_indicator">yes</property>
+                <property name="visible">yes</property>
+              </widget>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">no</property>
+                <property name="fill">no</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">yes</property>
+            <property name="fill">yes</property>
+          </packing>
+        </child>
+      </widget>
+      <packing>
+        <property name="padding">4</property>
+        <property name="expand">yes</property>
+        <property name="fill">yes</property>
+      </packing>
+    </child>
+  </widget>
+  <widget class="GtkDialog" id="HBCI_daterange_dialog">
+    <property name="title" translatable="yes">Get Transactions Online</property>
+    <property name="type">GTK_WINDOW_TOPLEVEL</property>
+    <property name="modal">no</property>
+    <property name="allow_shrink">no</property>
+    <property name="allow_grow">no</property>
+    <property name="visible">yes</property>
+    <property name="window-position">GTK_WIN_POS_NONE</property>
+
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox4">
+        <property name="homogeneous">no</property>
+        <property name="spacing">8</property>
+        <property name="visible">yes</property>
+
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area4">
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <property name="spacing">8</property>
+            <property name="visible">yes</property>
+
+            <child>
+              <widget class="GtkButton" id="ok_button">
+                <property name="can_default">yes</property>
+                <property name="can_focus">yes</property>
+                <property name="visible">yes</property>
+                <property name="label">gtk-ok</property>
+                <property name="use_stock">yes</property>
+                <property name="use_underline">yes</property>
+              </widget>
+            </child>
+
+            <child>
+              <widget class="GtkButton" id="cancel_button">
+                <property name="can_default">yes</property>
+                <property name="can_focus">yes</property>
+                <property name="visible">yes</property>
+                <property name="label">gtk-cancel</property>
+                <property name="use_stock">yes</property>
+                <property name="use_underline">yes</property>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">no</property>
+            <property name="fill">yes</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+
+        <child>
+          <widget class="GtkVBox" id="vbox152">
+            <property name="homogeneous">no</property>
+            <property name="spacing">0</property>
+            <property name="visible">yes</property>
+
+            <child>
+              <widget class="GtkLabel" id="heading_label">
+                <property name="label" translatable="yes">Date range of transactions to retrieve:</property>
+                <property name="justify">GTK_JUSTIFY_CENTER</property>
+                <property name="wrap">no</property>
+                <property name="xalign">0.5</property>
+                <property name="yalign">0.5</property>
+                <property name="xpad">0</property>
+                <property name="ypad">0</property>
+                <property name="visible">yes</property>
+              </widget>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">no</property>
+                <property name="fill">no</property>
+              </packing>
+            </child>
+
+            <child>
+              <widget class="GtkFrame" id="frame70">
+                <property name="label" translatable="yes">From</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
+                <property name="visible">yes</property>
+
+                <child>
+                  <widget class="GtkVBox" id="vbox153">
+                    <property name="homogeneous">no</property>
+                    <property name="spacing">0</property>
+                    <property name="visible">yes</property>
+
+                    <child>
+                      <widget class="GtkRadioButton" id="last_retrieval_button">
+                        <property name="can_focus">yes</property>
+                        <property name="label" translatable="yes">Last retrieval date</property>
+                        <property name="active">yes</property>
+                        <property name="draw_indicator">yes</property>
+                        <property name="visible">yes</property>
+                      </widget>
+                      <packing>
+                        <property name="padding">0</property>
+                        <property name="expand">no</property>
+                        <property name="fill">no</property>
+                      </packing>
+                    </child>
+
+                    <child>
+                      <widget class="GtkHBox" id="hbox115">
+                        <property name="homogeneous">no</property>
+                        <property name="spacing">0</property>
+                        <property name="visible">yes</property>
+
+                        <child>
+                          <widget class="GtkRadioButton" id="enter_from_button">
+                            <property name="can_focus">yes</property>
+                            <property name="label" translatable="yes">Enter date:</property>
+                            <property name="active">no</property>
+                            <property name="draw_indicator">yes</property>
+                            <property name="visible">yes</property>
+                            <property name="group">last_retrieval_button</property>
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">no</property>
+                            <property name="fill">no</property>
+                          </packing>
+                        </child>
+
+                        <child>
+                          <widget class="GtkHBox" id="enter_from_box">
+                            <property name="homogeneous">no</property>
+                            <property name="spacing">0</property>
+                            <property name="visible">yes</property>
+
+                            <child>
+                              <placeholder />
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">yes</property>
+                            <property name="fill">yes</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="padding">0</property>
+                        <property name="expand">no</property>
+                        <property name="fill">no</property>
+                      </packing>
+                    </child>
+
+                    <child>
+                      <widget class="GtkRadioButton" id="first_button">
+                        <property name="can_focus">yes</property>
+                        <property name="label" translatable="yes">Earliest possible date</property>
+                        <property name="active">no</property>
+                        <property name="draw_indicator">yes</property>
+                        <property name="visible">yes</property>
+                        <property name="group">last_retrieval_button</property>
+                      </widget>
+                      <packing>
+                        <property name="padding">0</property>
+                        <property name="expand">no</property>
+                        <property name="fill">no</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">yes</property>
+                <property name="fill">yes</property>
+              </packing>
+            </child>
+
+            <child>
+              <widget class="GtkFrame" id="frame71">
+                <property name="label" translatable="yes">To</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
+                <property name="visible">yes</property>
+
+                <child>
+                  <widget class="GtkVBox" id="vbox154">
+                    <property name="homogeneous">no</property>
+                    <property name="spacing">0</property>
+                    <property name="visible">yes</property>
+
+                    <child>
+                      <widget class="GtkRadioButton" id="now_button">
+                        <property name="can_focus">yes</property>
+                        <property name="label" translatable="yes">Now</property>
+                        <property name="active">no</property>
+                        <property name="draw_indicator">yes</property>
+                        <property name="visible">yes</property>
+                      </widget>
+                      <packing>
+                        <property name="padding">0</property>
+                        <property name="expand">no</property>
+                        <property name="fill">no</property>
+                      </packing>
+                    </child>
+
+                    <child>
+                      <widget class="GtkHBox" id="hbox116">
+                        <property name="homogeneous">no</property>
+                        <property name="spacing">0</property>
+                        <property name="visible">yes</property>
+
+                        <child>
+                          <widget class="GtkRadioButton" id="enter_to_button">
+                            <property name="can_focus">yes</property>
+                            <property name="label" translatable="yes">Enter date:</property>
+                            <property name="active">no</property>
+                            <property name="draw_indicator">yes</property>
+                            <property name="visible">yes</property>
+                            <property name="group">now_button</property>
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">no</property>
+                            <property name="fill">no</property>
+                          </packing>
+                        </child>
+
+                        <child>
+                          <widget class="GtkHBox" id="enter_to_box">
+                            <property name="homogeneous">no</property>
+                            <property name="spacing">0</property>
+                            <property name="visible">yes</property>
+
+                            <child>
+                              <placeholder />
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">yes</property>
+                            <property name="fill">yes</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="padding">0</property>
+                        <property name="expand">yes</property>
+                        <property name="fill">yes</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">yes</property>
+                <property name="fill">yes</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">yes</property>
+            <property name="fill">yes</property>
+          </packing>
+        </child>
+      </widget>
+      <packing>
+        <property name="padding">4</property>
+        <property name="expand">yes</property>
+        <property name="fill">yes</property>
+      </packing>
+    </child>
+  </widget>
+  <widget class="GtkDialog" id="HBCI_version_dialog">
+    <property name="title" translatable="yes">HBCI Version</property>
+    <property name="type">GTK_WINDOW_TOPLEVEL</property>
+    <property name="modal">no</property>
+    <property name="allow_shrink">yes</property>
+    <property name="allow_grow">yes</property>
+    <property name="visible">yes</property>
+    <property name="window-position">GTK_WIN_POS_NONE</property>
+
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox5">
+        <property name="homogeneous">no</property>
+        <property name="spacing">8</property>
+        <property name="visible">yes</property>
+
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area5">
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <property name="spacing">8</property>
+            <property name="visible">yes</property>
+
+            <child>
+              <widget class="GtkButton" id="button2">
+                <property name="can_default">yes</property>
+                <property name="can_focus">yes</property>
+                <property name="visible">yes</property>
+                <property name="label">gtk-ok</property>
+                <property name="use_stock">yes</property>
+                <property name="use_underline">yes</property>
+              </widget>
+            </child>
+
+            <child>
+              <widget class="GtkButton" id="button4">
+                <property name="can_default">yes</property>
+                <property name="can_focus">yes</property>
+                <property name="visible">yes</property>
+                <property name="label">gtk-cancel</property>
+                <property name="use_stock">yes</property>
+                <property name="use_underline">yes</property>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">no</property>
+            <property name="fill">yes</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+
+        <child>
+          <widget class="GtkVBox" id="vbox155">
+            <property name="homogeneous">no</property>
+            <property name="spacing">0</property>
+            <property name="visible">yes</property>
+
+            <child>
+              <widget class="GtkLabel" id="label8877436">
+                <property name="label" translatable="yes">Choose a HBCI Version to use with the selected bank:</property>
+                <property name="justify">GTK_JUSTIFY_CENTER</property>
+                <property name="wrap">no</property>
+                <property name="xalign">0.5</property>
+                <property name="yalign">0.5</property>
+                <property name="xpad">0</property>
+                <property name="ypad">0</property>
+                <property name="visible">yes</property>
+              </widget>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">no</property>
+                <property name="fill">no</property>
+              </packing>
+            </child>
+
+            <child>
+              <widget class="GtkScrolledWindow" id="scrolledwindow31">
+                <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                <property name="shadow_type">GTK_SHADOW_IN</property>
+                <property name="visible">yes</property>
+
+                <child>
+                  <widget class="GtkTreeView" id="version_clist">
+                    <property name="can_focus">yes</property>
+                    <property name="headers-visible">no</property>
+                    <property name="visible">yes</property>
+
+                    <child>
+                      <widget class="GtkLabel" id="label8877437">
+                        <property name="child_name">CList:title</property>
+                        <property name="label" translatable="yes">Version</property>
+                        <property name="justify">GTK_JUSTIFY_LEFT</property>
+                        <property name="wrap">no</property>
+                        <property name="xalign">0</property>
+                        <property name="yalign">0.5</property>
+                        <property name="xpad">0</property>
+                        <property name="ypad">0</property>
+                        <property name="visible">yes</property>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+
+                <child internal-child="hscrollbar">
+                  <widget class="GtkHScrollbar" id="convertwidget7">
+                    <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                </child>
+
+                <child internal-child="vscrollbar">
+                  <widget class="GtkVScrollbar" id="convertwidget8">
+                    <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">yes</property>
+                <property name="fill">yes</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">yes</property>
+            <property name="fill">yes</property>
+          </packing>
+        </child>
+      </widget>
+      <packing>
+        <property name="padding">4</property>
+        <property name="expand">yes</property>
+        <property name="fill">yes</property>
+      </packing>
+    </child>
+  </widget>
 </glade-interface>
Index: configure.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/configure.in,v
retrieving revision 1.359.2.35
retrieving revision 1.359.2.36
diff -Lconfigure.in -Lconfigure.in -u -r1.359.2.35 -r1.359.2.36
--- configure.in
+++ configure.in
@@ -539,6 +539,21 @@
 	LIBOFX_CFLAGS="-I${OFXPREFIX}/include"
     fi
 
+    # check libofx version
+    AC_MSG_CHECKING(for libofx version >= 0.7.0)
+    if test x${OFXPREFIX} = x ; then
+	LIBOFX_VERSION=`ofxdump --version | cut -d" " -f2`
+    else
+	LIBOFX_VERSION=`${OFXPREFIX}/bin/ofxdump --version | cut -d" " -f2`
+    fi
+    if test `echo ${LIBOFX_VERSION} | cut -d. -f1` -ge 1 -o \
+	     `echo ${LIBOFX_VERSION} | cut -d. -f2` -ge 7; then
+	# This is libofx >= 0.7.x
+	AC_MSG_RESULT([found ${LIBOFX_VERSION}])
+    else
+	AC_MSG_ERROR([Libofx 0.7.0 or newer needed for ofx support])
+    fi
+
     AC_MSG_CHECKING(for libofx/libofx.h)
     AS_SCRUB_INCLUDE(LIBOFX_CFLAGS)
     save_CPPFLAGS="${CPPFLAGS}"
@@ -561,13 +576,9 @@
     LIBS="${LIBS} ${LIBOFX_LIBS}"
     AC_TRY_LINK( [
 #include <libofx/libofx.h>
-int ofx_proc_status_cb(const struct OfxStatusData data) { return 0; }
-int ofx_proc_account_cb(const struct OfxAccountData data) { return 0; }
-int ofx_proc_security_cb(const struct OfxSecurityData data) { return 0; }
-int ofx_proc_transaction_cb(const struct OfxTransactionData data) { return 0; }
-int ofx_proc_statement_cb(const struct OfxStatementData data) { return 0; }
 	], [
-	ofx_proc_file(0, NULL);
+	LibofxContextPtr libofx_context = libofx_get_new_context();
+	libofx_free_context(libofx_context);
 	], AC_MSG_RESULT(yes),
 	[ AC_MSG_ERROR([*** Cannot compile test program for libofx library. Please check config.log for the exact error.]) ] )
 
@@ -587,8 +598,8 @@
   fi)
 if test x${MT940_DIR} = xmt940 ;
 then
-    AC_MSG_ERROR([Sorry, MT940 support is currently broken since it depends on the hbci module with the old openhbci 0.9.x library. But the hbci module now has been ported to the new openhbci2 library. The MT940 importer needs to be ported to openhbci2 as well before this can be enabled again.])
-    AM_PATH_OPENHBCI(0.9.13.2)
+    AC_MSG_ERROR([Sorry, MT940 support is currently broken since it depended on the hbci module with the old openhbci 0.9.x library. But the hbci module has now been ported to a new hbci library called aqbanking. That library contains a MT940 parser, too, so porting shouldnt be too difficult. Nevertheless someone needs to do the porting work before this can be enabled again.])
+    AC_AQBANKING(0,9,8)
     # Note: HBCI_LIBS is changed again below in the --enable-hbci
     # section. So check for mt940 first and *not* the other way round!
     HBCI_LIBS="${OPENHBCI_LIBS}"
@@ -603,18 +614,20 @@
 ### --------------------------------------------------------------------------
 ### HBCI
 AC_ARG_ENABLE( hbci,
-  [  --enable-hbci                compile with HBCI support (needs OpenHBCI)],
+  [  --enable-hbci                compile with HBCI support (needs AqBanking)],
   if test "x$enableval" != "xno" ; then
     HBCI_DIR=hbci
   fi)
 if test x${HBCI_DIR} = xhbci ;
 then
-    AM_PATH_OPENHBCI2(1.9.0.8)
-    #all_libraries="$all_libraries $OPENHBCI_LIBS"
-    #all_includes="$all_includes $OPENHBCI_CXXFLAGS"
-    #AM_PATH_OPENHBCI(0.9.13)
-    HBCI_LIBS="${OPENHBCI_LIBS}"
-    HBCI_CFLAGS="${OPENHBCI_CFLAGS}"
+    # Check for Aqbanking library
+    AC_AQBANKING(0,9,8)
+    if test x${have_aqbanking} != xyes; 
+    then
+	AC_MSG_ERROR([Could not find aqbanking. If you use --enable-hbci, you *have* to enable aqbanking.])
+    fi
+    HBCI_LIBS="${aqbanking_libs}"
+    HBCI_CFLAGS="${aqbanking_includes}"
 
     # also check for ktoblzcheck
     AC_CHECK_HEADERS(ktoblzcheck.h)
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1487.2.154
retrieving revision 1.1487.2.155
diff -LChangeLog -LChangeLog -u -r1.1487.2.154 -r1.1487.2.155
--- ChangeLog
+++ ChangeLog
@@ -2858,13 +2858,245 @@
 -=-=-=- cvs HEAD ChangeLog is below this line -=-=-=-
 
 
-2004-18-21  Derek Atkins  <derek at ihtfp.com>
+2004-12-23  Christian Stimming  <stimming at tuhh.de>
+
+	* src/import-export/hbci/druid-hbci-initial.c (on_aqhbci_button):
+	Add extra sanity checks and verbose error message if the setup
+	wizard of aqhbci cannot be found.
+
+	* src/import-export/hbci/gncmod-hbci.c: Fix potentially missing
+	initialization of gwenhywfar library, as reported by Peter
+	O'Gorman on Max OS X.
+
+2004-12-17  Derek Atkins  <derek at ihtfp.com>
+
+	Rich Johnson's patch to include private structures in the doxygen docs
+	* src/doc/doxygen.cfg.in:
+	  extract local classes = yes
+	  don't exclude *P.h
+
+2004-12-05  Derek Atkins  <derek at ihtfp.com>
+
+	* src/engine/test/test-book-merge.c: targetEnt is always NULL
+	  during MERGE_NEW so don't test it in that case.
+
+2004-12-04  Derek Atkins  <derek at ihtfp.com>
+
+	* src/backend/file/Makefile.am:
+	* src/backend/file/test/Makefile.am:
+	* src/business/business-core/file/Makefile.am:
+	  Need to include GNOME_XML_CFLAGS to make sure the libxml includes
+	  are found during the compile.  Fixes #121026.
+
+	* src/gnome/glade/register.glade:
+	  Increase "number" spin box to a maximum of 1billion.  Fixes #152772.
+
+	* src/business/business-core/gncInvoice.c:
+	  send an event when a payment is processed so the invoice gets
+	  updated as "paid" in the search window.
+	  Fixes #139092.
+
+	* src/business/business-gnome/dialog-vendor.c:
+	  Make sure we set the proper search-type when we create the
+	  query, otherwise the search will fail later.
+	  Fixes #141526.
+
+	* src/engine/test/test-numeric.c:
+	  Make sure we use gint64 instead of gint when trying to test
+	  values > 2^32.
+
+2004-12-02  Derek Atkins  <derek at ihtfp.com>
+
+	* src/business/business-ledger/Makefile.am: add explicit
+	  dependency on business-utils.
+
+	* src/engine/gnc-trace.c: Try a few different filenames for
+	  the trace log and if all else fails fall back to stderr.
+
+2004-11-27  Christian Stimming  <stimming at tuhh.de>
+
+	* src/import-export/import-backend.c
+	(gnc_import_find_split_matches): Improve importer performance by
+	matching imported transactions only against transactions in the
+	proper time interval.
+
+2004-11-22  Christian Stimming  <stimming at tuhh.de>
+
+	* configure.in, README: Add configure check for libofx version
+	0.7.0 and respective error message. Update docs. Fixes #159050
+
+2004-11-13  Christian Stimming  <stimming at tuhh.de>
+
+	* src/report/report-gnome/window-report.c,
+	src/scm/main-window.scm: Identified and fixed several places with
+	untranslated strings.
+
+2004-11-10  Christian Stimming  <stimming at tuhh.de>
+
+	* src/engine/gnc-commodity.c, src/engine/iso-4217-currencies.scm:
+	Change currency mnemonic for "New Israeli Shekel" from "ILS" to
+	"NIS". Fixes #152755.
+
+2004-11-01  Christian Stimming  <stimming at tuhh.de>
+
+	* src/gnome/dialog-find-transactions.c: Mark search criteria for
+	translation -- somehow this had been missed all the time.
+
+2004-10-31  Derek Atkins  <derek at ihtfp.com>
+
+	* Neil Williams' QOF Book Merge Patch #2.
+
+	* src/engine/gnc-pricedb.c:
+	  Phil Longstaff's patch to prevent duplicate pricedb entries.
+
+	Heath Martin's x86_64 patch:
+	* macros/autogen.sh:
+	  change "head -1" to "head -n 1"
+	* src/engine/gnc-numeric.[ch]:
+	  change string_to_gnc_numeric() to return gboolean.
+	* src/app-utils/gnc-exp-parser.c:
+	* src/backend/file/sixtp-dom-parsers.c:
+	  use new string_to_gnc_numeric() API
+	* src/engine/gnc-lot.c:
+	  64-bit safe for x86_64
+	* src/gnome/dialog-scheduledxaction.c:
+	* src/gnome/dialog-sxsincelast.c:
+	* src/gnome/druid-loan.c:
+	* src/gnome-utils/dialog-account.c:
+	* src/gnome-utils/gnc-query-list.c:
+	* src/import-export/import-match-map.c:
+	  use GPOINTER_TO_INT and GINT_TO_POINTER macros to be 64-bit safe.
+
+	James Strandboge's "Easy Invoice" patch:
+	* src/business/business-reports/Makefile.am:
+	* src/business/business-reports/business-reports.scm:
+	* src/business/business-reports/easy-invoice.scm:
+	  add "easy invoice" code.
+	* src/business/business-utils/business-prefs.scm:
+	* src/business/business-utils/business-utils.scm:
+	  add preferences for the business ID, used in the easy invoice.
+	* src/report/stylesheets/Makefile.am:
+	* src/report/stylesheets/stylesheets.scm:
+	* src/report/stylesheets/stylesheet-easy.scm:
+	  add "easy stylesheet" code.
+
+	* src/engine/gw-engine-spec.scm:
+	  Fix parameter order to match C file (thanks for Erwin Rieger).
+
+2004-10-30  Christian Stimming  <stimming at tuhh.de>
+
+	* doc/README.HBCI: Updated HBCI readme.
+	
+	* src/import-export/hbci/hbci-interaction.c: Fix problems with
+	user messages.
+
+2004-10-24  Benoit Grégoire <bock at step.polymtl.ca>
+	* po/fr.po:  Translation from Johan Buret, unfortunately on the wrong branch.
+
+2004-10-16  Derek Atkins  <derek at ihtfp.com>
+
+	* Neil Williams' QOF book merge patch #1:
+	  qof_book_merge - release 1.
+
+	  Includes
+	  qof_book_merge.c
+	  qof_book_merge.h
+	  test-book-merge.c test routine
+	  New Account Hierarchy druid 
+	  Sundry adjustments to QOF support.
+	  Tweaks to several Makefile.am files to support new files.
+	  Tweaks to window-main.c to support new menu item
+	  Changes to druid-hierarchy.c to support the merge druid.
+
+2004-10-15  Derek Atkins  <derek at ihtfp.com>
+
+	* src/business/business-core/gncInvoice.[ch]
+	* src/business/business-gnome/dialog-date-close.[ch]
+	* src/business/business-gnome/dialog-invoice.c
+	* src/business/business-gnome/glade/date-close.glade
+	* src/business/business-utils/business-prefs.scm
+	  Daniel Lindenaar's patch to implement a check-box in the Invoice Post
+	  Dialog (with a default in the File Preferences) to choose to accumulate
+	  splits when posting an invoice, or post a 1:1 mapping.
+
+2004-10-13  Derek Atkins  <derek at ihtfp.com>
+
+	* src/import-export/qif-import/qif-object.scm:
+	  provide a default account name so we don't crash when someone
+	  imports a broken QIF that has a !Account without an account name.
+	  Fixes bug #155244.
+
+2004-10-08  Derek Atkins  <derek at ihtfp.com>
+
+	* engine/gw-engine-spec.scm:
+	* gnome-search/dialog-search.h:
+	* report/report-gnome/dialog-column-view.h:
+	  Andreas Rottmann's patch to support g-wrap 1.9.
+	  - don't wrap non-existent objects
+	  - protect headers from multiple inclusion
+	  - include gtk.h header when we use gtk objects.
+
+2004-10-08  Benoit Grégoire <bock at step.polymtl.ca>
+       	* src/import-export/import-backend.c:  Duplicate match tweaks:
+               -Change MATCH_DATE_NOT_THRESHOLD from 3 weeks to two weeks
+               -A transaction amount mismatch past the threshold is now punished by -5 instead of -1
+               -Date mismatch is now worth -5 isntead of -10
+               -Check number mismatch is now punished -2, but only if both numbers are NOT empty.
+       	* src/import-export/ofx/gnc-ofx-import.c: Update for new LibOfx, this among other things, gives gnucash Microsoft OFC support.
+       	* src/import-export/ofx/test/test-link.cL Update for new LibOfx.
+       	* configure.in:  Partly update for new libofx.  It will crash if the right version isn't available, but there is no explicit version support (if someone wants to code it, you can use the output of "ofxdump --version".
+	* src/gnome-utils/gnc-query-list.c:  Fix gcc3.4 compile problem
+
+2004-09-30  Christian Stimming  <stimming at tuhh.de>
+
+	* src/import-export/hbci/gnc-hbci-getbalance.c: Fix HBCI balance
+	retrieval when some of the returned balance is NULL.
+
+2004-09-28  Derek Atkins  <derek at ihtfp.com>
+
+	* src/engine/qofquerycore.c: Fix for x86_64.
+	* src/backend/file/io-gncbin-r.c: Fixes for x86_64
+
+2004-09-22  Christian Stimming  <stimming at tuhh.de>
+
+	* src/import-export/hbci/hbci-interaction.c: Finally fix the HBCI
+	implementation based on aqbanking/aqhbci. This can now be tested
+	intensively.
+
+2004-09-22  Derek Atkins  <derek at ihtfp.com>
+
+	* src/engine/test/test-transaction-reversal.c:
+	* src/engine/test-core/test-engine-stuff.c:
+	  Fix for ISO C90.  Fixes #153465.
+
+2004-09-06  Christian Stimming  <stimming at tuhh.de>
+
+	* src/import-export/hbci/dialog-hbcitrans.c,
+	gnc-hbci-getbalance.c, gnc-hbci-gettrans.c: More AqBanking work
+	after hints from Martin Preuss <martin at libchipcard.de>.
+
+2004-09-04  Christian Stimming  <stimming at tuhh.de>
+
+	* src/import-export/hbci/*.h, *.c, macros/aqbanking.m4,
+	configure.in: Major change for HBCI. It is no longer based on the
+	openhbci2 library but instead on the aqbanking library
+	http://sf.net/projects/aqbanking which is Martin Preuss' successor
+	of openhbci2. This means that now aqbanking-0.9.2 is required
+	instead of any of the openhbci[2] package. Still needs more
+	testing, though.
+
+2004-08-28  Derek Atkins  <derek at ihtfp.com>
+
+	* src/engine/Account.c: fix xaccAccountGetBalanceAsOfDate() to properly
+	  compute the balance at the end of the split list.  Fixes #150757.
+
+2004-08-21  Derek Atkins  <derek at ihtfp.com>
 
 	* src/report/standard-reports/advanced-portfolio.scm:
 	  Add option to include zero-amount splits in computations.
 	  Fixes #143722.
 
-2004-18-19  Derek Atkins  <derek at ihtfp.com>
+2004-08-19  Derek Atkins  <derek at ihtfp.com>
 
 	Neil Williams's "QOF create: functionality added" patch:
 
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/Makefile.am,v
retrieving revision 1.55.4.5
retrieving revision 1.55.4.6
diff -LMakefile.am -LMakefile.am -u -r1.55.4.5 -r1.55.4.6
--- Makefile.am
+++ Makefile.am
@@ -103,7 +103,7 @@
 else
 
 etags:
-	@echo "You must ./configure with --enable-etags to use ctags."
+	@echo "You must ./configure with --enable-etags to use etags."
 
 endif
 
Index: GNOME2_STATUS
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/Attic/GNOME2_STATUS,v
retrieving revision 1.1.2.30
retrieving revision 1.1.2.31
diff -LGNOME2_STATUS -LGNOME2_STATUS -u -r1.1.2.30 -r1.1.2.31
--- GNOME2_STATUS
+++ GNOME2_STATUS
@@ -15,7 +15,7 @@
 names of active developers, that'd be great.
 
 ========================================
-   Last sync with HEAD on 2004-08-25
+   Last sync with HEAD on 2004-12-30
 ========================================
 
 ========================================
Index: README
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/README,v
retrieving revision 1.177.2.1
retrieving revision 1.177.2.2
diff -LREADME -LREADME -u -r1.177.2.1 -r1.177.2.2
--- README
+++ README
@@ -242,13 +242,15 @@
 To use the new import features (OFX and HBCI) you need to obtain
 the following;
   libofx: This library provide support for OFX file imports. 
-    GnuCash has mostly been tested against the 0.6.2 version, though
-    any newer version should also work. Sources can be found at
+    GnuCash-1.8.10 and newer needs at least the version libofx-0.7.0
+    or newer. Sources can be found at
     http://sourceforge.net/projects/libofx/
-  openhbci: This library provide support for HBCI file imports. 
-    GnuCash has mostly been tested against the 0.9.6 version, though
+  aqbanking/aqhbci: This library provide support for HBCI file imports. 
+    GnuCash has mostly been tested against the 0.9.7 version, though
     any newer version should also work. Sources can be found at
-    http://sourceforge.net/projects/openhbci/
+    http://sourceforge.net/projects/aqbanking and
+    http://sourceforge.net/projects/aqhbci/. More info in
+    doc/README.HBCI.
 
 #######
 Running
--- /dev/null
+++ macros/aqbanking.m4
@@ -0,0 +1,128 @@
+# $Id: aqbanking.m4,v 1.2.4.1 2004/12/30 21:37:18 hampton Exp $
+# (c) 2004 Martin Preuss<martin at libchipcard.de>
+# This function checks for AqBanking
+
+AC_DEFUN(AC_AQBANKING, [
+dnl searches for aqbanking
+dnl Arguments: 
+dnl   $1: major version minimum
+dnl   $2: minor version minimum
+dnl   $3: patchlevel version minimum
+dnl   $4: build version minimum
+dnl Returns: aqbanking_dir
+dnl          aqbanking_libs
+dnl          aqbanking_libspp
+dnl          aqbanking_data
+dnl          aqbanking_plugins
+dnl          aqbanking_includes
+dnl          have_aqbanking
+
+if test -z "$1"; then vma="0"; else vma="$1"; fi
+if test -z "$2"; then vmi="1"; else vmi="$2"; fi
+if test -z "$3"; then vpl="0"; else vpl="$3"; fi
+if test -z "$4"; then vbld="0"; else vbld="$4"; fi
+
+AC_MSG_CHECKING(if aqbanking support desired)
+dnl Disabled this switch because it is confusing (as if there were an option)
+#AC_ARG_ENABLE(aqbanking,
+#  [  --enable-aqbanking      enable aqbanking support (default=yes)],
+#  enable_aqbanking="$enableval",
+enable_aqbanking="yes"
+#)
+AC_MSG_RESULT($enable_aqbanking)
+
+have_aqbanking="no"
+aqbanking_dir=""
+aqbanking_data=""
+aqbanking_plugins=""
+aqbanking_libs=""
+aqbanking_libspp=""
+aqbanking_includes=""
+if test "$enable_aqbanking" != "no"; then
+  AC_MSG_CHECKING(for aqbanking)
+  AC_ARG_WITH(aqbanking-dir, [  --with-aqbanking-dir=DIR
+                            uses aqbanking from given dir],
+    [lcc_dir="$withval"],
+    [lcc_dir="${prefix} \
+	     /usr/local \
+             /usr \
+             /"])
+
+  for li in $lcc_dir; do
+      if test -x "$li/bin/aqbanking-config"; then
+          aqbanking_dir="$li";
+          break
+      fi
+  done
+  if test -z "$aqbanking_dir"; then
+      AC_MSG_RESULT([not found ])
+      AC_MSG_ERROR([
+*** The library AqBanking was not found. Obtain it from 
+*** http://www.aquamaniac.de. 
+*** If it is already installed (including the -devel package), 
+*** you might need to specify the location with the 
+*** option --with-aqbanking-dir=DIR.])
+  else
+      AC_MSG_RESULT($aqbanking_dir)
+      AC_MSG_CHECKING(for aqbanking libs)
+      aqbanking_libs="`$aqbanking_dir/bin/aqbanking-config --libraries`"
+      AC_MSG_RESULT($aqbanking_libs)
+      AC_MSG_CHECKING(for aqbanking C++ libs)
+      aqbanking_libspp="`$aqbanking_dir/bin/aqbanking-config --libraries++`"
+      AC_MSG_RESULT($aqbanking_libspp)
+      AC_MSG_CHECKING(for aqbanking includes)
+      aqbanking_includes="`$aqbanking_dir/bin/aqbanking-config --includes`"
+      AC_MSG_RESULT($aqbanking_includes)
+      AC_MSG_CHECKING(for aqbanking plugins)
+      aqbanking_plugins="`$aqbanking_dir/bin/aqbanking-config --plugins`"
+      AC_MSG_RESULT($aqbanking_plugins)
+      AC_MSG_CHECKING(for aqbanking data)
+      aqbanking_data="`$aqbanking_dir/bin/aqbanking-config --data`"
+      AC_MSG_RESULT($aqbanking_data)
+  fi
+  AC_MSG_CHECKING(if aqbanking test desired)
+  AC_ARG_ENABLE(aqbanking,
+    [  --enable-aqbanking-test   enable aqbanking-test (default=yes)],
+     enable_aqbanking_test="$enableval",
+     enable_aqbanking_test="yes")
+  AC_MSG_RESULT($enable_aqbanking_test)
+  AC_MSG_CHECKING(for AqBanking version >=$vma.$vmi.$vpl.$vbld)
+  if test "$enable_aqbanking_test" != "no"; then
+    aqbanking_versionstring="`$aqbanking_dir/bin/aqbanking-config --vstring`.`$aqbanking_dir/bin/aqbanking-config --vbuild`"
+    AC_MSG_RESULT([found $aqbanking_versionstring])
+    if test "$vma" -gt "`$aqbanking_dir/bin/aqbanking-config --vmajor`"; then
+      AC_MSG_ERROR([Your AqBanking version is way too old.
+      Please update from http://www.aquamaniac.de/aqbanking/])
+    elif test "$vma" = "`$aqbanking_dir/bin/aqbanking-config --vmajor`"; then
+      if test "$vmi" -gt "`$aqbanking_dir/bin/aqbanking-config --vminor`"; then
+        AC_MSG_ERROR([Your AqBanking version is too old.
+          Please update from http://www.aquamaniac.de/aqbanking/])
+      elif test "$vmi" = "`$aqbanking_dir/bin/aqbanking-config --vminor`"; then
+          if test "$vpl" -gt "`$aqbanking_dir/bin/aqbanking-config --vpatchlevel`"; then
+            AC_MSG_ERROR([Your AqBanking version is a little bit too old.
+            Please update from http://www.aquamaniac.de/aqbanking/])
+          elif test "$vpl" = "`$aqbanking_dir/bin/aqbanking-config --vpatchlevel`"; then
+            if test "$vbld" -gt "`$aqbanking_dir/bin/aqbanking-config --vbuild`"; then
+              AC_MSG_ERROR([Your AqBanking version is a little bit too old. 
+  Please update to the latest CVS version. Instructions for accessing 
+  CVS can be found on http://www.aquamaniac.de/aqbanking/])
+             fi
+           fi
+      fi
+    fi
+    have_aqbanking="yes"
+    #AC_MSG_RESULT(yes)
+  else
+    have_aqbanking="yes"
+    AC_MSG_RESULT(assuming yes)
+  fi
+dnl end of "if enable-aqbanking"
+fi
+
+AC_SUBST(aqbanking_dir)
+AC_SUBST(aqbanking_plugins)
+AC_SUBST(aqbanking_libs)
+AC_SUBST(aqbanking_libspp)
+AC_SUBST(aqbanking_data)
+AC_SUBST(aqbanking_includes)
+])
--- macros/openhbci2.m4
+++ /dev/null
@@ -1,196 +0,0 @@
-# Configure paths for OpenHBCI
-# by Christian Stimming 2002-07-30, updated 2003-05-09
-# Copied from glib-2.0.m4 by Owen Taylor     1997-2001
-
-dnl AM_PATH_OPENHBCI2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for OPENHBCI, and define OPENHBCI_CFLAGS, OPENHBCI_CXXFLAGS and OPENHBCI_LIBS
-dnl
-AC_DEFUN(AM_PATH_OPENHBCI2, [
-dnl 
-dnl Get the c[xx]flags and libraries from openhbci2-config
-dnl
-AC_MSG_CHECKING(for OpenHBCI)
-AC_ARG_ENABLE(openhbcitest, [  --disable-openhbcitest      do not try to compile and run a test OpenHBCI program],
-		    , enable_openhbcitest=yes)
-
-AC_ARG_WITH( openhbci-prefix,
-  [  --with-openhbci-prefix=PFX   Prefix where OpenHBCI is installed],
-  OPENHBCI_PREFIX="$with_openhbci_prefix",
-  OPENHBCI_PREFIX="${prefix} \
-		/usr/local \
-		/usr/local/openhbci \
-		/usr")
-
-hbci_config=""
-for li in $OPENHBCI_PREFIX; do
-  if test -x "${li}/bin/openhbci2-config"; then
-    hbci_config="${li}/bin/openhbci2-config"
-    hbci_dir="${li}"
-    break
-  fi
-done
-
-if test -x "${hbci_config}" ; then
-  OPENHBCI_LIBS="`${hbci_config} --libraries`"
-  OPENHBCI_CFLAGS="`${hbci_config} --includes`"
-  OPENHBCI_CXXFLAGS="`${hbci_config} --includes`"
-  OPENHBCI_PLUGINS="`${hbci_config} --plugins`"
-else
-  AC_MSG_ERROR([
-  Could not find bin/openhbci2-config in prefix ${OPENHBCI_PREFIX}.
-  Please specify the right path by --with-openhbci-prefix=PREFIX.
-  ])
-fi  
-AC_MSG_RESULT($hbci_dir)
-
-min_openhbci_version=ifelse([$1], ,0.9.0.0,$1)
-AC_MSG_CHECKING(for OpenHBCI - version >= $min_openhbci_version)
-dnl AC_LANG_PUSH(C++) -- DON'T use C++ here!!!
-
-if test "x$enable_openhbcitest" = "xyes" ; then
-  ac_save_CFLAGS="$CFLAGS"
-  ac_save_LIBS="$LIBS"
-  CFLAGS="$CFLAGS $OPENHBCI_CFLAGS"
-  LIBS="$OPENHBCI_LIBS $LIBS"
-dnl
-dnl Now check if the installed OpenHBCI is sufficiently new. (Also sanity
-dnl checks the results of path guessing to some extent)
-dnl
-  rm -f conf.openhbcitest
-  AC_TRY_RUN([
-#include <openhbci2.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#ifndef OPENHBCI_VERSION_BUILD
-#  define OPENHBCI_VERSION_BUILD 0
-#endif
-int 
-main ()
-{
-  int major, minor, micro, build;
-  int getmajor, getminor, getmicro, getbuild;
-  char *tmp_version;
-
-  system ("touch conf.openhbcitest");
-
-  /* HP/UX 9 writes to sscanf strings */
-  tmp_version = strdup("$min_openhbci_version");
-  build=0;
-  if (sscanf(tmp_version, "%d.%d.%d.%d", &major, &minor, &micro, &build) != 4)
-  {
-    build = 0;
-    if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3)
-    {
-      micro = 0;
-      if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2)
-      {
-        minor = 0;
-        if (sscanf(tmp_version, "%d", &major) != 1)
-        {
-          printf("\n*** AM PATH OPENHBCI: bad version string: %s\n", "$min_openhbci_version");
-          exit(1);
-        }
-      }
-    }
-  }
-
-  HBCI_Hbci_libraryVersion_build(&getmajor, &getminor, &getmicro, &getbuild);
-
-  if ((getmajor != OPENHBCI_VERSION_MAJOR) ||
-      (getminor != OPENHBCI_VERSION_MINOR) ||
-      (getmicro != OPENHBCI_VERSION_PATCHLEVEL) ||
-      (getbuild != OPENHBCI_VERSION_BUILD))
-    {
-      printf("\n*** OpenHBCI header files openhbci2.h "
-	     "(version %d.%d.%d build %d) do not match\n",
-	     OPENHBCI_VERSION_MAJOR, 
-	     OPENHBCI_VERSION_MINOR, 
-	     OPENHBCI_VERSION_PATCHLEVEL,
-	     OPENHBCI_VERSION_BUILD);
-      printf("*** installed library libopenhbci.so "
-	     "(version %d.%d.%d build %d)\n",
-	     getmajor, getminor, getmicro, getbuild);
-      exit(1);
-    }
-  else
-    {
-      if ((getmajor > major) ||
-	  ((getmajor == major) && (getminor > minor)) ||
-	  ((getmajor == major) && (getminor == minor) && (getmicro > micro)) ||
-	  ((getmajor == major) && (getminor == minor) && 
-	   (getmicro == micro) && (getbuild >= build)))
-	{
-	  return 0;
-	}
-      else
-	{
-	  printf("\n*** An old version of OpenHBCI (%d.%d.%d build %d) was found.\n",
-		 getmajor, getminor, getmicro, getbuild);
-	  printf("*** You need OpenHBCI in version %d.%d.%d build %d or newer. The latest\n",
-		 major, minor, micro, build);
-	  printf("*** version of OpenHBCI is always available from http://www.openhbci.de.\n");
-	  if (build > 0)
-	    printf("*** Note: The non-zero build number '%d' indicates that the latest CVS \n"
-		   "*** version of openhbci is required.\n", build);
-	  printf("***\n"
-	"*** If you have already installed a sufficiently new version, this error\n"
-	"*** probably means that you need to specify the right path by\n"
-	"*** --with-openhbci-prefix=PATH.  (Also, check that your LD_LIBRARY_PATH\n"
-	"*** enviroment variable is correct, or edit /etc/ld.so.conf\n"
-	"*** so that the correct libraries are found at run-time)\n");
-	}
-    }
-  return 1;
-}
-],, no_openhbci=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
-  CFLAGS="$ac_save_CFLAGS"
-  LIBS="$ac_save_LIBS"
-fi
-if test "x$no_openhbci" = x ; then
-  AC_MSG_RESULT(yes)
-  ifelse([$2], , :, [$2])     
-else
-  AC_MSG_RESULT(no)
-  if test -f conf.openhbcitest ; then
-    :
-  else
-    echo "*** Could not run OpenHBCI test program, checking why..."
-    ac_save_CFLAGS="$CFLAGS"
-    ac_save_LIBS="$LIBS"
-    CFLAGS="$CFLAGS $OPENHBCI_CFLAGS"
-    LIBS="$LIBS $OPENHBCI_LIBS"
-    AC_TRY_LINK([
-#include <openhbci2.h>
-#include <stdio.h>
-],      [ return ((OPENHBCI_VERSION_MAJOR) || (OPENHBCI_VERSION_MINOR)); ],
-        [ echo "***"
-	  echo "*** The test program compiled, but did not run. This usually means"
-          echo "*** that the run-time linker is not finding OpenHBCI or finding the wrong"
-          echo "*** version of OpenHBCI. If it is not finding OpenHBCI, you'll need to set your"
-          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
-          echo "*** is required on your system."
-	  echo "***"
-          echo "*** If you have an old version installed, it is best to remove it, although"
-          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH." 
-	  echo "***" ],
-        [ echo "***"
-	  echo "*** The test program failed to compile or link. See the file config.log for the"
-          echo "*** exact error that occured. This usually means OpenHBCI is incorrectly installed."])
-    CFLAGS="$ac_save_CFLAGS"
-    LIBS="$ac_save_LIBS"
-  fi
-  OPENHBCI_CFLAGS=""
-  OPENHBCI_LIBS=""
-  ifelse([$3], , :, [$3])
-  exit 1;
-fi
-AC_SUBST(OPENHBCI_CFLAGS)
-AC_SUBST(OPENHBCI_LIBS)
-AC_SUBST(OPENHBCI_CXXFLAGS)
-AC_SUBST(OPENHBCI_PLUGINS)
-dnl AC_LANG_POP(C++)
-rm -f conf.openhbcitest
-])
Index: autogen.sh
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/macros/autogen.sh,v
retrieving revision 1.15.4.7
retrieving revision 1.15.4.8
diff -Lmacros/autogen.sh -Lmacros/autogen.sh -u -r1.15.4.7 -r1.15.4.8
--- macros/autogen.sh
+++ macros/autogen.sh
@@ -21,7 +21,7 @@
     this_prog="$1"
     want_vers="$2"
 
-    testv=`"$this_prog" --version 2>/dev/null | head -1 | awk '{print $NF}'`
+    testv=`"$this_prog" --version 2>/dev/null | head -n 1 | awk '{print $NF}'`
     if test -z "$testv" ; then return 1 ; fi
 
     testv_major=`echo "$testv" | sed 's/\([0-9]*\).\([0-9]*\).*$/\1/'`
Index: README.HBCI
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/doc/README.HBCI,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -Ldoc/README.HBCI -Ldoc/README.HBCI -u -r1.4 -r1.4.4.1
--- doc/README.HBCI
+++ doc/README.HBCI
@@ -14,7 +14,11 @@
 
 Since the beta release 1.7.2, GnuCash features HBCI online banking
 support. This makes it the world's first *free* HBCI-enabled personal
-finance manager.
+finance manager. 
+
+Many additional information about GnuCash and HBCI can be found on
+http://linuxwiki.de/GnuCash, http://linuxwiki.de/AqBanking, and
+http://linuxwiki.de/OpenHBCI.
 
 HBCI (Home Banking Computer Interface) is a standard used by German
 banks for offering online banking service. Through this standard,
@@ -35,12 +39,22 @@
 2. Requirements
 ------------
 
-OpenHBCI 0.9.3 or later 
-http://sourceforge.net/projects/openhbci
-
-which in turn requires:
-Libchipcard 0.6 or later, http://sourceforge.net/projects/libchipcard
-and OpenSSL any 0.9.x, http://www.openssl.org
+AqBanking 0.9.7 and AqHBCI 0.9.13, or any later version: Get
+aqbanking, aqbanking-devel from
+http://sourceforge.net/projects/aqbanking, then aqhbci, aqhbci-devel
+and wizard-kde from http://sourceforge.net/projects/aqhbci/
+(Historical note: Until gnucash-1.8.9, the library "openhbci" had been
+used, but with gnucash-1.8.10, gnucash switched to the successor of
+openhbci which is aqbanking/aqhbci.)
+
+which in turn requires: 
+Gwenhywfar 1.1.0, http://sourceforge.net/projects/gwenhywfar, which in
+turn requires OpenSSL any 0.9.x, http://www.openssl.org
+
+For chipcard support, you also need plugin-ddvcard from
+http://sourceforge.net/projects/aqhbci, which in turn requires
+Libchipcard2 version 1.9.1 or later,
+http://sourceforge.net/projects/libchipcard
 
 Then you can build GnuCash 1.7.x/1.8.x with:
    ./configure --enable-hbci --with-openhbci-prefix=/your/openhbci/prefix 
@@ -56,8 +70,9 @@
 
 * Setup: In the main window with the account hierarchy, the "Tools" menu 
 (German: "Werkzeuge") now contains the item "HBCI Setup" ("HBCI 
-Einrichtung"). This menu item opens the HBCI Setup druid which will 
-guide you through the setup.
+Einrichtung"). This menu item opens the HBCI Setup druid which will
+guide you through the setup. (Note: With the new aqbanking/aqhbci, the
+Setup druid is an external program provided by the aqhbci authors.)
 
    - Chip card users will need to run this only once. (see 6. Known
      Problems below if this doesn't work)
@@ -164,11 +179,11 @@
 7. Credits
 -------
 
-The excellent OpenHBCI library is written by Fabian Kaiser 
-<fabian.kaiser at gmx.de>, Martin Preuss <openhbci at aquamaniac.de>, and 
-Christian Stimming <stimming at tuhh.de>. Libchipcard is written by Martin 
-Preuss <openhbci at aquamaniac.de>.
+The excellent AqBanking/AqHBCI library is written by Martin Preuss
+<openhbci at aquamaniac.de> and Christian Stimming
+<stimming at tuhh.de>. Libchipcard is written by Martin Preuss
+<openhbci at aquamaniac.de>.
 
 By Christian Stimming <stimming at tuhh.de>
-Saturday, Feb 1, 2003
+October 30th, 2004
 
Index: fr.po
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/po/fr.po,v
retrieving revision 1.87.4.1
retrieving revision 1.87.4.2
diff -Lpo/fr.po -Lpo/fr.po -u -r1.87.4.1 -r1.87.4.2
--- po/fr.po
+++ po/fr.po
@@ -1,25 +1,23 @@
 # translation of fr.po to 
-# translation of fr.po to
-# translation of fr.po to
-# translation of fr.po to
 # translation of fr.po to Français
 # Messages en francais pour GnuCash
-# Copyright (C) 1998-2002,2003 Free Software Foundation, Inc.
+# Copyright (C) 1998-2002,2003, 2004 Free Software Foundation, Inc.
 # Yannick LE NY <y-le-ny at ifrance.com>, 1998-2001.
 # Jérôme Sautret <jerome at sautret.org>, 2002.
-# Benoit Grégoire <bock at step.polymtl.ca>, 2003
-#
+# Benoit Grégoire <bock at step.polymtl.ca>, 2003.
+# Johan Buret <johan.buret at free.fr>, 2004.
+# Johan Buret <jburet at rhb.net>, 2004.
 msgid ""
 msgstr ""
 "Project-Id-Version: fr\n"
 "POT-Creation-Date: 2003-04-02 14:34-0500\n"
-"PO-Revision-Date: 2003-04-02 16:24-0500\n"
-"Last-Translator: \n"
-"Language-Team:  <en at li.org>\n"
+"PO-Revision-Date: 2004-10-19 16:38+0200\n"
+"Last-Translator: Johan Buret <jburet at rhb.net>\n"
+"Language-Team:  <fr at li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.0.1\n"
+"X-Generator: KBabel 1.9.1\n"
 "Plural-Forms: nplurals=2; plural=n>1\n"
 
 # messages-i18n.c:310
@@ -76,7 +74,7 @@
 msgstr ""
 "Impossible de se connecter à\n"
 "   %s\n"
-"Connexion perdue, impossible d'envoyer les données"
+"Connexion perdue, impossible d'envoyer les données."
 
 # messages-i18n.c:32
 #: src/app-file/gnc-file.c:123
@@ -97,7 +95,7 @@
 "   %s\n"
 "doesn't seem to exist. Do you want to create it?\n"
 msgstr ""
-"Le compte %s n'existe pas.\n"
+"La base de données %s n'existe pas.\n"
 "Voulez vous le créer ?\n"
 
 #: src/app-file/gnc-file.c:137
@@ -137,7 +135,7 @@
 msgstr ""
 "Le serveur à l'adresse\n"
 "    %s\n"
-"a eu un problème, ou bien a rencontré des données erronées ou corrompues"
+"a eu un problème, ou bien a rencontré des données erronées ou corrompues."
 
 #: src/app-file/gnc-file.c:158
 #, c-format
@@ -220,7 +218,7 @@
 "Do you want to want to upgrade the database to the current version?"
 msgstr ""
 "Ce fichier provient d'une ancienne version de GnuCash.\n"
-"Voulez vous mettre à jour la base de données vers le format de la\n"
+"Voulez-vous mettre à jour la base de données vers le format de la\n"
 "version actuelle ?"
 
 #: src/app-file/gnc-file.c:207
@@ -231,14 +229,14 @@
 "documentation to learn how to clear out dangling login\n"
 "sessions."
 msgstr ""
-"La base SQL est en cours d'utilisation par des autres utilisateurs et la "
+"La base SQL est en cours d'utilisation par d'autres utilisateurs et la "
 "mise à jour ne peut être effectuée tant qu'ils ne ferment pas leur session.\n"
 "Si il n'y a pas actuellement d'autres utilisateurs, consultez la "
 "documentation pour savoir comment nettoyer les sessions fantômes."
 
 #: src/app-file/gnc-file.c:217
 msgid "An unknown I/O error occurred."
-msgstr "Une erreur inconnue d'Entrée/Sortie s'est produite"
+msgstr "Une erreur inconnue d'Entrée/Sortie s'est produite."
 
 # messages-i18n.c:39
 #: src/app-file/gnc-file.c:308
@@ -409,7 +407,7 @@
 #. Please only translate the letter *after* the colon.
 #: src/app-utils/gnc-ui-util.c:671
 msgid "void:v"
-msgstr ""
+msgstr "vide : v"
 
 # messages-i18n.c:195
 #: src/app-utils/gnc-ui-util.c:837
@@ -467,7 +465,7 @@
 #: src/backend/postgres/PostgresBackend.c:1868
 #, c-format
 msgid "Unknown database access mode '%s'. Using default mode: multi-user."
-msgstr "Mode d'accès à la base données inconnu: '%s'.  Le mode par défaut sera utilisé:  multi-usagers"
+msgstr "Mode d'accès à la base données inconnu: '%s'.  Le mode par défaut sera utilisé:  multi-usagers."
 
 # messages-i18n.c:294 po/guile_strings.txt:205
 # src/gnome/glade-gnc-dialogs.c:644
@@ -491,21 +489,23 @@
 #. src/business/business-reports/invoice.scm
 #: src/business/business-core/gncInvoice.c:510 intl-scm/guile-strings.c:3489
 msgid "Expense Voucher"
-msgstr ""
+msgstr "Quittance de paiement"
 
 #. Set memo.  action?
 #: src/business/business-core/gncInvoice.c:865
+#, fuzzy
 msgid "Extra to Charge Card"
-msgstr ""
+msgstr "Supplément de paiement par carte"
 
 #: src/business/business-core/gncInvoice.c:903
 msgid "Generated from an invoice.  Try unposting the invoice."
-msgstr ""
+msgstr "Généré à partir d'une facture.  Essayez de rappeler cette facture."
 
 #. Translators: This is the memo of an auto-created split
 #: src/business/business-core/gncInvoice.c:921
+#, fuzzy
 msgid "Automatic Payment Forward"
-msgstr ""
+msgstr "Transmission automatique des paiements"
 
 # messages-i18n.c:312
 #. src/app-utils/prefs.scm
@@ -524,11 +524,11 @@
 
 #: src/business/business-core/gncInvoice.c:1322
 msgid " (posted)"
-msgstr ""
+msgstr " (envoyé)"
 
 #: src/business/business-core/gncOrder.c:416
 msgid " (closed)"
-msgstr ""
+msgstr " (fermé)"
 
 # messages-i18n.c:305 src/gnome/print-session.c:108
 # src/gnome/print-session.c:197
@@ -537,7 +537,7 @@
 #: src/business/business-gnome/glade/job.glade.h:1
 #: src/business/business-gnome/glade/order.glade.h:1
 msgid "(owner)"
-msgstr ""
+msgstr "(propriétaire)"
 
 # messages-i18n.c:242 po/guile_strings.txt:50
 #. src/report/report-system/options-utilities.scm
@@ -569,7 +569,7 @@
 #: intl-scm/guile-strings.c:3199 intl-scm/guile-strings.c:3347
 #: intl-scm/guile-strings.c:3371
 msgid "Date"
-msgstr "Date"
+msgstr ""
 
 # messages-i18n.c:302 po/guile_strings.txt:26
 #. src/report/standard-reports/transaction.scm
@@ -592,7 +592,7 @@
 #: intl-scm/guile-strings.c:2367 intl-scm/guile-strings.c:2473
 #: intl-scm/guile-strings.c:2509
 msgid "Num"
-msgstr "Num"
+msgstr ""
 
 # messages-i18n.c:231
 #: src/business/business-gnome/glade/payment.glade.h:6
@@ -603,7 +603,7 @@
 
 #: src/business/business-gnome/glade/payment.glade.h:7
 msgid "Post To"
-msgstr ""
+msgstr "Envoyer à"
 
 # messages-i18n.c:234
 #: src/business/business-gnome/glade/payment.glade.h:8
@@ -619,33 +619,33 @@
 
 #: src/business/business-gnome/glade/billterms.glade.h:2
 msgid "Absolute Day-of-the-month"
-msgstr ""
+msgstr "Jour-du-mois"
 
 #: src/business/business-gnome/glade/billterms.glade.h:3
 msgid "Cancel your changes"
-msgstr ""
+msgstr "Annuler vos changements"
 
 #: src/business/business-gnome/glade/billterms.glade.h:4
 msgid "Choose the type of Billing Term"
-msgstr ""
+msgstr "Choisissez le type d'échéance de paiment"
 
 # messages-i18n.c:74
 #: src/business/business-gnome/glade/billterms.glade.h:5
 msgid "Close this window"
-msgstr ""
+msgstr "Fermer cette fenêtre"
 
 #: src/business/business-gnome/glade/billterms.glade.h:6
 msgid "Commit this Billing Term"
-msgstr ""
+msgstr "Valider cette échéance de facturation"
 
 # messages-i18n.c:93
 #: src/business/business-gnome/glade/billterms.glade.h:7
 msgid "Create a new Billing Term"
-msgstr ""
+msgstr "Créer une échéance de facturation"
 
 #: src/business/business-gnome/glade/billterms.glade.h:8
 msgid "Cutoff Day: "
-msgstr ""
+msgstr "Jour de bascule : "
 
 # po/guile_strings.txt:101
 #. src/report/standard-reports/price-scatter.scm
@@ -669,38 +669,38 @@
 # messages-i18n.c:77
 #: src/business/business-gnome/glade/billterms.glade.h:11
 msgid "Delete the current Billing Term"
-msgstr ""
+msgstr "Détruire l'échéance de paiement courante"
 
 # src/gnome/glade-gnc-dialogs.c:573
 #: src/business/business-gnome/glade/billterms.glade.h:12
 msgid "Description: "
-msgstr ""
+msgstr "Description : "
 
 #: src/business/business-gnome/glade/billterms.glade.h:14
 #, no-c-format
 msgid "Discount %: "
-msgstr ""
+msgstr "% de ristourne : "
 
 #: src/business/business-gnome/glade/billterms.glade.h:15
 msgid "Discount Day: "
-msgstr ""
+msgstr "Jour de ristourne : "
 
 #: src/business/business-gnome/glade/billterms.glade.h:16
 msgid "Discount Days: "
-msgstr ""
+msgstr "Jours de ristourne : "
 
 #: src/business/business-gnome/glade/billterms.glade.h:17
 msgid "Due Day: "
-msgstr ""
+msgstr "Jour de rigueur: "
 
 #: src/business/business-gnome/glade/billterms.glade.h:18
 msgid "Due Days: "
-msgstr ""
+msgstr "Jours de rigueur : "
 
 # messages-i18n.c:105
 #: src/business/business-gnome/glade/billterms.glade.h:19
 msgid "Edit the current Billing Term"
-msgstr ""
+msgstr "Éditer l'échéance de facturation courante"
 
 # messages-i18n.c:281
 #: src/business/business-gnome/glade/billterms.glade.h:20
@@ -717,11 +717,11 @@
 #: src/business/business-gnome/glade/vendor.glade.h:11
 #: src/business/dialog-tax-table/tax-tables.glade.h:3
 msgid "Name: "
-msgstr "Nom :"
+msgstr "Nom : "
 
 #: src/business/business-gnome/glade/billterms.glade.h:22
 msgid "New Billing Terms"
-msgstr ""
+msgstr "Nouvelles échéances de facturations"
 
 # messages-i18n.c:303
 #. create the button.
@@ -735,7 +735,7 @@
 # po/guile_strings.txt:144
 #: src/business/business-gnome/glade/billterms.glade.h:24
 msgid "Number of days from now"
-msgstr ""
+msgstr "Nombre de jours à partir de maintenant"
 
 # messages-i18n.c:313
 #: src/business/business-gnome/glade/billterms.glade.h:25
@@ -750,7 +750,7 @@
 
 #: src/business/business-gnome/glade/billterms.glade.h:27
 msgid "Term Definition"
-msgstr ""
+msgstr "Définition du terme"
 
 # messages-i18n.c:345 po/guile_strings.txt:254
 # src/gnome/glade-gnc-dialogs.c:354 src/gnome/glade-gnc-dialogs.c:408
@@ -759,77 +759,77 @@
 #: src/business/business-gnome/glade/invoice.glade.h:60
 #: intl-scm/guile-strings.c:3499
 msgid "Terms"
-msgstr ""
+msgstr "Termes"
 
 #: src/business/business-gnome/glade/billterms.glade.h:29
 msgid ""
 "The cutoff day for applying bills to the next month.  After the cutoff, "
 "bills are applied to the following month.  Negative values count backwards "
 "from the end of the month."
-msgstr ""
+msgstr "Le jour de basculement des notes vers le mois suivant. Après le basculement, les factures sont appliquées vers le mois suivant. Les valeurs négatives sont comptées à rebours à partir de la fin du mois."
 
 #: src/business/business-gnome/glade/billterms.glade.h:30
 msgid "The day of the month bills are due"
-msgstr ""
+msgstr "Le jour du mois où les factures sont dûes"
 
 #: src/business/business-gnome/glade/billterms.glade.h:31
 msgid "The description of the Billing Term, printed on invoices"
-msgstr ""
+msgstr "La description de cette échéance de facturation, imprimée sur les factures"
 
 #: src/business/business-gnome/glade/billterms.glade.h:32
 msgid "The discount percentage applied if paid early."
-msgstr ""
+msgstr "Le pourcentage de ristourne appliqué en cas de paiement anticipé."
 
 #: src/business/business-gnome/glade/billterms.glade.h:33
 msgid "The internal name of the Billing Term."
-msgstr ""
+msgstr "Le nom interne de cette échéance de facturation."
 
 #: src/business/business-gnome/glade/billterms.glade.h:34
 msgid "The last day of the month for the early payment discount."
-msgstr ""
+msgstr "Le dernier jour du mois pour obtenir la ristourne de paiement anticipé."
 
 #: src/business/business-gnome/glade/billterms.glade.h:35
 msgid ""
 "The number of days after the post date during which a discount will be "
 "applied for early payment."
-msgstr ""
+msgstr "Le nombre de jours après la date d'envoi pendant lesquels une ristourne sera appliquée pour paiement anticipé."
 
 #: src/business/business-gnome/glade/billterms.glade.h:36
 msgid "The number of days to pay the bill after the post date."
-msgstr ""
+msgstr "Le nombre de jour pour payer la note après la date d'envoi."
 
 #: src/business/business-gnome/glade/billterms.glade.h:37
 msgid "The percentage discount applied for early payment."
-msgstr ""
+msgstr "Le pourcentage de ristourne appliqué en cas de paiement anticipé."
 
 # messages-i18n.c:345 po/guile_strings.txt:254
 # src/gnome/glade-gnc-dialogs.c:354 src/gnome/glade-gnc-dialogs.c:408
 #: src/business/business-gnome/glade/billterms.glade.h:38
 msgid "Type Menu"
-msgstr ""
+msgstr "Menu de Type"
 
 # messages-i18n.c:345 po/guile_strings.txt:254
 # src/gnome/glade-gnc-dialogs.c:354 src/gnome/glade-gnc-dialogs.c:408
 #: src/business/business-gnome/glade/billterms.glade.h:39
 #: src/business/dialog-tax-table/tax-tables.glade.h:12
 msgid "Type: "
-msgstr "Type :"
+msgstr "Type : "
 
 #: src/business/business-gnome/glade/customer.glade.h:1
 #: src/business/business-gnome/glade/vendor.glade.h:1
 msgid "(taxincluded)"
-msgstr ""
+msgstr "(taxecomprise)"
 
 #: src/business/business-gnome/glade/customer.glade.h:2
 #: src/business/business-gnome/glade/vendor.glade.h:2
 msgid "(taxtables)"
-msgstr ""
+msgstr "(tablesdetaxe)"
 
 #: src/business/business-gnome/glade/customer.glade.h:3
 #: src/business/business-gnome/glade/invoice.glade.h:2
 #: src/business/business-gnome/glade/vendor.glade.h:3
 msgid "(terms)"
-msgstr ""
+msgstr "(termes)"
 
 # messages-i18n.c:240
 #: src/business/business-gnome/glade/customer.glade.h:4
@@ -839,41 +839,41 @@
 #: src/business/business-gnome/glade/order.glade.h:2
 #: src/business/business-gnome/glade/vendor.glade.h:4
 msgid "Active"
-msgstr ""
+msgstr "Actif(ve)"
 
 #: src/business/business-gnome/glade/customer.glade.h:5
 #: src/business/business-gnome/glade/employee.glade.h:4
 #: src/business/business-gnome/glade/vendor.glade.h:5
 msgid "Address: "
-msgstr "Adresse:"
+msgstr "Adresse : "
 
 #: src/business/business-gnome/glade/customer.glade.h:6
 msgid "Billing Address"
-msgstr ""
+msgstr "Adresse de facturation : "
 
 # messages-i18n.c:231
 #: src/business/business-gnome/glade/customer.glade.h:7
 #: src/business/business-gnome/glade/invoice.glade.h:6
 #: src/business/business-gnome/glade/order.glade.h:3
 msgid "Billing Information"
-msgstr ""
+msgstr "Information de facturation"
 
 #: src/business/business-gnome/glade/customer.glade.h:8
 #: src/business/business-gnome/glade/vendor.glade.h:6
 msgid "Company Name: "
-msgstr ""
+msgstr "Nom de la société : "
 
 # messages-i18n.c:173
 #: src/business/business-gnome/glade/customer.glade.h:9
 msgid "Credit Limit: "
-msgstr ""
+msgstr "Limite de crédit : "
 
 # src/gnome/glade-gnc-dialogs.c:173
 #: src/business/business-gnome/glade/customer.glade.h:10
 #: src/business/business-gnome/glade/employee.glade.h:7
 #: src/business/business-gnome/glade/vendor.glade.h:7
 msgid "Currency: "
-msgstr "Monnaie: "
+msgstr "Devise : "
 
 # src/gnome/glade-gnc-dialogs.c:1219 src/gnome/glade-gnc-dialogs.c:1240
 # src/gnome/glade-gnc-dialogs.c:1276
@@ -884,27 +884,27 @@
 #: src/register/ledger-core/split-register-model.c:149
 #: intl-scm/guile-strings.c:3267
 msgid "Customer"
-msgstr "Consommateur"
+msgstr "Client"
 
 #: src/business/business-gnome/glade/customer.glade.h:12
 msgid "Customer Number: "
-msgstr ""
+msgstr "N° de Client : "
 
 #: src/business/business-gnome/glade/customer.glade.h:13
 msgid "Discount: "
-msgstr ""
+msgstr "Ristourne : "
 
 #: src/business/business-gnome/glade/customer.glade.h:14
 #: src/business/business-gnome/glade/employee.glade.h:10
 #: src/business/business-gnome/glade/vendor.glade.h:8
 msgid "Email: "
-msgstr ""
+msgstr "Mail : "
 
 #: src/business/business-gnome/glade/customer.glade.h:15
 #: src/business/business-gnome/glade/employee.glade.h:13
 #: src/business/business-gnome/glade/vendor.glade.h:9
 msgid "Fax: "
-msgstr ""
+msgstr "Fax : "
 
 # src/gnome/glade-gnc-dialogs.c:127
 #: src/business/business-gnome/glade/customer.glade.h:16
@@ -920,7 +920,7 @@
 #: src/business/business-gnome/dialog-customer.c:337
 #: intl-scm/guile-strings.c:3035 intl-scm/guile-strings.c:3037
 msgid "New Customer"
-msgstr "Nouveau consommateur"
+msgstr "Nouveau client"
 
 # messages-i18n.c:306 po/guile_strings.txt:176
 #. NOTES
@@ -932,12 +932,12 @@
 #: src/register/ledger-core/split-register-model.c:324
 #: intl-scm/guile-strings.c:148
 msgid "Notes"
-msgstr "Notes"
+msgstr ""
 
 #: src/business/business-gnome/glade/customer.glade.h:20
 #: src/business/business-gnome/glade/vendor.glade.h:14
 msgid "Override the global Tax Table?"
-msgstr ""
+msgstr "Remplacer la table de taxe globale ?"
 
 # messages-i18n.c:244
 #: src/business/business-gnome/glade/customer.glade.h:21
@@ -948,35 +948,35 @@
 
 #: src/business/business-gnome/glade/customer.glade.h:22
 msgid "Shipping Address"
-msgstr ""
+msgstr "Adresse de livraison"
 
 # messages-i18n.c:231
 #: src/business/business-gnome/glade/customer.glade.h:23
 msgid "Shipping Information"
-msgstr ""
+msgstr "Information de livraison"
 
 #: src/business/business-gnome/glade/customer.glade.h:24
 msgid "Tax Included: "
-msgstr ""
+msgstr "Taxes incluses : "
 
 #: src/business/business-gnome/glade/customer.glade.h:25
 msgid "Tax Table: "
-msgstr ""
+msgstr "Tables de taxation : "
 
 #: src/business/business-gnome/glade/customer.glade.h:26
 #: src/business/business-gnome/glade/vendor.glade.h:20
 msgid "Terms: "
-msgstr ""
+msgstr "Termes : "
 
 #: src/business/business-gnome/glade/customer.glade.h:27
 msgid ""
 "The customer ID number.  If left blank a reasonable number will be chosen "
 "for you"
-msgstr ""
+msgstr "Le numéro d'id. du client . Si laissé vierge, un nombre approprié sera choisi"
 
 #: src/business/business-gnome/glade/customer.glade.h:28
 msgid "What Tax Table should be applied to this customer?"
-msgstr ""
+msgstr "Quelle table de taxation faut-il appliquer à ce client ?"
 
 # messages-i18n.c:275 po/guile_strings.txt:129
 #. DESCRIPTION
@@ -993,7 +993,7 @@
 #: intl-scm/guile-strings.c:2515 intl-scm/guile-strings.c:3207
 #: intl-scm/guile-strings.c:3349 intl-scm/guile-strings.c:3377
 msgid "Description"
-msgstr "Description"
+msgstr ""
 
 # po/guile_strings.txt:46
 #: src/business/business-gnome/glade/date-close.glade.h:2
@@ -1002,90 +1002,91 @@
 
 #: src/business/business-gnome/glade/date-close.glade.h:3
 msgid "acct"
-msgstr ""
+msgstr "cmpt"
 
 # messages-i18n.c:180
 #: src/business/business-gnome/glade/date-close.glade.h:4
 msgid "duedate"
-msgstr ""
+msgstr "datedûe"
 
 # messages-i18n.c:273
 #: src/business/business-gnome/glade/date-close.glade.h:5
 msgid "postd"
-msgstr ""
+msgstr "envoye"
 
 #: src/business/business-gnome/glade/employee.glade.h:1
 msgid "Access Control"
-msgstr ""
+msgstr "Contrôle d'Accès"
 
 #: src/business/business-gnome/glade/employee.glade.h:2
 msgid "Access Control List"
-msgstr ""
+msgstr "Liste de Contrôle d'Accès"
 
 #: src/business/business-gnome/glade/employee.glade.h:5
 msgid "Billing"
-msgstr ""
+msgstr "Facturation"
 
 # po/guile_strings.txt:89
 #: src/business/business-gnome/glade/employee.glade.h:6
 msgid "Credit Account:"
-msgstr ""
+msgstr "Compte de Crédit :"
 
 # po/guile_strings.txt:152
 #: src/business/business-gnome/glade/employee.glade.h:8
 msgid "Default Hours per Day: "
-msgstr ""
+msgstr "Heures par Jour (par défaut) : "
 
 # po/guile_strings.txt:258
 #: src/business/business-gnome/glade/employee.glade.h:9
 msgid "Default Rate: "
-msgstr ""
+msgstr "Taux par défaut : "
 
 #. src/business/business-reports/owner-report.scm
 #: src/business/business-gnome/glade/employee.glade.h:11
 #: src/business/business-gnome/search-owner.c:236
 #: intl-scm/guile-strings.c:3271
 msgid "Employee"
-msgstr ""
+msgstr "Employé"
 
 #: src/business/business-gnome/glade/employee.glade.h:12
 msgid "Employee Number: "
-msgstr ""
+msgstr "N° Employé : "
 
 # messages-i18n.c:227
 #: src/business/business-gnome/glade/employee.glade.h:15
 msgid "Interface"
-msgstr ""
+msgstr "Intreface"
 
 #: src/business/business-gnome/glade/employee.glade.h:16
 msgid "Language: "
-msgstr ""
+msgstr "Langage : "
 
 #. src/business/business-gnome/business-gnome.scm
 #: src/business/business-gnome/glade/employee.glade.h:18
 #: src/business/business-gnome/dialog-employee.c:284
 #: intl-scm/guile-strings.c:3095 intl-scm/guile-strings.c:3097
 msgid "New Employee"
-msgstr ""
+msgstr "Nouvel Employé"
 
 #: src/business/business-gnome/glade/employee.glade.h:19
 #: src/business/business-gnome/glade/vendor.glade.h:15
 msgid "Payment Address"
-msgstr ""
+msgstr "Adresse de paiement"
 
 #: src/business/business-gnome/glade/employee.glade.h:21
 msgid ""
 "The employee ID number.  If left blank a reasonable number will be chosen "
 "for you"
-msgstr ""
+msgstr "Le numéro d'id. de l'employé. Si laissé vierge, un nombre approprié sera choisi"
 
 #: src/business/business-gnome/glade/employee.glade.h:22
 msgid "Username: "
-msgstr "d'utilisateur : "
+msgstr "Nom d'utilisateur : "
 
 #: src/business/business-gnome/glade/invoice.glade.h:4
+#, fuzzy
 msgid "Additional to Card:"
-msgstr ""
+msgstr "Remarque sur la carte :"
 
 #. src/business/business-reports/invoice.scm
 #: src/business/business-gnome/glade/invoice.glade.h:5
@@ -1097,7 +1098,7 @@
 #: src/business/business-gnome/dialog-order.c:857
 #: intl-scm/guile-strings.c:3447
 msgid "Billing ID"
-msgstr ""
+msgstr "Id. de Facturation"
 
 # messages-i18n.c:251
 #: src/business/business-gnome/glade/invoice.glade.h:7
@@ -1114,7 +1115,7 @@
 # messages-i18n.c:72
 #: src/business/business-gnome/glade/invoice.glade.h:9
 msgid "Cancel the current entry"
-msgstr ""
+msgstr "Annuler l'entrée courante"
 
 # messages-i18n.c:261
 #: src/business/business-gnome/glade/invoice.glade.h:10
@@ -1126,23 +1127,23 @@
 # messages-i18n.c:74
 #: src/business/business-gnome/glade/invoice.glade.h:11
 msgid "Close this invoice window"
-msgstr ""
+msgstr "Fermer cette fenêtre de facturation"
 
 # messages-i18n.c:92
 #: src/business/business-gnome/glade/invoice.glade.h:12
 msgid "Create a new Account"
-msgstr ""
+msgstr "Créer un nouveau compte"
 
 # messages-i18n.c:93
 #: src/business/business-gnome/glade/invoice.glade.h:13
 msgid "Create a new invoice"
-msgstr ""
+msgstr "Créer une nouvelle facture"
 
 # src/gnome/glade-gnc-dialogs.c:1219 src/gnome/glade-gnc-dialogs.c:1240
 # src/gnome/glade-gnc-dialogs.c:1276
 #: src/business/business-gnome/glade/invoice.glade.h:15
 msgid "Customer: "
-msgstr ""
+msgstr "Client : "
 
 # messages-i18n.c:135
 #: src/business/business-gnome/glade/invoice.glade.h:16
@@ -1157,43 +1158,44 @@
 #: src/business/business-gnome/glade/invoice.glade.h:17
 #: src/business/business-gnome/dialog-invoice.c:2277
 msgid "Date Posted"
-msgstr "de date"
+msgstr "Date envoyée"
 
 # po/guile_strings.txt:37
 #: src/business/business-gnome/glade/invoice.glade.h:18
 #: src/gnome/glade/register.glade.h:14
 msgid "Date of _Entry"
-msgstr "Date d'entrée"
+msgstr "Date d_'entrée"
 
 # po/guile_strings.txt:152
 #: src/business/business-gnome/glade/invoice.glade.h:19
+#, fuzzy
 msgid "Default Chargeback Project"
-msgstr ""
+msgstr "Zone d'opposition par défaut"
 
 # messages-i18n.c:77
 #: src/business/business-gnome/glade/invoice.glade.h:21
 msgid "Delete the current entry"
-msgstr ""
+msgstr "Supprimer l'entrée courante"
 
 # po/guile_strings.txt:219
 #: src/business/business-gnome/glade/invoice.glade.h:22
 msgid "Display the Status Bar"
-msgstr ""
+msgstr "Afficher la barre d'état"
 
 # po/guile_strings.txt:219
 #: src/business/business-gnome/glade/invoice.glade.h:23
 msgid "Display the Summary Bar"
-msgstr ""
+msgstr "Afficher la barre de résumé"
 
 # po/guile_strings.txt:219
 #: src/business/business-gnome/glade/invoice.glade.h:24
 msgid "Display the toolbar"
-msgstr ""
+msgstr "Afficher la barre d'outil"
 
 # messages-i18n.c:280
 #: src/business/business-gnome/glade/invoice.glade.h:25
 msgid "Dup_licate"
-msgstr ""
+msgstr "Dup_liquer"
 
 # messages-i18n.c:280
 #: src/business/business-gnome/glade/invoice.glade.h:26
@@ -1212,7 +1214,7 @@
 # messages-i18n.c:105
 #: src/business/business-gnome/glade/invoice.glade.h:28
 msgid "Edit this Invoice"
-msgstr ""
+msgstr "Éditer cette facturation"
 
 #: src/business/business-gnome/glade/invoice.glade.h:29
 #: src/gnome/glade/register.glade.h:28
@@ -1222,18 +1224,18 @@
 # messages-i18n.c:123
 #: src/business/business-gnome/glade/invoice.glade.h:30
 msgid "Enter a payment for the owner of this Invoice"
-msgstr "un nom pour le compte"
+msgstr "Entrez un paiement pour le destinataire de cette facture"
 
 # messages-i18n.c:312
 #: src/business/business-gnome/glade/invoice.glade.h:31
 msgid "Extra Payments"
-msgstr ""
+msgstr "Paiements supplémenatires"
 
 # messages-i18n.c:294 po/guile_strings.txt:205
 # src/gnome/glade-gnc-dialogs.c:644
 #: src/business/business-gnome/glade/invoice.glade.h:33
 msgid "Invoice Entries"
-msgstr ""
+msgstr "Entrées de facture "
 
 # messages-i18n.c:294 po/guile_strings.txt:205
 # src/gnome/glade-gnc-dialogs.c:644
@@ -1245,35 +1247,35 @@
 # messages-i18n.c:231
 #: src/business/business-gnome/glade/invoice.glade.h:35
 msgid "Invoice Information"
-msgstr ""
+msgstr "Information sur la facture"
 
 #: src/business/business-gnome/glade/invoice.glade.h:36
 #: src/business/business-gnome/search-owner.c:237
 msgid "Job"
-msgstr ""
+msgstr "Métier"
 
 #: src/business/business-gnome/glade/invoice.glade.h:37
 msgid "Job: "
-msgstr ""
+msgstr "Métier : "
 
 # messages-i18n.c:120
 #: src/business/business-gnome/glade/invoice.glade.h:38
 msgid "Keep normal invoice order"
-msgstr ""
+msgstr "Garder l'ordre normal des factures"
 
 # messages-i18n.c:79
 #: src/business/business-gnome/glade/invoice.glade.h:39
 msgid "Make a copy of the current entry"
-msgstr ""
+msgstr "Faire une copie de l'entrée en cours"
 
 #: src/business/business-gnome/glade/invoice.glade.h:40
 msgid "Make a printable Invoice"
-msgstr ""
+msgstr "Faire une facture imprimable"
 
 # messages-i18n.c:71
 #: src/business/business-gnome/glade/invoice.glade.h:41
 msgid "Move to the blank entry at the bottom of the Invoice"
-msgstr ""
+msgstr "Aller à l'entrée vierge en bas de la facture"
 
 # messages-i18n.c:190
 #: src/business/business-gnome/glade/invoice.glade.h:42
@@ -1289,12 +1291,12 @@
 #: src/business/business-gnome/dialog-invoice.c:1707
 #: intl-scm/guile-strings.c:3043 intl-scm/guile-strings.c:3045
 msgid "New Invoice"
-msgstr ""
+msgstr "Nouvelle facture"
 
 # messages-i18n.c:104
 #: src/business/business-gnome/glade/invoice.glade.h:45
 msgid "Open a company report window for the owner of this Invoice"
-msgstr ""
+msgstr "Ouvrir une fenêtre de rapport de société sur le destinataire de cette facture"
 
 # messages-i18n.c:85
 #: src/business/business-gnome/glade/invoice.glade.h:46
@@ -1304,16 +1306,17 @@
 
 #: src/business/business-gnome/glade/invoice.glade.h:47
 msgid "Post"
-msgstr ""
+msgstr "Envoyer"
 
 #: src/business/business-gnome/glade/invoice.glade.h:48
 msgid "Post this Invoice to your Chart of Accounts"
-msgstr ""
+msgstr "Envoyer cette facture vers votre tableau de comptes"
 
 # messages-i18n.c:186
 #: src/business/business-gnome/glade/invoice.glade.h:49
+#, fuzzy
 msgid "Posted Account"
-msgstr ""
+msgstr "Comptes envoyés"
 
 # messages-i18n.c:317 src/gnome/glade-gnc-dialogs.c:971
 #: src/business/business-gnome/glade/invoice.glade.h:50
@@ -1326,17 +1329,17 @@
 # messages-i18n.c:312
 #: src/business/business-gnome/glade/invoice.glade.h:51
 msgid "Process Pa_yment"
-msgstr ""
+msgstr "Procéder au paiement"
 
 # messages-i18n.c:105
 #: src/business/business-gnome/glade/invoice.glade.h:52
 msgid "Record the current entry"
-msgstr ""
+msgstr "Enregistrer l'entrée courante"
 
 #: src/business/business-gnome/glade/invoice.glade.h:53
 #: src/gnome/glade/register.glade.h:56 src/gnome/window-main.c:877
 msgid "S_ummary Bar"
-msgstr "Barre de sommaire"
+msgstr "Barre de _Sommaire"
 
 # messages-i18n.c:160
 #: src/business/business-gnome/glade/invoice.glade.h:54
@@ -1361,12 +1364,12 @@
 # po/guile_strings.txt:238
 #: src/business/business-gnome/glade/invoice.glade.h:57
 msgid "Sort by price"
-msgstr ""
+msgstr "Trier par prix"
 
 # po/guile_strings.txt:261
 #: src/business/business-gnome/glade/invoice.glade.h:58
 msgid "Sort by quantity"
-msgstr ""
+msgstr "Trier par quantité"
 
 # po/guile_strings.txt:108
 #: src/business/business-gnome/glade/invoice.glade.h:59
@@ -1378,16 +1381,18 @@
 msgid ""
 "The invoice ID number.  If left blank a reasonable number will be chosen for "
 "you"
-msgstr ""
+msgstr "Le numéro d'id de facture. Si laissé vierge, un nombre approprié sera choisi"
 
 # messages-i18n.c:273
 #: src/business/business-gnome/glade/invoice.glade.h:62
+#, fuzzy
 msgid "Unpost"
-msgstr ""
+msgstr "Rappeler"
 
 #: src/business/business-gnome/glade/invoice.glade.h:63
+#, fuzzy
 msgid "Unpost this Invoice and make it editable"
-msgstr ""
+msgstr "Rappeler cette facture et la rendre modifiable"
 
 #: src/business/business-gnome/glade/invoice.glade.h:64
 #: src/gnome/glade/register.glade.h:86 src/gnome/window-main.c:955
@@ -1403,11 +1408,11 @@
 
 #: src/business/business-gnome/glade/invoice.glade.h:66
 msgid "View and edit the list of Billing Terms"
-msgstr ""
+msgstr "Voir et éditer la liste des échéances de paiement"
 
 #: src/business/business-gnome/glade/invoice.glade.h:67
 msgid "View and edit the list of Tax Tables"
-msgstr ""
+msgstr "Voir et éditer la liste des tables de taxation"
 
 #: src/business/business-gnome/glade/invoice.glade.h:68
 #: src/gnome/glade/register.glade.h:88 src/gnome/window-main.c:939
@@ -1422,7 +1427,7 @@
 
 #: src/business/business-gnome/glade/invoice.glade.h:70
 msgid "_Billing Terms Editor"
-msgstr ""
+msgstr "Éditeur des Échéances de facturations"
 
 # messages-i18n.c:133
 #: src/business/business-gnome/glade/invoice.glade.h:71
@@ -1445,7 +1450,7 @@
 # messages-i18n.c:325 po/guile_strings.txt:175
 #: src/business/business-gnome/glade/invoice.glade.h:74
 msgid "_Company Report"
-msgstr ""
+msgstr "Rapport de so_ciété"
 
 # messages-i18n.c:267 po/guile_strings.txt:6
 #: src/business/business-gnome/glade/invoice.glade.h:75
@@ -1458,7 +1463,7 @@
 #: src/gnome/glade/register.glade.h:105 src/gnome/window-reconcile.c:1307
 #: src/gnome/window-reconcile.c:1379
 msgid "_Delete"
-msgstr "Supprimer"
+msgstr "Su_pprimer"
 
 # messages-i18n.c:275 po/guile_strings.txt:129
 #: src/business/business-gnome/glade/invoice.glade.h:77
@@ -1469,7 +1474,7 @@
 # src/gnome/glade-gnc-dialogs.c:644
 #: src/business/business-gnome/glade/invoice.glade.h:78
 msgid "_Edit Invoice"
-msgstr ""
+msgstr "Édit_er Facture"
 
 #: src/business/business-gnome/glade/invoice.glade.h:79
 #: src/gnome/glade/register.glade.h:109
@@ -1479,7 +1484,7 @@
 #: src/business/business-gnome/glade/invoice.glade.h:80
 #: src/gnome/glade/register.glade.h:110
 msgid "_Financial Calculator"
-msgstr "Calculatrice financière"
+msgstr "Calculatrice _Financière"
 
 # messages-i18n.c:183
 #: src/business/business-gnome/glade/invoice.glade.h:81
@@ -1490,18 +1495,18 @@
 # messages-i18n.c:85
 #: src/business/business-gnome/glade/invoice.glade.h:82
 msgid "_Gnucash Users Manual"
-msgstr "Manuel de GnuCash"
+msgstr "Manuel de _GnuCash"
 
 # messages-i18n.c:294 po/guile_strings.txt:205
 # src/gnome/glade-gnc-dialogs.c:644
 #: src/business/business-gnome/glade/invoice.glade.h:83
 msgid "_New Invoice"
-msgstr ""
+msgstr "_Nouvelle Facture"
 
 # messages-i18n.c:316
 #: src/business/business-gnome/glade/invoice.glade.h:84
 msgid "_Price"
-msgstr ""
+msgstr "_Prix"
 
 #: src/business/business-gnome/glade/invoice.glade.h:85
 #: src/gnome/glade/register.glade.h:118 src/gnome/window-main.c:938
@@ -1510,7 +1515,7 @@
 
 #: src/business/business-gnome/glade/invoice.glade.h:86
 msgid "_Quantity"
-msgstr ""
+msgstr "_Quantité"
 
 # messages-i18n.c:326
 #. src/report/report-system/report.scm
@@ -1523,16 +1528,16 @@
 #: src/business/business-gnome/glade/invoice.glade.h:88
 #: src/gnome/glade/register.glade.h:122
 msgid "_Standard"
-msgstr "Ordre standard"
+msgstr "Ordre _standard"
 
 #: src/business/business-gnome/glade/invoice.glade.h:89
 #: src/gnome/glade/register.glade.h:124 src/gnome/window-main.c:884
 msgid "_Status Bar"
-msgstr ""
+msgstr "Barre d'état"
 
 #: src/business/business-gnome/glade/invoice.glade.h:90
 msgid "_Tax Table Editor"
-msgstr ""
+msgstr "Editeur de _table de taxation"
 
 #: src/business/business-gnome/glade/invoice.glade.h:91
 #: src/gnome/glade/register.glade.h:127
@@ -1543,7 +1548,7 @@
 #: src/business/business-gnome/glade/invoice.glade.h:92
 #: src/gnome/glade/register.glade.h:128 src/gnome/window-main.c:870
 msgid "_Toolbar"
-msgstr "Ou_tils"
+msgstr "Barre d'ou_tils"
 
 # po/guile_strings.txt:264
 #: src/business/business-gnome/glade/invoice.glade.h:93
@@ -1552,50 +1557,51 @@
 msgstr "Ou_tils"
 
 #: src/business/business-gnome/glade/job.glade.h:4
+#, fuzzy
 msgid "Job Active"
-msgstr ""
+msgstr "Métier actif "
 
 #: src/business/business-gnome/glade/job.glade.h:5
 msgid "Job Dialog"
-msgstr ""
+msgstr "Dialogue de métier"
 
 # messages-i18n.c:231
 #: src/business/business-gnome/glade/job.glade.h:6
 msgid "Job Information"
-msgstr ""
+msgstr "Information sur le métier"
 
 # po/guile_strings.txt:188
 #: src/business/business-gnome/glade/job.glade.h:7
 #: src/business/business-gnome/dialog-job.c:536
 #: src/business/business-gnome/dialog-job.c:546
 msgid "Job Name"
-msgstr ""
+msgstr "Nom du métier"
 
 # po/guile_strings.txt:173
 #: src/business/business-gnome/glade/job.glade.h:8
 #: src/business/business-gnome/dialog-job.c:534
 msgid "Job Number"
-msgstr ""
+msgstr "Numéro du métier"
 
 # messages-i18n.c:231
 #: src/business/business-gnome/glade/job.glade.h:9
 msgid "Owner Information"
-msgstr ""
+msgstr "Information sur le propriétaire"
 
 #: src/business/business-gnome/glade/job.glade.h:10
 msgid "The job ID number.  If left blank a reasonable number will be chosen for you"
-msgstr ""
+msgstr "Le numero d'ID métier. Si laissé vierge, un nombre approprié sera choisi"
 
 # messages-i18n.c:324 po/guile_strings.txt:181
 #: src/business/business-gnome/glade/order.glade.h:4
 msgid "Close Order"
-msgstr ""
+msgstr "Fermer la commande"
 
 # messages-i18n.c:261
 #: src/business/business-gnome/glade/order.glade.h:5
 #: src/business/business-gnome/dialog-order.c:843
 msgid "Date Closed"
-msgstr ""
+msgstr "Date Fermée"
 
 # messages-i18n.c:294 po/guile_strings.txt:205
 # src/gnome/glade-gnc-dialogs.c:644
@@ -1606,44 +1612,44 @@
 # messages-i18n.c:204
 #: src/business/business-gnome/glade/order.glade.h:8
 msgid "New Order"
-msgstr ""
+msgstr "Nouvelle commande"
 
 # messages-i18n.c:160
 #: src/business/business-gnome/glade/order.glade.h:10
 msgid "Order"
-msgstr ""
+msgstr "Commande"
 
 # po/guile_strings.txt:228
 #: src/business/business-gnome/glade/order.glade.h:11
 msgid "Order Entries"
-msgstr ""
+msgstr "Entrées de Commandes"
 
 #: src/business/business-gnome/glade/order.glade.h:12
 msgid "Order Entry"
-msgstr ""
+msgstr "Entrée de Commandes"
 
 #: src/business/business-gnome/glade/order.glade.h:13
 #: src/business/business-gnome/dialog-order.c:851
 msgid "Order ID"
-msgstr ""
+msgstr "Id. de commande"
 
 # messages-i18n.c:231
 #: src/business/business-gnome/glade/order.glade.h:14
 msgid "Order Information"
-msgstr ""
+msgstr "Information sur la commande"
 
 # messages-i18n.c:315
 #. src/business/business-reports/owner-report.scm
 #: src/business/business-gnome/glade/order.glade.h:15
 #: intl-scm/guile-strings.c:3203 intl-scm/guile-strings.c:3497
 msgid "Reference"
-msgstr ""
+msgstr "Référence"
 
 #: src/business/business-gnome/glade/order.glade.h:16
 msgid ""
 "The order ID number.  If left blank a reasonable number will be chosen for "
 "you"
-msgstr ""
+msgstr "Le numéro d'id. de commande .Si laissé vierge, un nombre approprié sera choisi"
 
 # messages-i18n.c:348 po/guile_strings.txt:57
 #. src/business/business-gnome/business-gnome.scm
@@ -1651,22 +1657,22 @@
 #: src/business/business-gnome/dialog-vendor.c:260
 #: intl-scm/guile-strings.c:3065 intl-scm/guile-strings.c:3067
 msgid "New Vendor"
-msgstr ""
+msgstr "Nouveau fournisseur"
 
 #: src/business/business-gnome/glade/vendor.glade.h:18
 msgid "Tax Included:"
-msgstr ""
+msgstr "Taxes Incluses :"
 
 # po/guile_strings.txt:264
 #: src/business/business-gnome/glade/vendor.glade.h:19
 msgid "Tax Table:"
-msgstr ""
+msgstr "Table de Taxation :"
 
 #: src/business/business-gnome/glade/vendor.glade.h:21
 msgid ""
 "The vendor ID number.  If left blank a reasonable number will be chosen for "
 "you"
-msgstr ""
+msgstr "Le numéro d'id. du fournisseur. Si laissé vierge, un nombre approprié sera choisi"
 
 #. src/business/business-reports/owner-report.scm
 #: src/business/business-gnome/glade/vendor.glade.h:22
@@ -1674,15 +1680,15 @@
 #: src/register/ledger-core/split-register-model.c:151
 #: intl-scm/guile-strings.c:3269
 msgid "Vendor"
-msgstr ""
+msgstr "Fournisseur"
 
 #: src/business/business-gnome/glade/vendor.glade.h:23
 msgid "Vendor Number: "
-msgstr ""
+msgstr "Numéro du vendeur : "
 
 #: src/business/business-gnome/glade/vendor.glade.h:24
 msgid "What Tax Table should be applied to this vendor?"
-msgstr ""
+msgstr "Quelle table de taxation doit-on appliquer à ce fournisseur ?"
 
 #: src/business/business-gnome/business-urls.c:43
 #: src/business/business-gnome/business-urls.c:93
@@ -1703,12 +1709,12 @@
 #: src/gnome/top-level.c:269
 #, c-format
 msgid "No such entity: %s"
-msgstr "Aucune telle entité: %s"
+msgstr "Aucune entité de ce type : %s"
 
 #: src/business/business-gnome/business-urls.c:62
 #, c-format
 msgid "Entity type does not match Customer: %s"
-msgstr ""
+msgstr "Le type de l'entité ne correspond au client : %s"
 
 #: src/business/business-gnome/business-urls.c:69
 #: src/business/business-gnome/business-urls.c:119
@@ -1723,42 +1729,42 @@
 #: src/business/business-gnome/business-urls.c:112
 #, c-format
 msgid "Entity type does not match Vendor: %s"
-msgstr ""
+msgstr "Le type de l'entité ne correspond au fournisseur : %s"
 
 #: src/business/business-gnome/business-urls.c:162
 #, c-format
 msgid "Entity type does not match Employee: %s"
-msgstr ""
+msgstr "Le type de l'entité ne correspond à l'employé : %s"
 
 #: src/business/business-gnome/business-urls.c:212
 #, c-format
 msgid "Entity type does not match Invoice: %s"
-msgstr ""
+msgstr "Le type de l'entité ne correspond à la facture : %s"
 
 #: src/business/business-gnome/business-urls.c:283
 #, c-format
 msgid "No such owner entity: %s"
-msgstr ""
+msgstr "Pas de propriétaire de ce type : %s"
 
 #: src/business/business-gnome/business-urls.c:317
 #, c-format
 msgid "Entity type does not match %s: %s"
-msgstr ""
+msgstr "L'entité ne correspond à %s : %s"
 
 #: src/business/business-gnome/business-urls.c:327
 #, c-format
 msgid "Bad URL %s"
-msgstr ""
+msgstr "Mauvais URL %s"
 
 #: src/business/business-gnome/business-urls.c:339
 #, c-format
 msgid "No such Account entity: %s"
-msgstr ""
+msgstr "Pas de compte de ce type %s : "
 
 #: src/business/business-gnome/business-urls.c:347
 #, c-format
 msgid "Entity is not Account entity: %s"
-msgstr ""
+msgstr "Cette entité n'est pas un compte : %s "
 
 # messages-i18n.c:96
 #: src/business/business-gnome/dialog-billterms.c:230
@@ -1773,7 +1779,7 @@
 
 #: src/business/business-gnome/dialog-billterms.c:259
 msgid "You must provide a name for this Billing Term."
-msgstr ""
+msgstr "Vous devez donner un nom à cette échéance de facturation."
 
 #: src/business/business-gnome/dialog-billterms.c:265
 #, c-format
@@ -1781,6 +1787,8 @@
 "You must provide a unique name for this Billing Term.\n"
 "Your choice \"%s\" is already in use."
 msgstr ""
+"Vous devez donner un nom unique à cette échéance de facturation.\n"
+"Votre choix \"%s\" est déjà pris."
 
 #. src/business/business-reports/owner-report.scm
 #: src/business/business-gnome/dialog-billterms.c:484
@@ -1798,7 +1806,7 @@
 #: src/business/business-gnome/dialog-billterms.c:608
 #, c-format
 msgid "Term \"%s\" is in use.  You cannot delete it."
-msgstr ""
+msgstr "L'échéance \"%s\" est utilisée. Vous ne pouvez pas la détruire."
 
 # messages-i18n.c:17
 #: src/business/business-gnome/dialog-billterms.c:616
@@ -1811,20 +1819,20 @@
 #: src/business/business-gnome/dialog-customer.c:234
 #: src/business/business-gnome/dialog-vendor.c:172
 msgid "You must enter a company name."
-msgstr ""
+msgstr "Vous devez donner un nom de société."
 
 # messages-i18n.c:13
 #: src/business/business-gnome/dialog-customer.c:242
 msgid "You must enter a billing address."
-msgstr ""
+msgstr "Vous devez donnez une adresse de facturation."
 
 #: src/business/business-gnome/dialog-customer.c:252
 msgid "Discount percentage must be between 0-100 or you must leave it blank."
-msgstr ""
+msgstr "Le pourcentage de ristourne doit être entre 0 et 100 ou vous devez laisser le champ vierge."
 
 #: src/business/business-gnome/dialog-customer.c:257
 msgid "Credit must be a positive amount or you must leave it blank."
-msgstr ""
+msgstr "Le crédit doit être un montant positif ou vous devez laisser le champ vierge."
 
 # po/guile_strings.txt:188
 #: src/business/business-gnome/dialog-customer.c:328
@@ -1833,26 +1841,26 @@
 #: src/business/business-gnome/dialog-vendor.c:251
 #: src/gnome-utils/dialog-account.c:1640
 msgid "<No name>"
-msgstr "<Pas de nom>"
+msgstr ""
 
 # src/gnome/glade-gnc-dialogs.c:1219 src/gnome/glade-gnc-dialogs.c:1240
 # src/gnome/glade-gnc-dialogs.c:1276
 #: src/business/business-gnome/dialog-customer.c:335
 msgid "Edit Customer"
-msgstr ""
+msgstr "Éditer le client"
 
 #: src/business/business-gnome/dialog-customer.c:793
 msgid "View/Edit Customer"
-msgstr ""
+msgstr "Voir/Éditer le client"
 
 #: src/business/business-gnome/dialog-customer.c:794
 msgid "Customer's Jobs"
-msgstr ""
+msgstr "Métiers du client"
 
 #.    { N_("Customer's Orders"), order_customer_cb},
 #: src/business/business-gnome/dialog-customer.c:796
 msgid "Customer's Invoices"
-msgstr ""
+msgstr "Factures du client"
 
 # messages-i18n.c:312
 #. src/business/business-gnome/business-gnome.scm
@@ -1864,16 +1872,16 @@
 #: intl-scm/guile-strings.c:3091 intl-scm/guile-strings.c:3111
 #: intl-scm/guile-strings.c:3113
 msgid "Process Payment"
-msgstr ""
+msgstr "Procéder au paiement"
 
 #: src/business/business-gnome/dialog-customer.c:806
 msgid "Shipping Contact"
-msgstr ""
+msgstr "Contact de livraison"
 
 #: src/business/business-gnome/dialog-customer.c:808
 #: src/business/business-gnome/dialog-vendor.c:665
 msgid "Billing Contact"
-msgstr ""
+msgstr "Contact de Facturation"
 
 # src/gnome/glade-gnc-dialogs.c:1219 src/gnome/glade-gnc-dialogs.c:1240
 # src/gnome/glade-gnc-dialogs.c:1276
@@ -1886,7 +1894,7 @@
 #: src/business/business-gnome/dialog-vendor.c:669
 #: intl-scm/guile-strings.c:3181
 msgid "Company Name"
-msgstr ""
+msgstr "Nom de la société"
 
 # src/gnome/glade-gnc-dialogs.c:1460
 #: src/business/business-gnome/dialog-customer.c:818
@@ -1903,63 +1911,63 @@
 #: intl-scm/guile-strings.c:3029 intl-scm/guile-strings.c:3197
 #: intl-scm/guile-strings.c:3329
 msgid "Company"
-msgstr ""
+msgstr "Société"
 
 #: src/business/business-gnome/dialog-customer.c:822
 #: src/business/business-gnome/dialog-employee.c:720
 #: src/business/business-gnome/dialog-job.c:548
 #: src/business/business-gnome/dialog-vendor.c:679
 msgid "ID #"
-msgstr ""
+msgstr "N° id"
 
 #: src/business/business-gnome/dialog-date-close.c:49
 msgid "No Account selected.  Please try again."
-msgstr ""
+msgstr "Pas de compte sélectionné. veuillez réessayer."
 
 # messages-i18n.c:21
 #: src/business/business-gnome/dialog-employee.c:190
 msgid "You must enter a username."
-msgstr ""
+msgstr "Vous devez entrer un nom d'utilisateur."
 
 # messages-i18n.c:21
 #: src/business/business-gnome/dialog-employee.c:195
 msgid "You must enter the employee's name."
-msgstr ""
+msgstr "Vous devez entrer le nom de l'employé."
 
 # messages-i18n.c:13
 #: src/business/business-gnome/dialog-employee.c:203
 msgid "You must enter an address."
-msgstr ""
+msgstr "Vous devez entrer une adresse."
 
 #: src/business/business-gnome/dialog-employee.c:282
 msgid "Edit Employee"
-msgstr ""
+msgstr "Éditer Employé"
 
 #: src/business/business-gnome/dialog-employee.c:698
 msgid "View/Edit Employee"
-msgstr ""
+msgstr "Voir/Éditer Employé"
 
 # messages-i18n.c:284 po/guile_strings.txt:274
 # src/gnome/glade-gnc-dialogs.c:647
 #: src/business/business-gnome/dialog-employee.c:699
 msgid "Expense Vouchers"
-msgstr ""
+msgstr "Quittances"
 
 #: src/business/business-gnome/dialog-employee.c:708
 msgid "Employee ID"
-msgstr ""
+msgstr "Id. Employé"
 
 #: src/business/business-gnome/dialog-employee.c:710
 msgid "Employee Username"
-msgstr ""
+msgstr "Nom d'Utilisateur d'employé"
 
 #: src/business/business-gnome/dialog-employee.c:712
 msgid "Employee Name"
-msgstr ""
+msgstr "Nom d'Employé"
 
 #: src/business/business-gnome/dialog-employee.c:718
 msgid "Username"
-msgstr ""
+msgstr "Nom d'Utilisateur"
 
 # po/guile_strings.txt:188
 #. src/business/business-reports/aging.scm
@@ -1978,20 +1986,20 @@
 #: src/business/business-gnome/dialog-invoice.c:290
 #: src/business/business-gnome/dialog-order.c:142
 msgid "You need to supply Billing Information."
-msgstr ""
+msgstr "Vous devez fournir les Informations de Facturation."
 
 # messages-i18n.c:17
 #: src/business/business-gnome/dialog-invoice.c:444
 msgid "Are you sure you want to delete the selected entry?"
-msgstr ""
+msgstr "Êtes-vous sûr de vouloir détruire l'entrée sélectionnée ?"
 
 #: src/business/business-gnome/dialog-invoice.c:446
 msgid "This entry is attached to an order and will be deleted from that as well!"
-msgstr ""
+msgstr "Cette entrée est rattachée à une commande et sera détruite là-bas du même coup!"
 
 #: src/business/business-gnome/dialog-invoice.c:553
 msgid "The Invoice must have at least one Entry."
-msgstr ""
+msgstr "La facture doit avoir au moins une entrée."
 
 # messages-i18n.c:56
 #. Ok, we can post this invoice.  Ask for verification, set the due date,
@@ -1999,7 +2007,7 @@
 #.
 #: src/business/business-gnome/dialog-invoice.c:560
 msgid "Do you really want to post the invoice?"
-msgstr ""
+msgstr "Voulez vous vraiment envoyer la facture ?"
 
 # messages-i18n.c:267 po/guile_strings.txt:6
 #. src/business/business-gnome/business-gnome.scm
@@ -2008,17 +2016,17 @@
 #: intl-scm/guile-strings.c:3027 intl-scm/guile-strings.c:3201
 #: intl-scm/guile-strings.c:3493
 msgid "Due Date"
-msgstr ""
+msgstr "Fin du délai"
 
 # messages-i18n.c:222
 #: src/business/business-gnome/dialog-invoice.c:562
 msgid "Post Date"
-msgstr ""
+msgstr "Date d'envoi"
 
 # messages-i18n.c:186
 #: src/business/business-gnome/dialog-invoice.c:563
 msgid "Post to Account"
-msgstr ""
+msgstr "Envoyer vers le compte"
 
 # messages-i18n.c:48
 #. make sure the user REALLY wants to do this!
@@ -2026,7 +2034,7 @@
 msgid ""
 "Unposting this Invoice will delete the posted transaction.  Are you sure you "
 "want to unpost it?"
-msgstr ""
+msgstr "Rappeler cette facture détruira la transaction envoyée. Êtes-vous sur de vouloir la renvoyer ?"
 
 # messages-i18n.c:344
 #: src/business/business-gnome/dialog-invoice.c:950
@@ -2037,13 +2045,13 @@
 # messages-i18n.c:344
 #: src/business/business-gnome/dialog-invoice.c:953
 msgid "Total Cash:"
-msgstr ""
+msgstr "Liquide total :"
 
 # messages-i18n.c:264 po/guile_strings.txt:211
 # src/gnome/glade-gnc-dialogs.c:629
 #: src/business/business-gnome/dialog-invoice.c:954
 msgid "Total Charge:"
-msgstr ""
+msgstr "Charge totale :"
 
 # src/gnome/glade-gnc-dialogs.c:936 src/gnome/glade-gnc-dialogs.c:943
 #: src/business/business-gnome/dialog-invoice.c:1123
@@ -2059,13 +2067,13 @@
 # src/gnome/glade-gnc-dialogs.c:644
 #: src/business/business-gnome/dialog-invoice.c:1711
 msgid "Edit Invoice"
-msgstr ""
+msgstr "Éditer la facture"
 
 # messages-i18n.c:294 po/guile_strings.txt:205
 # src/gnome/glade-gnc-dialogs.c:644
 #: src/business/business-gnome/dialog-invoice.c:1714
 msgid "View Invoice"
-msgstr ""
+msgstr "Voir la facture"
 
 # messages-i18n.c:192
 #. src/business/business-gnome/business-gnome.scm
@@ -2076,12 +2084,12 @@
 
 #: src/business/business-gnome/dialog-invoice.c:1726
 msgid "Edit Bill"
-msgstr ""
+msgstr "Éditer la facture"
 
 # messages-i18n.c:192
 #: src/business/business-gnome/dialog-invoice.c:1729
 msgid "View Bill"
-msgstr ""
+msgstr "Voir la facture"
 
 # messages-i18n.c:284 po/guile_strings.txt:274
 # src/gnome/glade-gnc-dialogs.c:647
@@ -2089,29 +2097,29 @@
 #: src/business/business-gnome/dialog-invoice.c:1737
 #: intl-scm/guile-strings.c:3103 intl-scm/guile-strings.c:3105
 msgid "New Expense Voucher"
-msgstr ""
+msgstr "Nouvelle quittance"
 
 # messages-i18n.c:284 po/guile_strings.txt:274
 # src/gnome/glade-gnc-dialogs.c:647
 #: src/business/business-gnome/dialog-invoice.c:1741
 msgid "Edit Expense Voucher"
-msgstr ""
+msgstr "Éditer quittance"
 
 # messages-i18n.c:284 po/guile_strings.txt:274
 # src/gnome/glade-gnc-dialogs.c:647
 #: src/business/business-gnome/dialog-invoice.c:1744
 msgid "View Expense Voucher"
-msgstr ""
+msgstr "Voir quittance"
 
 #: src/business/business-gnome/dialog-invoice.c:2262
 msgid "View/Edit Invoice"
-msgstr ""
+msgstr "Voir/Éditer facture"
 
 # messages-i18n.c:294 po/guile_strings.txt:205
 # src/gnome/glade-gnc-dialogs.c:644
 #: src/business/business-gnome/dialog-invoice.c:2271
 msgid "Invoice Owner"
-msgstr ""
+msgstr "Destinataire de la facture"
 
 # messages-i18n.c:294 po/guile_strings.txt:205
 # src/gnome/glade-gnc-dialogs.c:644
@@ -2119,15 +2127,15 @@
 #: src/business/business-gnome/dialog-invoice.c:2273
 #: intl-scm/guile-strings.c:3453
 msgid "Invoice Notes"
-msgstr ""
+msgstr "Note sur la facture"
 
 #: src/business/business-gnome/dialog-invoice.c:2279
 msgid "Is Posted?"
-msgstr ""
+msgstr "Est envoyé ?"
 
 #: src/business/business-gnome/dialog-invoice.c:2283
 msgid "Company Name "
-msgstr ""
+msgstr "Nom de la société"
 
 # messages-i18n.c:345 po/guile_strings.txt:254
 # src/gnome/glade-gnc-dialogs.c:354 src/gnome/glade-gnc-dialogs.c:408
@@ -2140,32 +2148,32 @@
 #: src/register/ledger-core/split-register-model.c:212
 #: intl-scm/guile-strings.c:142 intl-scm/guile-strings.c:3205
 msgid "Type"
-msgstr "Type"
+msgstr ""
 
 #: src/business/business-gnome/dialog-invoice.c:2299
 msgid "Posted"
-msgstr ""
+msgstr "Envoyé"
 
 # messages-i18n.c:310
 #: src/business/business-gnome/dialog-invoice.c:2301
 #: src/business/business-gnome/dialog-order.c:864
 msgid "Opened"
-msgstr ""
+msgstr "Ouvert"
 
 # messages-i18n.c:18
 #: src/business/business-gnome/dialog-job.c:104
 msgid "The Job must be given a name."
-msgstr ""
+msgstr "Le métier doit être nommé."
 
 # messages-i18n.c:13
 #: src/business/business-gnome/dialog-job.c:113
 msgid "You must choose an owner for this job."
-msgstr ""
+msgstr "Vous devez donner un propriétaire à ce métier."
 
 # messages-i18n.c:281
 #: src/business/business-gnome/dialog-job.c:210
 msgid "Edit Job"
-msgstr ""
+msgstr "Voir le métier"
 
 # messages-i18n.c:303
 #. src/business/business-gnome/business-gnome.scm
@@ -2173,35 +2181,35 @@
 #: intl-scm/guile-strings.c:3053 intl-scm/guile-strings.c:3081
 #: intl-scm/guile-strings.c:3083
 msgid "New Job"
-msgstr ""
+msgstr "Nouveau métier"
 
 #: src/business/business-gnome/dialog-job.c:518
 msgid "View/Edit Job"
-msgstr ""
+msgstr "Voir/Éditer le métier"
 
 # messages-i18n.c:294 po/guile_strings.txt:205
 # src/gnome/glade-gnc-dialogs.c:644
 #: src/business/business-gnome/dialog-job.c:519
 msgid "View Invoices"
-msgstr ""
+msgstr "Voir factures"
 
 # po/guile_strings.txt:188
 #: src/business/business-gnome/dialog-job.c:528
 msgid "Owner's Name"
-msgstr ""
+msgstr "Nom du propriétaire"
 
 #: src/business/business-gnome/dialog-job.c:530
 msgid "Only Active?"
-msgstr ""
+msgstr "Seulements les actifs ?"
 
 # messages-i18n.c:18
 #: src/business/business-gnome/dialog-order.c:133
 msgid "The Order must be given an ID."
-msgstr ""
+msgstr "La commande soit avoir un id."
 
 #: src/business/business-gnome/dialog-order.c:238
 msgid "The Order must have at least one Entry."
-msgstr ""
+msgstr "La commande doit avoir au moins une entrée."
 
 #. Damn; yes.  Well, ask the user to make sure they REALLY want to
 #. * close this order!
@@ -2212,104 +2220,107 @@
 "Are you sure you want to close it out before\n"
 "you invoice all the entries?"
 msgstr ""
+"Cette commande contient des entrées non facturées.\n"
+"Êtes-vous sûr de vouloir la fermer avant de\n"
+"facturer toutes les entrées ?"
 
 # messages-i18n.c:56
 #. Ok, we can close this.  Ask for verification and set the closed date
 #: src/business/business-gnome/dialog-order.c:266
 msgid "Do you really want to close the order?"
-msgstr ""
+msgstr "Voulez vous vraiment fermer cette commande ?"
 
 # messages-i18n.c:261
 #: src/business/business-gnome/dialog-order.c:267
 msgid "Close Date"
-msgstr ""
+msgstr "Date de fermeture"
 
 # messages-i18n.c:324 po/guile_strings.txt:181
 #: src/business/business-gnome/dialog-order.c:833
 msgid "View/Edit Order"
-msgstr ""
+msgstr "Voir/Éditer la commande"
 
 # messages-i18n.c:306 po/guile_strings.txt:176
 #: src/business/business-gnome/dialog-order.c:841
 msgid "Order Notes"
-msgstr ""
+msgstr "Notes sur la commande"
 
 # messages-i18n.c:261
 #: src/business/business-gnome/dialog-order.c:845
 msgid "Is Closed?"
-msgstr ""
+msgstr "Est fermée ?"
 
 # po/guile_strings.txt:188
 #: src/business/business-gnome/dialog-order.c:849
 msgid "Owner Name "
-msgstr ""
+msgstr "Nom du destinataire "
 
 # messages-i18n.c:261
 #: src/business/business-gnome/dialog-order.c:862
 msgid "Closed"
-msgstr ""
+msgstr "Fermée"
 
 #: src/business/business-gnome/dialog-payment.c:88
 msgid ""
 "You must enter the amount of the payment.  The payment amount must be "
 "greater than zero."
-msgstr ""
+msgstr "Vous devez entrer le montant du paiement. Celui-ci doit être plus grand que zéro."
 
 # messages-i18n.c:21
 #: src/business/business-gnome/dialog-payment.c:97
 msgid "You must select a company for payment processing."
-msgstr ""
+msgstr "Vous devez selectionner une société pour procéder au paiement."
 
 # messages-i18n.c:20
 #: src/business/business-gnome/dialog-payment.c:105
 msgid "You must select a transfer account from the account tree."
-msgstr ""
+msgstr "Vous devez sélectionner un compte de transfert dans la hiérarchie des comptes."
 
 # messages-i18n.c:21
 #: src/business/business-gnome/dialog-payment.c:113
 msgid "You must enter an account name for posting."
-msgstr ""
+msgstr "Vous devez entrer le nom d'un compte pour envoyer."
 
 # po/guile_strings.txt:48
 #: src/business/business-gnome/dialog-payment.c:123
 #, c-format
 msgid "Your selected post account, %s, does not exist"
-msgstr ""
+msgstr "Votre compte sélectionné, %s, n'existe pas"
 
 # messages-i18n.c:21
 #: src/business/business-gnome/dialog-vendor.c:180
 msgid "You must enter a payment address."
-msgstr ""
+msgstr "Vous devez entrer une adresse de paiement."
 
 #: src/business/business-gnome/dialog-vendor.c:258
 msgid "Edit Vendor"
-msgstr ""
+msgstr "Éditer fournisseur"
 
 #: src/business/business-gnome/dialog-vendor.c:652
 msgid "View/Edit Vendor"
-msgstr ""
+msgstr "Voir/Éditer fournisseur"
 
 #: src/business/business-gnome/dialog-vendor.c:653
 msgid "Vendor's Jobs"
-msgstr ""
+msgstr "Métier du fournisseur"
 
 #.    { N_("Vendor Orders"), order_vendor_cb},
 #: src/business/business-gnome/dialog-vendor.c:655
 msgid "Vendor's Bills"
-msgstr ""
+msgstr "Factures du fournisseur"
 
 #: src/business/business-gnome/dialog-vendor.c:656
 msgid "Pay Bill"
-msgstr ""
+msgstr "Payer la facture"
 
 #: src/business/business-gnome/dialog-vendor.c:667
 msgid "Vendor ID"
-msgstr ""
+msgstr "Id. du fournisseur"
 
 # po/guile_strings.txt:48
 #: src/business/business-gnome/search-owner.c:151
 msgid "You have not selected an owner"
-msgstr ""
+msgstr "Vous n'avez pas sélectionner de propriétaire"
 
 # messages-i18n.c:278
 #: src/business/business-gnome/search-owner.c:283
@@ -2339,23 +2350,23 @@
 # po/guile_strings.txt:182
 #: src/business/business-gnome/business-gnome-utils.c:490
 msgid "Yes"
-msgstr ""
+msgstr "Oui"
 
 # po/guile_strings.txt:243
 #: src/business/business-gnome/business-gnome-utils.c:495
 msgid "No"
-msgstr ""
+msgstr "Non"
 
 #: src/business/business-gnome/business-gnome-utils.c:500
 msgid "Use Global"
-msgstr ""
+msgstr "Utiliser global"
 
 # messages-i18n.c:54
 #: src/business/business-ledger/gncEntryLedger.c:65
 #: src/register/ledger-core/split-register.c:1488
 #, c-format
 msgid "The account %s does not allow transactions.\n"
-msgstr ""
+msgstr "Le compte %s ne permet pas les transactions.\n"
 
 # messages-i18n.c:54
 #: src/business/business-ledger/gncEntryLedger.c:66
@@ -2371,16 +2382,16 @@
 #. XXX: change this based on the ledger type
 #: src/business/business-ledger/gncEntryLedger.c:201
 msgid "Hours"
-msgstr ""
+msgstr "Heures"
 
 # messages-i18n.c:318
 #: src/business/business-ledger/gncEntryLedger.c:202
 msgid "Project"
-msgstr ""
+msgstr "Projet"
 
 #: src/business/business-ledger/gncEntryLedger.c:203
 msgid "Material"
-msgstr ""
+msgstr "Matériel"
 
 # messages-i18n.c:54
 #: src/business/business-ledger/gncEntryLedger.c:774
@@ -2389,18 +2400,20 @@
 "The current entry has been changed.\n"
 "Would you like to save it?"
 msgstr ""
+"L'entrée en cours a été modifiée.\n"
+"Voulez-vous la sauvegarder ?"
 
 #. Translators: %s is the string "an Account" i.e. its translation.
 #: src/business/business-ledger/gncEntryLedgerControl.c:124
 #, c-format
 msgid "Invalid Entry:  You need to supply %s."
-msgstr ""
+msgstr "Entrée invalide : Vous devez donner %s."
 
 # messages-i18n.c:199
 #: src/business/business-ledger/gncEntryLedgerControl.c:148
 #: src/business/business-ledger/gncEntryLedgerControl.c:154
 msgid "an Account"
-msgstr ""
+msgstr "un compte"
 
 # messages-i18n.c:54
 #: src/business/business-ledger/gncEntryLedgerControl.c:358
@@ -2409,6 +2422,8 @@
 "The tax table %s does not exist.\n"
 "Would you like to create it?"
 msgstr ""
+"La table de taxation %s n'existe pas.\n"
+"Voulez-vous la créer?"
 
 #: src/business/business-ledger/gncEntryLedgerControl.c:473
 msgid ""
@@ -2417,6 +2432,10 @@
 "Would you like to record the change and\n"
 "effectively change your order?"
 msgstr ""
+"L'entrée en cours a été changée.\n"
+"Or cette entrée fait partie d'une commande existante.\n"
+"Voulez-vous enregistrer ce changement et \n"
+"changer effectivement votre commande ?"
 
 #. Translators: The 'sample:' items are strings which are not
 #. displayed, but only used to estimate widths. Please only
@@ -2424,44 +2443,44 @@
 #. ("sample:") as is.
 #: src/business/business-ledger/gncEntryLedgerLayout.c:58
 msgid "sample:X"
-msgstr ""
+msgstr "exemple:X"
 
 # src/gnome/glade-gnc-dialogs.c:1264
 #: src/business/business-ledger/gncEntryLedgerLayout.c:60
 #: src/register/ledger-core/split-register-layout.c:503
 #: src/register/ledger-core/split-register-layout.c:511
 msgid "sample:12/12/2000"
-msgstr ""
+msgstr "exemple:12/12/2000"
 
 # messages-i18n.c:123
 #: src/business/business-ledger/gncEntryLedgerLayout.c:63
 msgid "sample:Description of an Entry"
-msgstr ""
+msgstr "exemple : Description d'une entrée"
 
 # messages-i18n.c:240
 #: src/business/business-ledger/gncEntryLedgerLayout.c:65
 msgid "sample:Action"
-msgstr ""
+msgstr "exemple: action"
 
 #: src/business/business-ledger/gncEntryLedgerLayout.c:67
 #: src/business/business-ledger/gncEntryLedgerLayout.c:71
 msgid "sample:9,999.00"
-msgstr ""
+msgstr "exemple : 9.999,00"
 
 #: src/business/business-ledger/gncEntryLedgerLayout.c:69
 #: src/business/business-ledger/gncEntryLedgerLayout.c:91
 msgid "sample:999,999.00"
-msgstr ""
+msgstr "exemple: 999.999,00"
 
 #: src/business/business-ledger/gncEntryLedgerLayout.c:74
 #, no-c-format
 msgid "sample(DT):+%"
-msgstr ""
+msgstr "Exemple(DT) : +%"
 
 #: src/business/business-ledger/gncEntryLedgerLayout.c:77
 #, no-c-format
 msgid "sample(DH):+%"
-msgstr ""
+msgstr "Exemple(DH) : +%"
 
 #: src/business/business-ledger/gncEntryLedgerLayout.c:80
 #: src/business/business-ledger/gncEntryLedgerLayout.c:83
@@ -2472,32 +2491,32 @@
 
 #: src/business/business-ledger/gncEntryLedgerLayout.c:85
 msgid "sample:T?"
-msgstr ""
+msgstr "exemple : T?"
 
 #: src/business/business-ledger/gncEntryLedgerLayout.c:87
 msgid "sample:TI"
-msgstr ""
+msgstr "exemple : TI"
 
 #: src/business/business-ledger/gncEntryLedgerLayout.c:89
 msgid "sample:Tax Table 1"
-msgstr ""
+msgstr "exemple : Table de Taxation 1"
 
 #: src/business/business-ledger/gncEntryLedgerLayout.c:93
 msgid "sample:999.00"
-msgstr ""
+msgstr "exemple : 999,00"
 
 #: src/business/business-ledger/gncEntryLedgerLayout.c:95
 msgid "sample:BI"
-msgstr ""
+msgstr "exemple : BI"
 
 # messages-i18n.c:312
 #: src/business/business-ledger/gncEntryLedgerLayout.c:97
 msgid "sample:Payment"
-msgstr ""
+msgstr "exemple : paiement"
 
 #: src/business/business-ledger/gncEntryLedgerLoad.c:32
 msgid "$"
-msgstr ""
+msgstr "?"
 
 #. src/business/business-reports/invoice.scm
 #: src/business/business-ledger/gncEntryLedgerLoad.c:33
@@ -2548,7 +2567,7 @@
 # messages-i18n.c:194
 #: src/business/business-ledger/gncEntryLedgerModel.c:45
 msgid "Expense Account"
-msgstr ""
+msgstr "Compte de dépense"
 
 # messages-i18n.c:240
 #. src/business/business-reports/invoice.scm
@@ -2556,43 +2575,43 @@
 #: src/register/ledger-core/split-register-model.c:184
 #: intl-scm/guile-strings.c:3383
 msgid "Action"
-msgstr "Action"
+msgstr ""
 
 # messages-i18n.c:278
 #. src/business/business-reports/invoice.scm
 #: src/business/business-ledger/gncEntryLedgerModel.c:65
 #: intl-scm/guile-strings.c:3357 intl-scm/guile-strings.c:3399
 msgid "Discount"
-msgstr ""
+msgstr "Ristourne"
 
 # messages-i18n.c:166
 #: src/business/business-ledger/gncEntryLedgerModel.c:70
 msgid "Discount Type"
-msgstr ""
+msgstr "Type de ristourne"
 
 # messages-i18n.c:236 po/guile_strings.txt:56
 #: src/business/business-ledger/gncEntryLedgerModel.c:75
 msgid "Discount How"
-msgstr ""
+msgstr "Comment faire la ristourne"
 
 # messages-i18n.c:316
 #. src/business/business-reports/invoice.scm
 #: src/business/business-ledger/gncEntryLedgerModel.c:80
 #: intl-scm/guile-strings.c:3355
 msgid "Unit Price"
-msgstr ""
+msgstr "Prix unitaire"
 
 #. src/business/business-reports/invoice.scm
 #: src/business/business-ledger/gncEntryLedgerModel.c:85
 #: intl-scm/guile-strings.c:3353 intl-scm/guile-strings.c:3389
 msgid "Quantity"
-msgstr ""
+msgstr "Quantité"
 
 # po/guile_strings.txt:264
 #: src/business/business-ledger/gncEntryLedgerModel.c:90
 #: src/business/dialog-tax-table/tax-tables.glade.h:8
 msgid "Tax Table"
-msgstr ""
+msgstr "Table de Taxation"
 
 # po/guile_strings.txt:264
 #: src/business/business-ledger/gncEntryLedgerModel.c:95
@@ -2601,140 +2620,140 @@
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:100
 msgid "Tax Included?"
-msgstr ""
+msgstr "Taxe incluse ?"
 
 # messages-i18n.c:294 po/guile_strings.txt:205
 # src/gnome/glade-gnc-dialogs.c:644
 #: src/business/business-ledger/gncEntryLedgerModel.c:105
 msgid "Invoiced?"
-msgstr ""
+msgstr "Facturé ?"
 
 # messages-i18n.c:344
 #. src/business/business-reports/invoice.scm
 #: src/business/business-ledger/gncEntryLedgerModel.c:110
 #: intl-scm/guile-strings.c:3477
 msgid "Subtotal"
-msgstr ""
+msgstr "Sous-total"
 
 # po/guile_strings.txt:264
 #. src/business/business-reports/invoice.scm
 #: src/business/business-ledger/gncEntryLedgerModel.c:115
 #: intl-scm/guile-strings.c:3479
 msgid "Tax"
-msgstr ""
+msgstr "Taxe"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:120
 msgid "Billable?"
-msgstr ""
+msgstr "Facturable ?"
 
 # messages-i18n.c:129
 #: src/business/business-ledger/gncEntryLedgerModel.c:515
 msgid "Enter the income/expense account for the Entry, or choose one from the list"
-msgstr ""
+msgstr "Entrez le compte de revenus/dépenses pour cette entrée, ou choisissez-en un de cette liste"
 
 # po/guile_strings.txt:108
 #: src/business/business-ledger/gncEntryLedgerModel.c:528
 msgid "Enter the type of Entry"
-msgstr ""
+msgstr "Entrez le type de cette entrée"
 
 # messages-i18n.c:223
 #: src/business/business-ledger/gncEntryLedgerModel.c:564
 msgid "Enter the Entry Description"
-msgstr ""
+msgstr "Entrez la description de cet entrée"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:579
 msgid "Enter the Discount Amount"
-msgstr ""
+msgstr "Entrez le montant de la ristourne"
 
 # messages-i18n.c:126
 #: src/business/business-ledger/gncEntryLedgerModel.c:582
 msgid "Enter the Discount Percent"
-msgstr ""
+msgstr "Entrez le pourcentage de la ristourne"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:585
 msgid "Enter the Discount ... unknown type"
-msgstr ""
+msgstr "Entrez la ristourne ... type inconnu"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:602
 msgid "Discount Type: Monetary Value"
-msgstr ""
+msgstr "Type de ristourne : Valeur monétaire"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:605
 msgid "Discount Type: Percent"
-msgstr ""
+msgstr "Type de ristourne : Au pourcentage"
 
 # src/gnome/glade-gnc-dialogs.c:506
 #: src/business/business-ledger/gncEntryLedgerModel.c:608
 msgid "Select the Discount Type"
-msgstr ""
+msgstr "Sélectionnez le type de ristourne"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:624
 msgid "Tax computed after discount is applied"
-msgstr ""
+msgstr "Taxe calculée après la ristourne"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:627
 msgid "Discount and tax both applied on pretax value"
-msgstr ""
+msgstr "La ristourne et la taxe sont appliqué sur la valeur hors-taxe"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:630
 msgid "Discount computed after tax is applied"
-msgstr ""
+msgstr "La ristourne est calculée après la taxe"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:633
 msgid "Select how to compute the Discount and Taxes"
-msgstr ""
+msgstr "Sélectionner la méthode de calcul des taxes et de la ristourne"
 
 # messages-i18n.c:123
 #: src/business/business-ledger/gncEntryLedgerModel.c:646
 msgid "Enter the unit-Price for this Entry"
-msgstr ""
+msgstr "Entrez le prix unitaire de cette entrée"
 
 # messages-i18n.c:81
 #: src/business/business-ledger/gncEntryLedgerModel.c:658
 msgid "Enter the Quantity of units for this Entry"
-msgstr ""
+msgstr "Entrée la quantité pour cette entrée"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:670
 msgid "Enter the Tax Table to apply to this entry"
-msgstr ""
+msgstr "Entrer la table de taxation pour cette entrée"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:679
 msgid "Is this entry taxable?"
-msgstr ""
+msgstr "Cette entrée est-elle taxable ?"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:688
 msgid "Is the tax already included in the price of this entry?"
-msgstr ""
+msgstr "Est-ce que la taxe est déjà comprise dans le prix ?"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:705
 msgid "Is this entry Invoiced?"
-msgstr ""
+msgstr "Est-ce que cette entrée est facturée ?"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:709
 msgid "Include this entry on this invoice?"
-msgstr ""
+msgstr "Inclure cette entrée dans cette facture ?"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:712
 msgid "Unknown EntryLedger Type"
-msgstr ""
+msgstr "Type de registre d'entrée inconnu"
 
 # po/guile_strings.txt:22
 #: src/business/business-ledger/gncEntryLedgerModel.c:725
 msgid "The subtotal value of this entry "
-msgstr ""
+msgstr "La valuer sous-totale de cette entrée "
 
 # po/guile_strings.txt:22
 #: src/business/business-ledger/gncEntryLedgerModel.c:737
 msgid "The total tax of this entry "
-msgstr ""
+msgstr "La taxe totale sur cette entrée"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:746
 msgid "Is this entry billable to a customer or job?"
-msgstr ""
+msgstr "Cette entrée est-elle facturable à un client ou à un métier ?"
 
 #: src/business/business-ledger/gncEntryLedgerModel.c:755
 msgid "How did you pay for this item?"
-msgstr ""
+msgstr "Comment avez-vous payé cette entrée ?"
 
 #: src/business/dialog-tax-table/tax-tables.glade.h:6
 #, no-c-format
@@ -2748,18 +2767,18 @@
 
 #: src/business/dialog-tax-table/tax-tables.glade.h:9
 msgid "Tax Table Entries"
-msgstr ""
+msgstr "Entrées de la table de taxation"
 
 #: src/business/dialog-tax-table/tax-tables.glade.h:10
 msgid "Tax Table Entry"
-msgstr ""
+msgstr "Entrée de la table de taxation"
 
 # po/guile_strings.txt:264
 #. src/business/business-gnome/business-gnome.scm
 #: src/business/dialog-tax-table/tax-tables.glade.h:11
 #: intl-scm/guile-strings.c:3123
 msgid "Tax Tables"
-msgstr ""
+msgstr "Tables de taxation"
 
 # messages-i18n.c:348 po/guile_strings.txt:57
 #: src/business/dialog-tax-table/tax-tables.glade.h:13
@@ -2769,7 +2788,7 @@
 # messages-i18n.c:348 po/guile_strings.txt:57
 #: src/business/dialog-tax-table/tax-tables.glade.h:14
 msgid "Value: "
-msgstr "Valeur:"
+msgstr "Valeur : "
 
 #: src/business/dialog-tax-table/dialog-tax-table.c:71
 msgid "You must provide a name for this Tax Table."
@@ -2802,13 +2821,15 @@
 #: src/business/dialog-tax-table/dialog-tax-table.c:510
 #, c-format
 msgid "Tax table \"%s\" is in use.  You cannot delete it."
-msgstr ""
+msgstr "La table de taxation \"%s\" est utilisée. Vous ne pouvez pas la détruire."
 
 #: src/business/dialog-tax-table/dialog-tax-table.c:555
 msgid ""
 "You cannot remove the last entry from the tax table.\n"
 "Try deleting the tax table if you want to do that."
 msgstr ""
+"Vous ne pouvez pas détruire la dernière entrée d'une table de taxation.\n"
+"Essayez de détruire la table de taxation si vous voulez le faire."
 
 # messages-i18n.c:17
 #: src/business/dialog-tax-table/dialog-tax-table.c:562
@@ -3112,7 +3133,7 @@
 # messages-i18n.c:95
 #: src/gnome/glade/register.glade.h:8
 msgid "Copy the selected transaction"
-msgstr "Copier la transaction sélectionnée."
+msgstr "Copier la transaction sélectionnée"
 
 #: src/gnome/glade/register.glade.h:9
 msgid "Create a Scheduled Transaction with the current transaction as a template"
@@ -3132,7 +3153,7 @@
 # messages-i18n.c:80
 #: src/gnome/glade/register.glade.h:12
 msgid "Cut the selected transaction"
-msgstr "Couper la transaction sélectionnée."
+msgstr "Couper la transaction sélectionnée"
 
 # messages-i18n.c:135
 #: src/gnome/glade/register.glade.h:13
@@ -3250,7 +3271,7 @@
 # messages-i18n.c:85
 #: src/gnome/glade/register.glade.h:41 src/gnome/window-main.c:991
 msgid "Open the GnuCash Help"
-msgstr "Ouvrir le manuel de GnuCash."
+msgstr "Ouvrir le manuel de GnuCash"
 
 # messages-i18n.c:85
 #: src/gnome/glade/register.glade.h:42 src/gnome/window-main.c:975
@@ -3280,7 +3301,7 @@
 # messages-i18n.c:104
 #: src/gnome/glade/register.glade.h:48
 msgid "Reconcile the main account for this register"
-msgstr "Rapprocher le compte principal pour ce registre."
+msgstr "Rapprocher le compte principal pour ce registre"
 
 #: src/gnome/glade/register.glade.h:49 src/gnome/window-acct-tree.c:1018
 #: src/gnome/window-acct-tree.c:1363
@@ -3362,7 +3383,7 @@
 #. src/app-utils/prefs.scm
 #: src/gnome/glade/register.glade.h:65 intl-scm/guile-strings.c:634
 msgid "Show expanded transactions with all splits"
-msgstr "Montrer les transactions développées avec toutes les répartitions."
+msgstr "Montrer les transactions développées avec toutes les répartitions"
 
 # messages-i18n.c:114 po/guile_strings.txt:128
 #. src/app-utils/prefs.scm
@@ -3452,7 +3473,7 @@
 #: src/gnome/glade/register.glade.h:84 src/gnome/window-acct-tree.c:1010
 #: src/gnome/window-acct-tree.c:1347 src/gnome/window-reconcile.c:1271
 msgid "Transfer funds from one account to another"
-msgstr "Transfert de fonds depuis un compte vers un autre."
+msgstr "Transfert de fonds depuis un compte vers un autre"
 
 #: src/gnome/glade/register.glade.h:85 src/gnome/window-main.c:974
 msgid "Tutorial and Concepts _Guide"
@@ -3464,20 +3485,20 @@
 
 #: src/gnome/glade/register.glade.h:90
 msgid "[rmw] THIS WINDOW SHOULD NOT BE CREATED"
-msgstr ""
+msgstr "[rmw] CETTE FENÊTRE NE DOIT PAS ÊTRE CRÉÉE"
 
 #: src/gnome/glade/register.glade.h:91
 msgid "[rtw] THIS WINDOW SHOULD NOT BE CREATED"
-msgstr ""
+msgstr "[rtw] CETTE FENÊTRE NE DOIT PAS ÊTRE CRÉÉE"
 
 #: src/gnome/glade/register.glade.h:92
 msgid "[wrtw] THIS WINDOW SHOULD NOT BE CREATED"
-msgstr ""
+msgstr "[wrtw] CETTE FENÊTRE NE DOIT PAS ÊTRE CRÉÉE"
 
 # po/guile_strings.txt:9
 #: src/gnome/glade/register.glade.h:93
 msgid "_Account Report"
-msgstr "Rapport de compte"
+msgstr "R_apport de compte"
 
 # src/gnome/glade-gnc-dialogs.c:869
 #: src/gnome/glade/register.glade.h:95
@@ -3568,8 +3589,9 @@
 
 # messages-i18n.c:210
 #: src/gnome/glade/register.glade.h:123
+#, fuzzy
 msgid "_Statement Date"
-msgstr "État de la date :"
+msgstr "État de la date "
 
 #: src/gnome/glade/register.glade.h:125
 msgid "_Stock Split..."
@@ -3741,7 +3763,7 @@
 # messages-i18n.c:262
 #: src/gnome/glade/account.glade.h:21 src/gnome/glade/price.glade.h:6
 msgid "Commodity:"
-msgstr "Produit : "
+msgstr "Produit :"
 
 # src/gnome/glade-gnc-dialogs.c:573
 #: src/gnome/glade/account.glade.h:24 src/gnome/glade/stocks.glade.h:7
@@ -3787,7 +3809,7 @@
 
 #: src/gnome/glade/account.glade.h:34
 msgid "New Account (not implemented)"
-msgstr ""
+msgstr "Nouveau compte (pas développé)"
 
 # messages-i18n.c:190
 #. src/scm/help-topics-index.scm
@@ -3815,7 +3837,7 @@
 # po/guile_strings.txt:200
 #: src/gnome/glade/account.glade.h:41
 msgid "Please choose the currency to use for new accounts."
-msgstr "Choisissez la monnaie utilisée pour les nouveaux comptes"
+msgstr "Choisissez la monnaie utilisée pour les nouveaux comptes."
 
 #: src/gnome/glade/account.glade.h:42
 msgid ""
@@ -3957,7 +3979,7 @@
 #: src/gnome/glade/commodities.glade.h:3 src/gnome/dialog-commodities.c:334
 #: intl-scm/guile-strings.c:144
 msgid "Code"
-msgstr "Code"
+msgstr ""
 
 # messages-i18n.c:262
 #: src/gnome/glade/commodities.glade.h:4
@@ -3967,7 +3989,7 @@
 # messages-i18n.c:346
 #: src/gnome/glade/commodities.glade.h:6 src/gnome/dialog-commodities.c:335
 msgid "Fraction"
-msgstr "Fraction"
+msgstr ""
 
 # messages-i18n.c:321
 #: src/gnome/glade/commodities.glade.h:8 src/gnome/glade/price.glade.h:22
@@ -3978,7 +4000,7 @@
 # messages-i18n.c:105
 #: src/gnome/glade/commodities.glade.h:9
 msgid "Remove the current commodity."
-msgstr "Supprimer le produit actuel"
+msgstr "Supprimer le produit actuel."
 
 # messages-i18n.c:266 po/guile_strings.txt:112
 # src/gnome/glade-gnc-dialogs.c:641
@@ -4130,7 +4152,7 @@
 # messages-i18n.c:344
 #: src/gnome/glade/fincalc.glade.h:32
 msgid "total"
-msgstr "total"
+msgstr ""
 
 #. src/scm/help-topics-index.scm
 #: src/gnome/glade/help.glade.h:1 intl-scm/guile-strings.c:306
@@ -4184,7 +4206,7 @@
 # messages-i18n.c:92
 #: src/gnome/glade/newuser.glade.h:2
 msgid "Create a new set of accounts"
-msgstr "Créer de nouveaux comptes."
+msgstr "Créer de nouveaux comptes"
 
 # src/gnome/glade-gnc-dialogs.c:74
 #: src/gnome/glade/newuser.glade.h:3
@@ -4194,7 +4216,7 @@
 # messages-i18n.c:85
 #: src/gnome/glade/newuser.glade.h:4
 msgid "Open the new user tutorial"
-msgstr "Ouvrir le tutoriel de GnuCash."
+msgstr "Ouvrir le tutoriel de GnuCash"
 
 #: src/gnome/glade/newuser.glade.h:5
 msgid "Run dialog for new user again?"
@@ -4204,7 +4226,7 @@
 msgid "Uncheck if you do not want this dialog to run if you start GnuCash up again. "
 msgstr ""
 "Décocher si vous ne voulez pas que cette fenêtre s'ouvre au prochain "
-"lancement de GnuCash."
+"lancement de GnuCash. "
 
 #: src/gnome/glade/newuser.glade.h:7
 msgid "Welcome to GnuCash!"
@@ -4238,7 +4260,7 @@
 # messages-i18n.c:105
 #: src/gnome/glade/price.glade.h:12
 msgid "Edit the current price."
-msgstr "Modifier le cours sélectionné"
+msgstr "Modifier le cours sélectionné."
 
 #: src/gnome/glade/price.glade.h:13
 msgid "Get Quotes"
@@ -4287,7 +4309,7 @@
 # messages-i18n.c:316
 #: src/gnome/glade/price.glade.h:20
 msgid "Price:"
-msgstr "Cours : "
+msgstr "Cours :"
 
 # messages-i18n.c:316
 #: src/gnome/glade/price.glade.h:21
@@ -4310,11 +4332,11 @@
 
 #: src/gnome/glade/price.glade.h:26 src/gnome/dialog-price-edit-db.c:498
 msgid "Source"
-msgstr "Source"
+msgstr ""
 
 #: src/gnome/glade/price.glade.h:27
 msgid "Source:"
-msgstr "Source : "
+msgstr "Source :"
 
 # messages-i18n.c:345 po/guile_strings.txt:254
 # src/gnome/glade-gnc-dialogs.c:354 src/gnome/glade-gnc-dialogs.c:408
@@ -4325,11 +4347,11 @@
 
 #: src/gnome/glade/print.glade.h:1
 msgid "                    "
-msgstr "                    "
+msgstr ""
 
 #: src/gnome/glade/print.glade.h:2
 msgid "                                  "
-msgstr "                                  "
+msgstr ""
 
 #: src/gnome/glade/print.glade.h:4
 #, no-c-format
@@ -4402,7 +4424,7 @@
 # messages-i18n.c:290 po/guile_strings.txt:106
 #: src/gnome/glade/print.glade.h:18
 msgid "Format:"
-msgstr "Format:"
+msgstr "Format :"
 
 #. src/app-utils/prefs.scm
 #: src/gnome/glade/print.glade.h:19 intl-scm/guile-strings.c:586
@@ -4416,19 +4438,19 @@
 
 #: src/gnome/glade/print.glade.h:21
 msgid "Include the century when printing the year. (E.g. 2001 instead of 01.)"
-msgstr "Inclure le siles en imprimant l'année (ex: 2001 au lieu de 01)"
+msgstr "Inclure le siècle en imprimant l'année (ex: 2001 au lieu de 01)"
 
 # src/gnome/glade-gnc-dialogs.c:300
 #. src/app-utils/prefs.scm
 #: src/gnome/glade/print.glade.h:22 intl-scm/guile-strings.c:590
 msgid "Locale"
-msgstr "Locale"
+msgstr ""
 
 # src/gnome/glade-gnc-dialogs.c:1348
 #: src/gnome/glade/print.glade.h:23 src/gnome/glade/stocks.glade.h:19
 #: src/gnome-utils/transfer.glade.h:8
 msgid "Memo:"
-msgstr "Mémo"
+msgstr "Mémo :"
 
 # src/gnome/glade-gnc-dialogs.c:1234
 #: src/gnome/glade/print.glade.h:24
@@ -4443,14 +4465,14 @@
 # po/guile_strings.txt:184
 #: src/gnome/glade/print.glade.h:26
 msgid "Months:"
-msgstr "Mois:"
+msgstr "Mois :"
 
 # po/guile_strings.txt:127
 #: src/gnome/glade/print.glade.h:27 src/gnome/glade/sched-xact.glade.h:130
 #: src/gnome/window-acct-tree.c:879
 #: src/report/report-gnome/window-report.c:860
 msgid "Options"
-msgstr "Options"
+msgstr ""
 
 # src/gnome/glade-gnc-dialogs.c:1316
 #: src/gnome/glade/print.glade.h:28
@@ -4460,7 +4482,7 @@
 # src/gnome/glade-gnc-dialogs.c:1466
 #: src/gnome/glade/print.glade.h:29
 msgid "Points"
-msgstr "Points"
+msgstr ""
 
 # src/gnome/glade-gnc-dialogs.c:1149
 #: src/gnome/glade/print.glade.h:30
@@ -4489,7 +4511,7 @@
 #. src/app-utils/prefs.scm
 #: src/gnome/glade/print.glade.h:35 intl-scm/guile-strings.c:578
 msgid "UK (31/12/2001)"
-msgstr ""
+msgstr "GB (31/12/2001)"
 
 # src/gnome/glade-gnc-dialogs.c:1264
 #. src/app-utils/prefs.scm
@@ -4505,7 +4527,7 @@
 # po/guile_strings.txt:20
 #: src/gnome/glade/print.glade.h:38
 msgid "Use abbreviated month name for date format."
-msgstr "Utiliser les mois abrégés pour formatter la date."
+msgstr "Utiliser les mois abrégés pour formater la date."
 
 # po/guile_strings.txt:147
 #: src/gnome/glade/print.glade.h:39
@@ -4523,7 +4545,7 @@
 
 #: src/gnome/glade/print.glade.h:42
 msgid "abbreviation"
-msgstr "Code/abbréviation :"
+msgstr "Code/abbréviation"
 
 #: src/gnome/glade/print.glade.h:43
 msgid "include century"
@@ -4542,18 +4564,18 @@
 # src/gnome/glade-gnc-dialogs.c:1387
 #: src/gnome/glade/print.glade.h:46
 msgid "x"
-msgstr "x"
+msgstr ""
 
 # src/gnome/glade-gnc-dialogs.c:1478
 #: src/gnome/glade/print.glade.h:47
 msgid "y"
-msgstr "y"
+msgstr ""
 
 #: src/gnome/glade/progress.glade.h:2
 #: src/import-export/hbci/glade/hbci.glade.h:2
 #, no-c-format
 msgid "%P %%"
-msgstr "%P %%"
+msgstr ""
 
 # po/guile_strings.txt:212
 #: src/gnome/glade/progress.glade.h:3
@@ -4704,12 +4726,13 @@
 msgstr "Montant :"
 
 #: src/gnome/glade/sched-xact.glade.h:38
+#, fuzzy
 msgid "Apr, Jul, Dec"
-msgstr ""
+msgstr "Avr, Jul , Déc"
 
 #: src/gnome/glade/sched-xact.glade.h:39
 msgid "Apr, Oct"
-msgstr ""
+msgstr "Avr, Oct"
 
 #: src/gnome/glade/sched-xact.glade.h:40
 msgid "April"
@@ -4804,7 +4827,7 @@
 # messages-i18n.c:273
 #: src/gnome/glade/sched-xact.glade.h:63
 msgid "Disposition?"
-msgstr "Disposition?"
+msgstr "Disposition ?"
 
 #: src/gnome/glade/sched-xact.glade.h:64
 msgid "Do you..."
@@ -4837,7 +4860,7 @@
 
 #: src/gnome/glade/sched-xact.glade.h:71
 msgid "Ended On"
-msgstr "S'est termiée le"
+msgstr "S'est terminée le"
 
 # messages-i18n.c:190
 #: src/gnome/glade/sched-xact.glade.h:72
@@ -4854,15 +4877,15 @@
 
 #: src/gnome/glade/sched-xact.glade.h:75
 msgid "Feb, Apr, Oct"
-msgstr ""
+msgstr "Fév, Avr, Oct"
 
 #: src/gnome/glade/sched-xact.glade.h:76
 msgid "Feb, Aug"
-msgstr ""
+msgstr "Fév, Aoû"
 
 #: src/gnome/glade/sched-xact.glade.h:77
 msgid "Feb, May, Aug, Nov"
-msgstr ""
+msgstr "Fév, Mai, Aoû, Nov"
 
 #: src/gnome/glade/sched-xact.glade.h:78
 msgid "February"
@@ -4911,7 +4934,7 @@
 
 #: src/gnome/glade/sched-xact.glade.h:87
 msgid "Jan, Apr, Jul, Oct"
-msgstr ""
+msgstr "Jan, Avr, Jui, Oct"
 
 #: src/gnome/glade/sched-xact.glade.h:88
 msgid "Jan, Jul"
@@ -4919,7 +4942,7 @@
 
 #: src/gnome/glade/sched-xact.glade.h:89
 msgid "Jan, May, Sep"
-msgstr ""
+msgstr "Jan, Mai, Sep"
 
 #: src/gnome/glade/sched-xact.glade.h:90
 msgid "January"
@@ -4931,7 +4954,7 @@
 
 #: src/gnome/glade/sched-xact.glade.h:92
 msgid "Jun, Dec"
-msgstr ""
+msgstr "Jun, Déc"
 
 #: src/gnome/glade/sched-xact.glade.h:93
 msgid "June"
@@ -4939,16 +4962,16 @@
 
 #: src/gnome/glade/sched-xact.glade.h:94
 msgid "Last Occurred: "
-msgstr "Dernière occurence:"
+msgstr "Dernière occurence : "
 
 #: src/gnome/glade/sched-xact.glade.h:95
 msgid "Length:"
-msgstr "Durée:"
+msgstr "Durée :"
 
 # messages-i18n.c:186
 #: src/gnome/glade/sched-xact.glade.h:96
 msgid "Loan Account:"
-msgstr "Comptes du prêt:"
+msgstr "Comptes du prêt :"
 
 # messages-i18n.c:231
 #: src/gnome/glade/sched-xact.glade.h:97
@@ -4966,7 +4989,7 @@
 
 #: src/gnome/glade/sched-xact.glade.h:100
 msgid "Mar, Jun, Sep, Dec"
-msgstr ""
+msgstr "Mar, Jun, Sep, Déc"
 
 #: src/gnome/glade/sched-xact.glade.h:101
 msgid "Mar, Sep"
@@ -4983,7 +5006,7 @@
 
 #: src/gnome/glade/sched-xact.glade.h:104
 msgid "May, Nov"
-msgstr ""
+msgstr "Mai, Nov"
 
 # messages-i18n.c:343
 #. src/report/standard-reports/daily-reports.scm
@@ -5055,12 +5078,12 @@
 
 #: src/gnome/glade/sched-xact.glade.h:121
 msgid "Now + 1 Year"
-msgstr ""
+msgstr "Maintenant +1 an"
 
 # po/guile_strings.txt:144
 #: src/gnome/glade/sched-xact.glade.h:122
 msgid "Number of Occurences:"
-msgstr "Nombre d'occurences:"
+msgstr "Nombre d'occurences :"
 
 # po/guile_strings.txt:144
 #: src/gnome/glade/sched-xact.glade.h:123
@@ -5135,16 +5158,16 @@
 
 #: src/gnome/glade/sched-xact.glade.h:139
 msgid "Principal To:"
-msgstr ""
+msgstr "Principal vers :"
 
 #: src/gnome/glade/sched-xact.glade.h:141
 msgid "REPLACEME with the Register control box"
-msgstr ""
+msgstr "REMPLACEMOI avec le boîte de contrôle des registres"
 
 # po/guile_strings.txt:188
 #: src/gnome/glade/sched-xact.glade.h:142
 msgid "Range: "
-msgstr "Range: "
+msgstr "Intervalle : "
 
 # messages-i18n.c:323
 #: src/gnome/glade/sched-xact.glade.h:143
@@ -5239,7 +5262,7 @@
 # messages-i18n.c:227
 #: src/gnome/glade/sched-xact.glade.h:163
 msgid "Start Date: "
-msgstr "Date de départ:"
+msgstr "Date de départ : "
 
 # messages-i18n.c:267 po/guile_strings.txt:6
 #: src/gnome/glade/sched-xact.glade.h:164
@@ -5307,7 +5330,7 @@
 
 #: src/gnome/glade/sched-xact.glade.h:182
 msgid "This window should never be realized."
-msgstr ""
+msgstr "Cette fenêtre ne doit jamais être réalisée."
 
 # messages-i18n.c:343
 #. src/report/standard-reports/daily-reports.scm
@@ -5318,7 +5341,7 @@
 # messages-i18n.c:231
 #: src/gnome/glade/sched-xact.glade.h:184
 msgid "To-Create Transaction Preparation"
-msgstr ""
+msgstr "Préparation d'une transaction À-Créer"
 
 # messages-i18n.c:346
 #: src/gnome/glade/sched-xact.glade.h:185
@@ -5366,12 +5389,12 @@
 
 #: src/gnome/glade/sched-xact.glade.h:194
 msgid "Variable"
-msgstr "Variable"
+msgstr ""
 
 # po/guile_strings.txt:264
 #: src/gnome/glade/sched-xact.glade.h:195
 msgid "Variables"
-msgstr "Variables"
+msgstr ""
 
 #. src/report/standard-reports/daily-reports.scm
 #: src/gnome/glade/sched-xact.glade.h:196 intl-scm/guile-strings.c:2743
@@ -5380,15 +5403,15 @@
 
 #: src/gnome/glade/sched-xact.glade.h:198
 msgid "What to do, what to do?"
-msgstr ""
+msgstr "Que faire, que faire ?"
 
 #: src/gnome/glade/sched-xact.glade.h:199
 msgid "Whole Loan"
-msgstr ""
+msgstr "Tout l'emprunt"
 
 #: src/gnome/glade/sched-xact.glade.h:200
 msgid "YYYY-MM-DD"
-msgstr ""
+msgstr "AAAA-MM-JJ"
 
 # po/guile_strings.txt:182
 #. src/report/standard-reports/transaction.scm
@@ -5399,15 +5422,15 @@
 
 #: src/gnome/glade/sched-xact.glade.h:202
 msgid "[29th/last]"
-msgstr ""
+msgstr "[29/dernier]"
 
 #: src/gnome/glade/sched-xact.glade.h:203
 msgid "[30th/last]"
-msgstr ""
+msgstr "[30/dernier]"
 
 #: src/gnome/glade/sched-xact.glade.h:204
 msgid "[31st/last]"
-msgstr ""
+msgstr "[31/dernier]"
 
 # po/guile_strings.txt:101
 #: src/gnome/glade/sched-xact.glade.h:205
@@ -5511,7 +5534,7 @@
 msgid "Select the account for which you want to record a stock split or merger."
 msgstr ""
 "Sélectionner le compte pour lequel vous voulez enregistrer une fusion ou "
-"division d'action"
+"division d'action."
 
 #: src/gnome/glade/stocks.glade.h:22
 msgid "Share Distribution:"
@@ -5546,11 +5569,11 @@
 
 #: src/gnome/glade/stocks.glade.h:28
 msgid "This druid will help you record a stock split or stock merger."
-msgstr "L'expert va vous aider à enregistrer une division ou une fusion d'action"
+msgstr "L'expert va vous aider à enregistrer une division ou une fusion d'action."
 
 #: src/gnome/glade/tax.glade.h:1
 msgid "0"
-msgstr "0"
+msgstr ""
 
 #: src/gnome/glade/tax.glade.h:3
 msgid "Accounts Selected:"
@@ -5592,7 +5615,7 @@
 #: src/gnome/glade/userpass.glade.h:2
 #: src/import-export/hbci/glade/hbcipass.glade.h:6
 msgid "Password:"
-msgstr "Mot de passe : "
+msgstr "Mot de passe :"
 
 #: src/gnome/glade/userpass.glade.h:3
 msgid "Username and Password"
@@ -5600,7 +5623,7 @@
 
 #: src/gnome/glade/userpass.glade.h:4
 msgid "Username:"
-msgstr "Nom d'utilisateur : "
+msgstr "Nom d'utilisateur :"
 
 #: src/gnome/dialog-commodities.c:256
 msgid ""
@@ -5610,7 +5633,7 @@
 msgstr ""
 "Ce bien est actuellement utilisé par\n"
 "au moins un de vos comptes. Vous ne pouvez\n"
-"pas le détruire"
+"pas le détruire."
 
 # messages-i18n.c:56
 #: src/gnome/dialog-commodities.c:264
@@ -5634,15 +5657,15 @@
 
 #: src/gnome/dialog-fincalc.c:398
 msgid "The number of payments cannot be zero."
-msgstr "Le nombre de paiements ne peut être zéro"
+msgstr "Le nombre de paiements ne peut être zéro."
 
 #: src/gnome/dialog-fincalc.c:403
 msgid "The number of payments cannot be negative."
-msgstr "Le nombre de paiements ne peut être négatif"
+msgstr "Le nombre de paiements ne peut être négatif."
 
 #: src/gnome/dialog-price-edit-db.c:74
 msgid "old-file-import"
-msgstr ""
+msgstr "import-fichier-ancien"
 
 # messages-i18n.c:202
 #: src/gnome/dialog-price-edit-db.c:75
@@ -5651,9 +5674,10 @@
 
 #: src/gnome/dialog-price-edit-db.c:76
 msgid "user:stock-split"
-msgstr ""
+msgstr "Division d'action"
 
 #: src/gnome/dialog-price-edit-db.c:77
+#, fuzzy
 msgid "user:xfer-dialog"
 msgstr ""
 
@@ -5671,7 +5695,7 @@
 
 #: src/gnome/dialog-price-edit-db.c:352
 msgid "All prices before the date below will be deleted."
-msgstr "Toutes les valeurs avant la date précédente seront supprimées"
+msgstr "Toutes les valeurs avant la date précédente seront supprimées."
 
 # messages-i18n.c:21
 #: src/gnome/dialog-price-editor.c:170
@@ -5767,7 +5791,7 @@
 "The following transactions are presently being edited;\n"
 "are you sure you want to delete them?"
 msgstr ""
-"Les transactions suivantes sont présement en cours de modification;\n"
+"Les transactions suivantes sont actuellement en cours de modification;\n"
 "Êtes-vous sûr que vous souhaitez les effacer?"
 
 # messages-i18n.c:26
@@ -5796,14 +5820,18 @@
 "(%d transactions automatically created)"
 msgstr[0] ""
 "Il n'y a aucune transaction récurrente à entrer à ce moment-ci.\n"
-"(%d transaction(s) crée(s) automatiquement)"
+"(%d transaction créée automatiquement)"
 msgstr[1] ""
+"Il n'y a aucune transaction récurrente à entrer à ce moment-ci.\n"
+"(%d transactions créées automatiquement)"
 
 #: src/gnome/dialog-sxsincelast.c:1370
 msgid ""
 "Cancelling the Since-Last-Run dialog will revert all changes.\n"
 "Are you sure you want to lose all Scheduled Transaction changes?"
 msgstr ""
+"Annuler dans le dialogue Depuis-la-dernière-fois défera tous les changements.\n"
+"Êtes vous sûr de vouloir perdre tous les changements apportés par les transaction récurrentes ?"
 
 # messages-i18n.c:105
 #: src/gnome/dialog-sxsincelast.c:1799
@@ -5841,7 +5869,7 @@
 
 #: src/gnome/dialog-totd.c:303
 msgid "-*-helvetica-bold-r-normal-*-*-180-*-*-p-*-*-*"
-msgstr "-*-helvetica-bold-r-normal-*-*-180-*-*-p-*-*-*"
+msgstr ""
 
 #: src/gnome/dialog-totd.c:304
 msgid "Tip of the Day:"
@@ -5855,48 +5883,48 @@
 # messages-i18n.c:288
 #: src/gnome/druid-loan.c:512
 msgid "Fixed"
-msgstr ""
+msgstr "Fixe"
 
 #: src/gnome/druid-loan.c:512
 msgid "A Fixed-Rate loan"
-msgstr ""
+msgstr "Un prêt à taux fixe"
 
 # po/guile_strings.txt:182
 #. Translators: ARM = Adjustable Rate Mortgage
 #: src/gnome/druid-loan.c:514
 msgid "3/1 Year"
-msgstr ""
+msgstr "Variable 3/1"
 
 #: src/gnome/druid-loan.c:514
 msgid "A 3/1 Year ARM"
-msgstr ""
+msgstr "Un prêt à taux variable à partir de la 3ème année"
 
 # po/guile_strings.txt:182
 #: src/gnome/druid-loan.c:515
 msgid "5/1 Year"
-msgstr ""
+msgstr "Variable 5/1"
 
 #: src/gnome/druid-loan.c:515
 msgid "A 5/1 Year ARM"
-msgstr ""
+msgstr "Un prêt à taux variable à partir de la 5ème année"
 
 # po/guile_strings.txt:182
 #: src/gnome/druid-loan.c:516
 msgid "7/1 Year"
-msgstr ""
+msgstr "Variable 7/1"
 
 #: src/gnome/druid-loan.c:516
 msgid "A 7/1 Year ARM"
-msgstr ""
+msgstr "Un prêt à taux variable à partir de la 7ème année"
 
 # po/guile_strings.txt:182
 #: src/gnome/druid-loan.c:517
 msgid "10/1 Year"
-msgstr ""
+msgstr "Variable 10/1"
 
 #: src/gnome/druid-loan.c:517
 msgid "A 10/1 Year ARM"
-msgstr ""
+msgstr "Un prêt à taux variable à partir de la 10ème année"
 
 #. Add payment checkbox.
 #. Translators: %s is "Taxes",
@@ -5904,7 +5932,7 @@
 #: src/gnome/druid-loan.c:602
 #, c-format
 msgid "... pay \"%s\"?"
-msgstr ""
+msgstr "... payer \"%s\" ?"
 
 # messages-i18n.c:96
 #: src/gnome/druid-loan.c:614
@@ -5983,7 +6011,7 @@
 # messages-i18n.c:21
 #: src/gnome/druid-stock-split.c:263
 msgid "You must enter a distribution amount."
-msgstr "Vous devez entrer un montant de répartition"
+msgstr "Vous devez entrer un montant de répartition."
 
 # messages-i18n.c:13
 #: src/gnome/druid-stock-split.c:271
@@ -5992,7 +6020,7 @@
 "or leave it blank."
 msgstr ""
 "Vous devez entrer une expression valide\n"
-"ou laisser blanc."
+"ou laisser vierge."
 
 # messages-i18n.c:24
 #: src/gnome/druid-stock-split.c:280
@@ -6003,11 +6031,11 @@
 msgid ""
 "You must either enter a valid cash amount\n"
 "or leave it blank."
-msgstr "Vous devez saisir un montant valide ou laisser blanc."
+msgstr "Vous devez saisir un montant valide ou laisser vierge."
 
 #: src/gnome/druid-stock-split.c:326
 msgid "The cash distribution must be positive."
-msgstr "La répartition du liquide doit être positive"
+msgstr "La répartition du liquide doit être positive."
 
 # messages-i18n.c:20
 #: src/gnome/druid-stock-split.c:339
@@ -6029,7 +6057,7 @@
 
 #: src/gnome/druid-stock-split.c:442
 msgid "Error adding price."
-msgstr "Erreur d'ajout de prix"
+msgstr "Erreur d'ajout de prix."
 
 # po/guile_strings.txt:167
 #: src/gnome/druid-stock-split.c:731
@@ -6042,7 +6070,7 @@
 
 #: src/gnome/gnc-network.c:223
 msgid "GnuCash Network authorization failed."
-msgstr "Demande d'accès au réseau GnuCash rejetée..."
+msgstr "Demande d'accès au réseau GnuCash rejetée."
 
 #. start: get first passphrase
 #: src/gnome/gnc-network.c:356
@@ -6056,7 +6084,7 @@
 
 #: src/gnome/gnc-network.c:381
 msgid "Passphrases did not match."
-msgstr "Les codes ne correspondent pas"
+msgstr "Les codes ne correspondent pas."
 
 #: src/gnome/gnc-splash.c:74
 #, c-format
@@ -6066,7 +6094,7 @@
 #: src/gnome/gnc-splash.c:77
 #, c-format
 msgid "Version: Gnucash-%s"
-msgstr "Version: Gnucash-%s"
+msgstr "Version : Gnucash-%s"
 
 #: src/gnome/gnc-splash.c:81
 msgid "Loading..."
@@ -6075,7 +6103,7 @@
 # messages-i18n.c:83
 #: src/gnome/gnucash.desktop.in.h:1
 msgid "GnuCash"
-msgstr "GnuCash"
+msgstr ""
 
 # messages-i18n.c:291
 #: src/gnome/gnucash.desktop.in.h:2
@@ -6098,12 +6126,12 @@
 #: src/gnome/top-level.c:212
 #, c-format
 msgid "No such split: %s"
-msgstr "Aucune répartitons comme: %s"
+msgstr "Aucune répartiton : %s"
 
 #: src/gnome/top-level.c:222 src/gnome/top-level.c:265
 #, c-format
 msgid "Unsupported entity type: %s"
-msgstr "Type d'entité non supporté: %s"
+msgstr "Type d'entité non supporté : %s"
 
 # messages-i18n.c:166
 #. src/scm/main-window.scm
@@ -6172,7 +6200,7 @@
 "%s account and all its children?"
 msgstr ""
 "Un ou plusieurs sous-compte du compte %s contient des transactions.\n"
-"Êtes vous certain de vouloir effacte ce compte et tous ses sous-comptes?"
+"Êtes vous certain de vouloir effacer ce compte et tous ses sous-comptes?"
 
 # messages-i18n.c:17
 #: src/gnome/window-acct-tree.c:445
@@ -6260,7 +6288,7 @@
 "account and its subaccounts"
 msgstr ""
 "Identifier et corriger les transactions non soldées et les répartitions "
-"orphelines dans ce compte et ses sous-comptes."
+"orphelines dans ce compte et ses sous-comptes"
 
 #: src/gnome/window-acct-tree.c:941
 msgid "Check & Repair A_ll"
@@ -6272,7 +6300,7 @@
 "accounts"
 msgstr ""
 "Identifier et corriger les transactions non soldées et les répartitions "
-"orphelines dans tous les comptes."
+"orphelines dans tous les comptes"
 
 # messages-i18n.c:147
 #: src/gnome/window-acct-tree.c:976
@@ -6287,7 +6315,7 @@
 # messages-i18n.c:97
 #: src/gnome/window-acct-tree.c:985 src/gnome/window-acct-tree.c:1308
 msgid "Open the selected account and all its subaccounts"
-msgstr "Ouvrir le compte sélectionné et tous ses sous-comptes."
+msgstr "Ouvrir le compte sélectionné et tous ses sous-comptes"
 
 # messages-i18n.c:101
 #: src/gnome/window-acct-tree.c:1002 src/gnome/window-acct-tree.c:1355
@@ -6331,12 +6359,12 @@
 # messages-i18n.c:246
 #: src/gnome/window-main-summarybar.c:129
 msgid "Net Assets"
-msgstr "Actifs(Avoirs) nets :"
+msgstr "Actifs(Avoirs) nets"
 
 # messages-i18n.c:318
 #: src/gnome/window-main-summarybar.c:147
 msgid "Profits"
-msgstr "Profits :"
+msgstr ""
 
 #: src/gnome/window-main.c:616
 msgid "Select \"Exit\" to exit GnuCash."
@@ -6374,7 +6402,7 @@
 # messages-i18n.c:93
 #: src/gnome/window-main.c:802
 msgid "Create a new file"
-msgstr "Créer un nouveau fichier."
+msgstr "Créer un nouveau fichier"
 
 # messages-i18n.c:190
 #: src/gnome/window-main.c:806
@@ -6394,7 +6422,7 @@
 # messages-i18n.c:85
 #: src/gnome/window-main.c:816
 msgid "Open a new top-level GnuCash window for the current view"
-msgstr "Ouvrir une fenêtre principale GnuCash pour la vue courante."
+msgstr "Ouvrir une fenêtre principale GnuCash pour la vue courante"
 
 # messages-i18n.c:96
 #: src/gnome/window-main.c:820
@@ -6457,7 +6485,7 @@
 
 #: src/gnome/window-main.c:903
 msgid "_Since Last Run..."
-msgstr "Depuis la dernière exécution"
+msgstr "Depui_s la dernière exécution..."
 
 #: src/gnome/window-main.c:904
 msgid "Create Scheduled Transactions since the last time run."
@@ -6465,7 +6493,7 @@
 
 #: src/gnome/window-main.c:911
 msgid "_Mortgage & Loan Repayment..."
-msgstr "Remboursement Hypothèque/Prêt"
+msgstr "Rembourse_ment Hypothèque/Prêt..."
 
 #: src/gnome/window-main.c:912
 msgid "Setup scheduled transactions for repayment of a loan"
@@ -6492,7 +6520,7 @@
 
 #: src/gnome/window-main.c:962
 msgid "Find transactions with a search"
-msgstr "Trouver des transactions avec une recherche."
+msgstr "Trouver des transactions avec une recherche"
 
 #: src/gnome/window-main.c:982
 msgid "_Tips Of The Day"
@@ -6506,7 +6534,7 @@
 # messages-i18n.c:107
 #: src/gnome/window-main.c:1032
 msgid "Save the file to disk"
-msgstr "Enregistrer le fichier sur le disque."
+msgstr "Enregistrer le fichier sur le disque"
 
 # messages-i18n.c:105
 #: src/gnome/window-main.c:1042
@@ -6521,7 +6549,7 @@
 # messages-i18n.c:83
 #: src/gnome/window-main.c:1065
 msgid "Exit GnuCash"
-msgstr "Quitter GnuCash."
+msgstr "Quitter GnuCash"
 
 # messages-i18n.c:227
 #: src/gnome/window-reconcile.c:425
@@ -6531,7 +6559,7 @@
 # messages-i18n.c:227
 #: src/gnome/window-reconcile.c:428
 msgid "Interest Charge"
-msgstr ""
+msgstr "Coût des Intérêts"
 
 # po/guile_strings.txt:186
 #: src/gnome/window-reconcile.c:446
@@ -6656,12 +6684,12 @@
 # messages-i18n.c:96
 #: src/gnome/window-reconcile.c:1256 src/gnome/window-reconcile.c:1447
 msgid "Open the account"
-msgstr "Ouvrir le compte."
+msgstr "Ouvrir le compte"
 
 # messages-i18n.c:81
 #: src/gnome/window-reconcile.c:1263
 msgid "Edit the main account for this register"
-msgstr "Éditer le compte principal pour ce registre."
+msgstr "Éditer le compte principal pour ce registre"
 
 # messages-i18n.c:145
 #: src/gnome/window-reconcile.c:1293 src/gnome/window-reconcile.c:1365
@@ -6689,7 +6717,7 @@
 # messages-i18n.c:85
 #: src/gnome/window-reconcile.c:1319
 msgid "Open the GnuCash help window"
-msgstr "Ouvrir la fenêtre d'aide de GnuCash."
+msgstr "Ouvrir la fenêtre d'aide de GnuCash"
 
 # messages-i18n.c:151
 #: src/gnome/window-reconcile.c:1329
@@ -6699,7 +6727,7 @@
 # messages-i18n.c:162
 #: src/gnome/window-reconcile.c:1331
 msgid "_Transaction"
-msgstr "_Transaction"
+msgstr ""
 
 # messages-i18n.c:182
 #: src/gnome/window-reconcile.c:1455
@@ -6793,7 +6821,7 @@
 # messages-i18n.c:231
 #: src/gnome/gnc-split-reg.c:740
 msgid "<No information>"
-msgstr "<Pas d'information>"
+msgstr ""
 
 # messages-i18n.c:54
 #: src/gnome/gnc-split-reg.c:887
@@ -6847,7 +6875,7 @@
 msgid ""
 "This is the split anchoring this transaction to the register. You may not "
 "delete it from this register window."
-msgstr ""
+msgstr "C'est la division ancrant cette transaction au registre. Vous ne pouvez pas la détruire de cette fenêtre de registre."
 
 # messages-i18n.c:305 src/gnome/print-session.c:108
 # src/gnome/print-session.c:197
@@ -6876,12 +6904,12 @@
 # messages-i18n.c:348 po/guile_strings.txt:57
 #: src/gnome/gnc-split-reg.c:1851
 msgid "Present:"
-msgstr "Valeur actuelle"
+msgstr "Valeur actuelle :"
 
 # messages-i18n.c:348 po/guile_strings.txt:57
 #: src/gnome/gnc-split-reg.c:1852
 msgid "Future:"
-msgstr "Valeur future"
+msgstr "Valeur future :"
 
 # messages-i18n.c:260
 #: src/gnome/gnc-split-reg.c:1853
@@ -6895,17 +6923,17 @@
 
 #: src/gnome/gnc-split-reg.c:1855
 msgid "Projected Minimum:"
-msgstr ""
+msgstr "Minimum Projeté :"
 
 # po/guile_strings.txt:266
 #: src/gnome/gnc-split-reg.c:1859
 msgid "Shares:"
-msgstr "Titres"
+msgstr "Titres:"
 
 # messages-i18n.c:348 po/guile_strings.txt:57
 #: src/gnome/gnc-split-reg.c:1860
 msgid "Current Value:"
-msgstr "Valeur actuelle"
+msgstr "Valeur actuelle:"
 
 #: src/gnome/gnc-split-reg.c:2088
 msgid ""
@@ -6935,7 +6963,7 @@
 
 #: src/gnome/gnc-split-reg.c:2269
 msgid "View"
-msgstr ""
+msgstr "Voir"
 
 # messages-i18n.c:21
 #: src/gnome-search/dialog-search.c:127
@@ -6971,12 +6999,12 @@
 # po/guile_strings.txt:25
 #: src/gnome-search/dialog-search.c:903
 msgid "item"
-msgstr "item"
+msgstr ""
 
 # po/guile_strings.txt:48
 #: src/gnome-search/search-account.c:166
 msgid "You have not selected any accounts"
-msgstr "Vous n'avez pas sélectionné de compte."
+msgstr "Vous n'avez pas sélectionné de compte"
 
 # messages-i18n.c:186
 #: src/gnome-search/search-account.c:209
@@ -7169,7 +7197,7 @@
 
 #: src/gnome-search/search.glade.h:4
 msgid "Choose whether to search all your data or only that marked as \"active\""
-msgstr ""
+msgstr "Choisissez si vous voulez chercher toute vos données ou juste celle marquée « actives »"
 
 # messages-i18n.c:77
 #: src/gnome-search/search.glade.h:5
@@ -7179,7 +7207,7 @@
 # messages-i18n.c:303
 #: src/gnome-search/search.glade.h:7
 msgid "New Item...."
-msgstr "Nouvel item..."
+msgstr "Nouvel item...."
 
 #: src/gnome-search/search.glade.h:8
 msgid "New search"
@@ -7191,7 +7219,7 @@
 
 #: src/gnome-search/search.glade.h:10
 msgid "Search Criteria"
-msgstr "Critère de recherche :"
+msgstr "Critère de recherche"
 
 #: src/gnome-search/search.glade.h:11
 msgid "Search for items where"
@@ -7242,7 +7270,7 @@
 
 #: src/gnome-utils/commodity.glade.h:1
 msgid "1 /"
-msgstr "1 /"
+msgstr ""
 
 #: src/gnome-utils/commodity.glade.h:2
 msgid "CUSIP or other code:"
@@ -7287,7 +7315,7 @@
 msgstr ""
 "Entrer le type de produit. Pour les actions, c'est souvent un marché sur "
 "lequel l'action est gérée.Vous pouvez choisir un type existant de la liste "
-"ou saisir un nouveau type au clavier"
+"ou saisir un nouveau type au clavier."
 
 #: src/gnome-utils/commodity.glade.h:9
 msgid "Fraction traded:"
@@ -7310,7 +7338,7 @@
 # messages-i18n.c:238
 #: src/gnome-utils/commodity.glade.h:14
 msgid "Select user information here..."
-msgstr ""
+msgstr "Sélectionnez les informations utilisateur ici..."
 
 #: src/gnome-utils/commodity.glade.h:15
 msgid "Symbol/abbreviation:"
@@ -7356,7 +7384,7 @@
 "To create a new one, click \"New\""
 msgstr ""
 "Vous devez sélectionner un produit.\n"
-"Pour en créer un nouveau, cliquez sur « Nouveau »."
+"Pour en créer un nouveau, cliquez sur « Nouveau »"
 
 #: src/gnome-utils/dialog-commodity.c:742
 msgid "You may not create a new national currency."
@@ -7364,7 +7392,7 @@
 
 #: src/gnome-utils/dialog-commodity.c:756
 msgid "That commodity already exists."
-msgstr "Le produit existe déjà"
+msgstr "Le produit existe déjà."
 
 #: src/gnome-utils/dialog-commodity.c:789
 msgid ""
@@ -7469,12 +7497,12 @@
 "the opening balances equity account."
 msgstr ""
 "Vous devez sélectionner un compte de transfert ou choisir\n"
-"le solde initial du compte de capitaux propres"
+"le solde initial du compte de capitaux propres."
 
 # messages-i18n.c:193
 #: src/gnome-utils/dialog-account.c:1558
 msgid "New top level account"
-msgstr "Nouveau compte de niveau supérieur/de base."
+msgstr "Nouveau compte de niveau supérieur/de base"
 
 # messages-i18n.c:178
 #: src/gnome-utils/dialog-account.c:1680
@@ -7498,7 +7526,7 @@
 #. PRESENT
 #: src/gnome-utils/gnc-account-tree.c:93 src/gnome-utils/gnc-account-tree.c:94
 msgid "Present"
-msgstr ""
+msgstr "Présent"
 
 # messages-i18n.c:249 po/guile_strings.txt:12
 #. BALANCE
@@ -7514,7 +7542,7 @@
 #: src/gnome-utils/gnc-account-tree.c:101
 #: src/gnome-utils/gnc-account-tree.c:102
 msgid "Future Minimum"
-msgstr "Munimum futur"
+msgstr "Minimum futur"
 
 # messages-i18n.c:344
 #. TOTAL
@@ -7526,7 +7554,7 @@
 #: intl-scm/guile-strings.c:3339 intl-scm/guile-strings.c:3343
 #: intl-scm/guile-strings.c:3363 intl-scm/guile-strings.c:3417
 msgid "Total"
-msgstr "Total"
+msgstr ""
 
 # messages-i18n.c:231
 #. TAX_INFO
@@ -7571,7 +7599,7 @@
 #. src/report/stylesheets/stylesheet-fancy.scm
 #: src/gnome-utils/gnc-dense-cal.c:276 intl-scm/guile-strings.c:1231
 msgid "Date: "
-msgstr "Date :"
+msgstr "Date : "
 
 # messages-i18n.c:305 src/gnome/print-session.c:108
 # src/gnome/print-session.c:197
@@ -7643,7 +7671,7 @@
 # messages-i18n.c:98
 #: src/gnome-utils/gnc-mdi-utils.c:483
 msgid "<no file>"
-msgstr "<Pas de fichier>"
+msgstr ""
 
 #: src/gnome-utils/print-session.c:89
 msgid "Print GnuCash Document"
@@ -7668,7 +7696,7 @@
 #: src/gnome-utils/window-help.c:619
 #: src/report/report-gnome/window-report.c:815
 msgid "Move back one step in the history"
-msgstr "Reculer d'un pas dans l'historique."
+msgstr "Reculer d'un pas dans l'historique"
 
 # messages-i18n.c:289
 #: src/gnome-utils/window-help.c:627
@@ -7680,7 +7708,7 @@
 #: src/gnome-utils/window-help.c:628
 #: src/report/report-gnome/window-report.c:824
 msgid "Move forward one step in the history"
-msgstr "Avancer d'un pas dans l'historique."
+msgstr "Avancer d'un pas dans l'historique"
 
 # messages-i18n.c:323
 #: src/gnome-utils/window-help.c:637
@@ -7696,14 +7724,14 @@
 # messages-i18n.c:96
 #: src/gnome-utils/window-help.c:647
 msgid "Open a new document"
-msgstr "Ouvrir un nouveau document."
+msgstr "Ouvrir un nouveau document"
 
 # messages-i18n.c:338 po/guile_strings.txt:298
 # src/gnome/glade-gnc-dialogs.c:635
 #: src/gnome-utils/window-help.c:655
 #: src/report/report-gnome/window-report.c:841
 msgid "Stop"
-msgstr "Stop"
+msgstr ""
 
 #: src/gnome-utils/window-help.c:656
 #: src/report/report-gnome/window-report.c:842
@@ -7722,7 +7750,7 @@
 
 #: src/gnome-utils/transfer.glade.h:1
 msgid " "
-msgstr " "
+msgstr ""
 
 # messages-i18n.c:266 po/guile_strings.txt:112
 # src/gnome/glade-gnc-dialogs.c:641
@@ -7823,7 +7851,7 @@
 # messages-i18n.c:21
 #: src/gnome-utils/dialog-transfer.c:1361
 msgid "You must enter an amount to transfer."
-msgstr "Vous devez entrer une quantité à transférer"
+msgstr "Vous devez entrer une quantité à transférer."
 
 # messages-i18n.c:13
 #: src/gnome-utils/dialog-transfer.c:1375
@@ -7934,7 +7962,7 @@
 #: src/import-export/binary-import/druid-commodity.c:425
 #: src/import-export/qif-import/druid-qif-import.c:1415
 msgid "You must enter an existing national currency or enter a different type."
-msgstr "Vous devez entrer une monnaie existante ou un type différent"
+msgstr "Vous devez entrer une monnaie existante ou un type différent."
 
 #: src/import-export/generic-import.glade.h:1
 msgid ""
@@ -7953,8 +7981,8 @@
 msgstr ""
 "-Les transaction en ROUGE nécessitent votre intervention sinon elle ne seront PAS importées.\n"
 "-Les transaction en JAUNE nécessitent probablement votre intervention sinon elle seront importées mais leurs répartitions ne seront PAS balancées.\n"
-"-Les transactions en VERT seront impartée avec des répartitions balancées (vous devriez probablement "
-"vérifier que la transaction corespondante ou le compte de destination sont corrects).\n"
+"-Les transactions en VERT seront importée avec des répartitions balancées (vous devriez probablement "
+"vérifier que la transaction correspondante ou le compte de destination sont corrects).\n"
 "\n"
 "-Sélectionnez \"A\" pour Ajouter comme nouvelle transaction\n"
 "-Sélectionnez \"R\" pour Réconcilier une transactioncorrespondante\n"
@@ -7964,7 +7992,7 @@
 
 #: src/import-export/generic-import.glade.h:9
 msgid "A"
-msgstr "A"
+msgstr ""
 
 # messages-i18n.c:236 po/guile_strings.txt:56
 #: src/import-export/generic-import.glade.h:11
@@ -7997,6 +8025,12 @@
 "duplicates are matched with the right existing transaction, \n"
 "click \"Ok\"."
 msgstr ""
+"Pour une nouvelle transaction, cliquez sur « Autre Compte » "
+"pour choisir le compte destinataire de cette transaction.\n"
+"Pour une transaction doublon d'une  précédent, cliquee sur « Autre Compte » ou « Description » pour vérifier si GnuCash choisit la bonne transaction. \n"
+"Pour changer l'état de la transaction cliquer sur la boîte à cocher dans la coulonne « Nouveau ».\n"
+"Quand toutes les nouvelles transactions ont le compte de destination adéquat, et que les doublons correspondent à leur transaction, \n"
+"cliquer sur « OK »."
 
 #: src/import-export/generic-import.glade.h:24
 msgid "Generic import transaction matcher"
@@ -8017,7 +8051,7 @@
 
 #: src/import-export/generic-import.glade.h:31
 msgid "Online account ID here..."
-msgstr ""
+msgstr "Id. du compte en ligne ici..."
 
 # messages-i18n.c:194
 #. src/report/standard-reports/transaction.scm
@@ -8033,11 +8067,11 @@
 # messages-i18n.c:82
 #: src/import-export/generic-import.glade.h:34
 msgid "Potential splits matching the selected transaction: "
-msgstr "Duplicatas potentiels pour la transactions sélectionnée:"
+msgstr "Duplicatas potentiels pour la transaction sélectionnée : "
 
 #: src/import-export/generic-import.glade.h:35
 msgid "R"
-msgstr "R"
+msgstr ""
 
 # src/gnome/glade-gnc-dialogs.c:506
 #: src/import-export/generic-import.glade.h:37
@@ -8051,7 +8085,7 @@
 
 #: src/import-export/hbci/glade/hbci.glade.h:3
 msgid "(filled in automatically)"
-msgstr ""
+msgstr "(rempli automatiquement)"
 
 #: src/import-export/hbci/glade/hbci.glade.h:4
 msgid "10010010"
@@ -8064,7 +8098,7 @@
 # po/guile_strings.txt:39
 #: src/import-export/hbci/glade/hbci.glade.h:6
 msgid "Account list will be updated"
-msgstr ""
+msgstr "La liste de compte sera mise à jour"
 
 # messages-i18n.c:250 po/guile_strings.txt:94
 # src/gnome/glade-gnc-dialogs.c:620
@@ -8073,12 +8107,16 @@
 "Add \n"
 "Bank"
 msgstr ""
+"Ajouter \n"
+"Banque"
 
 #: src/import-export/hbci/glade/hbci.glade.h:9
 msgid ""
 "Add \n"
 "User"
 msgstr ""
+"Ajouter \n"
+"Utilisateur"
 
 # messages-i18n.c:250 po/guile_strings.txt:94
 # src/gnome/glade-gnc-dialogs.c:620
@@ -8089,54 +8127,54 @@
 # messages-i18n.c:164
 #: src/import-export/hbci/glade/hbci.glade.h:14
 msgid "Bank Code:"
-msgstr "Code bancaire:"
+msgstr "Code bancaire :"
 
 # messages-i18n.c:231
 #: src/import-export/hbci/glade/hbci.glade.h:15
 msgid "Bank Identification"
-msgstr ""
+msgstr "Identification Bancaire"
 
 #: src/import-export/hbci/glade/hbci.glade.h:16
 msgid "Choose OpenHBCI Configuration File"
-msgstr ""
+msgstr "Choisissez le fichier de configuration OpenHBCI"
 
 #: src/import-export/hbci/glade/hbci.glade.h:17
 msgid "Choose a HBCI Version to use with the selected bank:"
-msgstr ""
+msgstr "Choisissez la version HBCI à utiliser avec la banque sélectionnée :"
 
 #: src/import-export/hbci/glade/hbci.glade.h:18
 msgid "Choose file for secret key"
-msgstr ""
+msgstr "Choisissez le fichier pour la clé secrète"
 
 #: src/import-export/hbci/glade/hbci.glade.h:19
 msgid "Click \"Next\" when all desired accounts are matching."
-msgstr ""
+msgstr "Cliquez sur « Suivant » quand tous les comptes souhaités correspondent."
 
 #: src/import-export/hbci/glade/hbci.glade.h:20
 msgid "Close when finished"
-msgstr ""
+msgstr "Fermez quand vous aurez terminé"
 
 #: src/import-export/hbci/glade/hbci.glade.h:21
 msgid "Configuration File"
-msgstr ""
+msgstr "Fichier de configuration"
 
 #: src/import-export/hbci/glade/hbci.glade.h:22
 msgid "Country Code (Germany: 280)"
-msgstr ""
+msgstr "Code du pays (Allemagne 280)"
 
 # messages-i18n.c:199
 #: src/import-export/hbci/glade/hbci.glade.h:23
 msgid "Current Action"
-msgstr ""
+msgstr "Action courante"
 
 # messages-i18n.c:199
 #: src/import-export/hbci/glade/hbci.glade.h:24
 msgid "Current Job"
-msgstr ""
+msgstr "Tâche courante"
 
 #: src/import-export/hbci/glade/hbci.glade.h:25
 msgid "Customer ID (\"Kundennummer\")"
-msgstr ""
+msgstr "Id. client (\"Kundennummer\")"
 
 #: src/import-export/hbci/glade/hbci.glade.h:26
 msgid "DDV Medium (Chip Card)"
@@ -8144,53 +8182,53 @@
 
 #: src/import-export/hbci/glade/hbci.glade.h:27
 msgid "Date range of transactions to retrieve:"
-msgstr ""
+msgstr "Plage des dates des transacrions à chercher :"
 
 #: src/import-export/hbci/glade/hbci.glade.h:28
 msgid "Do these values match the values on your paper Ini-Letter?"
-msgstr ""
+msgstr "Ces valeurs correspondent-ellles au contenu de votre papier Ini-Letter ?"
 
 #: src/import-export/hbci/glade/hbci.glade.h:29
 msgid "Earliest possible date"
-msgstr ""
+msgstr "Date possible au plus tôt"
 
 # messages-i18n.c:231
 #: src/import-export/hbci/glade/hbci.glade.h:30
 msgid "Enter Bank Information"
-msgstr ""
+msgstr "Entrez les informatiosn bancaires"
 
 #: src/import-export/hbci/glade/hbci.glade.h:31
 msgid "Enter OpenHBCI Configuration File"
-msgstr ""
+msgstr "Entrez le fichier de Configuration HBCI"
 
 # messages-i18n.c:231
 #: src/import-export/hbci/glade/hbci.glade.h:32
 msgid "Enter User Information"
-msgstr ""
+msgstr "Entrez les informations de l'utilisateur"
 
 # messages-i18n.c:57
 #: src/import-export/hbci/glade/hbci.glade.h:33
 msgid "Enter an Online Transaction"
-msgstr ""
+msgstr "Entrez une transaction en Ligne"
 
 # messages-i18n.c:180
 #: src/import-export/hbci/glade/hbci.glade.h:34
 msgid "Enter date:"
-msgstr ""
+msgstr "Entrer la date :"
 
 #: src/import-export/hbci/glade/hbci.glade.h:35
 msgid ""
 "Enter the IDs given from your bank here. Please make sure the spelling is "
 "correct. "
-msgstr ""
+msgstr "Entrez les id. donnés par votre banque. Assurez-vous de la correction de votre saisie. "
 
 #: src/import-export/hbci/glade/hbci.glade.h:36
 msgid "Execute Later (unimpl.)"
-msgstr ""
+msgstr "À exécuter plus tard (pasfait)"
 
 #: src/import-export/hbci/glade/hbci.glade.h:37
 msgid "Execute Now"
-msgstr ""
+msgstr "Exécuter Maintenant"
 
 # messages-i18n.c:290 po/guile_strings.txt:106
 #. src/report/standard-reports/price-scatter.scm
@@ -8220,24 +8258,26 @@
 "HBCI\n"
 "Version"
 msgstr ""
+"Version \n"
+"HBCI"
 
 #: src/import-export/hbci/glade/hbci.glade.h:43
 msgid "HBCI Connection Window"
-msgstr ""
+msgstr "Fenêtre de Connexion HBCI"
 
 #: src/import-export/hbci/glade/hbci.glade.h:44
 msgid "HBCI Setup Finished"
-msgstr ""
+msgstr "Mise en place de HBCI terminée"
 
 # messages-i18n.c:346
 #: src/import-export/hbci/glade/hbci.glade.h:45
 msgid "HBCI Version"
-msgstr ""
+msgstr "Version HBCI"
 
 # src/gnome/glade-gnc-dialogs.c:333
 #: src/import-export/hbci/glade/hbci.glade.h:46
 msgid "HBCI account name"
-msgstr ""
+msgstr "nom de compte HBCI"
 
 #: src/import-export/hbci/glade/hbci.glade.h:47
 msgid ""
@@ -8248,6 +8288,9 @@
 "created there. Make\n"
 "sure to remember the exact User ID and Customer ID specified now."
 msgstr ""
+"Si vous avez déjà un fichier de clé, SVP choisissez-le et assurez-vous que les identifiants utilisateur et\n"
+"client correspondent à ceux de la création de la clé.\n"
+"Si vous n'en avez pas, donner un nom de fichier, et une clé sera créé là. Assurez-vous de vous rappeler les identifiants utilisateurs et client donnés maintenant."
 
 #: src/import-export/hbci/glade/hbci.glade.h:51
 msgid ""
@@ -8261,6 +8304,12 @@
 "HBCI \n"
 "Setup finishes."
 msgstr ""
+"Si vous avez déjà un fichier de configuration OpenHBCI (ex. de 'aqmoney'), \n"
+"utilisez le maintenant. GnuCash continuera à utiliser l'ancienne "
+"configuration.\n"
+"\n"
+"Si vous n'avez pas encore de un fichier de configuration OpenHBCI, indiquez un nom de fichier ici.\n"
+"Un nouveau  fichier de configuration OpenHBCI sera créé sous ce nom, quand la mise en place d'HBCI sera terminée."
 
 #: src/import-export/hbci/glade/hbci.glade.h:57
 msgid ""
@@ -8335,12 +8384,12 @@
 # po/guile_strings.txt:95
 #: src/import-export/hbci/glade/hbci.glade.h:86
 msgid "Name (optional)"
-msgstr ""
+msgstr "Nom (optionnel)"
 
 # messages-i18n.c:303
 #: src/import-export/hbci/glade/hbci.glade.h:89
 msgid "Now"
-msgstr ""
+msgstr "Maintenant"
 
 #: src/import-export/hbci/glade/hbci.glade.h:90
 msgid ""
@@ -8589,7 +8638,7 @@
 #. * import-export/hbci subdirectory in other countries.
 #: src/import-export/hbci/druid-hbci-initial.c:967
 msgid "Default Customer"
-msgstr ""
+msgstr "Client par défaut"
 
 #: src/import-export/hbci/druid-hbci-initial.c:1453
 msgid ""
@@ -9063,31 +9112,31 @@
 
 #: src/import-export/ofx/gnc-ofx-import.c:602
 msgid "Unknown OFX checking account"
-msgstr ""
+msgstr "Compte chèque OFX inconnu"
 
 #: src/import-export/ofx/gnc-ofx-import.c:606
 msgid "Unknown OFX savings account"
-msgstr ""
+msgstr "Compte d'épargne OFX inconnu"
 
 #: src/import-export/ofx/gnc-ofx-import.c:610
 msgid "Unknown OFX money market account"
-msgstr ""
+msgstr "Compte du marché des changes OFX inconnu"
 
 #: src/import-export/ofx/gnc-ofx-import.c:614
 msgid "Unknown OFX credit line account"
-msgstr ""
+msgstr "Compte de crédit OFX inconnu"
 
 #: src/import-export/ofx/gnc-ofx-import.c:618
 msgid "Unknown OFX CMA account"
-msgstr ""
+msgstr "Compte CMA inconnu"
 
 #: src/import-export/ofx/gnc-ofx-import.c:622
 msgid "Unknown OFX credit card account"
-msgstr ""
+msgstr "Compte de carte de crédit inconnu"
 
 #: src/import-export/ofx/gnc-ofx-import.c:626
 msgid "Unknown OFX investment account"
-msgstr ""
+msgstr "compte d'investissement OFX inconnu"
 
 # messages-i18n.c:123
 #: src/import-export/qif-import/dialog-account-picker.c:163
@@ -9142,11 +9191,11 @@
 "%s"
 msgstr ""
 "Le chargement du fichier QIF :\n"
-"%s a échoué."
+"%s a échoué"
 
 #: src/import-export/qif-import/druid-qif-import.c:571
 msgid "An error occurred while parsing the QIF file."
-msgstr "Une erreur est survenue lors de l'analyse du fichier QIF"
+msgstr "Une erreur est survenue lors de l'analyse du fichier QIF."
 
 # messages-i18n.c:44
 #: src/import-export/qif-import/druid-qif-import.c:582
@@ -9156,7 +9205,7 @@
 "%s"
 msgstr ""
 "Le traitement/analyse du fichier QIF :\n"
-"%s a échoué."
+"%s a échoué"
 
 # messages-i18n.c:21
 #: src/import-export/qif-import/druid-qif-import.c:823
@@ -9183,7 +9232,7 @@
 
 #: src/import-export/qif-import/druid-qif-import.c:1401
 msgid "You must enter a name for the commodity."
-msgstr "Vous devez entrer un nom pour le produit"
+msgstr "Vous devez entrer un nom pour le produit."
 
 #: src/import-export/qif-import/druid-qif-import.c:1406
 msgid "You must enter an abbreviation for the commodity."
@@ -9224,7 +9273,7 @@
 # messages-i18n.c:88
 #: src/import-export/qif-import/druid-qif-import.c:2052
 msgid "Import a Quicken QIF file"
-msgstr "Importer un fichier QIF de Quicken."
+msgstr "Importer un fichier QIF de Quicken"
 
 # messages-i18n.c:165 po/guile_strings.txt:7
 #: src/import-export/qif-import/qif.glade.h:2
@@ -9402,7 +9451,7 @@
 "dupliquées dans la section « Importer QIF » de la boite de dialogue des "
 "préférences de GnuCash\n"
 "\n"
-"Cliquer sur « Suivant » pour trouver les transactions dupliquées."
+"Cliquer sur « Suivant » pour trouver les transactions dupliquées. "
 
 # src/gnome/glade-gnc-dialogs.c:74
 #: src/import-export/qif-import/qif.glade.h:66
@@ -9588,7 +9637,7 @@
 "Par défaut, ces transactions sont assignées à un compte « Unspecified » dans "
 "GnuCash\n"
 "Si vous sélectionnez un autre compte, il sera mémorisé pour les prochains "
-"fichiers QIF."
+"fichiers QIF. "
 
 # messages-i18n.c:44
 #: src/import-export/qif-import/qif.glade.h:126
@@ -9694,7 +9743,7 @@
 
 #: src/import-export/import-backend.c:831
 msgid "Auto-Balance split"
-msgstr ""
+msgstr "Auto-répartition d'équilibre"
 
 #: src/import-export/import-commodity-matcher.c:118
 msgid ""
@@ -9708,31 +9757,31 @@
 
 #: src/import-export/import-main-matcher.c:263
 msgid "Destination account for the auto-balance split."
-msgstr ""
+msgstr "compte destinataire de la répartition d'équilibre automatique."
 
 #: src/import-export/import-main-matcher.c:609
 msgid "New, already balanced"
-msgstr ""
+msgstr "Nouveau, déjà équilibré"
 
 #. Translators: %1$s is the amount to be
 #. transferred. %2$s is the destination account.
 #: src/import-export/import-main-matcher.c:636
 #, c-format
 msgid "New, transfer %s to (manual) \"%s\""
-msgstr ""
+msgstr "Nouveau, transférer (manuellement) %s vers « %s »"
 
 #. Translators: %1$s is the amount to be
 #. transferred. %2$s is the destination account.
 #: src/import-export/import-main-matcher.c:644
 #, c-format
 msgid "New, transfer %s to (auto) \"%s\""
-msgstr ""
+msgstr "Nouveau, transférer (automatiquement) %s vers « %s »"
 
 #. Translators: %s is the amount to be transferred.
 #: src/import-export/import-main-matcher.c:656
 #, c-format
 msgid "New, UNBALANCED (need acct to transfer %s)!"
-msgstr ""
+msgstr "Nouveau, DÉSÉQUILIBRÉ (besoin d'un compte pour transférer %s) !"
 
 # messages-i18n.c:195
 #: src/import-export/import-main-matcher.c:670
@@ -9742,7 +9791,7 @@
 # messages-i18n.c:322
 #: src/import-export/import-main-matcher.c:675
 msgid "Reconcile (auto) match"
-msgstr "Réconcilier homologue (manuel)"
+msgstr "Réconcilier homologue (auto)"
 
 # messages-i18n.c:240
 #: src/import-export/import-main-matcher.c:683
@@ -9751,17 +9800,17 @@
 
 #: src/import-export/import-main-matcher.c:691
 msgid "Do not import (no action selected)"
-msgstr ""
+msgstr "Ne pas importer (pas d'action sélectionnée)"
 
 # messages-i18n.c:57
 #: src/register/ledger-core/split-register-control.c:61
 msgid "Rebalance Transaction"
-msgstr "Recalculer la transaction"
+msgstr "Rééquilibrer la transaction"
 
 # messages-i18n.c:82
 #: src/register/ledger-core/split-register-control.c:62
 msgid "The current transaction is not balanced."
-msgstr "La transaction courante n'est pas équilibrée"
+msgstr "La transaction courante n'est pas équilibrée."
 
 #: src/register/ledger-core/split-register-control.c:98
 msgid "Balance it manually"
@@ -9782,7 +9831,7 @@
 
 #: src/register/ledger-core/split-register-control.c:1059
 msgid "You need to expand the transaction in order to modify its exchange rates."
-msgstr ""
+msgstr "Vous devez étendre la transaction pour modifier ses cours d'échange."
 
 #: src/register/ledger-core/split-register-control.c:1523
 msgid ""
@@ -9851,7 +9900,7 @@
 #: src/register/ledger-core/split-register-model.c:295
 #, c-format
 msgid "Tot %s"
-msgstr "Tot %s"
+msgstr "Tot. %s"
 
 # messages-i18n.c:264 po/guile_strings.txt:211
 # src/gnome/glade-gnc-dialogs.c:629
@@ -9940,7 +9989,7 @@
 #: src/register/ledger-core/split-register-model.c:1178
 #: src/register/ledger-core/split-register-model.c:1245
 msgid "Enter the account to transfer from, or choose one from the list"
-msgstr "Précisez depuis quel compte transférer, ou choisissez en un dans la liste."
+msgstr "Précisez depuis quel compte transférer, ou choisissez en un dans la liste"
 
 # messages-i18n.c:91
 #: src/register/ledger-core/split-register-model.c:1255
@@ -9968,12 +10017,12 @@
 # messages-i18n.c:123
 #: src/register/ledger-core/split-register-model.c:1785
 msgid "Enter debit formula for real transaction"
-msgstr ""
+msgstr "Entrez la formule de débit d'une transaction réelle"
 
 # messages-i18n.c:123
 #: src/register/ledger-core/split-register-model.c:1819
 msgid "Enter credit formula for real transaction"
-msgstr ""
+msgstr "Entrez la formule de crébit d'une transaction réelle"
 
 # messages-i18n.c:47
 #: src/register/ledger-core/split-register.c:794
@@ -10128,7 +10177,7 @@
 #. Action: Dividend
 #: src/register/ledger-core/split-register.c:2053
 msgid "Div"
-msgstr "Div"
+msgstr ""
 
 # messages-i18n.c:301
 #. Action: Long Term Capital Gains
@@ -10146,7 +10195,7 @@
 #. Action: Distribution
 #: src/register/ledger-core/split-register.c:2061
 msgid "Dist"
-msgstr "Dist"
+msgstr ""
 
 # messages-i18n.c:338 po/guile_strings.txt:298
 # src/gnome/glade-gnc-dialogs.c:635
@@ -10158,13 +10207,13 @@
 #: src/register/register-gnome/gnucash-style.c:806
 #: intl-scm/guile-strings.c:660
 msgid "register-default-font:-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*"
-msgstr "register-default-font:-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*"
+msgstr ""
 
 #. src/app-utils/prefs.scm
 #: src/register/register-gnome/gnucash-style.c:812
 #: intl-scm/guile-strings.c:668
 msgid "register-hint-font:-adobe-helvetica-medium-o-normal--*-120-*-*-*-*-*-*"
-msgstr "register-hint-font:-adobe-helvetica-medium-o-normal--*-120-*-*-*-*-*-*"
+msgstr ""
 
 # src/gnome/glade-gnc-dialogs.c:1460
 #: src/report/report-gnome/dialog-column-view.c:274
@@ -10190,11 +10239,11 @@
 # messages-i18n.c:261
 #: src/report/report-gnome/report.glade.h:5
 msgid "Cols"
-msgstr "Cols"
+msgstr ""
 
 #: src/report/report-gnome/report.glade.h:6
 msgid "Column span:"
-msgstr "Affichage sur deux colonnes"
+msgstr "Affichage sur deux colonnes :"
 
 #: src/report/report-gnome/report.glade.h:8
 msgid "Enter report row/column span"
@@ -10260,7 +10309,7 @@
 #: src/report/report-gnome/window-report.c:370
 #: src/report/report-gnome/window-report.c:406
 msgid "HTML"
-msgstr "HTML"
+msgstr ""
 
 # src/gnome/glade-gnc-dialogs.c:1178
 #: src/report/report-gnome/window-report.c:373
@@ -10291,7 +10340,7 @@
 
 #: src/report/report-gnome/window-report.c:440
 msgid "You cannot save to that file."
-msgstr "Impossible d'enregistrer dans ce fichier"
+msgstr "Impossible d'enregistrer dans ce fichier."
 
 # messages-i18n.c:35
 #: src/report/report-gnome/window-report.c:503
@@ -10309,7 +10358,7 @@
 # messages-i18n.c:124
 #: src/report/report-gnome/window-report.c:522
 msgid "There are no options for this report."
-msgstr "Il n'y a pas d'options pour ce rapport"
+msgstr "Il n'y a pas d'options pour ce rapport."
 
 # messages-i18n.c:105
 #: src/report/report-gnome/window-report.c:833
@@ -10495,7 +10544,7 @@
 "la colonne de transfert du registre, et GnuCash complétera  le nom\n"
 "à partir de votre liste de comptes. Pour les sous-comptes, tapez la\n"
 "/les première(s) lettre(s) du compte parent, suivie(s) par ':' et la/les\n"
-"première(s) lettre(s) du sous-compte (par exemple A:E pour Avoirs:Espèces)."
+"première(s) lettre(s) du sous-compte (par exemple A:E pour Avoirs:Espèces)"
 
 #. src/scm/tip-list.scm
 #: intl-scm/guile-strings.c:53
@@ -10590,7 +10639,7 @@
 msgstr ""
 "L'équipe de développement de GnuCash est facile à contacter. En plus\n"
 "des listes de diffusion vous pouvez discuter avec eux en direct sur\n"
-"IRC. Connectez à sur #gnucash sur irc.gnome.org."
+"IRC. Connectez à sur #gnucash sur irc.gnome.org"
 
 #. src/scm/tip-list.scm
 #: intl-scm/guile-strings.c:87
@@ -10754,7 +10803,7 @@
 #. src/scm/main.scm
 #: intl-scm/guile-strings.c:190
 msgid "Loading modules... "
-msgstr "Chargement des modules..."
+msgstr "Chargement des modules... "
 
 #. src/scm/main.scm
 #: intl-scm/guile-strings.c:192
@@ -10780,7 +10829,7 @@
 #. src/scm/main.scm
 #: intl-scm/guile-strings.c:200
 msgid "Edit report style sheets."
-msgstr "Éditer Feuille de style du rapport"
+msgstr "Éditer Feuille de style du rapport."
 
 #. src/scm/main.scm
 #: intl-scm/guile-strings.c:202
@@ -10800,34 +10849,34 @@
 #. src/scm/command-line.scm
 #: intl-scm/guile-strings.c:208
 msgid "Show version."
-msgstr "Voir version"
+msgstr "Voir version."
 
 #. src/scm/command-line.scm
 #: intl-scm/guile-strings.c:210 intl-scm/guile-strings.c:212
 msgid "Generate an argument summary."
-msgstr "Générer un sommaire"
+msgstr "Générer un sommaire."
 
 #. src/scm/command-line.scm
 #: intl-scm/guile-strings.c:214
 msgid "Don't load any file, including autoloading the last file."
 msgstr ""
 "Ne charger aucun fichier, y compris le chargement automatique du dernier "
-"fichier"
+"fichier."
 
 #. src/scm/command-line.scm
 #: intl-scm/guile-strings.c:216
 msgid "Enable debugging code."
-msgstr "Activer le débogage"
+msgstr "Activer le débogage."
 
 #. src/scm/command-line.scm
 #: intl-scm/guile-strings.c:218
 msgid "Enable developers mode."
-msgstr "Passer en mode débogage"
+msgstr "Passer en mode débogage."
 
 #. src/scm/command-line.scm
 #: intl-scm/guile-strings.c:220
 msgid "Logging level from 0 (least logging) to 5 (most logging)."
-msgstr "Niveau de traces de 0 (minimum) à 5 (maximum)"
+msgstr "Niveau de traces de 0 (minimum) à 5 (maximum)."
 
 #. src/scm/command-line.scm
 #: intl-scm/guile-strings.c:222
@@ -10839,7 +10888,7 @@
 "Une liste de répertoires à parcourir pour trouver les fichiers de "
 "configuration. Chaque élément doit être une chaîne de caractères "
 "représentant un répertoire ou un lien. « Défaut » se réfère au chemin par "
-"défaut et « courant » se réfère à la valeur courante du chemin"
+"défaut et « courant » se réfère à la valeur courante du chemin."
 
 #. src/scm/command-line.scm
 #: intl-scm/guile-strings.c:224
@@ -10852,7 +10901,7 @@
 "Une liste de répertoires à parcourir pour trouver les fichiers de données "
 "partagées. Chaque élément doit être une chaîne de caractères représentant un "
 "répertoire ou un lien. « Défaut » se réfère au chemin par défaut et "
-"« courant » se réfère à la valeur courante du chemin"
+"« courant » se réfère à la valeur courante du chemin."
 
 #. src/scm/command-line.scm
 #: intl-scm/guile-strings.c:226
@@ -10865,7 +10914,7 @@
 "Une liste de répertoires (chaînes de caractères) indiquant où chercher les "
 "fichiers HTML. Chaque élément doit être une chaîne de caractères "
 "représentant un répertoire ou un lien. « Défaut » se réfère au chemin par "
-"défaut et « courant » se réfère à la valeur courante du chemin"
+"défaut et « courant » se réfère à la valeur courante du chemin."
 
 #. src/scm/command-line.scm
 #: intl-scm/guile-strings.c:228
@@ -10931,7 +10980,7 @@
 #. src/scm/command-line.scm
 #: intl-scm/guile-strings.c:252
 msgid "Add price quotes to given FILE."
-msgstr "Ajouter le cours de l'action au fichier"
+msgstr "Ajouter le cours de l'action au fichier."
 
 #. src/scm/command-line.scm
 #: intl-scm/guile-strings.c:254
@@ -10946,7 +10995,7 @@
 #. src/scm/command-line.scm
 #: intl-scm/guile-strings.c:258
 msgid "Run the RPC Server if GnuCash was configured with --enable-rpc"
-msgstr ""
+msgstr "Lancer le serveur RPC si gnucash était configuré avec --enable-rpc"
 
 #. src/scm/price-quotes.scm
 #: intl-scm/guile-strings.c:260 intl-scm/guile-strings.c:262
@@ -10995,7 +11044,7 @@
 #. src/scm/price-quotes.scm
 #: intl-scm/guile-strings.c:294
 msgid "Continuing with good quotes."
-msgstr "Continuation avec les bonnes cotations"
+msgstr "Continuation avec les bonnes cotations."
 
 #. src/scm/price-quotes.scm
 #: intl-scm/guile-strings.c:296 intl-scm/guile-strings.c:300
@@ -11065,7 +11114,7 @@
 #. src/scm/help-topics-index.scm
 #: intl-scm/guile-strings.c:330 intl-scm/guile-strings.c:342
 msgid "Menus"
-msgstr "Menus"
+msgstr ""
 
 # po/guile_strings.txt:135
 #. src/scm/help-topics-index.scm
@@ -11153,7 +11202,7 @@
 #. src/scm/help-topics-index.scm
 #: intl-scm/guile-strings.c:380
 msgid "To Create a Chart of Accounts"
-msgstr ""
+msgstr "Pour créer un tableau de comptes"
 
 # messages-i18n.c:92
 #. src/scm/help-topics-index.scm
@@ -11171,7 +11220,7 @@
 #. src/scm/help-topics-index.scm
 #: intl-scm/guile-strings.c:390
 msgid "To Edit a Chart of Accounts"
-msgstr ""
+msgstr "Pour éditer un tableau de compte"
 
 # messages-i18n.c:136
 #. src/scm/help-topics-index.scm
@@ -11395,7 +11444,7 @@
 #: intl-scm/guile-strings.c:594 intl-scm/guile-strings.c:600
 #: intl-scm/guile-strings.c:606 intl-scm/guile-strings.c:612
 msgid "International"
-msgstr "International"
+msgstr ""
 
 # po/guile_strings.txt:83
 #. src/scm/help-topics-index.scm
@@ -11445,7 +11494,7 @@
 #. src/scm/help-topics-index.scm
 #: intl-scm/guile-strings.c:492 intl-scm/guile-strings.c:1235
 msgid "Technicolor"
-msgstr "Technicolor"
+msgstr ""
 
 # messages-i18n.c:261
 #. src/scm/help-topics-index.scm
@@ -11470,7 +11519,7 @@
 #: intl-scm/guile-strings.c:1203 intl-scm/guile-strings.c:1207
 #: intl-scm/guile-strings.c:1211
 msgid "Images"
-msgstr "Images"
+msgstr ""
 
 # po/guile_strings.txt:1
 #. src/scm/help-topics-index.scm
@@ -11617,7 +11666,7 @@
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:610
 msgid "Use a 24 hour (instead of a 12 hour) time format."
-msgstr "Utiliser un format de date sur 24 heures (à la place de celui sur 12 heures)"
+msgstr "Utiliser un format de date sur 24 heures (à la place de celui sur 12 heures)."
 
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:614
@@ -11853,7 +11902,7 @@
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:733
 msgid "Check off cleared transactions"
-msgstr "Cocher les transactions pointées."
+msgstr "Cocher les transactions pointées"
 
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:735
@@ -12009,7 +12058,7 @@
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:795
 msgid "Reverse Income and Expense Accounts"
-msgstr "Inverser les comptes de revenus et dépenses."
+msgstr "Inverser les comptes de revenus et dépenses"
 
 # po/guile_strings.txt:89
 #. src/app-utils/prefs.scm
@@ -12079,7 +12128,7 @@
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:833
 msgid "How many automatic decimal places will be filled in."
-msgstr "Combien d'emplacements décimaux seront entrés automatiquement"
+msgstr "Combien d'emplacements décimaux seront entrés automatiquement."
 
 # po/guile_strings.txt:275
 #. src/app-utils/prefs.scm
@@ -12156,7 +12205,7 @@
 msgid "Notify on new, auto-created Scheduled Transactions"
 msgstr ""
 "Avertir l'usager lors de la création automatique de nouvelles transactions "
-"récurrentes."
+"récurrentes"
 
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:875
@@ -12194,13 +12243,13 @@
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:891
 msgid "Template Register Lines"
-msgstr ""
+msgstr "Modèle de lignes de registres"
 
 # messages-i18n.c:87
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:893
 msgid "How many lines in the template register?"
-msgstr ""
+msgstr "Combien de lignes dans le registre modèle?"
 
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:895 intl-scm/guile-strings.c:901
@@ -12221,7 +12270,7 @@
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:899
 msgid "Save window sizes and positions."
-msgstr "Enregistrer les tailles et positions de la fenêtre"
+msgstr "Enregistrer les tailles et positions de la fenêtre."
 
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:903
@@ -12252,12 +12301,12 @@
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:911 intl-scm/guile-strings.c:1317
 msgid "Top-level"
-msgstr "Compte de niveau supérieur/base."
+msgstr "Compte de niveau supérieur/base"
 
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:913
 msgid "Create a new top-level window for each report or account tree"
-msgstr "Créer une fenêtre principale pour chaque rapport ou hiérarchie de compte."
+msgstr "Créer une fenêtre principale pour chaque rapport ou hiérarchie de compte"
 
 # messages-i18n.c:171
 #. src/app-utils/prefs.scm
@@ -12317,7 +12366,7 @@
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:939
 msgid "Automatically raise the list of accounts or actions during input."
-msgstr "Activer automatiquement la liste de comptes ou d'actions durant l'entrée"
+msgstr "Activer automatiquement la liste de comptes ou d'actions durant l'entrée."
 
 # po/guile_strings.txt:267
 #. src/app-utils/prefs.scm
@@ -12329,7 +12378,7 @@
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:945
 msgid "By default, show every transaction in an account."
-msgstr "Par défaut, montre toutes les transactions dans un compte"
+msgstr "Par défaut, montre toutes les transactions dans un compte."
 
 # po/guile_strings.txt:144
 #. src/app-utils/prefs.scm
@@ -12341,7 +12390,7 @@
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:951
 msgid "Default number of register rows to display."
-msgstr "Nombre de lignes du registre à afficher par défaut"
+msgstr "Nombre de lignes du registre à afficher par défaut."
 
 #. src/app-utils/prefs.scm
 #: intl-scm/guile-strings.c:955
@@ -12605,7 +12654,7 @@
 #. src/report/stylesheets/stylesheet-fancy.scm
 #: intl-scm/guile-strings.c:1075 intl-scm/guile-strings.c:1247
 msgid "Background tile for reports."
-msgstr "Couleur d'arrière-plan pour les rapports"
+msgstr "Couleur d'arrière-plan pour les rapports."
 
 # po/guile_strings.txt:212
 #. src/report/stylesheets/stylesheet-fancy.scm
@@ -12616,17 +12665,17 @@
 #. src/report/stylesheets/stylesheet-fancy.scm
 #: intl-scm/guile-strings.c:1081
 msgid "Banner for top of report."
-msgstr "En-tête pour le début du rapport"
+msgstr "En-tête pour le début du rapport."
 
 #. src/report/stylesheets/stylesheet-fancy.scm
 #: intl-scm/guile-strings.c:1085 intl-scm/guile-strings.c:1213
 msgid "Logo"
-msgstr "Logo"
+msgstr ""
 
 #. src/report/stylesheets/stylesheet-fancy.scm
 #: intl-scm/guile-strings.c:1087
 msgid "Company logo image."
-msgstr "Logo de l'organisation/entreprise"
+msgstr "Logo de l'organisation/entreprise."
 
 # po/guile_strings.txt:70
 #. src/report/stylesheets/stylesheet-fancy.scm
@@ -12639,7 +12688,7 @@
 #. src/report/stylesheets/stylesheet-fancy.scm
 #: intl-scm/guile-strings.c:1093
 msgid "General background color for report."
-msgstr "Couleur de fond pour le rapport"
+msgstr "Couleur de fond pour le rapport."
 
 # po/guile_strings.txt:134
 #. src/report/stylesheets/stylesheet-fancy.scm
@@ -12651,7 +12700,7 @@
 #. src/report/stylesheets/stylesheet-fancy.scm
 #: intl-scm/guile-strings.c:1099
 msgid "Normal body text color."
-msgstr "Couleur du texte normal"
+msgstr "Couleur du texte normal."
 
 #. src/report/stylesheets/stylesheet-fancy.scm
 #: intl-scm/guile-strings.c:1103 intl-scm/guile-strings.c:1181
@@ -12661,7 +12710,7 @@
 #. src/report/stylesheets/stylesheet-fancy.scm
 #: intl-scm/guile-strings.c:1105
 msgid "Link text color."
-msgstr "Couleur du texte des liens hypertextes"
+msgstr "Couleur du texte des liens hypertextes."
 
 #. src/report/stylesheets/stylesheet-fancy.scm
 #: intl-scm/guile-strings.c:1109 intl-scm/guile-strings.c:1185
@@ -12672,7 +12721,7 @@
 #. src/report/stylesheets/stylesheet-fancy.scm
 #: intl-scm/guile-strings.c:1111
 msgid "Default background for table cells."
-msgstr "Couleur par défaut des cellules de tableau"
+msgstr "Couleur par défaut des cellules de tableau."
 
 #. src/report/stylesheets/stylesheet-fancy.scm
 #: intl-scm/guile-strings.c:1115 intl-scm/guile-strings.c:1189
@@ -12683,7 +12732,7 @@
 #. src/report/stylesheets/stylesheet-fancy.scm
 #: intl-scm/guile-strings.c:1117
 msgid "Default alternate background for table cells."
-msgstr "Autre couleur par défaut des cellules de tableau"
+msgstr "Autre couleur par défaut des cellules de tableau."
 
 #. src/report/stylesheets/stylesheet-fancy.scm
 #: intl-scm/guile-strings.c:1121 intl-scm/guile-strings.c:1193
@@ -12694,7 +12743,7 @@
 #. src/report/stylesheets/stylesheet-fancy.scm
 #: intl-scm/guile-strings.c:1123
 msgid "Default color for subtotal rows."
-msgstr "Couleur par défaut pour les lignes de sous-total"
+msgstr "Couleur par défaut pour les lignes de sous-total."
 
 #. src/report/stylesheets/stylesheet-fancy.scm
 #: intl-scm/guile-strings.c:1127 intl-scm/guile-strings.c:1197
@@ -12766,7 +12815,7 @@
 #. src/report/stylesheets/stylesheet-plain.scm
 #: intl-scm/guile-strings.c:1241
 msgid "Background color for reports."
-msgstr "Couleur d'arrière-plan"
+msgstr "Couleur d'arrière-plan."
 
 # po/guile_strings.txt:70
 #. src/report/stylesheets/stylesheet-plain.scm
@@ -12777,7 +12826,7 @@
 #. src/report/stylesheets/stylesheet-plain.scm
 #: intl-scm/guile-strings.c:1253
 msgid "Enable hyperlinks in reports."
-msgstr "Activer les liens hypertextes dans les rapports"
+msgstr "Activer les liens hypertextes dans les rapports."
 
 # po/guile_strings.txt:64
 #. src/report/stylesheets/stylesheet-plain.scm
@@ -12969,7 +13018,7 @@
 #. src/report/report-system/options-utilities.scm
 #: intl-scm/guile-strings.c:1361
 msgid "Choose the marker for each data point."
-msgstr "Choisir le marqueur pour chaque point de donnée"
+msgstr "Choisir le marqueur pour chaque point de donnée."
 
 # messages-i18n.c:350
 #. src/report/report-system/options-utilities.scm
@@ -13109,7 +13158,7 @@
 #. src/report/report-system/report.scm
 #: intl-scm/guile-strings.c:1423
 msgid "Select a stylesheet for the report."
-msgstr "Sélectionnez une feuille de style pour le rapport"
+msgstr "Sélectionnez une feuille de style pour le rapport."
 
 # messages-i18n.c:339
 #. src/report/report-system/report.scm
@@ -13231,7 +13280,7 @@
 #. src/report/report-system/html-utilities.scm
 #: intl-scm/guile-strings.c:1483
 msgid "This report requires accounts to be selected."
-msgstr "Ce rapport nécessite de sélectionner un compte"
+msgstr "Ce rapport nécessite de sélectionner un compte."
 
 # messages-i18n.c:344
 #. src/report/report-system/html-utilities.scm
@@ -13265,7 +13314,7 @@
 #: intl-scm/guile-strings.c:1501
 #, c-format
 msgid "Display the %s report"
-msgstr "Affiche le rapport %s ."
+msgstr "Affiche le rapport %s"
 
 # po/guile_strings.txt:144
 #. src/report/utility-reports/view-column.scm
@@ -13345,7 +13394,7 @@
 #. src/report/utility-reports/hello-world.scm
 #: intl-scm/guile-strings.c:1539
 msgid "This is a boolean option."
-msgstr "C'est une option booléenne"
+msgstr "C'est une option booléenne."
 
 # po/guile_strings.txt:276
 #. src/report/utility-reports/hello-world.scm
@@ -13357,7 +13406,7 @@
 #. src/report/utility-reports/hello-world.scm
 #: intl-scm/guile-strings.c:1545
 msgid "This is a multi choice option."
-msgstr "C'est une option à choix multiples"
+msgstr "C'est une option à choix multiples."
 
 # po/guile_strings.txt:221
 #. src/report/utility-reports/hello-world.scm
@@ -13424,7 +13473,7 @@
 #: intl-scm/guile-strings.c:1569 intl-scm/guile-strings.c:1643
 #: intl-scm/guile-strings.c:1689
 msgid "Hello, World"
-msgstr "Bonjour, monde !"
+msgstr "Bonjour, monde"
 
 # po/guile_strings.txt:214
 #. src/report/utility-reports/hello-world.scm
@@ -13484,7 +13533,7 @@
 #. src/report/utility-reports/hello-world.scm
 #: intl-scm/guile-strings.c:1599
 msgid "This is a number option."
-msgstr "C'est une option de numérotation"
+msgstr "C'est une option de numérotation."
 
 # po/guile_strings.txt:277
 #. src/report/utility-reports/hello-world.scm
@@ -13608,7 +13657,7 @@
 #: intl-scm/guile-strings.c:1649
 #, c-format
 msgid "For details on subscribing to that list, see %s."
-msgstr "Pour les détails pour la souscription à la liste, voyez %s"
+msgstr "Pour les détails pour la souscription à la liste, voyez %s."
 
 #. src/report/utility-reports/hello-world.scm
 #: intl-scm/guile-strings.c:1651
@@ -13712,7 +13761,7 @@
 #. src/report/utility-reports/hello-world.scm
 #: intl-scm/guile-strings.c:1681
 msgid "List items selected"
-msgstr "Afficher les éléments sélectionnés."
+msgstr "Afficher les éléments sélectionnés"
 
 # po/guile_strings.txt:272
 #. src/report/utility-reports/hello-world.scm
@@ -13740,7 +13789,7 @@
 #. src/report/utility-reports/hello-world.scm
 #: intl-scm/guile-strings.c:1693
 msgid "A sample report with examples."
-msgstr "Un rapport d'exemple avec... des exemples"
+msgstr "Un rapport d'exemple avec... des exemples."
 
 #. src/report/utility-reports/welcome-to-gnucash.scm
 #: intl-scm/guile-strings.c:1695 intl-scm/guile-strings.c:1701
@@ -13844,7 +13893,7 @@
 #. src/report/standard-reports/price-scatter.scm
 #: intl-scm/guile-strings.c:1733
 msgid "Calculate the price of this commodity."
-msgstr "Calculer la valeur de ce bien/produit"
+msgstr "Calculer la valeur de ce bien/produit."
 
 # po/guile_strings.txt:35
 #. src/report/standard-reports/price-scatter.scm
@@ -13900,7 +13949,7 @@
 "straight line. Unfortunately, the plotting tool can't handle that."
 msgstr ""
 "Tous les cours trouvés sont égaux. Cela entraînerai l'affichage d'une ligne "
-"droite. Hélas, l'outil de dessin ne le permet pas :,-("
+"droite. Hélas, l'outil de dessin ne le permet pas ."
 
 #. src/report/standard-reports/price-scatter.scm
 #: intl-scm/guile-strings.c:1767
@@ -13913,8 +13962,8 @@
 "All the prices found are from the same date. This would result in a plot "
 "with one straight line. Unfortunately, the plotting tool can't handle that."
 msgstr ""
-"Tous les cours sont à la même date. Cela entraînerai l'affichage d'une ligne "
-"droite. Hélas, l'outil ne le permet pas :,-("
+"Tous les cours sont à la même date. Cela entraînerait l'affichage d'une ligne "
+"droite. Hélas, l'outil ne le permet pas."
 
 #. src/report/standard-reports/price-scatter.scm
 #: intl-scm/guile-strings.c:1771
@@ -13928,7 +13977,7 @@
 "selected time period. This doesn't give a useful plot."
 msgstr ""
 "Il n'y a qu'un cours pour le produit sélectionné dans la période. Le "
-"graphique ne sera pas très utile !"
+"graphique ne sera pas très utile."
 
 #. src/report/standard-reports/price-scatter.scm
 #: intl-scm/guile-strings.c:1777
@@ -13951,7 +14000,7 @@
 "doesn't make sense to show prices for identical commodities."
 msgstr ""
 "Le produit sélectionné et la monnaie du rapport sont identiques. Cela n'a "
-"pas de sens d'afficher le cours de produits identiques !"
+"pas de sens d'afficher le cours de produits identiques."
 
 #. src/report/standard-reports/price-scatter.scm
 #: intl-scm/guile-strings.c:1785
@@ -13969,7 +14018,7 @@
 #: intl-scm/guile-strings.c:1813 intl-scm/guile-strings.c:1939
 #: intl-scm/guile-strings.c:2731 intl-scm/guile-strings.c:2801
 msgid "Report on these accounts, if chosen account level allows."
-msgstr "Faire rapport sur ce(s) compte(s) si le niveau de compte le permet"
+msgstr "Faire rapport sur ce(s) compte(s) si le niveau de compte le permet."
 
 # messages-i18n.c:216
 #. src/report/standard-reports/net-barchart.scm
@@ -14309,7 +14358,7 @@
 #. src/report/standard-reports/portfolio.scm
 #: intl-scm/guile-strings.c:1981 intl-scm/guile-strings.c:2099
 msgid "Listing"
-msgstr "Listing"
+msgstr ""
 
 # src/gnome/glade-gnc-dialogs.c:1372
 #. src/report/standard-reports/portfolio.scm
@@ -14399,7 +14448,7 @@
 #. src/report/standard-reports/advanced-portfolio.scm
 #: intl-scm/guile-strings.c:2111 intl-scm/guile-strings.c:2633
 msgid "Gain"
-msgstr "Gain"
+msgstr ""
 
 #. src/report/standard-reports/advanced-portfolio.scm
 #: intl-scm/guile-strings.c:2113
@@ -14501,7 +14550,7 @@
 #. src/report/standard-reports/transaction.scm
 #: intl-scm/guile-strings.c:2217 intl-scm/guile-strings.c:2465
 msgid "Style"
-msgstr "Style"
+msgstr ""
 
 # messages-i18n.c:326
 #. src/report/standard-reports/transaction.scm
@@ -14849,7 +14898,7 @@
 #. src/report/standard-reports/transaction.scm
 #: intl-scm/guile-strings.c:2385
 msgid "Display the full account name"
-msgstr "Afficher le nom complet du compte ?"
+msgstr "Afficher le nom complet du compte"
 
 #. src/report/standard-reports/transaction.scm
 #: intl-scm/guile-strings.c:2389
@@ -14912,7 +14961,7 @@
 #. src/report/standard-reports/transaction.scm
 #: intl-scm/guile-strings.c:2419 intl-scm/guile-strings.c:2545
 msgid "Double"
-msgstr "Double"
+msgstr ""
 
 #. src/report/standard-reports/transaction.scm
 #: intl-scm/guile-strings.c:2421 intl-scm/guile-strings.c:2547
@@ -14946,7 +14995,7 @@
 #. src/report/standard-reports/transaction.scm
 #: intl-scm/guile-strings.c:2433
 msgid "Reverse amount display for Income and Expense Accounts"
-msgstr "Inverser l'affichage des comptes de revenus et dépenses."
+msgstr "Inverser l'affichage des comptes de revenus et dépenses"
 
 # po/guile_strings.txt:297
 #. src/report/standard-reports/transaction.scm
@@ -14999,7 +15048,7 @@
 "selection."
 msgstr ""
 "Aucune transaction trouvée correspondante à la période et au compte "
-"sélectionnés"
+"sélectionnés."
 
 # po/guile_strings.txt:25
 #. src/report/standard-reports/register.scm
@@ -15017,7 +15066,7 @@
 #. src/report/standard-reports/register.scm
 #: intl-scm/guile-strings.c:2563
 msgid "Client"
-msgstr "Client"
+msgstr ""
 
 # po/guile_strings.txt:263
 #. src/report/standard-reports/average-balance.scm
@@ -15053,7 +15102,7 @@
 #. src/report/standard-reports/average-balance.scm
 #: intl-scm/guile-strings.c:2597
 msgid "Display a table of the selected data."
-msgstr "Afficher le tableau des données sélectionnées"
+msgstr "Afficher le tableau des données sélectionnées."
 
 # messages-i18n.c:215
 #. src/report/standard-reports/average-balance.scm
@@ -15064,7 +15113,7 @@
 #. src/report/standard-reports/average-balance.scm
 #: intl-scm/guile-strings.c:2601
 msgid "Display a graph of the selected data."
-msgstr "Afficher un graphique des données sélectionnées"
+msgstr "Afficher un graphique des données sélectionnées."
 
 # po/guile_strings.txt:227
 #. src/report/standard-reports/average-balance.scm
@@ -15112,7 +15161,7 @@
 #. src/report/standard-reports/average-balance.scm
 #: intl-scm/guile-strings.c:2623
 msgid "Period start"
-msgstr "Début de période :"
+msgstr "Début de période"
 
 # po/guile_strings.txt:203
 #. src/report/standard-reports/average-balance.scm
@@ -15273,7 +15322,7 @@
 #. src/report/locale-specific/us/taxtxf.scm
 #: intl-scm/guile-strings.c:2825
 msgid "Alternate Period"
-msgstr "Période alternée :"
+msgstr "Période alternée"
 
 #. src/report/locale-specific/us/taxtxf.scm
 #: intl-scm/guile-strings.c:2827
@@ -15434,7 +15483,7 @@
 #. src/report/locale-specific/us/taxtxf.scm
 #: intl-scm/guile-strings.c:2891
 msgid "Blue items are exportable to a .TXF file."
-msgstr "Les éléments en bleus sont exportables vers un fichier TXF"
+msgstr "Les éléments en bleus sont exportables vers un fichier TXF."
 
 #. src/report/locale-specific/us/taxtxf.scm
 #: intl-scm/guile-strings.c:2893
@@ -15466,12 +15515,12 @@
 #. src/report/locale-specific/us/taxtxf.scm
 #: intl-scm/guile-strings.c:2901
 msgid "This report shows your Taxable Income and Deductible Expenses."
-msgstr "Ce rapport montre vos Revenus imposables et Dépenses déductibles"
+msgstr "Ce rapport montre vos Revenus imposables et Dépenses déductibles."
 
 #. src/report/locale-specific/us/taxtxf.scm
 #: intl-scm/guile-strings.c:2903
 msgid "TXF"
-msgstr "TXF"
+msgstr ""
 
 # po/guile_strings.txt:66
 #. src/report/locale-specific/us/taxtxf.scm
@@ -15544,7 +15593,7 @@
 #. src/import-export/qif-io-core/qif-invst-xtn-import.scm
 #: intl-scm/guile-strings.c:2945 intl-scm/guile-strings.c:2967
 msgid "Commissions"
-msgstr "Commissions"
+msgstr ""
 
 #. src/import-export/qif-io-core/qif-invst-xtn-import.scm
 #: intl-scm/guile-strings.c:2947 intl-scm/guile-strings.c:2969
@@ -15560,7 +15609,7 @@
 #. src/import-export/qif-import/qif-to-gnc.scm
 #: intl-scm/guile-strings.c:2977
 msgid "QIF import: Name conflict with another account."
-msgstr "Importation QIF : conflit avec un autre compte"
+msgstr "Importation QIF : conflit avec un autre compte."
 
 # src/gnome/glade-gnc-dialogs.c:340 src/gnome/glade-gnc-dialogs.c:394
 #. src/import-export/qif-import/qif-to-gnc.scm
@@ -15611,7 +15660,7 @@
 msgstr ""
 "Une transaction pour laquelle le score du meilleur duplicata potentiel est dans la zone ROUGE "
 " (au dessus du seuil d'affichage, mais en dessous ou égal au seuil d'AJOUT automatique) sera "
-"AJOUTÉE par défaut"
+"AJOUTÉE par défaut."
 
 #. src/import-export/generic-import.scm
 #: intl-scm/guile-strings.c:3005
@@ -15625,7 +15674,7 @@
 "to the Auto-CLEAR threshold) will be CLEARed by default."
 msgstr ""
 "Une transaction pour laquelle le score du meilleur duplicata potentiel est dans la zone VERTE"
-" (au dessus ou égal au seuil de RÉCONCILIATION automatique) sera RÉCONCILIÉE par défaut"
+" (au dessus ou égal au seuil de RÉCONCILIATION automatique) sera RÉCONCILIÉE par défaut."
 
 #. src/import-export/generic-import.scm
 #: intl-scm/guile-strings.c:3011
@@ -15658,7 +15707,7 @@
 #. src/gnome-utils/gnc-menu-extensions.scm
 #: intl-scm/guile-strings.c:3015
 msgid "Extensions"
-msgstr "Extensions"
+msgstr ""
 
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3017
@@ -15668,12 +15717,12 @@
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3023
 msgid "The following bills are due:"
-msgstr ""
+msgstr "Les factures suivantes sont à payer:"
 
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3025
 msgid "The following bill is due:"
-msgstr ""
+msgstr "La facture suivante est à payer :"
 
 # src/gnome/glade-gnc-dialogs.c:1219 src/gnome/glade-gnc-dialogs.c:1240
 # src/gnome/glade-gnc-dialogs.c:1276
@@ -15700,17 +15749,17 @@
 #: intl-scm/guile-strings.c:3055 intl-scm/guile-strings.c:3057
 #: intl-scm/guile-strings.c:3085 intl-scm/guile-strings.c:3087
 msgid "Find Job"
-msgstr ""
+msgstr "Trouver le métier"
 
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3063
 msgid "Vendors"
-msgstr ""
+msgstr "Fournisseurs"
 
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3069 intl-scm/guile-strings.c:3071
 msgid "Find Vendor"
-msgstr ""
+msgstr "Trouver le fournisseur"
 
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3077 intl-scm/guile-strings.c:3079
@@ -15732,32 +15781,32 @@
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3107 intl-scm/guile-strings.c:3109
 msgid "Find Expense Voucher"
-msgstr ""
+msgstr "Trouver la quitttance"
 
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3115
 msgid "Bills Due Reminder"
-msgstr ""
+msgstr "Rappel des factures à payer"
 
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3117
 msgid "View the quick report of bills coming due soon."
-msgstr ""
+msgstr "Voir le rappel des factures à payer bientôt."
 
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3119 intl-scm/guile-strings.c:3441
 msgid "Billing Terms"
-msgstr ""
+msgstr "Échéances de facturation"
 
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3121
 msgid "View and Edit the available Billing Terms"
-msgstr ""
+msgstr "Voir et éditer les échéances de facturation disponibles"
 
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3125
 msgid "View and Edit the available Tax Tables"
-msgstr ""
+msgstr "Voir et éditer les tables de taxation disponible"
 
 # messages-i18n.c:316
 #. src/business/business-gnome/business-gnome.scm
@@ -15773,46 +15822,46 @@
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3131 intl-scm/guile-strings.c:3133
 msgid "Test Search Dialog"
-msgstr ""
+msgstr "Tester le dialogue de recherche"
 
 # messages-i18n.c:105
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3135
 msgid "Reload invoice report"
-msgstr ""
+msgstr "Recharger le rapport des factures "
 
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3137
 msgid "Reload invoice report scheme file"
-msgstr ""
+msgstr "Recharger le fichier schéma des rapports de facture"
 
 # messages-i18n.c:105
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3139
 msgid "Reload owner report"
-msgstr ""
+msgstr "Recharger le rapport sur le propriétaire"
 
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3141
 msgid "Reload owner report scheme file"
-msgstr ""
+msgstr "Recharger le fichier schéma de rapport sur le propriétaire"
 
 # messages-i18n.c:105
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3143
 msgid "Reload receivable report"
-msgstr ""
+msgstr "Recharger le rapport sur les recevables"
 
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3145
 msgid "Reload receivable report scheme file"
-msgstr ""
+msgstr "Recharger fichier schéma de rapport sur les recevables"
 
 # messages-i18n.c:227
 #. src/business/business-gnome/business-gnome.scm
 #: intl-scm/guile-strings.c:3147 intl-scm/guile-strings.c:3149
 msgid "Initialize Test Data"
-msgstr ""
+msgstr "Initialiser les données de test"
 
 # po/guile_strings.txt:241
 #. src/business/business-utils/business-prefs.scm
@@ -15833,22 +15882,22 @@
 #. src/business/business-utils/business-prefs.scm
 #: intl-scm/guile-strings.c:3159
 msgid "Notify Bills Due?"
-msgstr ""
+msgstr "Notiifer les factures à payer ?"
 
 #. src/business/business-utils/business-prefs.scm
 #: intl-scm/guile-strings.c:3161
 msgid "Whether to display the list of Bills Due at startup."
-msgstr ""
+msgstr "Faut-il afficher au démarrage la liste des factures à payer."
 
 #. src/business/business-utils/business-prefs.scm
 #: intl-scm/guile-strings.c:3163
 msgid "Bills Due Days"
-msgstr ""
+msgstr "Jours pour les factures à payer"
 
 #. src/business/business-utils/business-prefs.scm
 #: intl-scm/guile-strings.c:3165
 msgid "How many days in the future to warn about Bills coming due."
-msgstr ""
+msgstr "Combien de jours avant faut-il prévénir pour les factures à payer."
 
 #. src/business/business-utils/business-prefs.scm
 #: intl-scm/guile-strings.c:3167
@@ -15864,22 +15913,22 @@
 #. src/business/business-utils/business-prefs.scm
 #: intl-scm/guile-strings.c:3171
 msgid "Default Customer TaxTable"
-msgstr ""
+msgstr "Table de taxation client par défaut"
 
 #. src/business/business-utils/business-prefs.scm
 #: intl-scm/guile-strings.c:3173
 msgid "The default tax table to apply to customers."
-msgstr ""
+msgstr "La table de taxation par défaut à appliquer à vos clients."
 
 #. src/business/business-utils/business-prefs.scm
 #: intl-scm/guile-strings.c:3175
 msgid "Default Vendor TaxTable"
-msgstr ""
+msgstr "table de Taxation pour les fournisseurs"
 
 #. src/business/business-utils/business-prefs.scm
 #: intl-scm/guile-strings.c:3177
 msgid "The default tax table to apply to vendors."
-msgstr ""
+msgstr "La table de taxation par défaut pour les fournisseurs."
 
 #. src/business/business-utils/business-utils.scm
 #: intl-scm/guile-strings.c:3183
@@ -15896,12 +15945,12 @@
 #. src/business/business-reports/payables.scm
 #: intl-scm/guile-strings.c:3187
 msgid "The payable account you wish to examine"
-msgstr ""
+msgstr "Le compte payable que vous voulez examiner"
 
 #. src/business/business-reports/payables.scm
 #: intl-scm/guile-strings.c:3189 intl-scm/guile-strings.c:3191
 msgid "Payable Aging"
-msgstr ""
+msgstr "Date de paiement"
 
 #. src/business/business-reports/owner-report.scm
 #: intl-scm/guile-strings.c:3211 intl-scm/guile-strings.c:3331
@@ -15927,7 +15976,7 @@
 #. src/business/business-reports/owner-report.scm
 #: intl-scm/guile-strings.c:3219 intl-scm/guile-strings.c:3475
 msgid "Payment, thank you"
-msgstr ""
+msgstr "Paiement, merci"
 
 # messages-i18n.c:264 po/guile_strings.txt:211
 # src/gnome/glade-gnc-dialogs.c:629
@@ -15940,18 +15989,18 @@
 #. src/business/business-reports/owner-report.scm
 #: intl-scm/guile-strings.c:3225
 msgid "Total Due"
-msgstr "Total Du"
+msgstr "Total Dû"
 
 #. src/business/business-reports/owner-report.scm
 #: intl-scm/guile-strings.c:3227
 msgid "The company for this report"
-msgstr ""
+msgstr "La société pour ce rapport"
 
 # messages-i18n.c:80
 #. src/business/business-reports/owner-report.scm
 #: intl-scm/guile-strings.c:3229
 msgid "The account to search for transactions"
-msgstr ""
+msgstr "Le compte à chercher pour ces transactions"
 
 #. src/business/business-reports/owner-report.scm
 #: intl-scm/guile-strings.c:3233 intl-scm/guile-strings.c:3237
@@ -15975,13 +16024,13 @@
 #. src/business/business-reports/owner-report.scm
 #: intl-scm/guile-strings.c:3243
 msgid "Display the transaction reference?"
-msgstr ""
+msgstr "Afficher la référence de la transaction ?"
 
 # messages-i18n.c:96
 #. src/business/business-reports/owner-report.scm
 #: intl-scm/guile-strings.c:3247
 msgid "Display the transaction type?"
-msgstr ""
+msgstr "Afficher le type de la transaction ?"
 
 # po/guile_strings.txt:219
 #. src/business/business-reports/owner-report.scm
@@ -15995,12 +16044,12 @@
 #: intl-scm/guile-strings.c:3255 intl-scm/guile-strings.c:3275
 #: intl-scm/guile-strings.c:3471
 msgid "Today Date Format"
-msgstr ""
+msgstr "Format de la date d'aujourd'hui"
 
 #. src/business/business-reports/owner-report.scm
 #: intl-scm/guile-strings.c:3257 intl-scm/guile-strings.c:3473
 msgid "The format for the date->string conversion for today's date."
-msgstr ""
+msgstr "Le format pour la date -> La date d'aujourd'hui."
 
 # messages-i18n.c:284 po/guile_strings.txt:274
 # src/gnome/glade-gnc-dialogs.c:647
@@ -16019,18 +16068,18 @@
 #. src/business/business-reports/owner-report.scm
 #: intl-scm/guile-strings.c:3277 intl-scm/guile-strings.c:3283
 msgid "Customer Report"
-msgstr ""
+msgstr "Rapport du client"
 
 # messages-i18n.c:183
 #. src/business/business-reports/owner-report.scm
 #: intl-scm/guile-strings.c:3279 intl-scm/guile-strings.c:3285
 msgid "Vendor Report"
-msgstr ""
+msgstr "Rapport du fournisseur"
 
 #. src/business/business-reports/owner-report.scm
 #: intl-scm/guile-strings.c:3281 intl-scm/guile-strings.c:3287
 msgid "Employee Report"
-msgstr ""
+msgstr "Rapport sur l'employé"
 
 # messages-i18n.c:225
 #. src/business/business-reports/aging.scm
@@ -16047,7 +16096,7 @@
 #. src/business/business-reports/aging.scm
 #: intl-scm/guile-strings.c:3299
 msgid "Show Multi-currency Totals?"
-msgstr ""
+msgstr "Montrer un total multi-devises ?"
 
 #. src/business/business-reports/aging.scm
 #: intl-scm/guile-strings.c:3301
@@ -16055,38 +16104,38 @@
 msgid ""
 "Transactions relating to company  %d contain more than one currency.  This "
 "report is not designed to cope with this possibility."
-msgstr ""
+msgstr "Les transactions avec la société %d comptent plus d'une devise. Ce rapport n'est pas prévu pour faire face à cette possibilité."
 
 #. src/business/business-reports/aging.scm
 #: intl-scm/guile-strings.c:3303
 msgid "Sort companys by"
-msgstr ""
+msgstr "Trier les sociétés par"
 
 #. src/business/business-reports/aging.scm
 #: intl-scm/guile-strings.c:3307
 msgid "Name of the company"
-msgstr "Nom de l'organisation ou de l'entreprise"
+msgstr "Nom de la société"
 
 # messages-i18n.c:344
 #. src/business/business-reports/aging.scm
 #: intl-scm/guile-strings.c:3309
 msgid "Total Owed"
-msgstr "Total du"
+msgstr "Total dû"
 
 #. src/business/business-reports/aging.scm
 #: intl-scm/guile-strings.c:3311
 msgid "Total amount owed to/from Company"
-msgstr ""
+msgstr "Total dû à/par la société"
 
 #. src/business/business-reports/aging.scm
 #: intl-scm/guile-strings.c:3313
 msgid "Bracket Total Owed"
-msgstr ""
+msgstr "Total dû dans cet intervalle"
 
 #. src/business/business-reports/aging.scm
 #: intl-scm/guile-strings.c:3315
 msgid "Amount owed in oldest bracket - if same go to next oldest"
-msgstr ""
+msgstr "Montant dû dans le plus vieil intrevalle - si il est identique, va au suivant"
 
 # messages-i18n.c:160
 #. src/business/business-reports/aging.scm
@@ -16098,7 +16147,7 @@
 #. src/business/business-reports/aging.scm
 #: intl-scm/guile-strings.c:3319
 msgid "Increasing"
-msgstr ""
+msgstr "Croissant"
 
 #. src/business/business-reports/aging.scm
 #: intl-scm/guile-strings.c:3321
@@ -16109,7 +16158,7 @@
 #. src/business/business-reports/aging.scm
 #: intl-scm/guile-strings.c:3323
 msgid "Decreasing"
-msgstr ""
+msgstr "Décroissant"
 
 #. src/business/business-reports/aging.scm
 #: intl-scm/guile-strings.c:3325
@@ -16121,20 +16170,20 @@
 msgid ""
 "Show multi-currency totals.  If not selected, convert all totals to report "
 "currency"
-msgstr ""
+msgstr "Montre le total en multi-devises. SI ce n'est pas sélectionné, convertit les totaux dans la monnaie du rapport"
 
 # messages-i18n.c:294 po/guile_strings.txt:205
 # src/gnome/glade-gnc-dialogs.c:644
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3345
 msgid "Invoice Number"
-msgstr "# de facture"
+msgstr "Numéro de facture"
 
 # messages-i18n.c:257
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3351
 msgid "Charge Type"
-msgstr ""
+msgstr "Type de charge"
 
 # po/guile_strings.txt:264
 #. src/business/business-reports/invoice.scm
@@ -16146,7 +16195,7 @@
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3361 intl-scm/guile-strings.c:3411
 msgid "Tax Amount"
-msgstr ""
+msgstr "Montant des taxes"
 
 # messages-i18n.c:342 po/guile_strings.txt:252
 #. src/business/business-reports/invoice.scm
@@ -16158,77 +16207,77 @@
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3385
 msgid "Display the action?"
-msgstr ""
+msgstr "Montrer l'action ?"
 
 # po/guile_strings.txt:219
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3391
 msgid "Display the quantity of items?"
-msgstr ""
+msgstr "Montrer la quantité d'objets ?"
 
 # messages-i18n.c:96
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3401
 msgid "Display the entry's discount"
-msgstr ""
+msgstr "Montrer la ristourne sur le compte des dépenses"
 
 # po/guile_strings.txt:219
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3407
 msgid "Display the entry's taxable status"
-msgstr ""
+msgstr "Montrer la taxabilité de l'entrée "
 
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3413
 msgid "Display each entry's total total tax"
-msgstr ""
+msgstr "Montrer la taxe totale pour chaque entrée"
 
 # po/guile_strings.txt:219
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3419
 msgid "Display the entry's value"
-msgstr ""
+msgstr "Montrer la valeur de l'entrée"
 
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3423
 msgid "Individual Taxes"
-msgstr ""
+msgstr "Taxes individuelles"
 
 # po/guile_strings.txt:219
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3425
 msgid "Display all the individual taxes?"
-msgstr ""
+msgstr "Montrer chaque taxe individuellement ?"
 
 # messages-i18n.c:315
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3435
 msgid "References"
-msgstr ""
+msgstr "Références"
 
 # messages-i18n.c:127
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3437
 msgid "Display the invoice references?"
-msgstr ""
+msgstr "Montrer les références des factures ?"
 
 # po/guile_strings.txt:219
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3443
 msgid "Display the invoice billing terms?"
-msgstr ""
+msgstr "Montrer les échéances de cette facture ?"
 
 # po/guile_strings.txt:219
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3449
 msgid "Display the billing id?"
-msgstr ""
+msgstr "Montrer l'id de facturation ?"
 
 # messages-i18n.c:96
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3455
 msgid "Display the invoice notes?"
-msgstr ""
+msgstr "Montrer les notes de la facturation ?"
 
 # messages-i18n.c:312
 #. src/business/business-reports/invoice.scm
@@ -16240,24 +16289,24 @@
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3461
 msgid "Display the payments applied to this invoice?"
-msgstr ""
+msgstr "Montrer les paiements relatifs à cette facture ?"
 
 # messages-i18n.c:306 po/guile_strings.txt:176
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3465
 msgid "Extra Notes"
-msgstr "Notes suplémentaires"
+msgstr "Notes supplémentaires"
 
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3467
 msgid "Extra notes to put on the invoice"
-msgstr ""
+msgstr "Notes supplémentaires à mettre sur la facture"
 
 # messages-i18n.c:242 po/guile_strings.txt:50
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3481
 msgid "Amount Due"
-msgstr "Montant du"
+msgstr "Montant dû"
 
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3483
@@ -16269,937 +16318,39 @@
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3491
 msgid "Invoice Date"
-msgstr ""
+msgstr "Date de la facture"
 
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3495
 msgid "Invoice in progress...."
-msgstr ""
+msgstr "Facture en progrès...."
 
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3501
 msgid "No Valid Invoice Selected"
-msgstr ""
+msgstr "Pas de facture valide sélectionnée"
 
 # src/gnome/glade-gnc-dialogs.c:700
 #. src/business/business-reports/invoice.scm
 #: intl-scm/guile-strings.c:3503 intl-scm/guile-strings.c:3505
 #: intl-scm/guile-strings.c:3507
 msgid "Printable Invoice"
-msgstr ""
+msgstr "Facture imprimable"
 
 #. src/business/business-reports/receivables.scm
 #: intl-scm/guile-strings.c:3509
 msgid "Receivables Account"
-msgstr ""
+msgstr "Comptes recevables"
 
 # po/guile_strings.txt:96
 #. src/business/business-reports/receivables.scm
 #: intl-scm/guile-strings.c:3511
 msgid "The receivables account you wish to examine"
-msgstr ""
+msgstr "Les comptes recevables que vous voulez examiner"
 
 # messages-i18n.c:321
 #. src/business/business-reports/receivables.scm
 #: intl-scm/guile-strings.c:3513 intl-scm/guile-strings.c:3515
 msgid "Receivable Aging"
-msgstr ""
-
-# messages-i18n.c:242 po/guile_strings.txt:50
-#~ msgid "Loan Amount:"
-#~ msgstr "Montant du prêt:"
-
-# messages-i18n.c:199
-#~ msgid "Payment Amount:"
-#~ msgstr "Montant du paiement:"
-
-#~ msgid "Remainder to:"
-#~ msgstr "Reste vers:"
-
-# messages-i18n.c:346
-#~ msgid "Transaction"
-#~ msgstr "Transaction"
-
-# messages-i18n.c:346
-#~ msgid "Transaction Memo:"
-#~ msgstr "Mémo pour la transaction:"
-
-#~ msgid "Any"
-#~ msgstr "N'importe"
-
-#~ msgid "At least"
-#~ msgstr "Au moins"
-
-# messages-i18n.c:242 po/guile_strings.txt:50
-#~ msgid "At most"
-#~ msgstr "Au plus"
-
-#~ msgid "At most "
-#~ msgstr "Au plus"
-
-# messages-i18n.c:249 po/guile_strings.txt:12
-#~ msgid "Balanced"
-#~ msgstr "Équilibre"
-
-#~ msgid "Case sensitive"
-#~ msgstr "Respecter la casse"
-
-# messages-i18n.c:260
-#~ msgid "Cleared (c)"
-#~ msgstr "Pointé (c)"
-
-# messages-i18n.c:277
-#~ msgid "Credit or Debit"
-#~ msgstr "Crédit ou débit"
-
-# po/guile_strings.txt:122
-#~ msgid "Ending "
-#~ msgstr "Finissant "
-
-#~ msgid "Exactly"
-#~ msgstr "Exactement"
-
-#~ msgid "Find "
-#~ msgstr "Trouver"
-
-# messages-i18n.c:82
-#~ msgid "Find securities transactions of:"
-#~ msgstr "Trouver les transactions de valeurs de :"
-
-#~ msgid "Find securities transactions with share price of:"
-#~ msgstr "Trouver les transactions de valeurs avec un cours du titre de :"
-
-#~ msgid "Find splits whose Memo contains:"
-#~ msgstr "Trouver les répartitions dont le Mémo contient :"
-
-#~ msgid "Find transactions affecting"
-#~ msgstr "Trouver les transactions affectant"
-
-#~ msgid "Find transactions occurring in the date range:"
-#~ msgstr "Trouver les transactions ayant eu lieu entre les dates :"
-
-# messages-i18n.c:114 po/guile_strings.txt:128
-#~ msgid "Find transactions whose Action contains:"
-#~ msgstr "Trouver les transactions dont Action contient :"
-
-#~ msgid "Find transactions whose Balance status is:"
-#~ msgstr "Trouver les transactions dont l'état du solde est :"
-
-#~ msgid "Find transactions whose Cleared status is:"
-#~ msgstr "Trouver les transactions dont l'état de rapprochement est :"
-
-#~ msgid "Find transactions whose Description contains:"
-#~ msgstr "Trouver les transactions qui contiennent cette Description :"
-
-#~ msgid "Find transactions whose Number contains:"
-#~ msgstr "Trouver les transactions qui contiennent ce Numéro :"
-
-#~ msgid "Find transactions with the tag:"
-#~ msgstr "Trouver des transactions avec le marqueur :"
-
-# messages-i18n.c:186
-#~ msgid "Match Accounts"
-#~ msgstr "Comptes trouvés"
-
-# messages-i18n.c:242 po/guile_strings.txt:50
-#~ msgid "Match Amount"
-#~ msgstr "Montant trouvé"
-
-# messages-i18n.c:227
-#~ msgid "Match Balance state"
-#~ msgstr "État du solde trouvé"
-
-# messages-i18n.c:227
-#~ msgid "Match Cleared state"
-#~ msgstr "État du rapprochement trouvé"
-
-# messages-i18n.c:227
-#~ msgid "Match Date"
-#~ msgstr "Trouver date"
-
-# messages-i18n.c:275 po/guile_strings.txt:129
-#~ msgid "Match Description"
-#~ msgstr "Trouver description"
-
-#~ msgid "Match Memo"
-#~ msgstr "Trouver mémo"
-
-# messages-i18n.c:127
-#~ msgid "Match number of shares"
-#~ msgstr "Trouver le nombre de titres"
-
-# messages-i18n.c:126
-#~ msgid "Match share price"
-#~ msgstr "Retrouver cours du titre"
-
-#~ msgid "Match transaction tags (CURRENTLY INOPERABLE)"
-#~ msgstr "Marqueurs de transactions correspondant (ACTUELLEMENT INUTILISABLE)"
-
-# messages-i18n.c:191
-#~ msgid "Not Balanced"
-#~ msgstr "Non équilibré"
-
-#~ msgid "Not cleared (n)"
-#~ msgstr "Non pointé (n)"
-
-#~ msgid "Regular expression"
-#~ msgstr "Expression rationnelle"
-
-# po/guile_strings.txt:59
-#~ msgid "Starting "
-#~ msgstr "Débutant "
-
-# po/guile_strings.txt:264
-#~ msgid "Tags"
-#~ msgstr "Marqueurs"
-
-# po/guile_strings.txt:266
-#~ msgid "shares"
-#~ msgstr "titres"
-
-#~ msgid "splits having amounts of:"
-#~ msgstr "répartitions ayant des montants de :"
-
-# po/guile_strings.txt:59
-#~ msgid "Sort"
-#~ msgstr "Tri"
-
-# src/gnome/glade-gnc-dialogs.c:74
-#~ msgid "Import OFX files"
-#~ msgstr "Importer fichiers OFX"
-
-# src/gnome/glade-gnc-dialogs.c:155
-#~ msgid "OFX Filename:"
-#~ msgstr "Nom du fichier OFX:"
-
-# src/gnome/glade-gnc-dialogs.c:155
-#~ msgid "OFX Files"
-#~ msgstr "Fichiers OFX"
-
-# messages-i18n.c:293
-#~ msgid "OFX Import"
-#~ msgstr "Importer OFX"
-
-# messages-i18n.c:44
-#~ msgid "OFX files you have loaded"
-#~ msgstr "Fichiers OFX que vous avez chargés"
-
-# src/gnome/dialog-qif-import.c:221
-#~ msgid "Select a OFX file to load"
-#~ msgstr "Sélectionner un fichier QIF à charger"
-
-# src/gnome/glade-gnc-dialogs.c:127
-#~ msgid "User ID"
-#~ msgstr "ID utilisateur"
-
-#~ msgid "ADD"
-#~ msgstr "Ajouter"
-
-#~ msgid "RECONCILE"
-#~ msgstr "Réconcilier"
-
-#~ msgid "REPLACE"
-#~ msgstr "Remplacer"
-
-#~ msgid "IGNORE"
-#~ msgstr "Ignorer"
-
-#~ msgid "The following online account is currently unknown to GnuCash:"
-#~ msgstr "GnuCash ne connait pas encore le compte en ligne suivant:"
-
-#~ msgid "New Currency/Security"
-#~ msgstr "Nouvelle monnaie/valeur"
-
-#~ msgid ""
-#~ "You should back up your files regularly.  Just copy\n"
-#~ "your GnuCash data file to a floppy or other backup device."
-#~ msgstr ""
-#~ "Vous devriez sauvegarder vos fichiers régulièrement. Copiez juste le\n"
-#~ "fichier .xac de GnuCash (dans le répertoire ~/.gnucash) vers une\n"
-#~ "disquette ou tout autre périphérique de sauvegarde."
-
-#~ msgid "Run the RPC Server"
-#~ msgstr "Exécuter le serveur RPC"
-
-# messages-i18n.c:85
-#~ msgid "GnuCash Manual"
-#~ msgstr "Manuel de GnuCash."
-
-#~ msgid "More on GnuCash"
-#~ msgstr "À propos de GnuCash"
-
-# messages-i18n.c:183
-#~ msgid "Ledger"
-#~ msgstr "Grand livre"
-
-# messages-i18n.c:169 po/guile_strings.txt:62
-#~ msgid "Auto Ledger"
-#~ msgstr "Grand livre auto"
-
-#~ msgid "Journal"
-#~ msgstr "Journal"
-
-# po/guile_strings.txt:188
-#~ msgid "User Name"
-#~ msgstr "Nom de l'utilisateur"
-
-#~ msgid "The name of the user. This is used in some reports."
-#~ msgstr "Nom de l'utilisateur. Il est utilisé dans certains rapports."
-
-#~ msgid "User Address"
-#~ msgstr "Adresse de l'utilisateur"
-
-#~ msgid "The address of the user. This is used in some reports."
-#~ msgstr "Adresse de l'utilisateur. Utilisé dans certains rapports."
-
-#~ msgid "Net Worth Chart"
-#~ msgstr "Graphique de la valeur nette"
-
-# po/guile_strings.txt:183
-#~ msgid "Profit and Loss - %s to %s"
-#~ msgstr "Pertes et profits - %s à %s"
-
-#~ msgid ""
-#~ "You cannot transfer funds from the %s account.\n"
-#~ "It does not have a matching currency.\n"
-#~ "To transfer funds between accounts with different currencies\n"
-#~ "you need an intermediate currency account.\n"
-#~ "Please see the GnuCash online manual."
-#~ msgstr ""
-#~ "Vous ne pouvez pas transférer des fonds depuis le compte %s.\n"
-#~ "Il n'a pas la monnaie correspondante.\n"
-#~ "Pour transférer des fonds entre comptes avec différentes monnaies,\n"
-#~ "vous avez besoin d'un compte de monnaie intermédiaire.\n"
-#~ "Regardez s'il vous plaît le manuel en ligne de GnuCash."
-
-# src/gnome/dialog-qif-import.c:314
-#~ msgid "You must choose a currency."
-#~ msgstr "Vous devez choisir une monnaie."
-
-# messages-i18n.c:275 po/guile_strings.txt:129
-#~ msgid "No description"
-#~ msgstr "Pas de description"
-
-# messages-i18n.c:213
-#~ msgid "Set to default"
-#~ msgstr "Mettre par défaut"
-
-# messages-i18n.c:112
-#~ msgid "Set the option to its default value"
-#~ msgstr "Mettre l'option à sa valeur par défaut"
-
-#~ msgid ""
-#~ "No matching currency account!\n"
-#~ "Please create a currency account\n"
-#~ "with currency %s\n"
-#~ "and security %s\n"
-#~ "(or vice versa) to transfer funds\n"
-#~ "between the selected accounts."
-#~ msgstr ""
-#~ "Pas de compte de monnaie trouvé !\n"
-#~ "Créer s'il vous plaît un compte de monnaie\n"
-#~ "avec la monnaie %s\n"
-#~ "et la valeur %s\n"
-#~ "(ou vice versa) pour transférer des fonds\n"
-#~ "entre les comptes sélectionnés."
-
-# messages-i18n.c:180
-#~ msgid "Exchange"
-#~ msgstr "Change"
-
-#~ msgid "Euro conversion"
-#~ msgstr "Conversion euro"
-
-# po/guile_strings.txt:167
-#~ msgid "You don't have any accounts of Euroland currencies."
-#~ msgstr "Vous n'avez aucun compte dans une monnaie de la zone euro."
-
-# src/gnome/glade-gnc-dialogs.c:1258
-#~ msgid "Dec 31, 2000"
-#~ msgstr "Déc 31, 2000"
-
-# src/gnome/glade-gnc-dialogs.c:1261
-#~ msgid "31 Dec, 2000"
-#~ msgstr "31 Déc, 2000"
-
-# po/guile_strings.txt:228
-#~ msgid "Budget"
-#~ msgstr "Budget"
-
-#~ msgid "label773"
-#~ msgstr "label773"
-
-#~ msgid "Add a new entry or subentry"
-#~ msgstr "Ajouter une nouvelle entrée ou sous-entrée"
-
-# messages-i18n.c:76
-#~ msgid "Delete the selected entry or subentry"
-#~ msgstr "Supprimer l'entrée ou la sous-entrée sélectionnée."
-
-# messages-i18n.c:95
-#~ msgid "Move the selected item up"
-#~ msgstr "Déplacer l'élément sélectionné vers le haut."
-
-# messages-i18n.c:95
-#~ msgid "Move the selected item down"
-#~ msgstr "Déplacer l'élément sélectionné vers le bas."
-
-#~ msgid "Normal"
-#~ msgstr "Normal"
-
-# messages-i18n.c:344
-#~ msgid "No Total"
-#~ msgstr "Pas de Total"
-
-#~ msgid "Subentry"
-#~ msgstr "Sous-entrée"
-
-# po/guile_strings.txt:186
-#~ msgid "Period:"
-#~ msgstr "Point/Période :"
-
-#~ msgid "Mechanism:"
-#~ msgstr "Mécanisme :"
-
-# po/guile_strings.txt:186
-#~ msgid "Grace Period:"
-#~ msgstr "Période de répit :"
-
-#~ msgid "Nominal"
-#~ msgstr "Nominal"
-
-#~ msgid "label812"
-#~ msgstr "label812"
-
-#~ msgid "Click \"Back\" to cancel loading this file and select another."
-#~ msgstr ""
-#~ "Cliquez sur « Précédent » pour annuler le chargement de ce fichier et en "
-#~ "choisir un autre."
-
-#~ msgid "label827"
-#~ msgstr "label827"
-
-# messages-i18n.c:199
-#~ msgid "Currency Account:"
-#~ msgstr "Compte de monnaie :"
-
-#~ msgid "label847668"
-#~ msgstr "label847668"
-
-#~ msgid "window1"
-#~ msgstr "Fenêtre 1"
-
-# po/guile_strings.txt:238
-#~ msgid "Sort by Commodity"
-#~ msgstr "Trier par type de compte"
-
-#~ msgid "Euro Conversion Druid"
-#~ msgstr "Druide de conversion euro"
-
-#~ msgid ""
-#~ "This druid will help you converting your existing accounts to the\n"
-#~ "currency Euro (EUR). \n"
-#~ "\n"
-#~ "In the following, the term 'Euroland currency' will denote \n"
-#~ "the currencies that are being replaced by the Euro.\n"
-#~ "\n"
-#~ "No changes will be made until you press 'Finish' on the last page\n"
-#~ "of this druid."
-#~ msgstr ""
-#~ "Ce druide va vous aider à convertir vos comptes existants dans la monnaie "
-#~ "euro (EUR).\n"
-#~ "\n"
-#~ "Par la suite, le terme « monnaie de la zone euro » sera utilisé pour les "
-#~ "monnaies qui vont être remplacées par l'euro.\n"
-#~ "\n"
-#~ "Aucun changement ne sera effectif jusqu'à ce que vous cliquiez sur "
-#~ "« Terminer » sur la dernière page de ce druide."
-
-# messages-i18n.c:92
-#~ msgid "Where to create the Euro accounts?"
-#~ msgstr "Où créer les comptes euro ?"
-
-#~ msgid ""
-#~ "For each of your Euroland accounts, the druid will create a new EUR "
-#~ "account. \n"
-#~ "\n"
-#~ "Please choose the place in your account hierarchy where you would\n"
-#~ "like the EUR accounts to be created."
-#~ msgstr ""
-#~ "Pour tous vos comptes de la zone euro, le druide va créer un nouveau "
-#~ "compte EUR.\n"
-#~ "\n"
-#~ "Choisissez s'il vous plaît l'endroit dans votre hiérarchie de comptes où "
-#~ "vous désirez que les comptes EUR soient créés."
-
-#~ msgid ""
-#~ "Create a new toplevel account hierarchy as a copy of the existing one"
-#~ msgstr ""
-#~ "Créer une nouvelle hiérarchies de compte à la racine en copiant celle qui "
-#~ "existe déjà."
-
-#~ msgid ""
-#~ "Use same toplevel accounts. Create a copy of the rest of the accounts"
-#~ msgstr ""
-#~ "Gardez les comptes qui sont à la racine. Créer une copie des autres "
-#~ "comptes."
-
-#~ msgid ""
-#~ "Use existing account hierarchy. Create only a copy of those \n"
-#~ "accounts that have no subaccounts"
-#~ msgstr ""
-#~ "Utiliser la même hiérarchie de comptes. Créer seulement une copie des\n"
-#~ "comptes qui n'ont pas de sous-comptes."
-
-# po/guile_strings.txt:153
-#~ msgid "How to name the new accounts?"
-#~ msgstr "Comment nommer les nouveau comptes ?"
-
-#~ msgid ""
-#~ "Please choose a naming scheme for the new Euro accounts \n"
-#~ "and the old Euroland accounts."
-#~ msgstr ""
-#~ "Choisissez s'il vous plaît un schéma pour nommer les nouveaux comptes "
-#~ "euro et les\n"
-#~ "anciens comptes de la zone euro."
-
-#~ msgid ""
-#~ "The name of each newly created Euro account is copied from\n"
-#~ "the old Euroland account, plus an appended 'EUR'"
-#~ msgstr ""
-#~ "Le nom de chaque compte euro nouvellement créé est copié de celui de\n"
-#~ "l'ancien compte de la zone euro, avec un « EUR » ajouté."
-
-#~ msgid ""
-#~ "The name of each old Euroland account is modified by appending \n"
-#~ "the respective currency symbol of the Euroland currency. \n"
-#~ "The name of the newly created Euro account is copied from the\n"
-#~ "old Euroland account."
-#~ msgstr ""
-#~ "Le nom de chaque ancien compte de la zone euro est modifié en ajoutant\n"
-#~ "le symbole monétaire de la devise de la zone euro correspondante.\n"
-#~ "Le nom de chaque compte euro nouvellement créé est copié de celui de\n"
-#~ "l'ancien compte de la zone euro."
-
-#~ msgid "Finish Euro Conversion"
-#~ msgstr "Terminer la conversion euro"
-
-#~ msgid ""
-#~ "If you have finished choosing your Euro conversion settings,\n"
-#~ "press 'Finish'.\n"
-#~ "\n"
-#~ "The druid will then perform the following steps:\n"
-#~ "\n"
-#~ "1. Create new accounts according to your settings.\n"
-#~ "2. Create currency exchange accounts.\n"
-#~ "3. Exchange all amounts from Euroland accounts to their\n"
-#~ "respective Euro account.\n"
-#~ "\n"
-#~ "You may also press 'Back' to review your settings, or 'Cancel'\n"
-#~ "to quit without making any changes."
-#~ msgstr ""
-#~ "Si vous avez terminer vos choix de réglage pour la conversion euro, "
-#~ "appuyez sur « Terminer ».\n"
-#~ "\n"
-#~ "Le druide va alors effectuer les actions suivantes :\n"
-#~ "\n"
-#~ "1. Créer les nouveaux comptes conformément à vos réglables.\n"
-#~ "2. Créer les comptes de conversion de monnaie.\n"
-#~ "3. Transférer tous les montants des comptes de la zone euro vers les "
-#~ "comptes euro correspondants.\n"
-#~ "\n"
-#~ "Vous pouvez également appuyez sur « Précédent » pour réviser vos "
-#~ "réglages, ou « Annuler » pour quitter sans effectuer aucun changement."
-
-#~ msgid "Couldn't find pixmap file: %s"
-#~ msgstr "Impossible de trouver le fichier image : %s"
-
-#~ msgid "Couldn't create pixmap from file: %s"
-#~ msgstr "Impossible de créer l'image à partir de : %s"
-
-#~ msgid "Badly formed gnc-register: URL."
-#~ msgstr "gnc-register : adresse URL mal formée"
-
-#~ msgid "checking SSL certificate..."
-#~ msgstr "Vérification du certificat SSL..."
-
-#~ msgid " ... done\n"
-#~ msgstr "... fait\n"
-
-# messages-i18n.c:149
-#~ msgid "_Preferences..."
-#~ msgstr "_Préférences..."
-
-# messages-i18n.c:99
-#~ msgid "Open the global preferences dialog"
-#~ msgstr "Ouvrir la boîte de dialogue des préférences globales."
-
-#~ msgid "_Euro Conversion..."
-#~ msgstr "Conversion _euro..."
-
-# messages-i18n.c:102
-#~ msgid "Do the Euro conversion of the account hierarchy"
-#~ msgstr "Effectuer la conversion euro de l'arborescence des comptes"
-
-# src/gnome/glade-gnc-dialogs.c:638
-#~ msgid "_Manual"
-#~ msgstr "_Manuel"
-
-# messages-i18n.c:332
-#~ msgid "_Settings"
-#~ msgstr "_Paramètres"
-
-# messages-i18n.c:104
-#~ msgid "Print a report for this register"
-#~ msgstr "Imprimer un rapport pour ce registre"
-
-# messages-i18n.c:75
-#~ msgid "Set the date range of this register"
-#~ msgstr "Mettre une échelle de date pour ce registre"
-
-# messages-i18n.c:161
-#~ msgid "_Style"
-#~ msgstr "_Style"
-
-# messages-i18n.c:104
-#~ msgid "Open an invoice report window for this register"
-#~ msgstr "Ouvrir un rapport de facturation pour ce registre"
-
-# messages-i18n.c:138
-#~ msgid "D_uplicate"
-#~ msgstr "D_upliquer"
-
-# messages-i18n.c:336
-#~ msgid "_Split"
-#~ msgstr "Répartition"
-
-#~ msgid "_Check & Repair All"
-#~ msgstr "Tout _vérifier & réparer"
-
-#~ msgid ""
-#~ "Check for and repair unbalanced transactions and orphan splits in all "
-#~ "transactions of this account"
-#~ msgstr ""
-#~ "Identifier et corriger les transactions non soldées et les répartitions "
-#~ "orphelines dans toutes les transactions de ce compte"
-
-#~ msgid "Check & _Repair Current"
-#~ msgstr "Vérifier & réparer transaction"
-
-#~ msgid ""
-#~ "Check for and repair unbalanced transactions and orphan splits in this "
-#~ "transaction"
-#~ msgstr ""
-#~ "Identifier et corriger les transactions non soldées et les répartitions "
-#~ "orphelines dans cette transaction"
-
-# src/gnome/glade-gnc-dialogs.c:1149
-#~ msgid "_Print Check..."
-#~ msgstr "Imprimer _chèque"
-
-# messages-i18n.c:153
-#~ msgid "_Register"
-#~ msgstr "_Registre"
-
-# messages-i18n.c:27
-#~ msgid ""
-#~ "This selection will delete the whole transaction. This is what you "
-#~ "usually want."
-#~ msgstr ""
-#~ "Cette sélection supprimera la transaction en totalité. C'est ce que vous "
-#~ "voudrez habituellement faire."
-
-# messages-i18n.c:27
-#~ msgid ""
-#~ "This selection will delete the whole transaction.\n"
-#~ "\n"
-#~ "You would be deleting a transaction with reconciled splits!"
-#~ msgstr ""
-#~ "Cette sélection supprimera la transaction en totalité.\n"
-#~ "\n"
-#~ "Vous allez supprimer une transaction avec des répartitions rapprochés !"
-
-# messages-i18n.c:28
-#~ msgid ""
-#~ "Warning: Just deleting all the other splits will make your account "
-#~ "unbalanced. You probably shouldn't do this unless you're going to "
-#~ "immediately add another split to bring the transaction back into balance."
-#~ msgstr ""
-#~ "Attention : l'effacement des autres répartitions uniquement fera de votre "
-#~ "compte un compte non équilibré. Vous ne devriez probablement pas faire "
-#~ "cela à moins que vous n'alliez immédiatement ajouter une autre "
-#~ "répartition qui rééquilibrera la transaction"
-
-#~ msgid "You would be deleting reconciled splits!"
-#~ msgstr "Vous allez supprimer des répartitions rapprochées"
-
-#~ msgid "You would be deleting a reconciled split!"
-#~ msgstr "Vous allez supprimer une répartition rapprochée !"
-
-# messages-i18n.c:75
-#~ msgid "Set the search path for .scm files."
-#~ msgstr "Définir le chemin pour les fichiers .scm"
-
-# messages-i18n.c:294 po/guile_strings.txt:205
-# src/gnome/glade-gnc-dialogs.c:644
-#~ msgid "Welcome"
-#~ msgstr "Bienvenue"
-
-# messages-i18n.c:293
-#~ msgid "Importing Data"
-#~ msgstr "Importer"
-
-#~ msgid "Gnome MDI"
-#~ msgstr "MDI Gnome"
-
-# po/guile_strings.txt:246
-#~ msgid "Quicken"
-#~ msgstr "Quicken"
-
-#~ msgid "MYM"
-#~ msgstr "MYM ??"
-
-# src/gnome/glade-gnc-dialogs.c:415
-#~ msgid "Vs. Categories"
-#~ msgstr "Vs catégories"
-
-# po/guile_strings.txt:295
-#~ msgid "Income/Expense"
-#~ msgstr "Revenus et dépenses"
-
-# src/gnome/glade-gnc-dialogs.c:786
-#~ msgid "New Setup"
-#~ msgstr "Nouvelle configuration"
-
-#~ msgid "Chart of"
-#~ msgstr "Graphique de"
-
-# po/guile_strings.txt:122
-#~ msgid "Editing"
-#~ msgstr "Édition"
-
-# messages-i18n.c:324 po/guile_strings.txt:181
-#~ msgid "Registers"
-#~ msgstr "Registres"
-
-#~ msgid "Shortcuts"
-#~ msgstr "Raccourcis"
-
-# messages-i18n.c:174
-#~ msgid "Date Input"
-#~ msgstr "Entrée de date"
-
-#~ msgid "Keyboard"
-#~ msgstr "Clavier"
-
-# messages-i18n.c:238
-#~ msgid "Reconciliation"
-#~ msgstr "Rapprochement"
-
-#~ msgid "Record Keeping"
-#~ msgstr "Enregistrer"
-
-# messages-i18n.c:259
-#~ msgid "Check Printing"
-#~ msgstr "Imprimer chèque"
-
-#~ msgid "Capital Gains"
-#~ msgstr "Gain en capital"
-
-# messages-i18n.c:274
-#~ msgid "Depreciation"
-#~ msgstr "Dépréciation/Moins-values"
-
-#~ msgid "Payables/Receivables"
-#~ msgstr "Dettes/Encaissements"
-
-# messages-i18n.c:326
-#~ msgid "Reports"
-#~ msgstr "Rapports"
-
-# po/guile_strings.txt:24
-#~ msgid "Balance Tracking"
-#~ msgstr "Équilibrage"
-
-#~ msgid "TXF Export"
-#~ msgstr "Exporter TXF"
-
-#~ msgid "TXF Anomalies"
-#~ msgstr "Anomalies TXF"
-
-# messages-i18n.c:317 src/gnome/glade-gnc-dialogs.c:971
-#~ msgid "Printing"
-#~ msgstr "Impression"
-
-#~ msgid "Hacking Documentation"
-#~ msgstr "Documentation de développeurs (hacking)"
-
-#~ msgid "GNU GPL"
-#~ msgstr "Licence publique générale GNU"
-
-#~ msgid "URL Tests"
-#~ msgstr "Tests URL"
-
-#~ msgid "gnucash.org"
-#~ msgstr "gnucash.org"
-
-#~ msgid "gnumatic.com"
-#~ msgstr "gnumatic.com"
-
-#~ msgid "slashdot.org"
-#~ msgstr "slashdot.org"
-
-# po/guile_strings.txt:169
-#~ msgid "US"
-#~ msgstr "US"
-
-# po/guile_strings.txt:36
-#~ msgid "UK"
-#~ msgstr "GB"
-
-# po/guile_strings.txt:99
-#~ msgid "Europe"
-#~ msgstr "Europe"
-
-# po/guile_strings.txt:119
-#~ msgid "ISO"
-#~ msgstr "ISO"
-
-# messages-i18n.c:303
-#~ msgid "Network"
-#~ msgstr "Réseau"
-
-#~ msgid "Allow http network access"
-#~ msgstr "Autoriser l'accès au réseau HTTP"
-
-#~ msgid "Enable GnuCash's HTTP client support."
-#~ msgstr "Activer le support client HTTP GnuCash"
-
-#~ msgid "Allow https connections using OpenSSL"
-#~ msgstr "Autoriser les connexion par OpenSSL"
-
-#~ msgid "Enable secure HTTP connections using OpenSSL"
-#~ msgstr "Activer les connexions HTTP sécurisées via OpenSSL"
-
-#~ msgid "Enable GnuCash Network"
-#~ msgstr "Activer le réseau GnuCash"
-
-#~ msgid "The GnuCash Network server provides support and other services"
-#~ msgstr ""
-#~ "Le serveur de réseau GnuCash fournit de l'assistance et d'autres services"
-
-#~ msgid "GnuCash Network server"
-#~ msgstr "Serveur de réseau GnuCash"
-
-#~ msgid "Host to connect to for user registration and support services"
-#~ msgstr ""
-#~ "Hôte auquel se connecter pour l'enregistrement des utilisateurs et les "
-#~ "services d'assistance"
-
-#~ msgid "Shared files directory."
-#~ msgstr "Répertoire des fichiers partagés"
-
-#~ msgid ""
-#~ "A list of strings indicating the load path for (gnc:load name).\n"
-#~ "Each element must be a string representing a directory or a symbol\n"
-#~ "where 'default expands to the default path, and 'current expands to\n"
-#~ "the current value of the path."
-#~ msgstr ""
-#~ "Une liste de chaînes de caractères indiquant le chemin pour (gnc:load "
-#~ "name).\n"
-#~ "Chaque élément doit être une chaîne de caractères représentant un "
-#~ "répertoire ou un lien.\n"
-#~ "« Défaut » se réfère au chemin par défaut et « courant » se réfère\n"
-#~ "à la valeur courante du chemin"
-
-#~ msgid "_Utility"
-#~ msgstr "_Utilitaire"
-
-#~ msgid "Welcome Extravaganza"
-#~ msgstr "Écran de bienvenue"
-
-# po/guile_strings.txt:171
-#~ msgid "Balance sheet at %s"
-#~ msgstr "Feuille de solde à %s"
-
-# messages-i18n.c:106
-#~ msgid "Select file for .TXF export"
-#~ msgstr "Choisir un fichier pour l'exportation TXF"
-
-#~ msgid ""
-#~ "File: \"%s\" exists.\n"
-#~ "Overwrite?"
-#~ msgstr ""
-#~ "Le fichier « %s » existe.\n"
-#~ "L'écraser ?"
-
-#~ msgid ""
-#~ "The URL \n"
-#~ "    %s\n"
-#~ "is in use by another user."
-#~ msgstr ""
-#~ "l'URL\n"
-#~ "    %s\n"
-#~ "est utilisée par un autre utilisateur"
-
-# messages-i18n.c:155
-#~ msgid "Scrub A_ccount"
-#~ msgstr "Nettoyer le _compte"
-
-# messages-i18n.c:108
-#~ msgid "Identify and fix problems in the account"
-#~ msgstr "Identifier et corriger les problèmes dans le compte."
-
-# messages-i18n.c:156
-#~ msgid "Scrub A_ll"
-#~ msgstr "Tout nettoyer"
-
-# messages-i18n.c:109
-#~ msgid "Identify and fix problems in all the accounts"
-#~ msgstr "Identifier et corriger les problèmes dans tous les comptes."
-
-# messages-i18n.c:154
-#~ msgid "_Scrub"
-#~ msgstr "Nettoyer"
-
-# messages-i18n.c:207
-#~ msgid "_Scrub All"
-#~ msgstr "_Tout nettoyer"
-
-# messages-i18n.c:111
-#~ msgid ""
-#~ "Identify and fix problems in the transactions displayed in this register"
-#~ msgstr ""
-#~ "Identifier et corriger les problèmes dans les comptes de ce registre."
-
-# messages-i18n.c:206
-#~ msgid "_Scrub Current"
-#~ msgstr "Nettoyer le compte"
-
-# messages-i18n.c:108
-#~ msgid "Identify and fix problems in the current transaction"
-#~ msgstr "Identifier et corriger les problèmes dans la transaction courante"
-
-#~ msgid ""
-#~ "Use an Equity account to transfer the opening balance. The Equity account "
-#~ "will be created if it doesn't exist already."
-#~ msgstr ""
-#~ "Utiliser un compte de capitaux propres pour transférer le solde initial."
-#~ "Le compte de capitaux sera créé s'il n'existe pas déjà"
-
-#~ msgid "Use the account select below to transfer the opening balance."
-#~ msgstr ""
-#~ "Utiliser le compte sélectionné ci dessous pour transférer les capitaux "
-#~ "propres"
-
-# messages-i18n.c:293
-#~ msgid "Support"
-#~ msgstr "Support"
-
-# messages-i18n.c:324 po/guile_strings.txt:181
-#~ msgid "Register GnuCash"
-#~ msgstr "Enregistrer GnuCash"
-
-#~ msgid "GnuCash Network Home"
-#~ msgstr "Réseau GnuCash"
+msgstr "Attente des recevables"
 
Index: POTFILES.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/po/POTFILES.in,v
retrieving revision 1.88.2.5
retrieving revision 1.88.2.6
diff -Lpo/POTFILES.in -Lpo/POTFILES.in -u -r1.88.2.5 -r1.88.2.6
--- po/POTFILES.in
+++ po/POTFILES.in
@@ -403,9 +403,6 @@
 src/import-export/hbci/gnc-hbci-utils.c
 src/import-export/hbci/gncmod-hbci.c
 src/import-export/hbci/hbci-interaction.c
-src/import-export/hbci/hbci-progressmon.c
-src/import-export/hbci/glade/hbci.glade
-src/import-export/hbci/glade/hbcipass.glade
 src/import-export/hbci/test/test-link-module.c
 src/import-export/hbci/gnc-plugin-hbci.c
 src/import-export/log-replay/gnc-log-replay.c
Index: option-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/option-util.c,v
retrieving revision 1.19.4.3
retrieving revision 1.19.4.4
diff -Lsrc/app-utils/option-util.c -Lsrc/app-utils/option-util.c -u -r1.19.4.3 -r1.19.4.4
--- src/app-utils/option-util.c
+++ src/app-utils/option-util.c
@@ -645,7 +645,7 @@
   initialize_getters();
 
   return gnc_guile_call1_symbol_to_string(getters.type,
-					  option->guile_option);
+                                          option->guile_option);
 }
 
 
@@ -680,7 +680,7 @@
   initialize_getters();
 
   return gnc_guile_call1_to_string(getters.documentation,
-				   option->guile_option);
+                                   option->guile_option);
 }
 
 
@@ -698,7 +698,7 @@
   initialize_getters();
 
   return gnc_guile_call1_to_procedure(getters.getter,
-				      option->guile_option);
+                                      option->guile_option);
 }
 
 
@@ -716,7 +716,7 @@
   initialize_getters();
 
   return gnc_guile_call1_to_procedure(getters.setter,
-				      option->guile_option);
+                                      option->guile_option);
 }
 
 
@@ -734,7 +734,7 @@
   initialize_getters();
 
   return gnc_guile_call1_to_procedure(getters.default_getter,
-				      option->guile_option);
+                                      option->guile_option);
 }
 
 
@@ -752,7 +752,7 @@
   initialize_getters();
 
   return gnc_guile_call1_to_procedure(getters.value_validator,
-				      option->guile_option);
+                                      option->guile_option);
 }
 
 
@@ -896,7 +896,7 @@
   initialize_getters();
 
   value = scm_call_2(getters.index_to_value, option->guile_option,
-		     scm_int2num(index));
+                     scm_int2num(index));
 
   return value;
 }
@@ -923,7 +923,7 @@
   initialize_getters();
 
   name = scm_call_2(getters.index_to_name, option->guile_option,
-		    scm_int2num(index));
+                    scm_int2num(index));
   if (name == SCM_UNDEFINED)
     return NULL;
   
@@ -952,7 +952,7 @@
   initialize_getters();
 
   help = scm_call_2(getters.index_to_description, option->guile_option,
-		    scm_int2num(index));
+                    scm_int2num(index));
   if (help == SCM_UNDEFINED)
     return NULL;
 
@@ -1477,7 +1477,7 @@
     if (old != NULL)
     {
       if (section->section_name != NULL)
-	free(section->section_name);
+        free(section->section_name);
       g_free(section);
       section = old->data;
     }
@@ -1487,7 +1487,7 @@
   }
 
   section->options = g_slist_insert_sorted(section->options, option,
-					   compare_option_tags);
+                                           compare_option_tags);
 }
 
 
@@ -1591,7 +1591,7 @@
   section_key.section_name = (char *) section_name;
 
   section_node = g_slist_find_custom(odb->option_sections, &section_key,
-				     compare_sections);
+                                     compare_sections);
 
   if (section_node == NULL)
     return NULL;
@@ -1733,7 +1733,7 @@
     section = gnc_option_section(option);
 
     gnc_send_gui_error(_("There is a problem with option %s:%s.\n%s"),
-			   section ? section : "(null)",
+                           section ? section : "(null)",
                            name ? name : "(null)",
                            message ? message : "(null)");
 
@@ -1771,12 +1771,12 @@
     section = section_node->data;
 
     for (option_node = section->options; option_node;
-	 option_node = option_node->next) {
+         option_node = option_node->next) {
 
       option = option_node->data;
 
       if (option->changed)
-	return TRUE;
+        return TRUE;
     }
   }
   return FALSE;
@@ -1814,9 +1814,9 @@
 
       if (option->changed)
       {
-	gnc_commit_option(option_node->data);
-	changed_something = TRUE;
-	option->changed = FALSE;
+        gnc_commit_option(option_node->data);
+        changed_something = TRUE;
+        option->changed = FALSE;
       }
 
       option_node = option_node->next;
@@ -2021,7 +2021,7 @@
     {
       value = scm_call_0(getter);
       if (SCM_STRINGP(value))
-	return gh_scm2newstr(value, NULL);
+        return gh_scm2newstr(value, NULL);
     }
   }
 
@@ -2086,7 +2086,7 @@
     {
       value = scm_call_0(getter);
       if (SCM_SYMBOLP(value))
-	return gh_symbol2newstr(value, NULL);
+        return gh_symbol2newstr(value, NULL);
     }
   }
 
@@ -2124,13 +2124,13 @@
 gnc_option_db_lookup_date_option(GNCOptionDB *odb,
                                  const char *section,
                                  const char *name,
-				 gboolean *is_relative,
+                                 gboolean *is_relative,
                                  Timespec *set_ab_value,
-				 char **set_rel_value, 
+                                 char **set_rel_value, 
                                  Timespec *default_value)
 {
   GNCOption *option;
-  Timespec temp;
+  Timespec temp = {0,0};
   char *symbol;
   SCM getter;
   SCM value;
@@ -2138,7 +2138,9 @@
   initialize_getters();
 
   if (set_ab_value == NULL)
+  {
     set_ab_value = &temp;
+  }
 
   if(set_rel_value != NULL)
   {
@@ -2147,7 +2149,7 @@
  
   if (is_relative != NULL)
   {
-      *is_relative = FALSE;
+    *is_relative = FALSE;
   }
   
   option = gnc_option_db_get_option_by_name(odb, section, name);
@@ -2230,7 +2232,7 @@
     {
       value = scm_call_0(getter);
       if (SCM_NUMBERP(value))
-	return scm_num2dbl(value, __FUNCTION__);
+        return scm_num2dbl(value, __FUNCTION__);
     }
   }
 
@@ -2513,9 +2515,9 @@
 \********************************************************************/
 gboolean
 gnc_option_db_set_boolean_option(GNCOptionDB *odb,
-				 const char *section,
-				 const char *name,
-				 gboolean value)
+                                 const char *section,
+                                 const char *name,
+                                 gboolean value)
 {
   GNCOption *option;
   SCM scm_value;
@@ -2553,9 +2555,9 @@
 \********************************************************************/
 gboolean
 gnc_option_db_set_string_option(GNCOptionDB *odb,
-				const char *section,
-				const char *name,
-				const char *value)
+                                const char *section,
+                                const char *name,
+                                const char *value)
 {
   GNCOption *option;
   SCM scm_value;
@@ -2695,8 +2697,8 @@
  */
 
 gboolean gnc_dateformat_option_value_parse(SCM value, DateFormat *format,
-					   GNCDateMonthFormat *months,
-					   gboolean *years, char **custom)
+                                           GNCDateMonthFormat *months,
+                                           gboolean *years, char **custom)
 {
   SCM val;
   char *str;
@@ -2717,8 +2719,8 @@
 
     if (format) {
       if (gnc_date_string_to_dateformat(str, format)) {
-	free(str);
-	break;
+        free(str);
+        break;
       }
     }
 
@@ -2733,8 +2735,8 @@
 
     if (months) {
       if (gnc_date_string_to_monthformat(str, months)) {
-	free(str);
-	break;
+        free(str);
+        break;
       }
     }
 
@@ -2766,7 +2768,7 @@
 }
 
 SCM gnc_dateformat_option_set_value(DateFormat format, GNCDateMonthFormat months,
-				    gboolean years, const char *custom)
+                                    gboolean years, const char *custom)
 {
   SCM value = SCM_EOL;
   SCM val;
Index: file-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/file-utils.c,v
retrieving revision 1.1.6.3
retrieving revision 1.1.6.4
diff -Lsrc/app-utils/file-utils.c -Lsrc/app-utils/file-utils.c -u -r1.1.6.3 -r1.1.6.4
--- src/app-utils/file-utils.c
+++ src/app-utils/file-utils.c
@@ -120,7 +120,10 @@
     g_free(buf);
     buf=NULL;
   }
-  buf[size] = '\0';
+  else
+  {
+    buf[size] = '\0';
+  }
 
   close(fd);
   *data = buf;
Index: gnc-exp-parser.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-exp-parser.c,v
retrieving revision 1.6.4.1
retrieving revision 1.6.4.2
diff -Lsrc/app-utils/gnc-exp-parser.c -Lsrc/app-utils/gnc-exp-parser.c -u -r1.6.4.1 -r1.6.4.2
--- src/app-utils/gnc-exp-parser.c
+++ src/app-utils/gnc-exp-parser.c
@@ -108,12 +108,12 @@
         else if (SCM_STRINGP (val_scm))
           {
             char *s;
-            const char *err;
+            gboolean err;
 
             s = gh_scm2newstr (val_scm, NULL);
 
             err = string_to_gnc_numeric (s, &value);
-            if (err == NULL)
+            if (err == FALSE)
               good = FALSE;
 
             free (s);
Index: test-scm-query-string.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/test/test-scm-query-string.c,v
retrieving revision 1.2.4.3
retrieving revision 1.2.4.4
diff -Lsrc/app-utils/test/test-scm-query-string.c -Lsrc/app-utils/test/test-scm-query-string.c -u -r1.2.4.3 -r1.2.4.4
--- src/app-utils/test/test-scm-query-string.c
+++ src/app-utils/test/test-scm-query-string.c
@@ -41,7 +41,7 @@
   if (!xaccQueryEqual (q, q2))
   {
     failure ("queries don't match");
-    fprintf (stderr, "%s\n\n", str);
+    fprintf (stderr, "%s\n\n", str ? str : "(null)");
     scm_q = gnc_query2scm (q2);
     gh_display (scm_q); gh_newline ();
     exit (1);
Index: sixtp-dom-parsers.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/sixtp-dom-parsers.c,v
retrieving revision 1.12.4.5
retrieving revision 1.12.4.6
diff -Lsrc/backend/file/sixtp-dom-parsers.c -Lsrc/backend/file/sixtp-dom-parsers.c -u -r1.12.4.5 -r1.12.4.6
--- src/backend/file/sixtp-dom-parsers.c
+++ src/backend/file/sixtp-dom-parsers.c
@@ -479,7 +479,7 @@
 
     ret = g_new(gnc_numeric, 1);
 
-    if(string_to_gnc_numeric(content, ret) != NULL)
+    if(string_to_gnc_numeric(content, ret))
     {
         g_free(content);
         return ret;
Index: io-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/io-utils.c,v
retrieving revision 1.5.4.2
retrieving revision 1.5.4.3
diff -Lsrc/backend/file/io-utils.c -Lsrc/backend/file/io-utils.c -u -r1.5.4.2 -r1.5.4.3
--- src/backend/file/io-utils.c
+++ src/backend/file/io-utils.c
@@ -66,14 +66,14 @@
         AccountGroup *newgrp;
         
         accnode = gnc_account_dom_tree_create((Account*)(node->data),
-					      gd && gd->exporting);
+                                              gd && gd->exporting);
 
         xmlElemDump(out, NULL, accnode);
         fprintf(out, "\n");
 
         xmlFreeNode(accnode);
-	gd->counter.accounts_loaded++;
-	run_callback(gd, "account");
+        gd->counter.accounts_loaded++;
+        run_callback(gd, "account");
 
         newgrp = xaccAccountGetChildren((Account*)(node->data));
 
Index: io-gncbin-r.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/io-gncbin-r.c,v
retrieving revision 1.15.2.5
retrieving revision 1.15.2.6
diff -Lsrc/backend/file/io-gncbin-r.c -Lsrc/backend/file/io-gncbin-r.c -u -r1.15.2.5 -r1.15.2.6
--- src/backend/file/io-gncbin-r.c
+++ src/backend/file/io-gncbin-r.c
@@ -826,12 +826,12 @@
 
    /* first, see if we've already created the account */
    acc = (Account *) g_hash_table_lookup(ids_to_finished_accounts,
-                                         (gconstpointer) acc_id);
+                                         GINT_TO_POINTER(acc_id));
    if (acc) return acc;
 
    /* next, see if its an unclaimed account */
    acc = (Account *) g_hash_table_lookup(ids_to_unfinished_accounts,
-                                         (gconstpointer) acc_id);
+                                         GINT_TO_POINTER(acc_id));
    if (acc) return acc;
 
    /* if neither, then it does not yet exist.  Create it.
@@ -839,7 +839,7 @@
    acc = xaccMallocAccount (book);
    xaccAccountBeginEdit(acc);
    g_hash_table_insert(ids_to_unfinished_accounts,
-                       (gpointer) acc_id,
+                       GINT_TO_POINTER(acc_id),
                        (gpointer) acc);
    return acc;
 }
Index: gncCustomer.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncCustomer.h,v
retrieving revision 1.13.4.5
retrieving revision 1.13.4.6
diff -Lsrc/business/business-core/gncCustomer.h -Lsrc/business/business-core/gncCustomer.h -u -r1.13.4.5 -r1.13.4.6
--- src/business/business-core/gncCustomer.h
+++ src/business/business-core/gncCustomer.h
@@ -31,6 +31,29 @@
 #ifndef GNC_CUSTOMER_H_
 #define GNC_CUSTOMER_H_
 
+/** @struct GncCustomer
+
+credit, discount and shipaddr are unique to GncCustomer\n
+id, name, notes, terms, addr, currency, taxtable, taxtable_override
+taxincluded, active and jobs are identical to ::GncVendor.
+
+ at param	QofInstance     inst;
+ at param	char *          id;
+ at param	char *          name;
+ at param	char *          notes;
+ at param	GncBillTerm *   terms;
+ at param	GncAddress *    addr;
+ at param	gnc_commodity * currency;
+ at param	GncTaxTable*    taxtable;
+ at param	gboolean        taxtable_override;
+ at param	GncTaxIncluded  taxincluded;
+ at param	gboolean        active;
+ at param	GList *         jobs;
+ at param	gnc_numeric     credit;
+ at param	gnc_numeric     discount;
+ at param	GncAddress *    shipaddr;
+
+*/
 typedef struct _gncCustomer GncCustomer;
 
 #include "qofbook.h"
@@ -75,10 +98,6 @@
 void gncCustomerAddJob (GncCustomer *customer, GncJob *job);
 void gncCustomerRemoveJob (GncCustomer *customer, GncJob *job);
 
-/** added for QOF standardisation */
-void gncCustomerSetTaxIncluded_q (GncCustomer *customer, gint taxincl);
-gint gncCustomerGetTaxIncluded_q (GncCustomer *cust);
-
 /** @} */
 
 /** @name Get Functions */
Index: gncJob.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncJob.h,v
retrieving revision 1.9.4.4
retrieving revision 1.9.4.5
diff -Lsrc/business/business-core/gncJob.h -Lsrc/business/business-core/gncJob.h -u -r1.9.4.4 -r1.9.4.5
--- src/business/business-core/gncJob.h
+++ src/business/business-core/gncJob.h
@@ -68,7 +68,7 @@
 gboolean gncJobIsDirty (GncJob *job);
 
 /** Return a pointer to the instance gncJob that is identified
- *  by the guid, and is residing in the book. Returns NULL if the 
+ *  by the guid, and is residing in the book. Returns NULL if the
  *  instance can't be found.
  *  Equivalent function prototype is
  *  GncJob * gncJobLookup (QofBook *book, const GUID *guid);
Index: gncInvoice.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncInvoice.c,v
retrieving revision 1.56.4.6
retrieving revision 1.56.4.7
diff -Lsrc/business/business-core/gncInvoice.c -Lsrc/business/business-core/gncInvoice.c -u -r1.56.4.6 -r1.56.4.7
--- src/business/business-core/gncInvoice.c
+++ src/business/business-core/gncInvoice.c
@@ -612,6 +612,7 @@
   return invoice->active;
 }
 
+
 gnc_numeric gncInvoiceGetToChargeAmount (GncInvoice *invoice)
 {
   if (!invoice) return gnc_numeric_zero();
@@ -742,7 +743,7 @@
 
 Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc,
 				       Timespec *post_date, Timespec *due_date,
-				       const char * memo)
+				       const char * memo, gboolean accumulatesplits)
 {
   Transaction *txn;
   GNCLot *lot = NULL;
@@ -853,7 +854,25 @@
 		gncEntryGetBillAccount (entry));
     if (this_acc) {
       if (gnc_numeric_check (value) == GNC_ERROR_OK) {
-	splitinfo = gncAccountValueAdd (splitinfo, this_acc, value);
+	if (accumulatesplits) {
+	    gncAccountValueAdd (splitinfo, this_acc, value);
+	} else {
+		Split *split;
+
+		split = xaccMallocSplit (invoice->inst.book);
+		/* set action and memo? */
+
+		xaccSplitSetMemo (split, gncEntryGetDescription (entry));
+		xaccSplitSetAction (split, type);
+
+		xaccSplitSetBaseValue (split, (reverse ? gnc_numeric_neg (value)
+				: value),
+				 invoice->currency);
+       	xaccAccountBeginEdit (this_acc);
+        xaccAccountInsertSplit (this_acc, split);
+        xaccAccountCommitEdit (this_acc);
+        xaccTransAppendSplit (txn, split);
+	}
 
 	/* If there is a credit-card account, and this is a CCard
 	 * payment type, the don't add it to the total, and instead
@@ -1142,6 +1161,7 @@
   Split *split;
   GList *lot_list, *fifo = NULL;
   GNCLot *lot, *prepay_lot = NULL;
+  GncInvoice *invoice;
   const char *name;
   gnc_commodity *commodity;
   gnc_numeric split_amt;
@@ -1240,6 +1260,11 @@
     xaccTransAppendSplit (txn, split);
     gnc_lot_add_split (lot, split);
 
+    /* Now send an event for the invoice so it gets updated as paid */
+    invoice = gncInvoiceGetInvoiceFromLot(lot);
+    if (invoice)
+      gnc_engine_gen_event (&invoice->inst.entity, GNC_EVENT_MODIFY);
+
     if (gnc_numeric_zero_p (amount))
       break;
   }
Index: gncEntry.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncEntry.h,v
retrieving revision 1.22.4.3
retrieving revision 1.22.4.4
diff -Lsrc/business/business-core/gncEntry.h -Lsrc/business/business-core/gncEntry.h -u -r1.22.4.3 -r1.22.4.4
--- src/business/business-core/gncEntry.h
+++ src/business/business-core/gncEntry.h
@@ -100,6 +100,7 @@
 void gncEntrySetInvDiscount (GncEntry *entry, gnc_numeric discount);
 void gncEntrySetInvDiscountType (GncEntry *entry, GncAmountType type);
 void gncEntrySetInvDiscountHow (GncEntry *entry, GncDiscountHow how);
+
 /** @} */
 
 /** @name Vendor Bills (and Employee Expenses) */
@@ -208,21 +209,32 @@
 void gncEntryCommitEdit (GncEntry *entry);
 int gncEntryCompare (GncEntry *a, GncEntry *b);
 
-#define ENTRY_DATE	"date"
-#define ENTRY_DATE_ENTERED "date-entered"
-#define ENTRY_DESC	"desc"
-#define ENTRY_ACTION	"action"
-#define ENTRY_NOTES	"notes"
-#define ENTRY_QTY	"qty"
-
-#define ENTRY_IPRICE	"iprice"
-#define ENTRY_BPRICE	"bprice"
-#define ENTRY_BILLABLE	"billable?"
-#define ENTRY_BILLTO	"bill-to"
-
-#define ENTRY_ORDER	"order"
-#define ENTRY_INVOICE	"invoice"
-#define ENTRY_BILL	"bill"
+#define ENTRY_DATE			"date"
+#define ENTRY_DATE_ENTERED 	"date-entered"
+#define ENTRY_DESC			"desc"
+#define ENTRY_ACTION		"action"
+#define ENTRY_NOTES			"notes"
+#define ENTRY_QTY			"qty"
+
+#define ENTRY_IPRICE		"iprice"
+#define ENTRY_BPRICE		"bprice"
+#define ENTRY_BILLABLE		"billable?"
+#define ENTRY_BILLTO		"bill-to"
+
+#define ENTRY_ORDER			"order"
+#define ENTRY_INVOICE		"invoice"
+#define ENTRY_BILL			"bill"
+
+#define ENTRY_INV_DISC_TYPE		"discount-type"
+#define ENTRY_INV_DISC_HOW		"discount-method"
+
+#define ENTRY_INV_TAXABLE	"invoice-taxable"
+#define ENTRY_BILL_TAXABLE	"bill-taxable"
+#define ENTRY_INV_TAX_INC	"invoice-tax-included"
+#define ENTRY_BILL_TAX_INC	"bill-tax-included"
+#define ENTRY_INV_DISCOUNT	"invoice-discount"
+#define ENTRY_BILL_PAY_TYPE "bill-payment-type"
+
 
 /* deprecated functions, should be removed */
 #define gncEntryGetGUID(x) qof_instance_get_guid(QOF_INSTANCE(x))
Index: gncCustomer.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncCustomer.c,v
retrieving revision 1.20.4.4
retrieving revision 1.20.4.5
diff -Lsrc/business/business-core/gncCustomer.c -Lsrc/business/business-core/gncCustomer.c -u -r1.20.4.4 -r1.20.4.5
--- src/business/business-core/gncCustomer.c
+++ src/business/business-core/gncCustomer.c
@@ -56,7 +56,7 @@
 #include "gncJobP.h"
 #include "gncTaxTableP.h"
 
-struct _gncCustomer 
+struct _gncCustomer
 {
   QofInstance     inst;
 
@@ -270,13 +270,6 @@
   gncCustomerCommitEdit (cust);
 }
 
-void gncCustomerSetTaxIncluded_q (GncCustomer *cust, gint taxincl)
-{
-	GncTaxIncluded g = taxincl;
-	if(!g) return;
-	gncCustomerSetTaxIncluded(cust, g);
-}
-
 void gncCustomerSetTaxIncluded (GncCustomer *cust, GncTaxIncluded taxincl)
 {
   if (!cust) return;
@@ -451,11 +444,6 @@
   return cust->terms;
 }
 
-gint gncCustomerGetTaxIncluded_q (GncCustomer *cust)
-{
-	return (GncTaxIncluded)gncCustomerGetTaxIncluded(cust);
-}
-
 GncTaxIncluded gncCustomerGetTaxIncluded (GncCustomer *cust)
 {
   if (!cust) return GNC_TAXINCLUDED_USEGLOBAL;
@@ -543,7 +531,7 @@
   return c->name;
 }
 
-static QofObject gncCustomerDesc = 
+static QofObject gncCustomerDesc =
 {
   interface_version:  QOF_OBJECT_VERSION,
   e_type:             _GNC_MOD_NAME,
Index: gncBillTerm.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncBillTerm.c,v
retrieving revision 1.6.4.4
retrieving revision 1.6.4.5
diff -Lsrc/business/business-core/gncBillTerm.c -Lsrc/business/business-core/gncBillTerm.c -u -r1.6.4.4 -r1.6.4.5
--- src/business/business-core/gncBillTerm.c
+++ src/business/business-core/gncBillTerm.c
@@ -51,7 +51,10 @@
 #include "gncBusiness.h"
 #include "gncBillTermP.h"
 
-
+/* doxygen: this definition has been copied and pasted
+into the .h file to make it accessible to doxygen.
+Please keep the two in sync if it is not possible to
+move the struct definition itself into the .h */
 struct _gncBillTerm 
 {
   QofInstance     inst;
@@ -79,7 +82,6 @@
 {
   GList *         terms;        /* visible terms */
 };
-
 static short        module = MOD_BUSINESS;
 
 #define _GNC_MOD_NAME        GNC_ID_BILLTERM
@@ -678,7 +680,7 @@
   interface_version:   QOF_OBJECT_VERSION,
   e_type:              _GNC_MOD_NAME,
   type_label:          "Billing Term",
-  create:              NULL,
+  create:              (gpointer)gncBillTermCreate,
   book_begin:          _gncBillTermCreate,
   book_end:            _gncBillTermDestroy,
   is_dirty:            qof_collection_is_dirty,
@@ -691,24 +693,16 @@
 gboolean gncBillTermRegister (void)
 {
   static QofParam params[] = {
-    { GNC_BILLTERM_NAME, QOF_TYPE_STRING, (QofAccessFunc)gncBillTermGetName,
-      (QofSetterFunc)gncBillTermSetName },
-    { GNC_BILLTERM_DESC, QOF_TYPE_STRING, (QofAccessFunc)gncBillTermGetDescription,
-      (QofSetterFunc)gncBillTermSetDescription },
-    { GNC_BILLTERM_TYPE, QOF_TYPE_INT32, (QofAccessFunc)gncBillTermGetType, 
-      (QofSetterFunc)gncBillTermSetType },
-    { GNC_BILLTERM_DUEDAYS, QOF_TYPE_INT32, (QofAccessFunc)gncBillTermGetDueDays, 
-      (QofSetterFunc)gncBillTermSetDueDays },
-    { GNC_BILLTERM_DISCDAYS, QOF_TYPE_INT32, (QofAccessFunc)gncBillTermGetDiscountDays,
-      (QofSetterFunc)gncBillTermSetDiscountDays },
-    { GNC_BILLTERM_DISCOUNT, QOF_TYPE_NUMERIC, (QofAccessFunc)gncBillTermGetDiscount,
-      (QofSetterFunc)gncBillTermSetDiscount },
-    { GNC_BILLTERM_CUTOFF, QOF_TYPE_INT32, (QofAccessFunc)gncBillTermGetCutoff, 
-      (QofSetterFunc)gncBillTermSetCutoff },
-    { GNC_BILLTERM_REFCOUNT, QOF_TYPE_INT64, (QofAccessFunc)gncBillTermGetRefcount, NULL },
-    { QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL },
-    { QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL },
-    { QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_instance_get_guid, NULL },
+	{ GNC_BILLTERM_NAME, 		QOF_TYPE_STRING,  (QofAccessFunc)gncBillTermGetName,			(QofSetterFunc)gncBillTermSetName },
+	{ GNC_BILLTERM_DESC, 		QOF_TYPE_STRING,  (QofAccessFunc)gncBillTermGetDescription,		(QofSetterFunc)gncBillTermSetDescription },
+	{ GNC_BILLTERM_TYPE, 		QOF_TYPE_INT32,   (QofAccessFunc)gncBillTermGetType, 			(QofSetterFunc)gncBillTermSetType },
+	{ GNC_BILLTERM_DUEDAYS, 	QOF_TYPE_INT32,   (QofAccessFunc)gncBillTermGetDueDays, 		(QofSetterFunc)gncBillTermSetDueDays },
+	{ GNC_BILLTERM_DISCDAYS, 	QOF_TYPE_INT32,   (QofAccessFunc)gncBillTermGetDiscountDays,	(QofSetterFunc)gncBillTermSetDiscountDays },
+	{ GNC_BILLTERM_DISCOUNT, 	QOF_TYPE_NUMERIC, (QofAccessFunc)gncBillTermGetDiscount,		(QofSetterFunc)gncBillTermSetDiscount },
+	{ GNC_BILLTERM_CUTOFF, 		QOF_TYPE_INT32,   (QofAccessFunc)gncBillTermGetCutoff, 			(QofSetterFunc)gncBillTermSetCutoff },
+	{ GNC_BILLTERM_REFCOUNT, 	QOF_TYPE_INT64,   (QofAccessFunc)gncBillTermGetRefcount, 		NULL },
+	{ QOF_PARAM_BOOK, 			QOF_ID_BOOK, 	  (QofAccessFunc)qof_instance_get_book, 		NULL },
+    { QOF_PARAM_GUID, 			QOF_TYPE_GUID, 	  (QofAccessFunc)qof_instance_get_guid, 		NULL },
     { NULL },
   };
 
Index: gncAddress.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncAddress.c,v
retrieving revision 1.4.4.3
retrieving revision 1.4.4.4
diff -Lsrc/business/business-core/gncAddress.c -Lsrc/business/business-core/gncAddress.c -u -r1.4.4.3 -r1.4.4.4
--- src/business/business-core/gncAddress.c
+++ src/business/business-core/gncAddress.c
@@ -285,10 +285,14 @@
 {
   static QofParam params[] = {
 
-    { ADDRESS_NAME, QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetName, (QofSetterFunc)gncAddressSetName },
-    { ADDRESS_PHONE, QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetPhone, (QofSetterFunc)gncAddressSetPhone },
-    { ADDRESS_FAX, QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetFax, (QofSetterFunc)gncAddressSetFax },
-    { ADDRESS_EMAIL, QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetEmail, (QofSetterFunc)gncAddressSetEmail },
+    { ADDRESS_NAME, 	QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetName, 	(QofSetterFunc)gncAddressSetName },
+    { ADDRESS_ONE, 		QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetAddr1, (QofSetterFunc)gncAddressSetAddr1 },
+    { ADDRESS_TWO, 		QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetAddr2, (QofSetterFunc)gncAddressSetAddr2 },
+    { ADDRESS_THREE, 	QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetAddr3, (QofSetterFunc)gncAddressSetAddr3 },
+    { ADDRESS_FOUR, 	QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetAddr4, (QofSetterFunc)gncAddressSetAddr4 },
+    { ADDRESS_PHONE, 	QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetPhone, (QofSetterFunc)gncAddressSetPhone },
+    { ADDRESS_FAX, 		QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetFax, 	(QofSetterFunc)gncAddressSetFax },
+    { ADDRESS_EMAIL, 	QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetEmail, (QofSetterFunc)gncAddressSetEmail },
     { NULL },
   };
 
Index: gncTaxTable.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncTaxTable.c,v
retrieving revision 1.9.4.4
retrieving revision 1.9.4.5
diff -Lsrc/business/business-core/gncTaxTable.c -Lsrc/business/business-core/gncTaxTable.c -u -r1.9.4.4 -r1.9.4.5
--- src/business/business-core/gncTaxTable.c
+++ src/business/business-core/gncTaxTable.c
@@ -464,12 +464,6 @@
     mod_table (entry->table);
   }
 }
-void gncTaxTableEntrySetType_q (GncTaxTableEntry *entry, gint type)
-{
-	GncAmountType q = type;
-	if(!q) return;
-	gncTaxTableEntrySetType(entry,q);
-}
 
 void gncTaxTableEntrySetType (GncTaxTableEntry *entry, GncAmountType type)
 {
@@ -669,11 +663,6 @@
   return entry->account;
 }
 
-gint gncTaxTableEntryGetType_q (GncTaxTableEntry *entry)
-{
-	return (GncAmountType)gncTaxTableEntryGetType(entry);
-}
-
 GncAmountType gncTaxTableEntryGetType (GncTaxTableEntry *entry)
 {
   if (!entry) return 0;
@@ -823,10 +812,10 @@
 gboolean gncTaxTableRegister (void)
 {
   static QofParam params[] = {
-	{ GNC_TT_NAME, QOF_TYPE_STRING, (QofAccessFunc)gncTaxTableGetName, (QofSetterFunc)gncTaxTableSetName },
-	{ GNC_TT_REFCOUNT, QOF_TYPE_INT64, (QofAccessFunc)gncTaxTableGetRefcount, NULL },
-    { QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL },
-    { QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_instance_get_guid, NULL },
+	{ GNC_TT_NAME, 		QOF_TYPE_STRING, 	(QofAccessFunc)gncTaxTableGetName, 		(QofSetterFunc)gncTaxTableSetName },
+	{ GNC_TT_REFCOUNT, 	QOF_TYPE_INT64, 	(QofAccessFunc)gncTaxTableGetRefcount, 	(QofSetterFunc)gncTaxTableSetRefcount },
+    { QOF_PARAM_BOOK, 	QOF_ID_BOOK, 		(QofAccessFunc)qof_instance_get_book, 	NULL },
+    { QOF_PARAM_GUID, 	QOF_TYPE_GUID, 		(QofAccessFunc)qof_instance_get_guid, 	NULL },
     { NULL },
   };
 
Index: gncAddress.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncAddress.h,v
retrieving revision 1.4.4.3
retrieving revision 1.4.4.4
diff -Lsrc/business/business-core/gncAddress.h -Lsrc/business/business-core/gncAddress.h -u -r1.4.4.3 -r1.4.4.4
--- src/business/business-core/gncAddress.h
+++ src/business/business-core/gncAddress.h
@@ -33,15 +33,35 @@
 
 #include "qofbook.h"
 #include "qofid.h"
+#include "qofobject.h"
+#include "qofinstance.h"
+#include "qofid-p.h"
 
 #define GNC_ADDRESS_MODULE_NAME        "gncAddress"
 
+/** \struct GncAddress
+
+ at param	QofBook *	book;
+ at param	QofEntity * parent;
+ at param	gboolean	dirty;
+ at param	char *	name;
+ at param	char *	addr1;
+ at param	char *	addr2;
+ at param	char *	addr3;
+ at param	char *	addr4;
+ at param	char *	phone;
+ at param	char *	fax;
+ at param	char *	email;
+*/
 typedef struct _gncAddress GncAddress;
 
 /** @name Create/Destroy functions */
 /** @{ */
+/** create a new address */
 GncAddress * gncAddressCreate (QofBook *book, QofEntity *parent);
+/** destroy an address */
 void gncAddressDestroy (GncAddress *addr);
+
 /** @} */
 
 /** @name Set functions */
@@ -73,9 +93,18 @@
 
 gboolean gncAddressIsDirty (const GncAddress *addr);
 
+/** \brief compare two addresses 
+
+\return 0 if identical, -1 if a is empty or less than b 
+and +1 if a is more than b or if b is empty. 
+*/
 int gncAddressCompare (const GncAddress *a, const GncAddress *b);
 
 #define ADDRESS_NAME    "name"
+#define ADDRESS_ONE		"number"
+#define ADDRESS_TWO		"street"
+#define ADDRESS_THREE   "locality"
+#define ADDRESS_FOUR	"city"
 #define ADDRESS_PHONE   "phone"
 #define ADDRESS_FAX     "fax"
 #define ADDRESS_EMAIL   "email"
Index: gncOrder.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncOrder.c,v
retrieving revision 1.23.4.4
retrieving revision 1.23.4.5
diff -Lsrc/business/business-core/gncOrder.c -Lsrc/business/business-core/gncOrder.c -u -r1.23.4.4 -r1.23.4.5
--- src/business/business-core/gncOrder.c
+++ src/business/business-core/gncOrder.c
@@ -425,7 +425,7 @@
   interface_version:  QOF_OBJECT_VERSION,
   e_type:             _GNC_MOD_NAME,
   type_label:         "Order",
-  create:             NULL,
+  create:             (gpointer)gncOrderCreate,
   book_begin:         NULL,
   book_end:           NULL,
   is_dirty:           qof_collection_is_dirty,
Index: gncInvoice.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncInvoice.h,v
retrieving revision 1.29.4.4
retrieving revision 1.29.4.5
diff -Lsrc/business/business-core/gncInvoice.h -Lsrc/business/business-core/gncInvoice.h -u -r1.29.4.4 -r1.29.4.5
--- src/business/business-core/gncInvoice.h
+++ src/business/business-core/gncInvoice.h
@@ -111,7 +111,7 @@
 Transaction *
 gncInvoicePostToAccount (GncInvoice *invoice, Account *acc,
 			 Timespec *posted_date, Timespec *due_date,
-			 const char *memo);
+			 const char *memo, gboolean accumulatesplits);
 
 /**
  * UNpost this invoice.  This will destroy the posted transaction and
Index: gncTaxTable.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncTaxTable.h,v
retrieving revision 1.7.4.5
retrieving revision 1.7.4.6
diff -Lsrc/business/business-core/gncTaxTable.h -Lsrc/business/business-core/gncTaxTable.h -u -r1.7.4.5 -r1.7.4.6
--- src/business/business-core/gncTaxTable.h
+++ src/business/business-core/gncTaxTable.h
@@ -31,8 +31,36 @@
 #ifndef GNC_TAXTABLE_H_
 #define GNC_TAXTABLE_H_
 
+/** @struct GncTaxTable
+
+modtime is the internal date of the last modtime\n
+See src/doc/business.txt for an explanation of the following\n
+Code that handles refcount, parent, child, invisible and children 
+is *identical* to that in ::GncBillTerm
+
+ at param	QofInstance     inst;
+ at param 	char *          name;
+ at param 	GList *         entries;
+ at param 	Timespec        modtime;	
+ at param 	gint64          refcount;
+ at param 	GncTaxTable *   parent; if non-null, we are an immutable child 
+ at param 	GncTaxTable *   child;  if non-null, we have not changed 
+ at param 	gboolean        invisible;
+ at param 	GList *         children; list of children for disconnection 
+*/
 typedef struct _gncTaxTable GncTaxTable;
+
+/** @struct GncTaxTableEntry
+
+ at param	GncTaxTable *   table;
+ at param  Account *       account;
+ at param	GncAmountType   type;
+ at param	gnc_numeric     amount;
+};
+
+*/
 typedef struct _gncTaxTableEntry GncTaxTableEntry;
+
 typedef struct _gncAccountValue GncAccountValue;
 
 #include "Account.h"
@@ -92,10 +120,6 @@
 void gncTaxTableBeginEdit (GncTaxTable *table);
 void gncTaxTableCommitEdit (GncTaxTable *table);
 
-/** added for later QOF standardisation */
-gint gncTaxTableEntryGetType_q (GncTaxTableEntry *entry);
-void gncTaxTableEntrySetType_q (GncTaxTableEntry *entry, gint type);
-
 /** @} */
 
 /** @name Get Functions */
Index: dialog-invoice.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-invoice.c,v
retrieving revision 1.81.4.12
retrieving revision 1.81.4.13
diff -Lsrc/business/business-gnome/dialog-invoice.c -Lsrc/business/business-gnome/dialog-invoice.c -u -r1.81.4.12 -r1.81.4.13
--- src/business/business-gnome/dialog-invoice.c
+++ src/business/business-gnome/dialog-invoice.c
@@ -612,10 +612,11 @@
 {
   InvoiceWindow *iw = data;
   GncInvoice *invoice;
-  char *message, *memo, *ddue_label, *post_label, *acct_label;
+  char *message, *memo, *ddue_label, *post_label, *acct_label, *question_label;
   Account *acc = NULL;
   GList * acct_types = NULL;
   Timespec ddue, postdate;
+  gboolean accumulate;
 
   /* Make sure the invoice is ok */
   if (!gnc_invoice_window_verify_ok (iw))
@@ -640,6 +641,7 @@
   ddue_label = _("Due Date");
   post_label = _("Post Date");
   acct_label = _("Post to Account");
+  question_label = _("Accumulate Splits?");
 
   /* Determine the type of account to post to */
   acct_types = gnc_business_account_types (&(iw->owner));
@@ -649,10 +651,13 @@
   ddue = postdate;
   memo = NULL;
 
-  if (!gnc_dialog_dates_acct_parented (iw->dialog, message, ddue_label,
-				       post_label, acct_label, TRUE,
+  /* Get the default for the accumulate option */
+  accumulate = gnc_lookup_boolean_option("Business", "Accumulate splits on Post?", TRUE);
+
+  if (!gnc_dialog_dates_acct_question_parented (iw->dialog, message, ddue_label,
+				       post_label, acct_label, question_label, TRUE,
 				       acct_types, iw->book, iw->terms,
-				       &ddue, &postdate, &memo, &acc))
+				       &ddue, &postdate, &memo, &acc, &accumulate))
     return;
 
   /* Yep, we're posting.  So, save the invoice... 
@@ -664,7 +669,7 @@
   gnc_invoice_window_ok_save (iw);
 
   /* ... post it; post date is set to now ... */
-  gncInvoicePostToAccount (invoice, acc, &postdate, &ddue, memo);
+  gncInvoicePostToAccount (invoice, acc, &postdate, &ddue, memo, accumulate);
   gncInvoiceCommitEdit (invoice);
   gnc_resume_gui_refresh ();
 
Index: dialog-date-close.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-date-close.h,v
retrieving revision 1.5.4.2
retrieving revision 1.5.4.3
diff -Lsrc/business/business-gnome/dialog-date-close.h -Lsrc/business/business-gnome/dialog-date-close.h -u -r1.5.4.2 -r1.5.4.3
--- src/business/business-gnome/dialog-date-close.h
+++ src/business/business-gnome/dialog-date-close.h
@@ -44,16 +44,40 @@
  */
 
 gboolean
-gnc_dialog_dates_acct_parented (GtkWidget *parent, const char *message,
+gnc_dialog_dates_acct_question_parented (GtkWidget *parent, const char *message,
 				const char *ddue_label_message,
 				const char *post_label_message,
 				const char *acct_label_message,
+				const char *question_check_message,
 				gboolean ok_is_default,
 				GList * acct_types, GNCBook *book,
 				GncBillTerm *terms,
 				/* Returned Data... */
 				Timespec *ddue, Timespec *post,
-				char **memo, Account **acct);
+				char **memo, Account **acct, gboolean *answer);
+
+#define gnc_dialog_dates_acct_parented(parent, message,	\
+				ddue_label_message,							\
+				post_label_message,							\
+				acct_label_message,							\
+				ok_is_default,								\
+				acct_types, book,							\
+				terms,										\
+				/* Returned Data... */						\
+				ddue, post,									\
+				memo, acct)									\
+		gnc_dialog_dates_acct_question_parented (parent, message,	\
+				ddue_label_message,							\
+				post_label_message,							\
+				acct_label_message,							\
+				NULL,						\
+				ok_is_default,								\
+				acct_types, book,							\
+				terms,										\
+				/* Returned Data... */						\
+				ddue, post,									\
+				memo, acct, NULL)									\
+
 
 gboolean
 gnc_dialog_date_acct_parented (GtkWidget *parent, const char *message,
Index: dialog-date-close.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-date-close.c,v
retrieving revision 1.15.4.5
retrieving revision 1.15.4.6
diff -Lsrc/business/business-gnome/dialog-date-close.c -Lsrc/business/business-gnome/dialog-date-close.c -u -r1.15.4.5 -r1.15.4.6
--- src/business/business-gnome/dialog-date-close.c
+++ src/business/business-gnome/dialog-date-close.c
@@ -42,6 +42,7 @@
   GtkWidget *post_date;
   GtkWidget *acct_combo;
   GtkWidget *memo_entry;
+  GtkWidget *question_check;
   GncBillTerm *terms;
   Timespec *ts, *ts2;
   GList * acct_types;
@@ -49,6 +50,7 @@
   Account *acct;
   char **memo;
   gboolean retval;
+  gboolean answer;
 } DialogDateClose;
 
 void gnc_dialog_date_close_ok_cb (GtkWidget *widget, gpointer user_data);
@@ -86,7 +88,8 @@
   if (ddc->memo_entry && ddc->memo)
     *(ddc->memo) = gtk_editable_get_chars (GTK_EDITABLE (ddc->memo_entry),
 					   0, -1);
-
+  if (ddc->question_check)
+	  ddc->answer = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ddc->question_check));
   ddc->retval = TRUE;
 }
 
@@ -216,16 +219,17 @@
 }
 
 gboolean
-gnc_dialog_dates_acct_parented (GtkWidget *parent, const char *message,
+gnc_dialog_dates_acct_question_parented (GtkWidget *parent, const char *message,
 				const char *ddue_label_message,
 				const char *post_label_message,
 				const char *acct_label_message,
+				const char *question_check_message,
 				gboolean ok_is_default,
 				GList * acct_types, GNCBook *book,
 				GncBillTerm *terms,
 				/* Returned Data... */
 				Timespec *ddue, Timespec *post,
-				char **memo, Account **acct)
+				char **memo, Account **acct, gboolean *answer)
 {
   DialogDateClose *ddc;
   GtkWidget *hbox;
@@ -238,6 +242,8 @@
   if (!message || !ddue_label_message || !post_label_message ||
       !acct_label_message || !acct_types || !book || !ddue || !post || !acct)
     return FALSE;
+  if (question_check_message && !answer)
+	  return FALSE;
 
   ddc = g_new0 (DialogDateClose, 1);
   ddc->ts = ddue;
@@ -264,6 +270,8 @@
   ddc->post_date = gnc_date_edit_new (time(NULL), FALSE, FALSE);
   gtk_box_pack_start (GTK_BOX(date_box), ddc->post_date, TRUE, TRUE, 0);
 
+  ddc->question_check = glade_xml_get_widget(xml, "question_check");
+  
   if (parent)
     gtk_window_set_transient_for (GTK_WINDOW(ddc->dialog), GTK_WINDOW(parent));
 
@@ -277,6 +285,16 @@
   label = glade_xml_get_widget (xml, "acct_label");
   gtk_label_set_text (GTK_LABEL (label), acct_label_message);
 
+  if (question_check_message)
+  {
+	  gtk_label_set_text(GTK_LABEL(GTK_BIN(ddc->question_check)->child), question_check_message);
+	  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ddc->question_check), *answer);
+  } else {
+	  gtk_widget_hide(ddc->question_check);
+	  gtk_widget_hide(glade_xml_get_widget(xml, "hide1"));
+  }
+
+
   /* Set the post date widget */
   gnc_date_edit_set_time_ts (GNC_DATE_EDIT (ddc->post_date), *post);
 
@@ -309,6 +327,8 @@
   gtk_widget_destroy(ddc->dialog);
   retval = ddc->retval;
   *acct = ddc->acct;
+  if (question_check_message)
+	  *answer = ddc->answer;
   g_free (ddc);
 
   return retval;
Index: dialog-vendor.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-vendor.c,v
retrieving revision 1.32.4.8
retrieving revision 1.32.4.9
diff -Lsrc/business/business-gnome/dialog-vendor.c -Lsrc/business/business-gnome/dialog-vendor.c -u -r1.32.4.8 -r1.32.4.9
--- src/business/business-gnome/dialog-vendor.c
+++ src/business/business-gnome/dialog-vendor.c
@@ -670,7 +670,7 @@
   }
 
   /* Build the queries */
-  q = gncQueryCreate ();
+  q = gncQueryCreateFor (type);
   gncQuerySetBook (q, book);
 
 #if 0
Index: date-close.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/glade/date-close.glade,v
retrieving revision 1.2.4.6
retrieving revision 1.2.4.7
diff -Lsrc/business/business-gnome/glade/date-close.glade -Lsrc/business/business-gnome/glade/date-close.glade -u -r1.2.4.6 -r1.2.4.7
--- src/business/business-gnome/glade/date-close.glade
+++ src/business/business-gnome/glade/date-close.glade
@@ -11,6 +11,11 @@
   <property name="modal">True</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="has_separator">True</property>
 
   <child internal-child="vbox">
@@ -32,6 +37,7 @@
 	      <property name="label">gtk-cancel</property>
 	      <property name="use_stock">True</property>
 	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
 	      <property name="response_id">0</property>
 	      <signal name="clicked" handler="gnc_dialog_date_close_cancel_cb" last_modification_time="Mon, 08 Sep 2003 02:04:34 GMT"/>
 	    </widget>
@@ -46,6 +52,7 @@
 	      <property name="label">gtk-ok</property>
 	      <property name="use_stock">True</property>
 	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
 	      <property name="response_id">0</property>
 	      <signal name="clicked" handler="gnc_dialog_date_close_ok_cb" last_modification_time="Mon, 08 Sep 2003 02:04:23 GMT"/>
 	    </widget>
@@ -195,6 +202,11 @@
   <property name="modal">True</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="has_separator">True</property>
 
   <child internal-child="vbox">
@@ -216,6 +228,7 @@
 	      <property name="label">gtk-cancel</property>
 	      <property name="use_stock">True</property>
 	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
 	      <property name="response_id">-6</property>
 	    </widget>
 	  </child>
@@ -229,6 +242,7 @@
 	      <property name="label">gtk-ok</property>
 	      <property name="use_stock">True</property>
 	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
 	      <property name="response_id">-5</property>
 	      <signal name="clicked" handler="gnc_dialog_date_close_ok_cb" last_modification_time="Mon, 08 Sep 2003 02:23:45 GMT"/>
 	    </widget>
@@ -383,6 +397,27 @@
 		      <property name="fill">False</property>
 		    </packing>
 		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="hide1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes"></property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
 		</widget>
 		<packing>
 		  <property name="padding">3</property>
@@ -466,6 +501,25 @@
 		      <property name="fill">False</property>
 		    </packing>
 		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="question_check">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">question</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
 		</widget>
 		<packing>
 		  <property name="padding">3</property>
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-ledger/Makefile.am,v
retrieving revision 1.6.4.1
retrieving revision 1.6.4.2
diff -Lsrc/business/business-ledger/Makefile.am -Lsrc/business/business-ledger/Makefile.am -u -r1.6.4.1 -r1.6.4.2
--- src/business/business-ledger/Makefile.am
+++ src/business/business-ledger/Makefile.am
@@ -23,6 +23,7 @@
   ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
   ${top_builddir}/src/register/register-core/libgncmod-register-core.la \
   ${top_builddir}/src/register/register-gnome/libgncmod-register-gnome.la \
+  ${top_builddir}/src/business/business-utils/libgncmod-business-utils.la \
   ${top_builddir}/src/business/dialog-tax-table/libgncmod-dialog-tax-table.la
 
 AM_CFLAGS = \
--- /dev/null
+++ src/business/business-reports/easy-invoice.scm
@@ -0,0 +1,866 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; -*-scheme-*-
+;; easy-invoice.scm -- an easily configured Invoice Report,
+;; used to print a GncInvoice
+;;
+;; Created by: James Strandboge <jstrand1 at rochester.rr.com>
+;;
+;; Based on invoice.scm by Derek Atkins <warlord at MIT.EDU>
+;;
+;; stylesheet-header.scm : stylesheet with nicer layout
+;; Copyright 2000 Bill Gribble <grib at gnumatic.com>
+;; 
+;; This program is free software; you can redistribute it and/or    
+;; modify it under the terms of the GNU General Public License as   
+;; published by the Free Software Foundation; either version 2 of   
+;; the License, or (at your option) any later version.              
+;;                                                                  
+;; This program is distributed in the hope that it will be useful,  
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of   
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    
+;; GNU General Public License for more details.                     
+;;                                                                  
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, contact:
+;;
+;; Free Software Foundation           Voice:  +1-617-542-5942
+;; 59 Temple Place - Suite 330        Fax:    +1-617-542-2652
+;; Boston, MA  02111-1307,  USA       gnu at gnu.org
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define-module (gnucash report easy-invoice))
+
+(use-modules (srfi srfi-1))
+(use-modules (ice-9 slib))
+(use-modules (gnucash gnc-module))
+
+(require 'hash-table)
+(require 'record)
+
+(gnc:module-load "gnucash/report/report-system" 0)
+(gnc:module-load "gnucash/business-utils" 0)
+
+(use-modules (gnucash report standard-reports))
+(use-modules (gnucash report business-reports))
+
+(define invoice-page gnc:pagename-general)
+(define invoice-name (N_ "Invoice Number"))
+
+(define-macro (addto! alist element)
+  `(set! ,alist (cons ,element ,alist)))
+
+(define (set-last-row-style! table tag . rest)
+  (let ((arg-list 
+         (cons table 
+               (cons (- (gnc:html-table-num-rows table) 1)
+                     (cons tag rest)))))
+    (apply gnc:html-table-set-row-style! arg-list)))
+
+(define (date-col columns-used)
+  (vector-ref columns-used 0))
+(define (description-col columns-used)
+  (vector-ref columns-used 1))
+(define (action-col columns-used)
+  (vector-ref columns-used 2))
+(define (quantity-col columns-used)
+  (vector-ref columns-used 3))
+(define (price-col columns-used)
+  (vector-ref columns-used 4))
+(define (discount-col columns-used)
+  (vector-ref columns-used 5))
+(define (tax-col columns-used)
+  (vector-ref columns-used 6))
+(define (taxvalue-col columns-used)
+  (vector-ref columns-used 7))
+(define (value-col columns-used)
+  (vector-ref columns-used 8))
+
+(define columns-used-size 9)
+
+(define (num-columns-required columns-used)  
+  (do ((i 0 (+ i 1)) 
+       (col-req 0 col-req)) 
+      ((>= i columns-used-size) col-req)
+    (if (vector-ref columns-used i)
+        (set! col-req (+ col-req 1)))))
+
+(define (build-column-used options)   
+  (define (opt-val section name)
+    (gnc:option-value 
+     (gnc:lookup-option options section name)))
+  (define (make-set-col col-vector)
+    (let ((col 0))
+      (lambda (used? index)
+        (if used?
+            (begin
+              (vector-set! col-vector index col)
+              (set! col (+ col 1)))
+            (vector-set! col-vector index #f)))))
+  
+  (let* ((col-vector (make-vector columns-used-size #f))
+         (set-col (make-set-col col-vector)))
+    (set-col (opt-val "Display Columns" "Date") 0)
+    (set-col (opt-val "Display Columns" "Description") 1)
+    (set-col (opt-val "Display Columns" "Action") 2)
+    (set-col (opt-val "Display Columns" "Quantity") 3)
+    (set-col (opt-val "Display Columns" "Price") 4)
+    (set-col (opt-val "Display Columns" "Discount") 5)
+    (set-col (opt-val "Display Columns" "Taxable") 6)
+    (set-col (opt-val "Display Columns" "Tax Amount") 7)
+    (set-col (opt-val "Display Columns" "Total") 8)
+    col-vector))
+
+(define (make-heading-list column-vector)
+
+  (let ((heading-list '()))
+    (if (date-col column-vector)
+        (addto! heading-list (_ "Date")))
+    (if (description-col column-vector)
+        (addto! heading-list (_ "Description")))
+    (if (action-col column-vector)
+	(addto! heading-list (_ "Charge Type")))
+    (if (quantity-col column-vector)
+	(addto! heading-list (_ "Quantity")))
+    (if (price-col column-vector)
+	(addto! heading-list (_ "Unit Price")))
+    (if (discount-col column-vector)
+	(addto! heading-list (_ "Discount")))
+    (if (tax-col column-vector)
+	(addto! heading-list (_ "Taxable")))
+    (if (taxvalue-col column-vector)
+	(addto! heading-list (_ "Tax Amount")))
+    (if (value-col column-vector)
+	(addto! heading-list (_ "Total")))
+    (reverse heading-list)))
+
+(define (make-account-hash) (make-hash-table 23))
+
+(define (update-account-hash hash values)
+  (for-each
+   (lambda (item)
+     (let* ((acct (car item))
+	    (val (cdr item))
+	    (ref (hash-ref hash acct)))
+
+       (hash-set! hash acct (if ref (gnc:numeric-add-fixed ref val) val))))
+   values))
+
+
+(define (monetary-or-percent numeric currency entry-type)
+  (if (gnc:entry-type-percent-p entry-type)
+      (let ((table (gnc:make-html-table)))
+	(gnc:html-table-set-style!
+	 table "table"
+	 'attribute (list "border" 0)
+	 'attribute (list "cellspacing" 1)
+	 'attribute (list "cellpadding" 0))
+	(gnc:html-table-append-row!
+	 table
+	 (list numeric (_ "%")))
+	(set-last-row-style!
+	 table "td"
+	 'attribute (list "valign" "top"))
+	table)
+      (gnc:make-gnc-monetary currency numeric)))      
+
+(define (add-entry-row table currency entry column-vector row-style invoice?)
+  (let* ((row-contents '())
+	 (entry-value (gnc:make-gnc-monetary
+		       currency
+		       (gnc:entry-get-value entry invoice?)))
+	 (entry-tax-value (gnc:make-gnc-monetary
+			   currency
+			   (gnc:entry-get-tax-value entry invoice?))))
+
+    (if (date-col column-vector)
+        (addto! row-contents
+                (gnc:print-date (gnc:entry-get-date entry))))
+
+    (if (description-col column-vector)
+        (addto! row-contents
+		(gnc:entry-get-description entry)))
+
+    (if (action-col column-vector)
+        (addto! row-contents
+		(gnc:entry-get-action entry)))
+
+    (if (quantity-col column-vector)
+	(addto! row-contents
+		(gnc:make-html-table-cell/markup
+		 "number-cell"
+		 (gnc:entry-get-quantity entry))))
+
+    (if (price-col column-vector)
+	(addto! row-contents
+		(gnc:make-html-table-cell/markup
+		 "number-cell"
+		 (gnc:make-gnc-monetary
+		  currency (if invoice? (gnc:entry-get-inv-price entry)
+			       (gnc:entry-get-bill-price entry))))))
+
+    (if (discount-col column-vector)
+	(addto! row-contents
+		(if invoice?
+		    (gnc:make-html-table-cell/markup
+		     "number-cell"
+		     (monetary-or-percent (gnc:entry-get-inv-discount entry)
+					  currency
+					  (gnc:entry-get-inv-discount-type entry)))
+		    "")))
+
+    (if (tax-col column-vector)
+	(addto! row-contents
+		(if (if invoice?
+			(and (gnc:entry-get-inv-taxable entry)
+			     (gnc:entry-get-inv-tax-table entry))
+			(and (gnc:entry-get-bill-taxable entry)
+			     (gnc:entry-get-bill-tax-table entry)))
+		    (_ "T") "")))
+
+    (if (taxvalue-col column-vector)
+	(addto! row-contents
+		(gnc:make-html-table-cell/markup
+		 "number-cell"
+		 entry-tax-value)))
+
+    (if (value-col column-vector)
+	(addto! row-contents
+		(gnc:make-html-table-cell/markup
+		 "number-cell"
+		 entry-value)))
+
+    (gnc:html-table-append-row/markup! table row-style
+                                       (reverse row-contents))
+    
+    (cons entry-value entry-tax-value)))
+
+(define (options-generator)
+
+  (define gnc:*report-options* (gnc:new-options))
+
+  (define (gnc:register-inv-option new-option)
+    (gnc:register-option gnc:*report-options* new-option))
+
+  (gnc:register-inv-option
+   (gnc:make-invoice-option invoice-page invoice-name "x" ""
+			    (lambda () #f) #f))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display Columns") (N_ "Date")
+    "b" (N_ "Display the date?") #t))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display Columns") (N_ "Description")
+    "d" (N_ "Display the description?") #t))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display Columns") (N_ "Action")
+    "g" (N_ "Display the action?") #t))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display Columns") (N_ "Quantity")
+    "ha" (N_ "Display the quantity of items?") #t))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display Columns") (N_ "Price")
+    "hb" "Display the price per item?" #t))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display Columns") (N_ "Discount")
+    "k" (N_ "Display the entry's discount") #t))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display Columns") (N_ "Taxable")
+    "l" (N_ "Display the entry's taxable status") #t))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display Columns") (N_ "Tax Amount")
+    "m" (N_ "Display each entry's total total tax") #f))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display Columns") (N_ "Total")
+    "n" (N_ "Display the entry's value") #t))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display") (N_ "My Company")
+    "oa" (N_ "Display my company name and address?") #t))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display") (N_ "My Company ID")
+    "ob" (N_ "Display my company ID?") #t))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display") (N_ "Due Date")
+    "oc" (N_ "Display due date?") #t))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display") (N_ "Individual Taxes")
+    "od" (N_ "Display all the individual taxes?") #f))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display") (N_ "Totals")
+    "pa" (N_ "Display the totals?") #t))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display") (N_ "Subtotal")
+    "pb" (N_ "Display the subtotals?") #t))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display") (N_ "References")
+    "s" (N_ "Display the invoice references?") #t))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display") (N_ "Billing Terms")
+    "t" (N_ "Display the invoice billing terms?") #t))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display") (N_ "Billing ID")
+    "ta" (N_ "Display the billing id?") #t))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display") (N_ "Invoice Notes")
+    "tb" (N_ "Display the invoice notes?") #f))
+
+  (gnc:register-inv-option
+   (gnc:make-simple-boolean-option
+    (N_ "Display") (N_ "Payments")
+    "tc" (N_ "Display the payments applied to this invoice?") #f))
+
+  (gnc:register-inv-option
+   (gnc:make-number-range-option
+    (N_ "Display") (N_ "Invoice Width")
+    "u" (N_ "The minimum width of the invoice.") 600
+    100 1600 0 10))
+
+  (gnc:register-inv-option
+   (gnc:make-text-option
+    (N_ "Text") (N_ "Extra Notes")
+     "v" (N_ "Extra notes to put on the invoice (simple HTML is accepted)")
+     "Thank you for your patronage"))
+
+  (gnc:register-inv-option
+   (gnc:make-string-option
+    (N_ "Text") (N_ "Today Date Format")
+    "x" (N_ "The format for the date->string conversion for today's date.")
+    "%B %e, %Y"))
+
+
+  (gnc:options-set-default-section gnc:*report-options* "General")
+
+  gnc:*report-options*)
+
+(define (make-entry-table invoice options add-order invoice?)
+  (define (opt-val section name)
+    (gnc:option-value 
+     (gnc:lookup-option options section name)))
+
+  (let ((show-payments (opt-val "Display" "Payments"))
+	(display-all-taxes (opt-val "Display" "Individual Taxes"))
+	(lot (gnc:invoice-get-posted-lot invoice))
+	(txn (gnc:invoice-get-posted-txn invoice))
+	(currency (gnc:invoice-get-currency invoice)))
+
+    (define (colspan monetary used-columns)
+      (cond
+       ((value-col used-columns) (value-col used-columns))
+       ((taxvalue-col used-columns) (taxvalue-col used-columns))
+       (else (price-col used-columns))))
+
+    (define (display-subtotal monetary used-columns)
+      (if (value-col used-columns)
+	  monetary
+	  (let ((amt (gnc:gnc-monetary-amount monetary)))
+	    (if amt
+		(if (gnc:numeric-negative-p amt)
+		    (gnc:monetary-neg monetary)
+		    monetary)
+		monetary))))
+
+    (define (add-subtotal-row table used-columns
+			      subtotal-collector subtotal-style subtotal-label)
+      (let ((currency-totals (subtotal-collector
+			      'format gnc:make-gnc-monetary #f)))
+
+	(for-each (lambda (currency)
+		    (gnc:html-table-append-row/markup! 
+		     table
+		     subtotal-style
+		     (append (cons (gnc:make-html-table-cell/markup
+				    "total-label-cell" subtotal-label)
+				   '())
+			     (list (gnc:make-html-table-cell/size/markup
+				    1 (colspan currency used-columns)
+				    "total-number-cell"
+				    (display-subtotal currency used-columns))))))
+		  currency-totals)))
+
+    (define (add-payment-row table used-columns split total-collector)
+      (let* ((t (gnc:split-get-parent split))
+	     (currency (gnc:transaction-get-currency t))
+	     ;; XXX Need to know when to reverse the value
+	     (amt (gnc:make-gnc-monetary currency (gnc:split-get-value split)))
+	     (payment-style "grand-total")
+	     (row '()))
+	
+	(total-collector 'add 
+			 (gnc:gnc-monetary-commodity amt)
+			 (gnc:gnc-monetary-amount amt))
+
+	(if (date-col used-columns)
+	    (addto! row
+		    (gnc:print-date (gnc:transaction-get-date-posted t))))
+
+	(if (description-col used-columns)
+	    (addto! row (_ "Payment, thank you")))
+		    
+	(gnc:html-table-append-row/markup! 
+	 table
+	 payment-style
+	 (append (reverse row)
+		 (list (gnc:make-html-table-cell/size/markup
+			1 (colspan currency used-columns)
+			"total-number-cell"
+			(display-subtotal amt used-columns)))))))
+
+    (define (do-rows-with-subtotals entries
+				    table
+				    used-columns
+				    width
+				    odd-row?
+				    value-collector
+				    tax-collector
+				    total-collector
+				    acct-hash)
+      (if (null? entries)
+	  (begin
+            ; jamie
+	    (if (opt-val "Display" "Subtotal")
+	       (add-subtotal-row table used-columns value-collector
+			      "grand-total" (_ "Subtotal")))
+
+	    (if display-all-taxes
+		(hash-for-each
+		 (lambda (acct value)
+		   (let ((collector (gnc:make-commodity-collector))
+			 (commodity (gnc:account-get-commodity acct))
+			 (name (gnc:account-get-name acct)))
+		     (collector 'add commodity value)
+		     (add-subtotal-row table used-columns collector
+				       "grand-total" name)))
+		 acct-hash)
+
+		; nope, just show the total tax.
+		(add-subtotal-row table used-columns tax-collector
+				  "grand-total" (_ "Tax")))
+
+	    (if (and show-payments lot)
+		(let ((splits (sort-list!
+			       (gnc:lot-get-splits lot)
+			       (lambda (s1 s2)
+				 (let ((t1 (gnc:split-get-parent s1))
+				       (t2 (gnc:split-get-parent s2)))
+				   (< (gnc:transaction-order t1 t2) 0))))))
+		  (for-each
+		   (lambda (split)
+		     (if (not (equal? (gnc:split-get-parent split) txn))
+			 (add-payment-row table used-columns
+					  split total-collector)))
+		   splits)))
+
+	    (add-subtotal-row table used-columns total-collector
+			      "grand-total" (_ "Amount Due")))
+
+	  ;;
+	  ;; End of BEGIN -- now here's the code to handle all the entries!
+	  ;;
+	  (let* ((current (car entries))
+		 (current-row-style (if odd-row? "normal-row" "alternate-row"))
+		 (rest (cdr entries))
+		 (next (if (null? rest) #f
+			   (car rest)))
+		 (entry-values (add-entry-row table
+					      currency
+					      current
+					      used-columns
+					      current-row-style
+					      invoice?)))
+
+	    (if display-all-taxes
+		(let ((tax-list (gnc:entry-get-tax-values current invoice?)))
+		  (update-account-hash acct-hash tax-list))
+		(tax-collector 'add
+			       (gnc:gnc-monetary-commodity (cdr entry-values))
+			       (gnc:gnc-monetary-amount (cdr entry-values))))
+
+	    (value-collector 'add
+			     (gnc:gnc-monetary-commodity (car entry-values))
+			     (gnc:gnc-monetary-amount (car entry-values)))
+
+	    (total-collector 'add
+			     (gnc:gnc-monetary-commodity (car entry-values))
+			     (gnc:gnc-monetary-amount (car entry-values)))
+	    (total-collector 'add
+			     (gnc:gnc-monetary-commodity (cdr entry-values))
+			     (gnc:gnc-monetary-amount (cdr entry-values)))
+
+	    (let ((order (gnc:entry-get-order current)))
+	      (if order (add-order order)))
+
+	    (do-rows-with-subtotals rest
+				    table
+				    used-columns
+				    width
+				    (not odd-row?)
+				    value-collector
+				    tax-collector
+				    total-collector
+				    acct-hash))))
+
+    (let* ((table (gnc:make-html-table))
+	   (used-columns (build-column-used options))
+	   (width (num-columns-required used-columns))
+	   (entries (gnc:invoice-get-entries invoice))
+	   (totals (gnc:make-commodity-collector)))
+
+      (gnc:html-table-set-col-headers!
+       table
+       (make-heading-list used-columns))
+
+      (do-rows-with-subtotals entries
+			      table
+			      used-columns
+			      width
+			      #t
+			      (gnc:make-commodity-collector)
+			      (gnc:make-commodity-collector)
+			      totals
+			      (make-account-hash))
+      table)))
+
+(define (string-expand string character replace-string)
+  (define (car-line chars)
+    (take-while (lambda (c) (not (eqv? c character))) chars))
+  (define (cdr-line chars)
+    (let ((rest (drop-while (lambda (c) (not (eqv? c character))) chars)))
+      (if (null? rest)
+          '()
+          (cdr rest))))
+  (define (line-helper chars)
+    (if (null? chars)
+        ""
+        (let ((first (car-line chars))
+              (rest (cdr-line chars)))
+          (string-append (list->string first)
+                         (if (null? rest) "" replace-string)
+                         (line-helper rest)))))
+  (line-helper (string->list string)))
+
+(define (make-client-table owner orders)
+  (let ((table (gnc:make-html-table)))
+    (gnc:html-table-set-style!
+     table "table"
+     'attribute (list "border" 0)
+     'attribute (list "cellspacing" 0)
+     'attribute (list "cellpadding" 0))
+    (gnc:html-table-append-row!
+     table
+     (list
+      (string-expand (gnc:owner-get-address-dep owner) #\newline "<br>")))
+    (gnc:html-table-append-row!
+     table
+     (list "<br>"))
+    (for-each
+     (lambda (order)
+       (let* ((reference (gnc:order-get-reference order)))
+	 (if (and reference (> (string-length reference) 0))
+	     (gnc:html-table-append-row!
+	      table
+	      (list
+	       (string-append (_ "REF") ":&nbsp;" reference))))))
+     orders)
+    (set-last-row-style!
+     table "td"
+     'attribute (list "valign" "top"))
+    table))
+
+(define (make-date-row! table label date)
+  (gnc:html-table-append-row!
+   table
+   (list
+    (string-append label ":&nbsp;")
+    (string-expand (gnc:print-date date) #\space "&nbsp;"))))
+
+(define (make-date-table)
+  (let ((table (gnc:make-html-table)))
+    (gnc:html-table-set-style!
+     table "table"
+     'attribute (list "border" 0)
+     'attribute (list "cellpadding" 0))
+    (set-last-row-style!
+     table "td"
+     'attribute (list "valign" "top"))
+    table))
+
+(define (make-myname-table book)
+  (let* ((table (gnc:make-html-table))
+	 (slots (gnc:book-get-slots book))
+	 (name (gnc:kvp-frame-get-slot-path
+		slots (append gnc:*kvp-option-path*
+			      (list gnc:*business-label* gnc:*company-name*))))
+	 (addy (gnc:kvp-frame-get-slot-path
+		slots (append gnc:*kvp-option-path*
+			      (list gnc:*business-label* gnc:*company-addy*)))))
+
+    (gnc:html-table-set-style!
+     table "table"
+     'attribute (list "border" 0)
+     'attribute (list "width" "100%")
+     'attribute (list "align" "right")
+     'attribute (list "valign" "top")
+     'attribute (list "cellspacing" 0)
+     'attribute (list "cellpadding" 0))
+    (gnc:html-table-append-row! table 
+      (list (if name (string-append "<div align='right'>" name "</div>") "")))
+
+    ; this is pretty strange.  If addy is set, then make caddy <div>addy</div>,
+    ; then when adding the row to the table, we actually add several rows by expanding
+    ; caddy (the <div> is already set for the first in list and </dev> for last because 
+    ; of addy)
+    (if (and addy (> (string-length addy) 0))
+     (let ((caddy (string-append "<div align='right'>" addy "</div>")))
+      (gnc:html-table-append-row! table (list (string-expand caddy
+        #\newline "</td></tr><tr><td><div align='right'>")))))
+    table))
+
+(define (add-html! document htmlstring)
+  (gnc:html-document-add-object!
+   document
+    (gnc:make-html-text
+     (N_ htmlstring))))
+
+(define (make-break! document)
+  (gnc:html-document-add-object!
+   document
+   (gnc:make-html-text
+    (gnc:html-markup-br))))
+
+(define (reg-renderer report-obj)
+  (define (opt-val section name)
+    (gnc:option-value
+     (gnc:lookup-option (gnc:report-options report-obj) section name)))
+
+  (let* ((document (gnc:make-html-document))
+	 (table '())
+	 (orders '())
+	 (invoice (opt-val invoice-page invoice-name))
+	 (owner #f)
+	 (references? (opt-val "Display" "References"))
+	 (title (_ "Invoice"))
+	 (invoice? #f))
+
+    (define (add-order o)
+      (if (and references? (not (member o orders)))
+	  (addto! orders o)))
+
+    (if invoice
+	(begin
+	  (set! owner (gnc:invoice-get-owner invoice))
+	  (let ((type (gw:enum-<gnc:GncOwnerType>-val->sym
+		       (gnc:owner-get-type 
+			(gnc:owner-get-end-owner owner)) #f)))
+	    (case type
+	      ((gnc-owner-customer)
+	       (set! invoice? #t))
+	      ((gnc-owner-vendor)
+	       (set! title (_ "Bill")))
+	      ((gnc-owner-employee)
+	       (set! title (_ "Expense Voucher")))))
+	  (set! title (string-append title " #"
+				     (gnc:invoice-get-id invoice)))))
+
+;    (gnc:html-document-set-title! document title)
+
+    ; framing table
+    (add-html! document "<center><table width='")
+    (add-html! document (opt-val "Display" "Invoice Width"))
+    (add-html! document "' cellpadding=0 cellspacing=0>")
+
+    (add-html! document "<tr><td align='left'>")
+
+    (if invoice
+      (begin
+        ; invoice number and ID String table
+        (add-html! document "<table width='100%'><tr>")
+        (add-html! document "<td align='left'>")
+        (add-html! document "<b><u>Invoice #")
+        (add-html! document (gnc:invoice-get-id invoice))
+        (add-html! document "</u></b></td>")
+        (add-html! document "<td align='right'>")
+
+        (if (opt-val "Display" "My Company ID")
+          (let* ((book (gnc:invoice-get-book invoice))
+                 (slots (gnc:book-get-slots book))
+	         (taxid (gnc:kvp-frame-get-slot-path
+		    slots (append gnc:*kvp-option-path*
+		                  (list gnc:*business-label* gnc:*company-id*)))))
+                 (if (and taxid (> (string-length taxid) 0))
+                   (begin
+                     (add-html! document taxid)
+                     (add-html! document "&nbsp;")))
+          )
+        )
+        (add-html! document "</td>")
+        (add-html! document "</tr></table>")
+                                                                              
+        (make-break! document)
+        (make-break! document)
+
+        ; add the client and company name table
+	(let ((book (gnc:invoice-get-book invoice)))
+	  (set! table (make-entry-table invoice
+					(gnc:report-options report-obj)
+					add-order invoice?))
+
+          (add-html! document "<table width='100%'><tr>")
+          (add-html! document "<td align='left' valign='top'>")
+	  (gnc:html-document-add-object!
+	   document
+	   (make-client-table owner orders))
+          (add-html! document "</td>")
+          (if (opt-val "Display" "My Company")
+            (begin
+              (add-html! document "<td align='right' valign='top'>")
+              (gnc:html-document-add-object!
+               document
+               (make-myname-table book))
+              (add-html! document "</td>")))
+          (add-html! document "</tr></table>")
+        )
+
+        ; add the date
+        (let ((date-table #f)
+              (post-date (gnc:invoice-get-date-posted invoice))
+              (due-date (gnc:invoice-get-date-due invoice)))
+          (if (not (equal? post-date (cons 0 0)))
+            (begin
+              (add-html! document "<table border=0><tr>")
+              (add-html! document "<td>")
+              (add-html! document "Date: ")
+              (add-html! document "</td>")
+              (add-html! document "<td>")
+              (add-html! document (gnc:print-date post-date))
+              (add-html! document "</td>")
+              (if (opt-val "Display" "Due Date")
+                (begin
+                  (add-html! document "<tr><td>")
+                  (add-html! document "Due: ")
+                  (add-html! document "</td>")
+                  (add-html! document "<td>")
+                  (add-html! document (gnc:print-date due-date))
+                  (add-html! document "</td>")))
+              (add-html! document "</tr></table>"))
+            (add-html! document "<font color='red'>INVOICE NOT POSTED</font>")))
+            ;(add-html! document (strftime (opt-val "Text" "Today Date Format")
+            ;             (localtime (car (gnc:get-today))))))
+
+        (make-break! document)
+
+        (if (opt-val "Display" "Billing ID")
+          (let ((billing-id (gnc:invoice-get-billing-id invoice)))
+            (if (and billing-id (> (string-length billing-id) 0))
+              (begin
+                (gnc:html-document-add-object!
+                  document
+                  (gnc:make-html-text
+                    (string-append
+                      (_ "Billing ID") ":&nbsp;" 
+                      (string-expand billing-id #\newline "<br>"))))
+                (make-break! document)))))
+
+        (if (opt-val "Display" "Billing Terms")
+          (let* ((term (gnc:invoice-get-terms invoice))
+            (terms (gnc:bill-term-get-description term)))
+            (if (and terms (> (string-length terms) 0))
+              (gnc:html-document-add-object!
+                document
+                (gnc:make-html-text
+                  (string-append
+                    (_ "Terms") ":&nbsp;" 
+                    (string-expand terms #\newline "<br>")))))))
+
+        (make-break! document)
+
+        ; add the main table
+        (gnc:html-table-set-style!
+          table "table"
+          'attribute (list "width" "100%")
+          'attribute (list "border" 1)
+          'attribute (list "cellspacing" 0)
+          'attribute (list "cellpadding" 4))
+        (gnc:html-document-add-object! document table)
+
+        (make-break! document)
+        (make-break! document)
+
+	(if (opt-val "Display" "Invoice Notes")
+          (begin
+            (let ((notes (gnc:invoice-get-notes invoice)))
+              (gnc:html-document-add-object!
+               document
+               (gnc:make-html-text
+               (string-expand notes #\newline "<br>"))))
+            (make-break! document)
+            (make-break! document)))
+	  
+        (gnc:html-document-add-object!
+          document
+          (gnc:make-html-text
+            (string-expand (opt-val "Text" "Extra Notes") #\newline "<br>")
+             ))
+
+        ; close the framing table
+        (add-html! document "</td></tr></table></center>"))
+
+    ; else (if invoice
+    (gnc:html-document-add-object!
+      document
+      (gnc:make-html-text
+      (N_ "No Valid Invoice Selected"))))
+
+    document))
+
+(gnc:define-report
+ 'version 1
+ 'name (N_ "Easy Invoice")
+ 'menu-path (list gnc:menuname-business-reports)
+ 'options-generator options-generator
+ 'renderer reg-renderer
+ 'in-menu? #t)
+
+(define (gnc:easy-invoice-report-create-internal invoice)
+  (let* ((options (gnc:make-report-options (N_ "Easy Invoice")))
+         (invoice-op (gnc:lookup-option options invoice-page invoice-name)))
+
+    (gnc:option-set-value invoice-op invoice)
+    (gnc:make-report (N_ "Easy Invoice") options)))
+
+(export gnc:easy-invoice-report-create-internal)
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-reports/Makefile.am,v
retrieving revision 1.4.4.1
retrieving revision 1.4.4.2
diff -Lsrc/business/business-reports/Makefile.am -Lsrc/business/business-reports/Makefile.am -u -r1.4.4.1 -r1.4.4.2
--- src/business/business-reports/Makefile.am
+++ src/business/business-reports/Makefile.am
@@ -10,6 +10,7 @@
 gncscmmod_DATA = \
    business-reports.scm \
    aging.scm \
+   easy-invoice.scm \
    fancy-invoice.scm \
    payables.scm \
    receivables.scm \
Index: business-reports.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-reports/business-reports.scm,v
retrieving revision 1.7.4.3
retrieving revision 1.7.4.4
diff -Lsrc/business/business-reports/business-reports.scm -Lsrc/business/business-reports/business-reports.scm -u -r1.7.4.3 -r1.7.4.4
--- src/business/business-reports/business-reports.scm
+++ src/business/business-reports/business-reports.scm
@@ -102,6 +102,7 @@
 
 (use-modules (gnucash report fancy-invoice))
 (use-modules (gnucash report invoice))
+(use-modules (gnucash report easy-invoice))
 (use-modules (gnucash report owner-report))
 (use-modules (gnucash report payables))
 (use-modules (gnucash report receivables))
Index: business-prefs.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-utils/business-prefs.scm,v
retrieving revision 1.2.4.2
retrieving revision 1.2.4.3
diff -Lsrc/business/business-utils/business-prefs.scm -Lsrc/business/business-utils/business-prefs.scm -u -r1.2.4.2 -r1.2.4.3
--- src/business/business-utils/business-prefs.scm
+++ src/business/business-utils/business-prefs.scm
@@ -44,6 +44,15 @@
 
 (gnc:register-configuration-option
  (gnc:make-simple-boolean-option
+  gnc:*business-label* (N_ "Accumulate splits on Post?")
+  "f0" (N_ (string-append
+	   "Whether multiple entries in an invoice which transfer to "
+	   "the same account should be accumulated into a single split by default."
+	   "This setting can be changed in the Post dialog."))
+  #t))
+
+(gnc:register-configuration-option
+ (gnc:make-simple-boolean-option
   gnc:*business-label* (N_ "Invoice Tax Included?")
   "f1" (N_ (string-append
 	   "Whether tax is included by default in entries on Invoices. "
@@ -92,7 +101,13 @@
   (reg-option
    (gnc:make-text-option
     gnc:*business-label* gnc:*company-addy*
-    "b" (N_ "The address of your business") ""))
+    "b1" (N_ "The address of your business") ""))
+
+  (reg-option
+   (gnc:make-string-option
+    gnc:*business-label* gnc:*company-id*
+    "b2" (N_ "The ID for your company (eg 'Tax-ID: 00-000000")
+    ""))
 
   (reg-option
    (gnc:make-taxtable-option
Index: business-utils.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-utils/business-utils.scm,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -Lsrc/business/business-utils/business-utils.scm -Lsrc/business/business-utils/business-utils.scm -u -r1.1 -r1.1.4.1
--- src/business/business-utils/business-utils.scm
+++ src/business/business-utils/business-utils.scm
@@ -7,8 +7,9 @@
 (define gnc:*business-label* (N_ "Business"))
 (define gnc:*company-name* (N_ "Company Name"))
 (define gnc:*company-addy* (N_ "Company Address"))
+(define gnc:*company-id* (N_ "Company ID"))
 
-(export gnc:*business-label* gnc:*company-name* gnc:*company-addy*)
+(export gnc:*business-label* gnc:*company-name* gnc:*company-addy* gnc:*company-id*)
 
 (load-from-path "business-options.scm")
 (load-from-path "business-prefs.scm")
Index: doxygen.cfg.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/doxygen.cfg.in,v
retrieving revision 1.2.4.2
retrieving revision 1.2.4.3
diff -Lsrc/doc/doxygen.cfg.in -Lsrc/doc/doxygen.cfg.in -u -r1.2.4.2 -r1.2.4.3
--- src/doc/doxygen.cfg.in
+++ src/doc/doxygen.cfg.in
@@ -209,7 +209,7 @@
 # defined locally in source files will be included in the documentation. 
 # If set to NO only classes defined in header files are included.
 
-EXTRACT_LOCAL_CLASSES  = NO
+EXTRACT_LOCAL_CLASSES  = YES
 
 # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
 # undocumented members of documented classes, files or namespaces. 
@@ -423,7 +423,7 @@
 # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
 # certain files from those directories.
 
-EXCLUDE_PATTERNS       = *P.h
+EXCLUDE_PATTERNS       =
 
 # The EXAMPLE_PATH tag can be used to specify one or more files or 
 # directories that contain example code fragments that are included (see 
Index: gw-engine-spec.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gw-engine-spec.scm,v
retrieving revision 1.53.4.6
retrieving revision 1.53.4.7
diff -Lsrc/engine/gw-engine-spec.scm -Lsrc/engine/gw-engine-spec.scm -u -r1.53.4.6 -r1.53.4.7
--- src/engine/gw-engine-spec.scm
+++ src/engine/gw-engine-spec.scm
@@ -97,8 +97,6 @@
 (gw:wrap-as-wct ws '<gnc:id-type> "QofIdType" "QofIdTypeConst")
 (gw:wrap-as-wct ws '<gnc:Account*> "Account*" "const Account*")
 (gw:wrap-as-wct ws '<gnc:Account**> "Account**" "const Account**")
-(gw:wrap-as-wct ws '<gnc:InvAcct*> "InvAcct*" "const InvAcct*")
-(gw:wrap-as-wct ws '<gnc:AccInfo*> "AccInfo*" "const AccInfo*")
 (gw:wrap-as-wct ws '<gnc:AccountGroup*> "AccountGroup*" "const AccountGroup*")
 (gw:wrap-as-wct ws '<gnc:Book*> "QofBook*" "const QofBook*")
 (gw:wrap-as-wct ws '<gnc:Lot*> "GNCLot*" "const GNCLot*")
@@ -1915,13 +1913,13 @@
  "xaccQueryAddDateMatch"
  '((<gnc:Query*> q)
    (<gw:bool> use-start)
-   (<gw:int> st-year)
-   (<gw:int> st-mon)
    (<gw:int> st-day)
+   (<gw:int> st-mon)
+   (<gw:int> st-year)
    (<gw:bool> use-end)
-   (<gw:int> end-year)
-   (<gw:int> end-mon)
    (<gw:int> end-day)
+   (<gw:int> end-mon)
+   (<gw:int> end-year)
    (<gnc:query-op> how))
  "Match the transaction date.")
 
Index: gnc-trace.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-trace.c,v
retrieving revision 1.2.20.8
retrieving revision 1.2.20.9
diff -Lsrc/engine/gnc-trace.c -Lsrc/engine/gnc-trace.c -u -r1.2.20.8 -r1.2.20.9
--- src/engine/gnc-trace.c
+++ src/engine/gnc-trace.c
@@ -26,6 +26,11 @@
 #include "config.h"
 
 #include <glib.h>
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#else
+  /* What to do? */
+#endif
 #include <stdarg.h>
 #include <string.h>
 #include <sys/time.h>
@@ -66,6 +71,7 @@
 };
 
 static FILE *fout = NULL;
+static const int MAX_TRACE_FILENAME = 100;
 
 static void
 fh_printer (const gchar   *log_domain,
@@ -75,14 +81,24 @@
 {
   FILE *fh = user_data;
   fprintf (fh, "%s\n", message);
+  fflush(fh);
 }
 
 void 
 gnc_log_init (void)
 {
-   fout = stderr;
-   fout = stdout;
+   char *filename;
+
    fout = fopen ("/tmp/gnucash.trace", "w");
+
+   if(!fout && (filename = (char *)malloc(MAX_TRACE_FILENAME))) {
+      snprintf(filename, MAX_TRACE_FILENAME-1, "/tmp/gnucash.trace.%d", getpid());
+      fout = fopen (filename, "w");
+   }
+
+   if(!fout)
+      fout = stderr;
+
    g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_MASK, fh_printer, fout);
 }
 
Index: cap-gains.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/cap-gains.c,v
retrieving revision 1.13.4.3
retrieving revision 1.13.4.4
diff -Lsrc/engine/cap-gains.c -Lsrc/engine/cap-gains.c -u -r1.13.4.3 -r1.13.4.4
--- src/engine/cap-gains.c
+++ src/engine/cap-gains.c
@@ -709,28 +709,30 @@
 
    if (GAINS_STATUS_GAINS & split->gains)
    {
+		Split *s;
       PINFO ("split is a gains recording split, switch over");
       /* If this is the split that records the gains, then work with 
        * the split that generates the gains. 
        */
       /* split = xaccSplitGetCapGainsSplit (split); */
-      split = split->gains_split;
+      s = split->gains_split;
 
       /* This should never be NULL, and if it is, and its matching
        * parent can't be found, then its a bug, and we should be
        * discarding this split.   But ... for now .. return.
        * XXX move appropriate actions to a 'scrub' routine'
        */
-      if (!split) 
+      if (!s) 
       {
          PERR ("Bad gains-split pointer! .. trying to recover.");
          split->gains_split = xaccSplitGetCapGainsSplit (split);
-         split = split->gains_split;
-         if (!split) return;
+         s = split->gains_split;
+         if (!s) return;
 #if MOVE_THIS_TO_A_DATA_INTEGRITY_SCRUBBER 
          xaccTransDestroy (trans);
 #endif
       }
+		split = s;
    }
 
    /* Note: if the value of the 'opening' split(s) has changed,
Index: qofquerycore.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofquerycore.c,v
retrieving revision 1.8.2.5
retrieving revision 1.8.2.6
diff -Lsrc/engine/qofquerycore.c -Lsrc/engine/qofquerycore.c -u -r1.8.2.5 -r1.8.2.6
--- src/engine/qofquerycore.c
+++ src/engine/qofquerycore.c
@@ -870,7 +870,7 @@
 {
   gint64 num = ((query_int64_getter)getter->param_getfcn)(object, getter);
 
-  return g_strdup_printf (GNC_SCANF_LLD, num);
+  return g_strdup_printf (GNC_SCANF_LLD, (long long int) num);
 }
 
 /* ================================================================ */
Index: iso-4217-currencies.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/iso-4217-currencies.scm,v
retrieving revision 1.7.4.2
retrieving revision 1.7.4.3
diff -Lsrc/engine/iso-4217-currencies.scm -Lsrc/engine/iso-4217-currencies.scm -u -r1.7.4.2 -r1.7.4.3
--- src/engine/iso-4217-currencies.scm
+++ src/engine/iso-4217-currencies.scm
@@ -91,7 +91,7 @@
 ( "Iranian Rial" "rial" "rial" "ISO4217" "IRR" "364" 1 1)
 ( "Iraqi Dinar" "dinar" "fil"  "ISO4217" "IQD" "368" 1000 1000)
 ( "Irish Punt" "punt" "pingin" "ISO4217" "IEP" "372" 100 100 ) ;; through 1998
-( "Israeli New Shekel" "new shekel" "new agorot"  "ISO4217" "ILS" "376" 100 100)
+( "Israeli New Shekel" "new shekel" "new agorot"  "ISO4217" "NIS" "376" 100 100)
 ( "Italian Lira" "lira" "lira" "ISO4217" "ITL" "380" 1 1 ) ;; through 1998
 ( "Jamaican Dollar" "dollar" "cent" "ISO4217" "JMD" "388" 100 100 )
 ( "Japanese Yen" "yen" "sen"  "ISO4217" "JPY" "392" 100 1 )
Index: gnc-numeric.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-numeric.c,v
retrieving revision 1.26.4.5
retrieving revision 1.26.4.6
diff -Lsrc/engine/gnc-numeric.c -Lsrc/engine/gnc-numeric.c -u -r1.26.4.5 -r1.26.4.6
--- src/engine/gnc-numeric.c
+++ src/engine/gnc-numeric.c
@@ -1067,7 +1067,7 @@
 double
 gnc_numeric_to_double(gnc_numeric in) 
 {
-  if(in.denom >= 0) 
+  if(in.denom > 0) 
   {
     return (double)in.num/(double)in.denom;
   }
@@ -1204,32 +1204,32 @@
   return p;
 }
 
-const gchar *
+gboolean
 string_to_gnc_numeric(const gchar* str, gnc_numeric *n) 
 {
   size_t num_read;
   long long int tmpnum;
   long long int tmpdenom;
     
-  if(!str) return NULL;
+  if(!str) return FALSE;
 
 #ifdef GNC_DEPRECATED
   /* must use "<" here because %n's effects aren't well defined */
   if(sscanf(str, " " GNC_SCANF_LLD "/" GNC_SCANF_LLD "%n",
             &tmpnum, &tmpdenom, &num_read) < 2) {
-    return(NULL);
+    return FALSE;
   }
 #else
   tmpnum = strtoll (str, NULL, 0);
   str = strchr (str, '/');
-  if (!str) return NULL;
+  if (!str) return FALSE;
   str ++;
   tmpdenom = strtoll (str, NULL, 0);
   num_read = strspn (str, "0123456789");
 #endif
   n->num = tmpnum;
   n->denom = tmpdenom;
-  return(str + num_read);
+  return TRUE;
 }
 
 /********************************************************************
--- /dev/null
+++ src/engine/qof_book_merge.c
@@ -0,0 +1,748 @@
+/*********************************************************************
+ * qof_book_merge.c -- api for QoFBook merge with collision handling *
+ * Copyright (C) 2004 Neil Williams <linux at codehelp.co.uk>           *
+ *                                                                   *
+ * This program is free software; you can redistribute it and/or     *
+ * modify it under the terms of the GNU General Public License as    *
+ * published by the Free Software Foundation; either version 2 of    *
+ * the License, or (at your option) any later version.               *
+ *                                                                   *
+ * This program is distributed in the hope that it will be useful,   *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of    *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     *
+ * GNU General Public License for more details.                      *
+ *                                                                   *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, contact:                         *
+ *                                                                   *
+ * Free Software Foundation           Voice:  +1-617-542-5942        *
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652        *
+ * Boston, MA  02111-1307,  USA       gnu at gnu.org                    *
+ *                                                                   *
+ ********************************************************************/
+
+#include "qof_book_merge.h"
+#include "qofid-p.h"
+static short module = MOD_IMPORT; 
+
+/* all qof_book_merge data is held in mergeData. */
+static qof_book_mergeData* mergeData = NULL;
+
+/*
+currentRule is only used when a qof_book_mergeRule is being inspected or
+tested, not when it is created. This is to avoid the need for g_new()
+every time a single rule is checked.
+
+Rules are created and freed separately, via the mergeData GList, mergeList.
+*/
+static qof_book_mergeRule* currentRule = NULL;
+
+/* ================================================================ */
+/* API functions. */
+int
+qof_book_mergeInit( QofBook *importBook, QofBook *targetBook) 
+{
+	GList *check;
+	g_return_val_if_fail((importBook != NULL)&&(targetBook != NULL), -1);
+	mergeData = g_new(qof_book_mergeData, 1);
+	mergeData->abort = FALSE;
+	mergeData->mergeList = NULL;
+	mergeData->targetList = NULL;
+	mergeData->mergeBook = importBook;
+	mergeData->targetBook = targetBook;
+	mergeData->mergeObjectParams = NULL;
+	currentRule = g_new(qof_book_mergeRule, 1);
+	qof_object_foreach_type(qof_book_mergeForeachType, NULL);
+	check = g_list_copy(mergeData->mergeList);
+	while(check != NULL) {
+		currentRule = check->data;
+		if(currentRule->mergeResult == MERGE_INVALID) {
+			qof_book_merge_abort();
+			return(-1);
+		}
+		check = g_list_next(check);
+	}
+	g_list_free(check);
+	return 0;
+}
+
+void
+qof_book_merge_abort (void)
+{
+	if(currentRule) {
+		g_slist_free(currentRule->linkedEntList);
+		g_slist_free(currentRule->mergeParam);
+		g_free(currentRule);
+	}
+	while(mergeData->mergeList != NULL) {
+		g_free(mergeData->mergeList->data);
+		mergeData->mergeList = g_list_next(mergeData->mergeList);
+	}
+	while(mergeData->targetList != NULL) {
+		g_free(mergeData->targetList->data);
+		mergeData->targetList = g_slist_next(mergeData->targetList);
+	}
+	g_list_free(mergeData->mergeList);
+	g_slist_free(mergeData->mergeObjectParams);
+	g_slist_free(mergeData->targetList);
+	g_free(mergeData);
+}
+
+char*
+qof_book_merge_param_as_string(QofParam *qtparam, QofEntity *qtEnt)
+{
+	gchar 		*stringImport;
+	char 		sa[GUID_ENCODING_LENGTH + 1];
+	KvpFrame 	*kvpImport;
+	QofType 	mergeType;
+	const GUID *guidImport;
+	gnc_numeric numericImport, 	(*numeric_getter)	(QofEntity*, QofParam*);
+	Timespec 	tsImport, 		(*date_getter)		(QofEntity*, QofParam*);
+	double 		doubleImport, 	(*double_getter)	(QofEntity*, QofParam*);
+	gboolean 	booleanImport, 	(*boolean_getter)	(QofEntity*, QofParam*);
+	gint32 		i32Import, 		(*int32_getter)		(QofEntity*, QofParam*);
+	gint64 		i64Import, 		(*int64_getter)		(QofEntity*, QofParam*);
+	
+	stringImport = NULL;
+	mergeType = qtparam->param_type;
+	if(safe_strcmp(mergeType, QOF_TYPE_STRING) == 0)  { 
+			stringImport = g_strdup(qtparam->param_getfcn(qtEnt,qtparam));
+			if(stringImport == NULL) { stringImport = ""; }
+			return stringImport;
+		}
+		if(safe_strcmp(mergeType, QOF_TYPE_DATE) == 0) { 
+			date_getter = (Timespec (*)(QofEntity*, QofParam*))qtparam->param_getfcn;
+			tsImport = date_getter(qtEnt, qtparam);
+			stringImport = g_strdup_printf("%llu", tsImport.tv_sec);
+			return stringImport;
+		}
+		if((safe_strcmp(mergeType, QOF_TYPE_NUMERIC) == 0)  ||
+		(safe_strcmp(mergeType, QOF_TYPE_DEBCRED) == 0)) { 
+			numeric_getter = (gnc_numeric (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
+			numericImport = numeric_getter(qtEnt,qtparam);
+			stringImport = g_strdup(gnc_numeric_to_string(numericImport));
+			return stringImport;
+		}
+		if(safe_strcmp(mergeType, QOF_TYPE_GUID) == 0) { 
+			guidImport = qtparam->param_getfcn(qtEnt,qtparam);
+			guid_to_string_buff(guidImport, sa);
+			stringImport = g_strdup(sa);
+			return stringImport;
+		}
+		if(safe_strcmp(mergeType, QOF_TYPE_INT32) == 0) { 
+			int32_getter = (gint32 (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
+			i32Import = int32_getter(qtEnt, qtparam);
+			stringImport = g_strdup_printf("%u", i32Import);
+			return stringImport;
+		}
+		if(safe_strcmp(mergeType, QOF_TYPE_INT64) == 0) { 
+			int64_getter = (gint64 (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
+			i64Import = int64_getter(qtEnt, qtparam);
+			stringImport = g_strdup_printf("%llu", i64Import);
+			return stringImport;
+		}
+		if(safe_strcmp(mergeType, QOF_TYPE_DOUBLE) == 0) { 
+			double_getter = (double (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
+			doubleImport = double_getter(qtEnt, qtparam);
+			stringImport = g_strdup_printf("%f", doubleImport);
+			return stringImport;
+		}
+		if(safe_strcmp(mergeType, QOF_TYPE_BOOLEAN) == 0){ 
+			boolean_getter = (gboolean (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
+			booleanImport = boolean_getter(qtEnt, qtparam);
+			if(booleanImport == TRUE) { stringImport = g_strdup("TRUE"); }
+			else { stringImport = g_strdup("FALSE"); }
+			return stringImport;
+		}
+		/* "kvp" */
+		/* FIXME: how can this be a string??? */
+		if(safe_strcmp(mergeType, QOF_TYPE_KVP) == 0) { 
+			kvpImport = kvp_frame_copy(qtparam->param_getfcn(qtEnt,qtparam));
+
+			return stringImport;
+		}
+		if(safe_strcmp(mergeType, QOF_TYPE_CHAR) == 0) { 
+			stringImport = g_strdup(qtparam->param_getfcn(qtEnt,qtparam));
+			return stringImport;
+		}
+	return NULL;
+}
+
+int
+qof_book_mergeUpdateResult(qof_book_mergeRule *resolved, qof_book_mergeResult tag)
+{
+	g_return_val_if_fail((resolved != NULL), -1);
+	g_return_val_if_fail((tag > 0), -1);
+	g_return_val_if_fail((tag != MERGE_REPORT), -1);
+	currentRule = resolved;
+	if((currentRule->mergeAbsolute == TRUE)&&	(tag == MERGE_DUPLICATE)) 	{ tag = MERGE_ABSOLUTE; }
+	if((currentRule->mergeAbsolute == TRUE)&&	(tag == MERGE_NEW)) 		{ tag = MERGE_UPDATE; }
+	if((currentRule->mergeAbsolute == FALSE)&&	(tag == MERGE_ABSOLUTE)) 	{ tag = MERGE_DUPLICATE; }
+	if((currentRule->mergeResult == MERGE_NEW)&&(tag == MERGE_UPDATE)) { tag = MERGE_NEW; }
+	if(currentRule->updated == FALSE) { currentRule->mergeResult = tag;	}
+	currentRule->updated = TRUE;
+	if(tag == MERGE_INVALID) {
+		mergeData->abort = TRUE;
+		qof_book_merge_abort();
+	}
+	return 0;
+}
+
+int
+qof_book_mergeCommit( void )
+{
+	GList *check;
+	
+	if(mergeData->abort == TRUE) return -1;
+	g_return_val_if_fail(mergeData != NULL, -1);
+	g_return_val_if_fail(mergeData->mergeList != NULL, -1);
+	currentRule = mergeData->mergeList->data;
+	check = g_list_copy(mergeData->mergeList);
+	while(check != NULL) {
+		currentRule = check->data;
+		if(currentRule->mergeResult == MERGE_INVALID) {
+			qof_book_merge_abort();
+			return(-1);
+		}
+		if(currentRule->mergeResult == MERGE_REPORT) {
+			g_list_free(check);
+			return 1;
+		}
+		check = g_list_next(check);
+	}
+	g_list_free(check);
+	qof_book_mergeCommitForeach( qof_book_mergeCommitRuleLoop, MERGE_NEW);
+	qof_book_mergeCommitForeach( qof_book_mergeCommitRuleLoop, MERGE_UPDATE);
+	while(mergeData->mergeList != NULL) {
+		g_free(mergeData->mergeList->data);
+		mergeData->mergeList = g_list_next(mergeData->mergeList);
+	}
+	g_list_free(mergeData->mergeList);
+	g_slist_free(mergeData->mergeObjectParams);
+	g_slist_free(mergeData->targetList);
+	g_free(mergeData);
+	return 0;
+}
+
+/* End of API functions. Internal code follows. */
+/* ==================================================================== */
+
+void qof_book_mergeRuleForeach( qof_book_mergeRuleForeachCB cb, qof_book_mergeResult mergeResult)
+{
+	struct qof_book_mergeRuleIterate iter;
+	GList *matching_rules;
+
+	g_return_if_fail(cb != NULL);
+	g_return_if_fail(mergeData != NULL);
+	g_return_if_fail(mergeResult > 0);
+	g_return_if_fail(mergeResult != MERGE_INVALID);
+	g_return_if_fail(mergeData->abort == FALSE);
+	iter.fcn = cb;
+	matching_rules = NULL;
+	iter.ruleList = g_list_copy(mergeData->mergeList);
+	while(iter.ruleList!=NULL) {
+		currentRule = iter.ruleList->data;
+		if(currentRule->mergeResult == mergeResult) {
+			matching_rules = g_list_prepend(matching_rules, currentRule);
+		}
+		iter.ruleList = g_list_next(iter.ruleList);
+	}
+	iter.remainder = g_list_length(matching_rules);
+	g_list_free(iter.ruleList);
+	g_list_foreach (matching_rules, qof_book_mergeRuleCB, &iter);
+	g_list_free(matching_rules);
+}
+
+
+void
+qof_book_mergeUpdateRule(gboolean match)
+{
+	gboolean absolute;
+
+	absolute = currentRule->mergeAbsolute;
+	if(absolute && match && currentRule->mergeResult == MERGE_UNDEF) {
+			currentRule->mergeResult = MERGE_ABSOLUTE;
+	}
+	if(absolute && !match) { currentRule->mergeResult = MERGE_UPDATE; }
+	if(!absolute && match &&currentRule->mergeResult == MERGE_UNDEF) {
+			currentRule->mergeResult = MERGE_DUPLICATE;
+	}
+	if(!absolute && !match) {
+		currentRule->difference++;
+		if(currentRule->mergeResult == MERGE_DUPLICATE) {
+			currentRule->mergeResult = MERGE_REPORT;
+		}
+	}
+}
+
+int 
+qof_book_mergeCompare( void ) 
+{
+	gchar 			*stringImport, *stringTarget, *charImport, *charTarget;
+	QofEntity	 	*mergeEnt, *targetEnt, *referenceEnt;
+	const GUID 		*guidImport, *guidTarget;
+	QofParam 		*qtparam;
+	KvpFrame 		*kvpImport, *kvpTarget;
+	QofIdType 		mergeParamName;
+	QofType 		mergeType;
+	GSList 			*paramList;
+	gboolean	 	absolute, mergeError, knowntype, mergeMatch, booleanImport, booleanTarget,
+													(*boolean_getter)	(QofEntity*, QofParam*);
+	Timespec 		tsImport, tsTarget, 			(*date_getter)		(QofEntity*, QofParam*);
+	gnc_numeric 	numericImport, numericTarget, 	(*numeric_getter)	(QofEntity*, QofParam*);
+	double 			doubleImport, doubleTarget, 	(*double_getter)	(QofEntity*, QofParam*);
+	gint32 			i32Import, i32Target, 			(*int32_getter)		(QofEntity*, QofParam*);
+	gint64 			i64Import, i64Target, 			(*int64_getter)		(QofEntity*, QofParam*);
+
+	g_return_val_if_fail((mergeData != NULL)||(currentRule != NULL), -1);
+	absolute = currentRule->mergeAbsolute;
+	mergeEnt = currentRule->importEnt;
+	targetEnt = currentRule->targetEnt;
+	paramList = currentRule->mergeParam;
+	currentRule->difference = 0;
+	currentRule->mergeResult = MERGE_UNDEF;
+	g_return_val_if_fail((targetEnt)||(mergeEnt)||(paramList), -1);
+	
+	kvpImport = kvp_frame_new();
+	kvpTarget = kvp_frame_new();
+	mergeError = FALSE;
+	while(paramList != NULL) {
+		mergeMatch = FALSE;
+		knowntype = FALSE;
+		qtparam = paramList->data;
+		mergeParamName = qtparam->param_name;
+
+		g_return_val_if_fail(mergeParamName != NULL, -1);
+		mergeType = qtparam->param_type;
+		if(safe_strcmp(mergeType, QOF_TYPE_STRING) == 0)  { 
+			stringImport = qtparam->param_getfcn(mergeEnt,qtparam);
+			stringTarget = qtparam->param_getfcn(targetEnt,qtparam);
+			/* very strict string matches may need to be relaxed. */
+			if(stringImport == NULL) { stringImport = ""; }
+			if(stringTarget == NULL) { stringTarget = ""; }
+			if(safe_strcmp(stringImport,stringTarget) == 0) { mergeMatch = TRUE; }
+			qof_book_mergeUpdateRule(mergeMatch);
+			stringImport = stringTarget = NULL;
+			knowntype= TRUE;
+		}
+		if(safe_strcmp(mergeType, QOF_TYPE_DATE) == 0) {
+			date_getter = (Timespec (*)(QofEntity*, QofParam*))qtparam->param_getfcn;
+			tsImport = date_getter(mergeEnt, qtparam);
+			tsTarget = date_getter(targetEnt, qtparam);
+			if(timespec_cmp(&tsImport, &tsTarget) == 0) { mergeMatch = TRUE; }
+			qof_book_mergeUpdateRule(mergeMatch);
+			knowntype= TRUE;
+		}
+		if((safe_strcmp(mergeType, QOF_TYPE_NUMERIC) == 0)  ||
+		(safe_strcmp(mergeType, QOF_TYPE_DEBCRED) == 0)) { 
+			numeric_getter = (gnc_numeric (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
+			numericImport = numeric_getter(mergeEnt,qtparam);
+			numericTarget = numeric_getter(targetEnt,qtparam);
+			if(gnc_numeric_compare (numericImport, numericTarget) == 0) { mergeMatch = TRUE; }
+			qof_book_mergeUpdateRule(mergeMatch);
+			knowntype= TRUE;
+		}
+		if(safe_strcmp(mergeType, QOF_TYPE_GUID) == 0) { 
+			guidImport = qtparam->param_getfcn(mergeEnt,qtparam);
+			guidTarget = qtparam->param_getfcn(targetEnt,qtparam);
+			if(guid_compare(guidImport, guidTarget) == 0) { mergeMatch = TRUE; }
+			qof_book_mergeUpdateRule(mergeMatch);
+			knowntype= TRUE;
+		}
+		if(safe_strcmp(mergeType, QOF_TYPE_INT32) == 0) { 
+			int32_getter = (gint32 (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
+			i32Import = int32_getter(mergeEnt, qtparam);
+			i32Target = int32_getter(targetEnt, qtparam);
+			if(i32Target == i32Import) { mergeMatch = TRUE; }
+			qof_book_mergeUpdateRule(mergeMatch);
+			knowntype= TRUE;
+		}
+		if(safe_strcmp(mergeType, QOF_TYPE_INT64) == 0) { 
+			int64_getter = (gint64 (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
+			i64Import = int64_getter(mergeEnt, qtparam);
+			i64Target = int64_getter(targetEnt, qtparam);
+			if(i64Target == i64Import) { mergeMatch = TRUE; }
+			qof_book_mergeUpdateRule(mergeMatch); 
+			knowntype= TRUE;
+		}
+		if(safe_strcmp(mergeType, QOF_TYPE_DOUBLE) == 0) { 
+			double_getter = (double (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
+			doubleImport = double_getter(mergeEnt, qtparam);
+			doubleTarget = double_getter(mergeEnt, qtparam);
+			if(doubleImport == doubleTarget) { mergeMatch = TRUE; }
+			qof_book_mergeUpdateRule(mergeMatch); 
+			knowntype= TRUE;
+		}
+		if(safe_strcmp(mergeType, QOF_TYPE_BOOLEAN) == 0){ 
+			boolean_getter = (gboolean (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
+			booleanImport = boolean_getter(mergeEnt, qtparam);
+			booleanTarget = boolean_getter(targetEnt, qtparam);
+			if(booleanImport != FALSE && booleanImport != TRUE) { booleanImport = FALSE; }
+			if(booleanTarget != FALSE && booleanTarget != TRUE) { booleanTarget = FALSE; }
+			if(booleanImport == booleanTarget) { mergeMatch = TRUE; }
+			qof_book_mergeUpdateRule(mergeMatch);
+			knowntype= TRUE;
+		}
+		if(safe_strcmp(mergeType, QOF_TYPE_KVP) == 0) { 
+			kvpImport = kvp_frame_copy(qtparam->param_getfcn(mergeEnt,qtparam));
+			kvpTarget = kvp_frame_copy(qtparam->param_getfcn(targetEnt,qtparam));
+			if(kvp_frame_compare(kvpImport, kvpTarget) == 0) { mergeMatch = TRUE; }
+			qof_book_mergeUpdateRule(mergeMatch); 
+			knowntype= TRUE;
+		}
+		if(safe_strcmp(mergeType, QOF_TYPE_CHAR) == 0) { 
+			charImport = qtparam->param_getfcn(mergeEnt,qtparam);
+			charTarget = qtparam->param_getfcn(targetEnt,qtparam);
+			if(charImport == charTarget) { mergeMatch = TRUE; }
+			qof_book_mergeUpdateRule(mergeMatch); 
+			knowntype= TRUE;
+		}
+		if(safe_strcmp(mergeType, QOF_ID_BOOK) == 0) { knowntype= TRUE;	}
+		/* deal with custom type parameters : */
+		/* using references to other registered QOF objects */
+		/* these references are NOT compared again here, just stored for the commit. */
+		if(knowntype == FALSE) {
+			referenceEnt = g_new(QofEntity,1);
+			referenceEnt = qtparam->param_getfcn(targetEnt, qtparam);
+			if(referenceEnt != NULL) {
+				if(referenceEnt->e_type != NULL) {
+					if(safe_strcmp(referenceEnt->e_type, mergeType) != 0) {
+						referenceEnt->e_type = NULL;
+						g_free(referenceEnt);
+					}
+				}
+			}
+			/* add to the rule so that the reference can be picked up in commit */
+			if(referenceEnt) {
+				currentRule->linkedEntList = g_slist_prepend(currentRule->linkedEntList, referenceEnt);
+			}
+		}
+	paramList = g_slist_next(paramList);
+	}
+	g_free(kvpImport);
+	g_free(kvpTarget);
+	return 0;
+}
+
+void
+qof_book_mergeCommitForeach (qof_book_mergeRuleForeachCB cb, qof_book_mergeResult mergeResult )
+{
+	struct qof_book_mergeRuleIterate iter;
+	GList *subList;
+
+	g_return_if_fail(cb != NULL);
+	g_return_if_fail(mergeData != NULL);
+	g_return_if_fail(mergeResult > 0);
+	g_return_if_fail((mergeResult != MERGE_INVALID)||(mergeResult != MERGE_UNDEF)||(mergeResult != MERGE_REPORT));
+
+	iter.fcn = cb;
+	subList = NULL;
+	iter.ruleList = g_list_copy(mergeData->mergeList);
+	while(iter.ruleList!=NULL) {
+		currentRule = iter.ruleList->data;
+		if(currentRule->mergeResult == mergeResult) {
+			subList = g_list_prepend(subList, currentRule);
+		}
+		iter.ruleList = g_list_next(iter.ruleList);
+	}
+	iter.remainder = g_list_length(subList);
+	g_list_foreach (subList, qof_book_mergeCommitForeachCB, &iter);
+}
+
+void qof_book_mergeCommitForeachCB(gpointer lister, gpointer arg)
+{
+	struct qof_book_mergeRuleIterate *iter;
+	
+	iter = arg;
+	iter->fcn ((qof_book_mergeRule*)lister, iter->remainder);
+	iter->remainder--;
+}
+
+
+void 
+qof_book_mergeForeach ( QofEntity* mergeEnt, gpointer user_data) 
+{
+	qof_book_mergeRule* mergeRule;
+	QofEntity *targetEnt, *best_matchEnt;
+	GUID *g;
+	gint difference;
+	GSList *c;
+	
+	g_return_if_fail(mergeEnt != NULL);
+	g = guid_malloc();
+	*g = mergeEnt->guid;
+	mergeRule = g_new(qof_book_mergeRule,1);
+	mergeRule->importEnt = 		mergeEnt;
+	mergeRule->difference = 	difference = 0;
+	mergeRule->mergeAbsolute = 	FALSE;
+	mergeRule->mergeResult = 	MERGE_UNDEF;
+	mergeRule->updated = 		FALSE;
+	mergeRule->mergeType = 		mergeEnt->e_type;
+	mergeRule->mergeLabel = 	qof_object_get_type_label(mergeEnt->e_type);
+	mergeRule->mergeParam = 	g_slist_copy(mergeData->mergeObjectParams);
+	mergeRule->linkedEntList =	NULL;
+	currentRule = mergeRule;
+	targetEnt = best_matchEnt = NULL;
+	targetEnt = qof_collection_lookup_entity (
+		qof_book_get_collection (mergeData->targetBook, mergeEnt->e_type), g);
+	if( targetEnt != NULL) { 
+		mergeRule->mergeAbsolute = TRUE;
+		mergeRule->targetEnt = targetEnt;
+		g_return_if_fail(qof_book_mergeCompare() != -1);
+		mergeData->mergeList = g_list_prepend(mergeData->mergeList,mergeRule);
+		return;
+	}
+	g_slist_free(mergeData->targetList);
+	mergeData->targetList = NULL;
+	qof_object_foreach_type(qof_book_mergeForeachTypeTarget, NULL);
+	if(g_slist_length(mergeData->targetList) == 0) {
+		mergeRule->mergeResult = MERGE_NEW;
+	}
+	difference = g_slist_length(mergeRule->mergeParam);
+	c = g_slist_copy(mergeData->targetList);
+	gnc_set_log_level(MOD_IMPORT, GNC_LOG_DEBUG);
+	while(c != NULL) {
+		mergeRule->targetEnt = c->data;
+		currentRule = mergeRule;
+		g_return_if_fail(qof_book_mergeCompare() != -1);
+		if(mergeRule->difference == 0) {
+			best_matchEnt = mergeRule->targetEnt;
+			mergeRule->mergeResult = MERGE_DUPLICATE;
+			g_slist_free(c);
+			guid_free(g);
+			return;
+		}
+		if(difference > mergeRule->difference) {
+			best_matchEnt = mergeRule->targetEnt;
+			difference = mergeRule->difference;
+		}
+		c = g_slist_next(c);
+	}
+	g_slist_free(c);
+	if(best_matchEnt != NULL ) {
+		mergeRule->targetEnt = best_matchEnt;
+		mergeRule->difference = difference;
+	}
+	else {
+		mergeRule->targetEnt = NULL;
+		mergeRule->difference = 0;
+		mergeRule->mergeResult = MERGE_NEW;
+	}
+	if(best_matchEnt != NULL ) {
+		g_return_if_fail(qof_book_mergeCompare() != -1);
+	}
+	mergeData->mergeList = g_list_prepend(mergeData->mergeList,mergeRule);
+	guid_free(g);
+	/* return to qof_book_mergeInit */
+}
+
+void qof_book_mergeForeachTarget (QofEntity* targetEnt, gpointer user_data)
+{
+	g_return_if_fail(targetEnt != NULL);
+
+	qof_book_merge_target_check(targetEnt);
+}
+
+
+void qof_book_merge_target_check (QofEntity* targetEnt)
+{
+	GList *checklist;
+	qof_book_mergeRule *destination;
+	const GUID *guid_ent, *guid_dest;
+	gboolean exists;
+	
+	exists = FALSE;
+	checklist = NULL;
+	if(mergeData->mergeList == NULL) { return; }
+	guid_ent = qof_entity_get_guid(targetEnt);
+	checklist = g_list_copy(mergeData->mergeList);
+	while(checklist != NULL) {
+		destination = checklist->data;
+		guid_dest = qof_entity_get_guid(destination->targetEnt);
+		if(guid_compare(guid_ent,guid_dest) == 0) { exists = TRUE; }
+		checklist = g_list_next(checklist);
+	}
+	if(exists == FALSE ) {
+		mergeData->targetList = g_slist_prepend(mergeData->targetList,targetEnt);
+	}
+}
+
+void 
+qof_book_mergeForeachTypeTarget ( QofObject* merge_obj, gpointer user_data) 
+{
+	g_return_if_fail(merge_obj != NULL);
+	if(safe_strcmp(merge_obj->e_type, currentRule->importEnt->e_type) == 0) {
+		qof_object_foreach(currentRule->importEnt->e_type, mergeData->targetBook, 
+			qof_book_mergeForeachTarget, NULL);
+	}
+}
+
+void 
+qof_book_mergeForeachType ( QofObject* merge_obj, gpointer user_data) 
+{
+	g_return_if_fail((merge_obj != NULL));
+	/* Skip unsupported objects */
+	if((merge_obj->create == NULL)||(merge_obj->foreach == NULL)){
+		DEBUG (" merge_obj QOF support failed %s", merge_obj->e_type);
+		return;
+	}
+
+	if(mergeData->mergeObjectParams != NULL) g_slist_free(mergeData->mergeObjectParams);
+	mergeData->mergeObjectParams = NULL;
+	qof_class_param_foreach(merge_obj->e_type, qof_book_mergeForeachParam , NULL);
+	qof_object_foreach(merge_obj->e_type, mergeData->mergeBook, qof_book_mergeForeach, NULL);
+}
+
+void 
+qof_book_mergeForeachParam( QofParam* param, gpointer user_data) 
+{
+	g_return_if_fail(param != NULL);
+	if((param->param_getfcn != NULL)&&(param->param_setfcn != NULL)) {
+		mergeData->mergeObjectParams = g_slist_append(mergeData->mergeObjectParams, param);
+	}
+}
+
+void
+qof_book_mergeRuleCB(gpointer lister, gpointer arg)
+{
+	struct qof_book_mergeRuleIterate *iter;
+
+	g_return_if_fail(mergeData->abort == FALSE);
+	iter = arg;
+	iter->fcn ((qof_book_mergeRule*)lister, iter->remainder);
+	iter->remainder--;
+}
+
+void qof_book_mergeCommitRuleLoop(qof_book_mergeRule *rule, guint remainder) 
+{ 
+	QofInstance 	*inst;
+	gboolean		registered_type;
+	QofEntity 		*referenceEnt;
+	GSList 			*linkage;
+	/* cm_ prefix used for variables that hold the data to commit */
+	QofParam 		*cm_param;
+	gchar 			*cm_string, *cm_char;
+	const GUID 		*cm_guid;
+	KvpFrame 		*cm_kvp;
+	/* function pointers and variables for parameter getters that don't use pointers normally */
+	gnc_numeric 	cm_numeric, (*numeric_getter)	(QofEntity*, QofParam*);
+	double 			cm_double, 	(*double_getter)	(QofEntity*, QofParam*);
+	gboolean 		cm_boolean, (*boolean_getter)	(QofEntity*, QofParam*);
+	gint32 			cm_i32, 	(*int32_getter)		(QofEntity*, QofParam*);
+	gint64 			cm_i64, 	(*int64_getter)		(QofEntity*, QofParam*);
+	Timespec 		cm_date, 	(*date_getter)		(QofEntity*, QofParam*);
+	/* function pointers to the parameter setters */
+	void	(*string_setter)	(QofEntity*, const char*);
+	void	(*date_setter)		(QofEntity*, Timespec);
+	void	(*numeric_setter)	(QofEntity*, gnc_numeric);
+	void	(*guid_setter)		(QofEntity*, const GUID*);
+	void	(*double_setter)	(QofEntity*, double);
+	void	(*boolean_setter)	(QofEntity*, gboolean);
+	void	(*i32_setter)		(QofEntity*, gint32);
+	void	(*i64_setter)		(QofEntity*, gint64);
+	void	(*char_setter)		(QofEntity*, char*);
+	void	(*kvp_frame_setter)	(QofEntity*, KvpFrame*);
+	void	(*reference_setter)	(QofEntity*, QofEntity*);
+
+	g_return_if_fail(rule != NULL);
+	g_return_if_fail((rule->mergeResult != MERGE_NEW)||(rule->mergeResult != MERGE_UPDATE));
+
+	/* create a new object for MERGE_NEW */
+	/* The new object takes the GUID from the import to retain an absolute match */
+	if(rule->mergeResult == MERGE_NEW) {
+		inst = (QofInstance*)qof_object_new_instance(rule->importEnt->e_type, mergeData->targetBook);
+		g_return_if_fail(inst != NULL);
+		rule->targetEnt = &inst->entity;
+		qof_entity_set_guid(rule->targetEnt, qof_entity_get_guid(rule->importEnt));
+	}
+	/* currentRule->targetEnt is now set,
+		1. by an absolute GUID match or
+		2. by best_matchEnt and difference or
+		3. by MERGE_NEW.
+	*/
+	while(rule->mergeParam != NULL) {
+		registered_type = FALSE;
+		g_return_if_fail(rule->mergeParam->data);		
+		cm_param = rule->mergeParam->data;
+		rule->mergeType = cm_param->param_type;
+		if(safe_strcmp(rule->mergeType, QOF_TYPE_STRING) == 0)  { 
+			cm_string = cm_param->param_getfcn(rule->importEnt, cm_param);
+			string_setter = (void(*)(QofEntity*, const char*))cm_param->param_setfcn;
+			if(string_setter != NULL) {	string_setter(rule->targetEnt, cm_string); }
+			registered_type = TRUE;
+		}
+		if(safe_strcmp(rule->mergeType, QOF_TYPE_DATE) == 0) { 
+			date_getter = (Timespec (*)(QofEntity*, QofParam*))cm_param->param_getfcn;
+			cm_date = date_getter(rule->importEnt, cm_param);
+			date_setter = (void(*)(QofEntity*, Timespec))cm_param->param_setfcn;
+			if(date_setter != NULL) { date_setter(rule->targetEnt, cm_date); }
+			registered_type = TRUE;
+		}
+		if((safe_strcmp(rule->mergeType, QOF_TYPE_NUMERIC) == 0)  ||
+		(safe_strcmp(rule->mergeType, QOF_TYPE_DEBCRED) == 0)) { 
+			numeric_getter = (gnc_numeric (*)(QofEntity*, QofParam*))cm_param->param_getfcn;
+			cm_numeric = numeric_getter(rule->importEnt, cm_param);
+			numeric_setter = (void(*)(QofEntity*, gnc_numeric))cm_param->param_setfcn;
+			if(numeric_setter != NULL) { numeric_setter(rule->targetEnt, cm_numeric); }
+			registered_type = TRUE;
+		}
+		if(safe_strcmp(rule->mergeType, QOF_TYPE_GUID) == 0) { 
+			cm_guid = cm_param->param_getfcn(rule->importEnt, cm_param);
+			guid_setter = (void(*)(QofEntity*, const GUID*))cm_param->param_setfcn;
+			if(guid_setter != NULL) { guid_setter(rule->targetEnt, cm_guid); }
+			registered_type = TRUE;
+		}
+		if(safe_strcmp(rule->mergeType, QOF_TYPE_INT32) == 0) { 
+			int32_getter = (gint32 (*)(QofEntity*, QofParam*)) cm_param->param_getfcn;
+			cm_i32 = int32_getter(rule->importEnt, cm_param);
+			i32_setter = (void(*)(QofEntity*, gint32))cm_param->param_setfcn;
+			if(i32_setter != NULL) { i32_setter(rule->targetEnt, cm_i32); }
+			registered_type = TRUE;
+		}
+		if(safe_strcmp(rule->mergeType, QOF_TYPE_INT64) == 0) { 
+			int64_getter = (gint64 (*)(QofEntity*, QofParam*)) cm_param->param_getfcn;
+			cm_i64 = int64_getter(rule->importEnt, cm_param);
+			i64_setter = (void(*)(QofEntity*, gint64))cm_param->param_setfcn;
+			if(i64_setter != NULL) { i64_setter(rule->targetEnt, cm_i64); }
+			registered_type = TRUE;
+		}
+		if(safe_strcmp(rule->mergeType, QOF_TYPE_DOUBLE) == 0) { 
+			double_getter = (double (*)(QofEntity*, QofParam*)) cm_param->param_getfcn;
+			cm_double = double_getter(rule->importEnt, cm_param);
+			double_setter = (void(*)(QofEntity*, double))cm_param->param_setfcn;
+			if(double_setter != NULL) { double_setter(rule->targetEnt, cm_double); }
+			registered_type = TRUE;
+		}
+		if(safe_strcmp(rule->mergeType, QOF_TYPE_BOOLEAN) == 0){ 
+			boolean_getter = (gboolean (*)(QofEntity*, QofParam*)) cm_param->param_getfcn;
+			cm_boolean = boolean_getter(rule->importEnt, cm_param);
+			boolean_setter = (void(*)(QofEntity*, gboolean))cm_param->param_setfcn;
+			if(boolean_setter != NULL) { boolean_setter(rule->targetEnt, cm_boolean); }
+			registered_type = TRUE;
+		}
+		if(safe_strcmp(rule->mergeType, QOF_TYPE_KVP) == 0) { 
+			cm_kvp = kvp_frame_copy(cm_param->param_getfcn(rule->importEnt,cm_param));
+			kvp_frame_setter = (void(*)(QofEntity*, KvpFrame*))cm_param->param_setfcn;
+			if(kvp_frame_setter != NULL) { kvp_frame_setter(rule->targetEnt, cm_kvp); }
+			registered_type = TRUE;
+		}
+		if(safe_strcmp(rule->mergeType, QOF_TYPE_CHAR) == 0) { 
+			cm_char = cm_param->param_getfcn(rule->importEnt,cm_param);
+			char_setter = (void(*)(QofEntity*, char*))cm_param->param_setfcn;
+			if(char_setter != NULL) { char_setter(rule->targetEnt, cm_char); }
+			registered_type = TRUE;
+		}
+		if(registered_type == FALSE) {
+			linkage = g_slist_copy(rule->linkedEntList);
+			while(linkage != NULL) {
+				referenceEnt = linkage->data;
+				if(safe_strcmp(referenceEnt->e_type, rule->mergeType) == 0) {
+					reference_setter = (void(*)(QofEntity*, QofEntity*))cm_param->param_setfcn;
+					if(reference_setter != NULL) { reference_setter(rule->targetEnt, referenceEnt); }
+				}
+				linkage = g_slist_next(linkage);
+			}
+		}
+		rule->mergeParam = g_slist_next(rule->mergeParam);
+	}
+}
--- /dev/null
+++ src/engine/qof_book_merge.h
@@ -0,0 +1,655 @@
+/*********************************************************************
+ * qof_book_merge.h -- api for QofBook merge with collision handling *
+ * Copyright (C) 2004 Neil Williams <linux at codehelp.co.uk>           *
+ *                                                                   *
+ * This program is free software; you can redistribute it and/or     *
+ * modify it under the terms of the GNU General Public License as    *
+ * published by the Free Software Foundation; either version 2 of    *
+ * the License, or (at your option) any later version.               *
+ *                                                                   *
+ * This program is distributed in the hope that it will be useful,   *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of    *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     *
+ * GNU General Public License for more details.                      *
+ *                                                                   *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, contact:                         *
+ *                                                                   *
+ * Free Software Foundation           Voice:  +1-617-542-5942        *
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652        *
+ * Boston, MA  02111-1307,  USA       gnu at gnu.org                    *
+ *                                                                   *
+ ********************************************************************/
+
+#define _GNU_SOURCE
+#ifndef QOFBOOKMERGE_H
+#define QOFBOOKMERGE_H
+
+/** @addtogroup QOF
+	@{ */
+/** @addtogroup BookMerge Merging QofBook structures.
+
+<b>Collision handling principles.</b>\n
+\n
+	-# Always check for a ::GUID first and compare. qof_book_merge only accepts valid ::QofBook
+	data  and therefore ALL objects in the import book will	include valid GUID's.
+	-# If the original import data did not contain a GUID (e.g. an external non-GnuCash source)
+	the GUID values will have been created during the import and will not match any existing
+	GUID's in the target book so objects that do not have a GUID match cannot be assumed to
+	be ::MERGE_NEW - parameter values must be checked.
+	-# If import contains data from closed books, store the data from the closed
+	books in the current book as active. i.e. re-open the books. 
+
+- If a GUID match exists, set qof_book_mergeRule::mergeAbsolute to \a TRUE.
+	-# If ALL parameters in the import object match the target object with the same \a GUID, 
+	set ::qof_book_mergeResult to \a MERGE_ABSOLUTE.
+	-# If any parameters differ, set ::MERGE_UPDATE.
+- If the import object \a GUID does not match an existing object,
+mergeAbsolute is unchanged from the default \a FALSE
+The parameter values of the object are compared to other objects of the same
+type in the target book.
+	-# If the same data exists in the target book with a different GUID, the object 
+	is tagged as DUPLICATE.
+	-# If the data has changed, the object is tagged as REPORT. 
+	-# If the data does not match, the object is tagged as NEW
+
+More information is at http://code.neil.williamsleesmill.me.uk/
+
+Each foreach function uses g_return_if_fail checks to protect the target book. If
+any essential data is missing, the loop returns without changing the target book.
+Note that this will not set or return an error value. However, g_return is only 
+used for critical errors that arise from programming errors, not for invalid import data 
+which should be cleaned up before creating the import QofBook.
+
+Only ::qof_book_mergeInit, ::qof_book_mergeUpdateResult and ::qof_book_mergeCommit return 
+any error values to the calling process. 
+
+	@{ */
+/**@file  qof_book_merge.h
+	@brief API for merging two \c QofBook* structures with collision handling
+	@author Copyright (c) 2004 Neil Williams <linux at codehelp.co.uk>
+*/
+
+
+#include <glib.h>
+#include "qof/gnc-engine-util.h"
+#include "qofbook.h"
+#include "qofclass.h"
+#include "qofobject.h"
+#include "qofinstance-p.h"
+#include "gnc-trace.h"
+
+/** \brief Results of collisions and user resolution.
+
+All rules are initialised as ::MERGE_UNDEF.
+Once the comparison is complete, each object within the import will be
+updated.
+
+::MERGE_ABSOLUTE, ::MERGE_NEW, ::MERGE_DUPLICATE and ::MERGE_UPDATE can be reported
+to the user along with all ::MERGE_REPORT objects for confirmation.
+It may be useful later to allow \a MERGE_ABSOLUTE, \a MERGE_NEW, \a MERGE_DUPLICATE and
+\a MERGE_UPDATE to not be reported, if the user sets a preferences option
+for each result. (Always accept new items: Y/N default NO, ignores all
+MERGE_NEW if set to Y etc.) This option would not require any changes
+to qof_book_merge.
+
+\a MERGE_NEW, \a MERGE_DUPLICATE and \a MERGE_UPDATE are only actioned after 
+conflicts are resolved by the user using a dialog and all \a MERGE_REPORT objects are
+re-assigned to one of MERGE_NEW, MERGE_DUPLICATE or MERGE_UPDATE. There is no automatic
+merge, even if no entities are tagged as MERGE_REPORT, the calling process must still
+check for REPORT items using ::qof_book_mergeRuleForeach and call ::qof_book_mergeCommit.
+
+\a MERGE_INVALID data should be rare and allows for user-abort - the imported file/source
+ may be corrupted and the prescence of invalid data should raise concerns that
+ the rest of the data may be corrupted, damaged or otherwise altered. If any entity is 
+ tagged as MERGE_INVALID, the merge operation will abort and leave the target book
+ completely unchanged.
+
+\a MERGE_ABSOLUTE is only used for a complete match. The import object contains 
+the same data in the same parameters with no omissions or amendments. If any data is missing, 
+amended or added, the data is labelled \a MERGE_UPDATE. 
+
+ Every piece of data has a corresponding result. Only when the count of items labelled
+ \a MERGE_REPORT is equal to zero are \a MERGE_NEW and \a MERGE_UPDATE 
+ items added to the existing book.\n \a MERGE_DUPLICATE items are silently ignored.
+ Aborting the dialog/process (by the user or in a program crash) at any point before the
+ final commit leaves the existing book completely untouched.
+*/
+typedef enum { 
+	MERGE_UNDEF, 		/**< default value before comparison is made. */
+	MERGE_ABSOLUTE, 	/**< GUID exact match, no new data - \b ignore */
+	MERGE_NEW, 			/**< import object does \b not exist in the
+							target book - \b add */
+	MERGE_REPORT, 		/**< import object needs user intervention - \b report */
+	MERGE_DUPLICATE, 	/**< import object with different GUID exactly
+							matches existing GUID - \b ignore */
+	MERGE_UPDATE, 		/**< import object matches an existing entity but 
+							includes new or modified parameter data - \b update */
+	MERGE_INVALID 		/**< import object didn't match registered object
+							or parameter types or user decided to abort - \b abort */
+}qof_book_mergeResult;
+
+
+/** \brief 	mergeData contains the essential data for any merge.
+
+Used to dictate what to merge, how to merge it, where to get the new data and
+where to put the amended data. 
+
+Combines lists of \a ::QofParam, \a ::QofEntity and \a ::qof_book_mergeRule into one struct that
+can be easily passed between callbacks. Also holds the pointers to the import and target ::QofBook 
+structures.
+	
+- targetList and mergeObjectParams change each time a new object type is set for compare. 
+- mergeList is the complete list of rules for all objects in the import book.
+
+*/
+typedef struct
+{
+	GSList 	*mergeObjectParams;	/**< GSList of ::QofParam details for each parameter in the current object. */
+	GList 	*mergeList;			/**< GSList of ::qof_book_mergeRule rules for the import data. */
+	GSList 	*targetList;		/**< GSList of ::QofEntity * for each object of this type in the target book */
+	QofBook *mergeBook;			/**< pointer to the import book for this merge operation. */
+	QofBook *targetBook;		/**< pointer to the target book for this merge operation. */
+	gboolean abort;				/**< set to TRUE if MERGE_INVALID is set. */
+}qof_book_mergeData;
+
+
+/** \brief One rule per entity, built into a single GSList for the entire merge 
+
+All rules are stored in the GSList qof_book_mergeData::mergeList.
+
+If the ::GUID matches it's the always same semantic object,
+regardless of whether other data fields are changed.
+\n	
+The boolean value mergeAbsolute defaults to \c FALSE\n
+
+NOTE 1: if mergeAbsolute == \c TRUE, ::qof_book_mergeResult will still be set to 
+::MERGE_UPDATE if parameters within this entity have been modified.
+
+NOTE 2: ::qof_book_merge_param_as_string returns \b string representations of the parameter
+data that is causing a collision. These values must \b NOT be used to set the target
+parameter - the function is provided for display purposes only, to make it simple to
+explain the collision to the user using MERGE_REPORT and the dialog.
+
+*/
+typedef struct 
+{
+	/* internal counters and reference variables */
+	gboolean mergeAbsolute;			/**< Only set if the GUID of the import matches the target */
+	gint difference;				/**< used to find best match in a book where no GUID matches */
+	gboolean updated;				/**< prevent the mergeResult from being overwritten. */
+	/* rule objects set from or by external calls */
+	QofIdType mergeType;			/**< type of comparison required for check for collision */
+	const char* mergeLabel;			/**< Descriptive label for the object type, useful for the
+											user intervention dialog. */
+	GSList *mergeParam;				/**< list of usable parameters for the object type */
+	GSList *linkedEntList;			/**< list of complex data types included in this object. 
+
+	linkedEntList contains an ::QofEntity reference to any parameter that is not
+	one of the core QOF_TYPE data types. This entity must be already registered with QOF
+	and the results of the comparison for the linked entity will modulate the mergeResult
+	of this object. e.g. if an invoice is the same value but for a different customer,
+	the invoice will be set to MERGE_REPORT and the customer as MERGE_NEW.
+	*/
+	qof_book_mergeResult mergeResult; /**< result of comparison with main ::QofBook */
+	QofEntity *importEnt;			/**< pointer to the current entity in the import book. */
+	QofEntity *targetEnt;			/**< pointer to the corresponding entity in the target book, if any. */
+}qof_book_mergeRule;
+
+
+/* ======================================================================== */
+/** @name qof_book_merge API */
+/** @{
+*/
+/** \brief Initialise the qof_book_merge process
+
+	First function of the qof_book_merge API. Every merge must begin with Init.
+
+	Requires the book to import (::QofBook *) and the book to receive the import, the target book
+	(::QofBook *). \n
+Process:
+
+ 	-# Invoke the callback ::qof_book_mergeForeachType on every registered object class definition. 
+	-# Callback obtains the registered parameter list for each object type. This provides run time 
+	access to all registered objects and all object parameters without any changes to
+	qof_book_merge - no registered object or parameter is omitted from any merge operation.
+	-# Use ::qof_object_foreach to invoke the callback ::qof_book_mergeForeach, one object at a time 
+	 on every instance stored in mergeBook. This is the first point where real data from the import 
+	 book is accessed.
+	-# qof_book_mergeForeach obtains the ::GUID for the object from the import book and runs the first
+	check on the original book, checking for any exact GUID match. With the full parameter list, 
+	the rules for this object can be created. If there is a GUID match, the data in each parameter 
+	of the import object is compared with the same semantic object in the original book. If there is
+	no GUID in the import object or no GUID match with the original book, the original book is 
+	searched to find a parameter match - checking for a ::MERGE_DUPLICATE result.
+	-# ::qof_book_mergeCompare sets the ::qof_book_mergeResult of the comparison.
+	-# Inserts the completed rule into qof_book_mergeData::mergeList GSList.
+
+\return -1 in case of error, otherwise 0.
+
+*/
+int
+qof_book_mergeInit( QofBook *importBook, QofBook *targetBook);
+
+
+/** \brief Definition of the dialog control callback routine
+
+All ::MERGE_REPORT rules must be offered for user intervention using this template.\n
+Commit will fail if any rules are still tagged as \a MERGE_REPORT.
+
+Calling processes are free to also offer MERGE_NEW, MERGE_UPDATE, MERGE_DUPLICATE and 
+MERGE_ABSOLUTE for user intervention. Attempting to query MERGE_INVALID rules
+will cause an error.
+
+For an example, consider test_rule_loop, declared as:
+
+<tt>void test_rule_loop(qof_book_mergeRule *rule, guint remainder);\n
+void test_rule_loop(qof_book_mergeRule *rule, guint remainder) \n
+{\n
+	g_return_if_fail(rule != NULL);\n
+	printf("Rule Result %s", rule->mergeType);\n
+	qof_book_mergeUpdateResult(rule,MERGE_UPDATE);\n
+}</tt>
+
+The dialog is free to call ::qof_book_mergeUpdateResult in the loop or at the end
+as long as the link between the rule and the result is maintained, e.g. by using a
+GHashTable. 
+\n
+The parameters are:
+	- rule : pointer to the ::qof_book_mergeRule that generated the collision report
+	- remainder : guint value returned from g_slist_length for the number of other
+		rules remaining with the same result. This might be useful for a progress dialog, it might not.
+		When updating MERGE_REPORT, remainder must equal zero before calling 
+		::qof_book_mergeCommit or the import will abort.
+\n
+
+If the dialog sets \b any rule result to ::MERGE_INVALID, the import will abort when
+::qof_book_mergeCommit is called. It is the responsibility of the calling 
+function to handle the error code from ::qof_book_mergeCommit, close the dialog
+and return to GnuCash. The merge routines in these files will already have halted the merge 
+operation and freed any memory allocated to merge structures before returning the error code.
+There is no need for the dialog process to report back to qof_book_merge in this situation.
+
+*/
+typedef void (* qof_book_mergeRuleForeachCB)(qof_book_mergeRule*, guint);
+
+/** \brief Dialog Control Callback
+
+This function is designed to be used to iterate over all rules tagged with a specific
+::qof_book_mergeResult value.
+
+Uses ::qof_book_get_collection with the qof_book_mergeRule::mergeType object type to
+return a collection of ::QofEntity entities from either the qof_book_mergeData::mergeBook or
+qof_book_mergeData::targetBook. Then uses ::qof_collection_lookup_entity to lookup 
+the qof_book_mergeRule::importEnt and again the qof_book_mergeRule::targetEnt to 
+return the two specific entities.
+
+*/
+void qof_book_mergeRuleForeach( qof_book_mergeRuleForeachCB, qof_book_mergeResult);
+
+
+/** \brief Holds details of each rule as the callbacks iterate over the list.
+
+*/
+struct qof_book_mergeRuleIterate {
+	qof_book_mergeRuleForeachCB   fcn;
+	qof_book_mergeRule *data;
+	GList *ruleList;
+	guint remainder;
+};
+
+/** \brief provides easy string access to parameter data for dialog use
+
+<b>Must only be used for display purposes!</b>
+
+Uses the param_getfcn to retrieve the parameter value as a string, suitable for
+display in dialogs and user intervention output. Only the parameters used in the merge
+are available, i.e. parameters where both param_getfcn and param_setfcn are not NULL.
+
+Note that the object type description (a full text version of the object name) is
+also available to the dialog as qof_book_mergeRule::mergeLabel.
+
+This allows the dialog to display the description of the object and all parameter data.
+
+*/
+char* qof_book_merge_param_as_string(QofParam *qtparam, QofEntity *qtEnt);
+
+/** \brief called by dialog callback to set the result of user intervention
+
+Set \b any rule result to ::MERGE_INVALID to abort the import when
+::qof_book_mergeCommit is called, without changing the target book.
+
+The calling process should make it absolutely clear that a merge operation 
+\b cannot be undone and that a backup copy should always be available 
+\b before a merge is initialised.
+
+Recommended method: Only offer three options to the user per rule:
+
+-# Allow import data to be merged into target data
+	- change MERGE_REPORT to MERGE_UPDATE
+-# Allow import data without an exact match to be
+	added as new
+	- change MERGE_REPORT to MERGE_NEW \b IF mergeAbsolute = FALSE
+-# Ignore import data and leave target data unchanged
+	- change MERGE_REPORT to MERGE_ABSOLUTE or MERGE_DUPLICATE
+
+Handle the required result changes in code: Check the value of
+qof_book_mergeRule::mergeAbsolute and use these principles:
+
+To ignore entities tagged as:
+- MERGE_REPORT, you must check the value of mergeAbsolute.
+	- if mergeAbsolute is TRUE, change MERGE_REPORT to MERGE_ABSOLUTE
+	- if mergeAbsolute is FALSE, change MERGE_REPORT to MERGE_DUPLICATE
+- MERGE_NEW, set MERGE_DUPLICATE.
+- MERGE_UPDATE, you must check the value of mergeAbsolute.
+	- if mergeAbsolute is TRUE, change MERGE_UPDATE to MERGE_ABSOLUTE
+	- if mergeAbsolute is FALSE, change MERGE_UPDATE to MERGE_DUPLICATE
+
+To merge entities that are not pre-set to MERGE_NEW, set MERGE_UPDATE.\n
+Attempting to merge an entity when the pre-set value was MERGE_NEW will
+force a change back to MERGE_NEW.
+
+To add entities, check mergeAbsolute is FALSE and set MERGE_NEW.\n
+An entity \b only be added if mergeAbsolute is FALSE. Attempting to
+add an entity when mergeAbsolute is TRUE will always force a MERGE_UPDATE.
+
+It is not possible to update the same rule more than once.
+
+-# \b MERGE_NEW is reserved for new objects and is only pre-set if
+all parameters, including GUID, have already failed to match any 
+relevant object. ::qof_book_mergeCommit will create new 
+entities for all rules tagged as MERGE_NEW. 
+	- if mergeAbsolute is TRUE and the user wants to import the 
+		data, requests to set MERGE_NEW will be forced to MERGE_UPDATE 
+		because an entity with that GUID already exists in the target book.
+	- if MERGE_NEW is pre-set, requests to change to MERGE_UPDATE will be 
+		ignored because a new entity is needed.
+-# \b MERGE_UPDATE is reserved for existing objects - ::qof_book_mergeCommit 
+will require a matching entity to update and will force a change to back to 
+MERGE_NEW if none is known to exist, using the principle above.
+-# \b MERGE_INVALID will cause an abort of the merge process.
+-# \b MERGE_UNDEF and \b MERGE_REPORT cannot be set - the entity result will be unchanged.
+-# \b MERGE_DUPLICATE and \b MERGE_ABSOLUTE are handled identically but are semantically
+	different - qof_book_mergeRule::mergeAbsolute is used to dictate which to set:
+	- if mergeAbsolute is TRUE but MERGE_DUPLICATE is requested,
+		force a change to MERGE_ABSOLUTE.
+	- if mergeAbsolute is FALSE but MERGE_ABSOLUTE is requested,
+		force a change to MERGE_DUPLICATE.
+
+::qof_book_mergeCommit only commits entities tagged 
+with MERGE_NEW and MERGE_UPDATE results.
+\n
+Entities tagged with MERGE_ABSOLUTE and MERGE_DUPLICATE results are ignored.
+
+\return -1 if supplied parameters are invalid or NULL, 0 on success.
+		
+*/
+int qof_book_mergeUpdateResult(qof_book_mergeRule *resolved, qof_book_mergeResult tag);
+
+
+/** \brief Commits the import data to the target book
+
+	The last function in the API and the final part of any qof_book_merge operation.
+
+qof_book_mergeCommit will abort the \b entire merge operation if any rule is set to
+::MERGE_INVALID. It is the responsibility of the calling 
+function to handle the error code from ::qof_book_mergeCommit, close the dialog
+and return to GnuCash. qof_book_mergeCommit will already have halted the merge 
+operation and freed any memory allocated to all merge structures before returning the error
+code. There is no way for the dialog process to report back to qof_book_merge in this situation.
+
+qof_book_mergeCommit checks for any entities still tagged as ::MERGE_REPORT and then proceeds
+to import all entities tagged as ::MERGE_UPDATE or ::MERGE_NEW into the target book.
+\n
+<b>This final process cannot be UNDONE!</b>\n
+\n
+
+\return 
+	- -1 if no merge has been initialised with ::qof_book_mergeInit or if any rules
+	are tagged as ::MERGE_INVALID,
+	- +1 if some entities are still tagged as \a MERGE_REPORT
+	- 0 on success.
+*/
+int
+qof_book_mergeCommit( void );
+
+/** \brief Abort the merge and free all memory allocated by the merge
+
+Sometimes, setting ::MERGE_INVALID is insufficient: e.g. if the user aborts the
+merge from outside the functions dealing with the merge ruleset. This function
+causes an immediate abort - the calling process must start again at Init if 
+a new merge is required.
+*/
+void
+qof_book_merge_abort(void);
+
+/** @} */
+
+/* ======================================================================== */
+/* Internal callback routines */
+
+/** @name Phase 1: Import book */
+/** @{
+*/
+
+/** \brief Looks up all import objects and calls ::qof_book_mergeCompare for each. 
+
+	This callback is used to obtain a list of all objects and their parameters
+	in the book to be imported.\n
+
+	Called by ::qof_book_mergeForeachType.\n
+	Receives all instances of only those objects that exist in the import book,
+	from ::qof_object_foreach. ::qof_book_mergeData contains a full list of all registered 
+	parameters for each object in the mergeObjectParams GSList. \n
+	Looks up the live parameter data (via ::QofEntity and ::QofParam), creates the rule, 
+	compares the data and stores the result of the comparison.
+
+Process:
+
+	-# Sets default ::qof_book_mergeResult as MERGE_UNDEF - undefined.\n
+	-# Obtains GUID, parameter data, type and rule.
+	-# Compares GUID with original book, sets ::qof_book_mergeData .mergeAbsolute
+	to TRUE if exact match.
+	-# Inserts rule into ::qof_book_mergeData rule list.
+	-# Runs the comparison for that data type using ::qof_book_mergeCompare.
+	
+*/
+void qof_book_mergeForeach (QofEntity* mergeEnt, gpointer mergeData);
+
+/** \brief Registered Object Callback.
+
+	Receives one object at a time from ::qof_object_foreach_type.\n
+	Note: generic type data only, no live data accesses.\n
+	::qof_object_foreach_type called directly by ::qof_book_mergeInit.
+
+	This callback is used to obtain a list of all registered
+	objects, whether or not the objects exist in either the import or
+	original books.\n
+	
+	Invokes the callback ::qof_book_mergeForeach on every instance of a particular object type.
+	The callback will be invoked only for those instances stored in the import book and therefore
+	qof_book_mergeForeach gains the first access to any live data.
+*/
+void qof_book_mergeForeachType (QofObject* merge_obj, gpointer mergeData);
+
+/** \brief Iterates over each parameter name within the selected QofObject.
+
+	 Receives the list of parameter names from ::QofParam and fills the GSList in
+	 ::qof_book_mergeData.\n
+	 No live data access - object typing and parameter listing only.\n
+	 \b Note: This function is called by ::qof_book_mergeForeachType in the comparison
+	 stage and ::qof_book_mergeCommitRuleLoop in the commit stage. Change with care!
+*/
+void qof_book_mergeForeachParam(QofParam* param_name, gpointer user_data);
+
+/** @} */
+/** @name Phase 2: Target book */
+/** @{
+*/
+
+/** \brief Registered Object Callback for the \b target book.
+
+	Receives one object at a time from ::qof_object_foreach_type.\n
+\n
+	This callback is used to iterate through all the registered
+	objects, in the \b Target book. When the target object type
+	matches the object type of the current import object, calls
+	::qof_book_mergeForeachTarget to store details of the possible target
+	matches in the GSList *targetList in ::qof_book_mergeData .
+	\n
+*/
+void qof_book_mergeForeachTypeTarget ( QofObject* merge_obj, gpointer mergeData);
+
+
+/** \brief Looks up all \b target objects of a specific type.
+
+	This callback is used to obtain a list of all suitable objects and their parameters
+	in the \b target book.\n
+\n
+	Called by ::qof_book_mergeForeachTypeTarget.\n
+	Receives all instances of only those objects that exist in the target book,
+	that match the object type of the current \b import object.
+	This is done when there is no GUID match and there is no way to know if
+	a corresponding object exists in the target book that would conflict with the
+	data in the import object.
+\n
+	Stores details of the QofEntity* of each suitable object in the target book
+	for later comparison by ::qof_book_mergeCompare .
+	
+*/
+void qof_book_mergeForeachTarget (QofEntity* mergeEnt, gpointer mergeData);
+
+/** \brief Omits target entities that have already been matched.
+
+	It is possible for two entities in the import book to match a single entity in
+	the target book, resulting in a loss of data during commit.
+	
+	qof_book_merge_target_check simply checks the GUID of all existing
+	target entities against the full list of all entities of a suitable type
+	in the ::qof_book_mergeForeachTarget iteration. Possible target entity
+	matches are only added to the qof_book_mergeData::targetList if the GUID
+	does not match.
+*/
+void qof_book_merge_target_check (QofEntity* targetEnt);
+
+/** @} */
+/** @name Phase 3: User Intervention
+*/
+/** @{
+*/
+
+/** \brief Iterates over the rules and declares the number of rules left to match
+
+	The second argument is a guint holding the remainder which might be
+	useful for progress feedback in the GUI. 
+*/
+void qof_book_mergeRuleCB(gpointer, gpointer);
+
+/** @} */
+/** @name Phase 4: Commit import to target book
+*/
+/** @{
+*/
+
+/** \brief Separates the rules according to the comparison results.
+
+	Used to create a list of all rules that match a particular ::qof_book_mergeResult.
+	Intended for ::MERGE_NEW and ::MERGE_UPDATE, it can be used for ::MERGE_ABSOLUTE or
+	::MERGE_DUPLICATE if you want to maybe report on what will be ignored in the import.
+	
+	It can \b NOT be used for ::MERGE_UNDEF, ::MERGE_INVALID or ::MERGE_REPORT.
+*/
+void qof_book_mergeCommitForeach (qof_book_mergeRuleForeachCB cb, qof_book_mergeResult mergeResult );
+
+/** \brief Iterates over the rules and declares the number of rules left to commit
+
+	The second argument is a guint holding the remainder which might be
+	useful for progress feedback in the GUI. 
+
+*/
+void qof_book_mergeCommitForeachCB(gpointer, gpointer);
+
+/** \brief Commit the data from the import to the target QofBook.
+
+	Called by ::qof_book_mergeCommit to commit data from each rule in turn.
+	Uses QofParam->param_getfcn - ::QofAccessFunc to query the import book
+	and param_setfcn - ::QofSetterFunc to update the target book.
+\n	
+	Note: Not all param_getfcn can have a matching param_setfcn.
+	Getting the balance of an account is obviously necessary to other routines
+	but is pointless in a comparison for a merge - the balance is calculated from
+	transactions, it cannot be set by the account. A discrepancy in the calculated
+	figures for an account object should not cause a MERGE_REPORT.
+\n
+ 	Limits the comparison routines to only calling param_getfcn if 
+	param_setfcn is not NULL. 
+	
+*/
+
+void qof_book_mergeCommitRuleLoop(qof_book_mergeRule *rule, guint remainder);
+
+/** @} */
+
+
+/** @name Comparison and Rule routines
+*/
+/** @{
+*/
+
+/** \brief Set the ::qof_book_mergeResult for each QofIdType parameter, using ::GUID if any.
+
+\n
+GUID's used in comparisons of entities and instances.
+
+If there is no GUID match, \a mergeData->mergeAbsolute will be set to FALSE.
+::qof_book_mergeCompare will receive a GSList of ::QofEntity * targets instead of one
+unique match and will iterate through the parameter comparisons for each member of 
+the GSList *targetList.
+
+Sets function pointers to the parameter_getter and parameter_setter routines from 
+::QofParam *mergeObjectParams and matches the comparison to the incoming data type:\n
+
+ at param mergeRule - contains the GUID, the import book reference, ::QofIdType of the object 
+that contains the parameter and mergeResult.
+
+\return -1 in case of error, otherwise 0.
+
+*/
+int 
+qof_book_mergeCompare( void );
+
+/** \brief Makes the decisions about how matches and conflicts are tagged.
+
+New rules start at:
+	- ::MERGE_ABSOLUTE\n 
+		(GUID's match; first parameter matches) OR
+	- ::MERGE_DUPLICATE\n
+		(GUID's do NOT match; first parameter DOES match) OR
+	- ::MERGE_NEW\n
+	(GUID's do NOT match; first parameters does NOT match).
+	
+If subsequent parameters in the same object FAIL a match:
+	- \a MERGE_ABSOLUTE fallsback to ::MERGE_UPDATE \n
+		(GUID matches but some parameters differ)\n
+		(guidTarget will be updated with mergeEnt)
+	- \a MERGE_DUPLICATE fallsback to ::MERGE_REPORT\n
+		(GUID does not match and some parameters do NOT match)
+	- \a MERGE_NEW fallsback to \a MERGE_REPORT
+		(GUID does not match and some parameters now DO match)
+
+<b>Comparisons without a GUID match.</b>
+	Only sets a failed match if ALL objects fail to match.
+	when absolute is FALSE, all suitable target objects are compared.
+	mergeResult is not set until all targets checked.
+	Identifies the closest match using a difference rank. This avoids 
+	using non-generic tests for object similarities. difference has a 
+	maximum value of the total number of comparable parameters and the
+	value closest to zero is used. In the case of a tie, it is
+	currently first-come-first-served. FIXME!
+
+*/
+void qof_book_mergeUpdateRule( gboolean match);
+
+/** @} */
+/** @} */
+#endif // QOFBOOKMERGE_H
Index: gnc-lot.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-lot.c,v
retrieving revision 1.14.4.5
retrieving revision 1.14.4.6
diff -Lsrc/engine/gnc-lot.c -Lsrc/engine/gnc-lot.c -u -r1.14.4.5 -r1.14.4.6
--- src/engine/gnc-lot.c
+++ src/engine/gnc-lot.c
@@ -308,7 +308,7 @@
    Timespec ts;
    Split *earliest = NULL;
 
-   ts.tv_sec = 1000000LL * ((long long) LONG_MAX);
+   ts.tv_sec = ((long long) LONG_MAX);
    ts.tv_nsec = 0;
    if (!lot) return NULL;
 
@@ -337,7 +337,7 @@
    Timespec ts;
    Split *latest = NULL;
 
-   ts.tv_sec = -1000000LL * ((long long) LONG_MAX);
+   ts.tv_sec = -((long long) LONG_MAX);
    ts.tv_nsec = 0;
    if (!lot) return NULL;
 
Index: Account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Account.c,v
retrieving revision 1.222.4.7
retrieving revision 1.222.4.8
diff -Lsrc/engine/Account.c -Lsrc/engine/Account.c -u -r1.222.4.7 -r1.222.4.8
--- src/engine/Account.c
+++ src/engine/Account.c
@@ -1255,6 +1255,27 @@
    xaccAccountCommitEdit(acc);
 }
 
+void qofAccountSetParent (Account *acc, QofEntity *parent) 
+{
+	AccountGroup *ag;
+	if((!acc)||(!parent)) return;
+	if(acc->parent) return;
+	xaccAccountBeginEdit(acc);
+	g_message("qofAccountSetParent start");
+	ag = xaccAccountGetParent((Account*)parent);
+	acc->parent = ag;
+/* FIXME: acc->parent is type AccountGroup but AccountGroup is not a true QOF object 
+so can't set AccountGroup in the target book because the GUID of any new AccountGroups 
+is not found. Workaround uses Account as the reference type.
+ */
+	if(!acc->parent) {
+		g_message("qofAccountSetParent failed.");
+	}
+	mark_account (acc);
+	acc->inst.dirty = TRUE;
+	xaccAccountCommitEdit(acc);
+}
+
 void
 xaccAccountSetNotes (Account *acc, const char *str) 
 {
@@ -1666,12 +1687,17 @@
       lp = lp->next;
   }
 
-  if( lp && lp->prev )
-  {
-    /* Since lp is now pointing to a split which was past the reconcile
-     * date, get the running balance of the previous split.
-     */
-    balance = xaccSplitGetBalance( (Split *)lp->prev->data );
+  if( lp ) {
+    if ( lp->prev ) {
+      /* Since lp is now pointing to a split which was past the reconcile
+       * date, get the running balance of the previous split.
+       */
+      balance = xaccSplitGetBalance( (Split *)lp->prev->data );
+    }		
+    else {
+      /* AsOf date must be before any entries, return zero. */
+      balance = gnc_numeric_zero();
+    }
   }
 
   /* Otherwise there were no splits posted after the given date,
@@ -2849,19 +2875,23 @@
 gboolean xaccAccountRegister (void)
 {
   static QofParam params[] = {
-    { ACCOUNT_NAME_, QOF_TYPE_STRING, (QofAccessFunc)xaccAccountGetName, (QofSetterFunc) xaccAccountSetName },
-    { ACCOUNT_CODE_, QOF_TYPE_STRING, (QofAccessFunc)xaccAccountGetCode, (QofSetterFunc) xaccAccountSetCode },
-    { ACCOUNT_DESCRIPTION_, QOF_TYPE_STRING, (QofAccessFunc)xaccAccountGetDescription, (QofSetterFunc) xaccAccountSetDescription },
-    { ACCOUNT_NOTES_, QOF_TYPE_STRING, (QofAccessFunc)xaccAccountGetNotes, (QofSetterFunc) xaccAccountSetNotes },
-    { ACCOUNT_PRESENT_, QOF_TYPE_NUMERIC, (QofAccessFunc)xaccAccountGetPresentBalance, NULL },
-    { ACCOUNT_BALANCE_, QOF_TYPE_NUMERIC, (QofAccessFunc)xaccAccountGetBalance, NULL },
-    { ACCOUNT_CLEARED_, QOF_TYPE_NUMERIC, (QofAccessFunc)xaccAccountGetClearedBalance, NULL },
-    { ACCOUNT_RECONCILED_, QOF_TYPE_NUMERIC, (QofAccessFunc)xaccAccountGetReconciledBalance, NULL },
-    { ACCOUNT_FUTURE_MINIMUM_, QOF_TYPE_NUMERIC, (QofAccessFunc)xaccAccountGetProjectedMinimumBalance, NULL },
-    { ACCOUNT_TAX_RELATED, QOF_TYPE_BOOLEAN, (QofAccessFunc)xaccAccountGetTaxRelated, (QofSetterFunc) xaccAccountSetTaxRelated },
-    { QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL },
-    { QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_instance_get_guid, NULL },
-    { ACCOUNT_KVP, QOF_TYPE_KVP, (QofAccessFunc)qof_instance_get_slots, NULL },
+    { ACCOUNT_NAME_, 			QOF_TYPE_STRING, (QofAccessFunc)xaccAccountGetName, 			(QofSetterFunc) xaccAccountSetName },
+    { ACCOUNT_CODE_, 			QOF_TYPE_STRING, (QofAccessFunc)xaccAccountGetCode, 			(QofSetterFunc) xaccAccountSetCode },
+    { ACCOUNT_DESCRIPTION_, 	QOF_TYPE_STRING, (QofAccessFunc)xaccAccountGetDescription, 		(QofSetterFunc) xaccAccountSetDescription },
+    { ACCOUNT_NOTES_, 			QOF_TYPE_STRING,  (QofAccessFunc)xaccAccountGetNotes, 			(QofSetterFunc) xaccAccountSetNotes },
+    { ACCOUNT_PRESENT_, 		QOF_TYPE_NUMERIC, (QofAccessFunc)xaccAccountGetPresentBalance, 	NULL },
+    { ACCOUNT_BALANCE_, 		QOF_TYPE_NUMERIC, (QofAccessFunc)xaccAccountGetBalance, 		NULL },
+    { ACCOUNT_CLEARED_, 		QOF_TYPE_NUMERIC, (QofAccessFunc)xaccAccountGetClearedBalance, 	NULL },
+    { ACCOUNT_RECONCILED_,	 	QOF_TYPE_NUMERIC, (QofAccessFunc)xaccAccountGetReconciledBalance, NULL },
+	{ ACCOUNT_TYPE_, 			QOF_TYPE_INT32,   (QofAccessFunc)xaccAccountGetType, 			(QofSetterFunc)xaccAccountSetType },
+    { ACCOUNT_FUTURE_MINIMUM_, 	QOF_TYPE_NUMERIC, (QofAccessFunc)xaccAccountGetProjectedMinimumBalance, NULL },
+    { ACCOUNT_TAX_RELATED, 		QOF_TYPE_BOOLEAN, (QofAccessFunc)xaccAccountGetTaxRelated, 		(QofSetterFunc) xaccAccountSetTaxRelated },
+	{ ACCOUNT_SCU, 				QOF_TYPE_INT32,   (QofAccessFunc)xaccAccountGetCommoditySCU, 	(QofSetterFunc)xaccAccountSetCommoditySCU },
+	{ ACCOUNT_NSCU, 			QOF_TYPE_BOOLEAN, (QofAccessFunc)xaccAccountSetNonStdSCU, 		(QofSetterFunc)xaccAccountSetNonStdSCU },
+	{ ACCOUNT_PARENT,			GNC_ID_ACCOUNT,	  (QofAccessFunc)xaccAccountGetParentAccount,	(QofSetterFunc)qofAccountSetParent },
+    { QOF_PARAM_BOOK, 			QOF_ID_BOOK, 	  (QofAccessFunc)qof_instance_get_book, 		NULL },
+    { QOF_PARAM_GUID, 			QOF_TYPE_GUID,    (QofAccessFunc)qof_instance_get_guid, 		NULL },
+    { ACCOUNT_KVP, 				QOF_TYPE_KVP, 	  (QofAccessFunc)qof_instance_get_slots, 		NULL },
     { NULL },
   };
 
Index: gnc-numeric.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-numeric.h,v
retrieving revision 1.8.6.2
retrieving revision 1.8.6.3
diff -Lsrc/engine/gnc-numeric.h -Lsrc/engine/gnc-numeric.h -u -r1.8.6.2 -r1.8.6.3
--- src/engine/gnc-numeric.h
+++ src/engine/gnc-numeric.h
@@ -301,10 +301,10 @@
 gnc_numeric double_to_gnc_numeric(double in, gint64 denom,  
                                   gint how);
 
-/** Read a gnc_numeric from str, skipping any leading whitespace, 
- *  and return a pointer to just past the last byte read.  
+/** Read a gnc_numeric from str, skipping any leading whitespace.
+ *  Return TRUE on success and store the resulting value in "n".
  *  Return NULL on error. */
-const gchar *string_to_gnc_numeric(const gchar* str, gnc_numeric *n);
+gboolean string_to_gnc_numeric(const gchar* str, gnc_numeric *n);
 
 /** Create a gnc_numeric object that signals the error condition
  *  noted by error_code, rather than a number. 
Index: gnc-pricedb.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-pricedb.c,v
retrieving revision 1.48.4.6
retrieving revision 1.48.4.7
diff -Lsrc/engine/gnc-pricedb.c -Lsrc/engine/gnc-pricedb.c -u -r1.48.4.6 -r1.48.4.7
--- src/engine/gnc-pricedb.c
+++ src/engine/gnc-pricedb.c
@@ -76,7 +76,7 @@
   return p;
 }
 
-static void 
+static void
 gnc_price_destroy (GNCPrice *p)
 {
   ENTER(" ");
@@ -151,20 +151,20 @@
 
 /* ==================================================================== */
 
-void 
+void
 gnc_price_begin_edit (GNCPrice *p)
 {
   QOF_BEGIN_EDIT (&p->inst);
 }
 
-static inline void commit_err (QofInstance *inst, QofBackendError errcode) 
+static inline void commit_err (QofInstance *inst, QofBackendError errcode)
 {
   PERR ("Failed to commit: %d", errcode);
 }
 
 static inline void noop (QofInstance *inst) {}
 
-void 
+void
 gnc_price_commit_edit (GNCPrice *p)
 {
   QOF_COMMIT_EDIT_PART1 (&p->inst);
@@ -173,13 +173,13 @@
 
 /* ==================================================================== */
 
-void 
+void
 gnc_pricedb_begin_edit (GNCPriceDB *pdb)
 {
   QOF_BEGIN_EDIT (&pdb->inst);
 }
 
-void 
+void
 gnc_pricedb_commit_edit (GNCPriceDB *pdb)
 {
   QOF_COMMIT_EDIT_PART1 (&pdb->inst);
@@ -194,10 +194,10 @@
 {
   if(!p) return;
 
-  if(!gnc_commodity_equiv(p->commodity, c)) 
+  if(!gnc_commodity_equiv(p->commodity, c))
   {
-    /* Changing the commodity requires the hash table 
-     * position to be modified. The easiest way of doing 
+    /* Changing the commodity requires the hash table
+     * position to be modified. The easiest way of doing
      * this is to remove and reinsert. */
     gnc_price_ref (p);
     remove_price (p->db, p, TRUE);
@@ -216,10 +216,10 @@
 {
   if(!p) return;
 
-  if(!gnc_commodity_equiv(p->currency, c)) 
+  if(!gnc_commodity_equiv(p->currency, c))
   {
-    /* Changing the currency requires the hash table 
-     * position to be modified. The easiest way of doing 
+    /* Changing the currency requires the hash table
+     * position to be modified. The easiest way of doing
      * this is to remove and reinsert. */
     gnc_price_ref (p);
     remove_price (p->db, p, TRUE);
@@ -236,10 +236,10 @@
 gnc_price_set_time(GNCPrice *p, Timespec t)
 {
   if(!p) return;
-  if(!timespec_equal(&(p->tmspec), &t)) 
+  if(!timespec_equal(&(p->tmspec), &t))
   {
-    /* Changing the datestamp requires the hash table 
-     * position to be modified. The easiest way of doing 
+    /* Changing the datestamp requires the hash table
+     * position to be modified. The easiest way of doing
      * this is to remove and reinsert. */
     gnc_price_ref (p);
     remove_price (p->db, p, FALSE);
@@ -256,7 +256,7 @@
 gnc_price_set_source(GNCPrice *p, const char *s)
 {
   if(!p) return;
-  if(safe_strcmp(p->source, s) != 0) 
+  if(safe_strcmp(p->source, s) != 0)
   {
     GCache *cache;
     char *tmp;
@@ -275,7 +275,7 @@
 gnc_price_set_type(GNCPrice *p, const char* type)
 {
   if(!p) return;
-  if(safe_strcmp(p->type, type) != 0) 
+  if(safe_strcmp(p->type, type) != 0)
   {
     GCache *cache;
     gchar *tmp;
@@ -294,7 +294,7 @@
 gnc_price_set_value(GNCPrice *p, gnc_numeric value)
 {
   if(!p) return;
-  if(!gnc_numeric_eq(p->value, value)) 
+  if(!gnc_numeric_eq(p->value, value))
   {
     gnc_price_begin_edit (p);
     p->value = value;
@@ -319,7 +319,7 @@
 gnc_price_lookup (const GUID *guid, QofBook *book)
 {
   QofCollection *col;
-  
+
   if (!guid || !book) return NULL;
   col = qof_book_get_collection (book, GNC_ID_PRICE);
   return (GNCPrice *) qof_collection_lookup_entity (col, guid);
@@ -445,13 +445,52 @@
                        gnc_price_get_guid((GNCPrice *) b));
 }
 
+typedef struct {
+	GNCPrice* pPrice;
+	gboolean isDupl;
+} PriceListIsDuplStruct;
+
+static void
+price_list_is_duplicate( gpointer data, gpointer user_data )
+{
+	GNCPrice* pPrice = (GNCPrice*)data;
+	PriceListIsDuplStruct* pStruct = (PriceListIsDuplStruct*)user_data;
+	Timespec time_a, time_b;
+
+    time_a = timespecCanonicalDayTime( gnc_price_get_time( pPrice ) );
+    time_b = timespecCanonicalDayTime( gnc_price_get_time( pStruct->pPrice ) );
+
+	/* If the date, currency, commodity and price match, it's a duplicate */
+	if( !gnc_numeric_equal( gnc_price_get_value( pPrice ),  gnc_price_get_value( pStruct->pPrice ) ) ) return;
+	if( gnc_price_get_commodity( pPrice ) != gnc_price_get_commodity( pStruct->pPrice ) ) return;
+	if( gnc_price_get_currency( pPrice ) != gnc_price_get_currency( pStruct->pPrice ) ) return;
+
+  if( timespec_cmp( &time_a, &time_b ) != 0 ) return;
+
+	pStruct->isDupl = TRUE;
+}
+
 gboolean
 gnc_price_list_insert(GList **prices, GNCPrice *p)
 {
   GList *result_list;
+  PriceListIsDuplStruct* pStruct;
+  gboolean isDupl;
 
   if(!prices || !p) return FALSE;
   gnc_price_ref(p);
+
+  pStruct = g_new0( PriceListIsDuplStruct, 1 );
+  pStruct->pPrice = p;
+  pStruct->isDupl = FALSE;
+  g_list_foreach( *prices, price_list_is_duplicate, pStruct );
+  isDupl = pStruct->isDupl;
+  g_free( pStruct );
+
+  if( isDupl ) {
+	return TRUE;
+  }
+
   result_list = g_list_insert_sorted(*prices, p, compare_prices_by_date);
   if(!result_list) return FALSE;
   *prices = result_list;
@@ -465,7 +504,7 @@
   GList *found_element;
 
   if(!prices || !p) return FALSE;
-  
+
   found_element = g_list_find(*prices, p);
   if(!found_element) return TRUE;
 
@@ -558,11 +597,11 @@
   g_return_val_if_fail (book, NULL);
 
   /* There can only be one pricedb per book.  So if one exits already,
-   * then use that.  Warn user, they shouldn't be creating two ... 
+   * then use that.  Warn user, they shouldn't be creating two ...
    */
   col = qof_book_get_collection (book, GNC_ID_PRICEDB);
   result = qof_collection_get_data (col);
-  if (result) 
+  if (result)
   {
     PWARN ("A price database already exists for this book!");
     return result;
@@ -736,7 +775,7 @@
 }
 
 /* ==================================================================== */
-/* The add_price() function is a utility that only manages the 
+/* The add_price() function is a utility that only manages the
  * dual hash table instertion */
 
 static gboolean
@@ -805,7 +844,7 @@
   if (FALSE == add_price(db, p)) return FALSE;
 
   /* If we haven't been able to call the backend before, call it now */
-  if (TRUE == p->inst.dirty) 
+  if (TRUE == p->inst.dirty)
   {
     gnc_price_begin_edit(p);
     db->inst.dirty = TRUE;
@@ -1032,8 +1071,8 @@
 }
 
 
-static void 
-hash_values_helper(gpointer key, gpointer value, gpointer data) 
+static void
+hash_values_helper(gpointer key, gpointer value, gpointer data)
 {
   GList ** l = data;
   *l = g_list_concat(*l, g_list_copy (value));
@@ -1403,7 +1442,7 @@
       Timespec diff_next = timespec_diff(&next_t, &t);
       Timespec abs_current = timespec_abs(&diff_current);
       Timespec abs_next = timespec_abs(&diff_next);
-      
+
       if (timespec_cmp(&abs_current, &abs_next) <= 0) {
         result = current_price;
       } else {
@@ -1458,7 +1497,7 @@
       Timespec diff_next = timespec_diff(&next_t, &t);
       Timespec abs_current = timespec_abs(&diff_current);
       Timespec abs_next = timespec_abs(&diff_next);
-      
+
       if (timespec_cmp(&abs_current, &abs_next) <= 0) {
         result = current_price;
       } else {
@@ -1578,10 +1617,10 @@
 
   balance = gnc_numeric_mul (balance, currency_price_value,
                              gnc_commodity_get_fraction (new_currency),
-                             GNC_HOW_RND_ROUND);      
+                             GNC_HOW_RND_ROUND);
   balance = gnc_numeric_mul (balance, gnc_price_get_value (price),
                              gnc_commodity_get_fraction (new_currency),
-                             GNC_HOW_RND_ROUND);      
+                             GNC_HOW_RND_ROUND);
 
   gnc_price_list_destroy(price_list);
   return balance;
@@ -1654,10 +1693,10 @@
 
   balance = gnc_numeric_mul (balance, currency_price_value,
                              gnc_commodity_get_fraction (new_currency),
-                             GNC_HOW_RND_ROUND);      
+                             GNC_HOW_RND_ROUND);
   balance = gnc_numeric_mul (balance, gnc_price_get_value (price),
                              gnc_commodity_get_fraction (new_currency),
-                             GNC_HOW_RND_ROUND);      
+                             GNC_HOW_RND_ROUND);
 
   gnc_price_list_destroy(price_list);
   return balance;
@@ -1702,7 +1741,7 @@
                        gpointer user_data)
 {
   GNCPriceDBForeachData foreach_data;
-  
+
   if(!db || !f) return FALSE;
   foreach_data.ok = TRUE;
   foreach_data.func = f;
@@ -1728,13 +1767,13 @@
   if(!a && !b) return 0;
   if(!a) return -1;
   if(!b) return 1;
-  
+
   ca = (gnc_commodity *) kvpa->key;
   cb = (gnc_commodity *) kvpb->key;
 
   cmp_result = safe_strcmp(gnc_commodity_get_namespace(ca),
                            gnc_commodity_get_namespace(cb));
-  
+
   if(cmp_result != 0) return cmp_result;
 
   return safe_strcmp(gnc_commodity_get_mnemonic(ca),
@@ -1749,7 +1788,7 @@
   GSList *currency_hashes = NULL;
   gboolean ok = TRUE;
   GSList *i = NULL;
-  
+
   if(!db || !f) return FALSE;
 
   currency_hashes = g_hash_table_key_value_pairs(db->commodity_hash);
@@ -1933,13 +1972,13 @@
 /* ==================================================================== */
 /* gncObject function implementation and registration */
 
-static void 
+static void
 pricedb_book_begin (QofBook *book)
 {
   gnc_pricedb_create(book);
 }
 
-static void 
+static void
 pricedb_book_end (QofBook *book)
 {
   /* ????? */
@@ -1960,11 +1999,11 @@
 /* ==================================================================== */
 /* a non-boolean foreach. Ugh */
 
-typedef struct 
+typedef struct
 {
   void (*func)(GNCPrice *p, gpointer user_data);
   gpointer user_data;
-} 
+}
 VoidGNCPriceDBForeachData;
 
 static void
@@ -1974,7 +2013,7 @@
   GList *node = price_list;
   VoidGNCPriceDBForeachData *foreach_data = (VoidGNCPriceDBForeachData *) user_data;
 
-  while(node) 
+  while(node)
   {
     GNCPrice *p = (GNCPrice *) node->data;
     foreach_data->func(p, foreach_data->user_data);
@@ -1995,7 +2034,7 @@
                        gpointer user_data)
 {
   VoidGNCPriceDBForeachData foreach_data;
-  
+
   if(!db || !f) return;
   foreach_data.func = f;
   foreach_data.user_data = user_data;
@@ -2005,11 +2044,11 @@
                        &foreach_data);
 }
 
-static void 
+static void
 pricedb_foreach(QofCollection *col, QofEntityForeachCB cb, gpointer data)
 {
   GNCPriceDB *db = gnc_collection_get_pricedb(col);
-  void_unstable_price_traversal(db, 
+  void_unstable_price_traversal(db,
                        (void (*)(GNCPrice *, gpointer)) cb,
                        data);
 }
@@ -2029,7 +2068,7 @@
 
   val = gnc_numeric_to_string (pr->value);
   da = qof_print_date (pr->tmspec.tv_sec);
-  
+
   commodity = gnc_price_get_commodity(pr);
   currency = gnc_price_get_currency(pr);
 
@@ -2042,7 +2081,7 @@
   return buff;
 }
 
-static QofObject pricedb_object_def = 
+static QofObject pricedb_object_def =
 {
   interface_version: QOF_OBJECT_VERSION,
   e_type:            GNC_ID_PRICE,
@@ -2057,7 +2096,7 @@
   version_cmp:       NULL,
 };
 
-gboolean 
+gboolean
 gnc_pricedb_register (void)
 {
   static QofParam params[] = {
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Makefile.am,v
retrieving revision 1.94.2.7
retrieving revision 1.94.2.8
diff -Lsrc/engine/Makefile.am -Lsrc/engine/Makefile.am -u -r1.94.2.7 -r1.94.2.8
--- src/engine/Makefile.am
+++ src/engine/Makefile.am
@@ -1,7 +1,11 @@
+#INCLUDES = /usr/include/glib-1.2 /usr/lib/glib/include
+
+qof_book_merge_lo_INCLUDES = -DG_LOG_DOMAIN=\"qof-book-merge\"
+
 SUBDIRS = . test-core test 
 PWD := $(shell pwd)
 
-pkglib_LTLIBRARIES = libgw-engine.la libgw-kvp.la libgncmod-engine.la 
+pkglib_LTLIBRARIES = libgw-engine.la libgw-kvp.la libgncmod-engine.la
 
 AM_CFLAGS = \
 	-I${top_srcdir}/lib/libc \
@@ -49,6 +53,7 @@
   messages.c \
   policy.c \
   qofbackend.c \
+  qof_book_merge.c \
   qofbook.c \
   qofclass.c \
   qofid.c \
@@ -56,7 +61,7 @@
   qofobject.c \
   qofquery.c \
   qofquerycore.c \
-  qofsession.c
+  qofsession.c 
 
 EXTRA_libgncmod_engine_la_SOURCES = iso-4217-currencies.c
 
@@ -111,6 +116,7 @@
   qofbackend.h \
   qof-be-utils.h \
   qofbook.h \
+  qof_book_merge.h \
   qofclass.h \
   qofid.h \
   qofinstance.h \
@@ -210,6 +216,7 @@
 	rm -f gnucash g-wrapped
 	ln -sf . gnucash 
 	ln -sf . g-wrapped 
+	ln -sf ${srcdir} qof
 if GNUCASH_SEPARATE_BUILDDIR
 	for X in ${SCM_FILE_LINKS} ; do \
 	  ln -sf ${srcdir}/$$X . ; \
@@ -242,6 +249,5 @@
   gw-engine.scm gw-engine.c gw-engine.h \
   gw-kvp.scm gw-kvp.c gw-kvp.h 
 
-DISTCLEANFILES = gnucash g-wrapped .scm-links ${SCM_FILE_LINKS} \
+DISTCLEANFILES = gnucash g-wrapped qof .scm-links ${SCM_FILE_LINKS} \
                  gw-engine.html gw-kvp.html
-
Index: gnc-commodity.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-commodity.c,v
retrieving revision 1.39.4.10
retrieving revision 1.39.4.11
diff -Lsrc/engine/gnc-commodity.c -Lsrc/engine/gnc-commodity.c -u -r1.39.4.10 -r1.39.4.11
--- src/engine/gnc-commodity.c
+++ src/engine/gnc-commodity.c
@@ -91,9 +91,10 @@
   const char *old_code;
   const char *new_code;
 } gnc_new_iso_codes[] = {
-  {"RUB", "RUR"}, // Russian Ruble
-  {"PLZ", "PLN"}, // Polish Zloty
-  {"UAG", "UAH"}, // Ukraine Hryvnia
+  {"RUB", "RUR"}, /* Russian Ruble */
+  {"PLZ", "PLN"}, /* Polish Zloty */
+  {"UAG", "UAH"}, /* Ukraine Hryvnia */
+  {"ILS", "NIS"}, /* New Israeli Shekel */
 };
 #define GNC_NEW_ISO_CODES \
         (sizeof(gnc_new_iso_codes) / sizeof(struct gnc_new_iso_code))
@@ -1431,12 +1432,10 @@
 {
   gnc_commodity_namespace * ns = NULL; 
   
-  if(table) 
-  { 
-    ns = g_hash_table_lookup(table->ns_table, (gpointer)namespace);
-  }
+  if (!table) return NULL;
   
-  if(!ns)
+  ns = g_hash_table_lookup(table->ns_table, (gpointer)namespace);
+  if(!ns) 
   {
     GCache *str_cache = gnc_engine_get_string_cache ();
     ns = g_new0(gnc_commodity_namespace, 1);
Index: Account.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Account.h,v
retrieving revision 1.110.4.7
retrieving revision 1.110.4.8
diff -Lsrc/engine/Account.h -Lsrc/engine/Account.h -u -r1.110.4.7 -r1.110.4.8
--- src/engine/Account.h
+++ src/engine/Account.h
@@ -212,9 +212,22 @@
 void xaccAccountSetNotes (Account *account, const char *notes);
 /** Set the last num field of an Account */
 void xaccAccountSetLastNum (Account *account, const char *num);
-
 /** Set the account's type */
 GNCAccountType xaccAccountGetType (Account *account);
+/** \brief Special function only for qof_book_merge
+
+qofAccountSetParent uses a specific QofEntity that is
+set during a qof_book_merge and it refers to the
+corresponding QofEntity in the target book. This is used
+to link new accounts into an existing AccountGroup. The
+parent reference is only changed if no parent exists.
+
+Care is needed before this function can be used in any
+other manner.
+*/
+void qofAccountSetParent (Account *, QofEntity *);
+
+
 /** Get the account's name */
 const char *   xaccAccountGetName (Account *account);
 /** Get the account's accounting code */
@@ -727,7 +740,7 @@
 
 /** @name Account parameter names */
 /** @{ */
-#define ACCOUNT_KVP		"kvp"
+#define ACCOUNT_KVP			"kvp"
 #define ACCOUNT_NAME_		"name"
 #define ACCOUNT_CODE_		"code"
 #define ACCOUNT_DESCRIPTION_	"desc"
@@ -738,6 +751,11 @@
 #define ACCOUNT_PRESENT_	"present"
 #define ACCOUNT_FUTURE_MINIMUM_ "future-minimum"
 #define ACCOUNT_TAX_RELATED	"tax-related-p"
+#define ACCOUNT_TYPE_		"account-type"
+#define ACCOUNT_SCU			"smallest-commodity-unit"
+#define ACCOUNT_NSCU		"non-standard-scu"
+#define ACCOUNT_PARENT		"parent-account"
+
 /** @} */
 
 /** This is the type-override when you want to match all accounts.  Used
--- /dev/null
+++ src/engine/test/test-book-merge.c
@@ -0,0 +1,486 @@
+/*********************************************************************
+ * test-book-merge.c -- test implementation api for QoFBook merge    *
+ * Copyright (C) 2004 Neil Williams <linux at codehelp.co.uk>           *
+ *                                                                   *
+ * This program is free software; you can redistribute it and/or     *
+ * modify it under the terms of the GNU General Public License as    *
+ * published by the Free Software Foundation; either version 2 of    *
+ * the License, or (at your option) any later version.               *
+ *                                                                   *
+ * This program is distributed in the hope that it will be useful,   *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of    *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     *
+ * GNU General Public License for more details.                      *
+ *                                                                   *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, contact:                         *
+ *                                                                   *
+ * Free Software Foundation           Voice:  +1-617-542-5942        *
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652        *
+ * Boston, MA  02111-1307,  USA       gnu at gnu.org                    *
+ *                                                                   *
+ ********************************************************************/
+ /* Test the qof_book_merge infrastructure. */
+ 
+#include <glib.h>
+#include <libguile.h>
+#define _GNU_SOURCE
+
+#include "qofinstance-p.h"
+#include "gnc-module.h"
+#include "gnc-event-p.h"
+#include "qof.h"
+#include "qof_book_merge.h"
+#include "test-stuff.h"
+
+#include "gnc-engine.h"
+#define TEST_MODULE_NAME "book-merge-test"
+#define TEST_MODULE_DESC "Test Book Merge"
+#define OBJ_NAME "somename"
+#define OBJ_AMOUNT "anamount"
+#define OBJ_DATE "nottoday"
+#define OBJ_GUID "unique"
+#define OBJ_DISCOUNT "hefty"
+#define OBJ_VERSION "early"
+#define OBJ_MINOR "tiny"
+#define OBJ_ACTIVE "ofcourse"
+
+static void test_rule_loop (qof_book_mergeRule*, guint);
+static void test_merge (void);
+gboolean myobjRegister (void);
+
+/* simple object structure */
+typedef struct obj_s
+{
+	QofInstance inst;
+	char     	*Name;
+	gnc_numeric Amount;
+	const GUID 	*obj_guid;
+	Timespec 	date;
+	double 		discount; /* cheap pun, I know. */
+	gboolean 	active;
+	gint32   	version;
+	gint64 		minor;
+}myobj;
+
+myobj* obj_create(QofBook*);
+
+/* obvious setter functions */
+void obj_setName(myobj*,	char*);
+void obj_setGUID(myobj*,	const GUID*);
+void obj_setAmount(myobj*,  gnc_numeric);
+void obj_setDate(myobj*,	Timespec h);
+void obj_setDiscount(myobj*, double);
+void obj_setActive(myobj*,  gboolean);
+void obj_setVersion(myobj*, gint32);
+void obj_setMinor(myobj*,   gint64);
+
+/* obvious getter functions */
+char*		obj_getName(myobj*);
+const GUID*	obj_getGUID(myobj*);
+gnc_numeric obj_getAmount(myobj*);
+Timespec   	obj_getDate(myobj*);
+double		obj_getDiscount(myobj*);
+gboolean	obj_getActive(myobj*);
+gint32		obj_getVersion(myobj*);
+gint64		obj_getMinor(myobj*);
+
+myobj*
+obj_create(QofBook *book)
+{
+	myobj *g;
+	g_return_val_if_fail(book, NULL);
+	g = g_new(myobj, 1);
+	qof_instance_init (&g->inst, TEST_MODULE_NAME, book);
+	obj_setGUID(g,qof_instance_get_guid(&g->inst));
+	g->date.tv_nsec = 0;
+	g->date.tv_sec = 0;
+	g->discount = 0;
+	g->active = TRUE;
+	g->version = 1;
+	g->minor = 1;
+	gnc_engine_gen_event(&g->inst.entity, GNC_EVENT_CREATE);
+	return g;
+}
+
+void
+obj_setMinor(myobj *g, gint64 h)
+{
+	g_return_if_fail(g != NULL);
+	g->minor = h;
+}
+
+gint64
+obj_getMinor(myobj *g)
+{
+	g_return_val_if_fail((g != NULL),0);
+	return g->minor;
+}
+
+void
+obj_setVersion(myobj *g, gint32 h)
+{
+	g_return_if_fail(g != NULL);
+	g->version = h;
+}
+
+gint32
+obj_getVersion(myobj *g)
+{
+	if(!g) return 0;
+	return g->version;
+}
+
+void
+obj_setActive(myobj *g, gboolean h)
+{
+	if(!g) return;
+	g->active = h;
+}
+
+gboolean
+obj_getActive(myobj *g)
+{
+	if(!g) return FALSE;
+	return g->active;
+}
+
+void
+obj_setDiscount(myobj *g, double h)
+{
+	if(!g) return;
+	g->discount = h;
+}
+
+double
+obj_getDiscount(myobj *g)
+{
+	if(!g) return 0;
+	return g->discount;
+}
+
+void
+obj_setDate(myobj *g, Timespec h)
+{
+	if(!g) return;
+	g->date = h;
+}
+
+Timespec
+obj_getDate(myobj *g)
+{
+	Timespec ts;
+	if(!g) return ts;
+	ts = g->date;
+	return ts;
+}
+
+void
+obj_setGUID(myobj* g, const GUID* h)
+{
+	if(!g) return;
+	g->obj_guid = h;
+}
+
+const GUID* 
+obj_getGUID(myobj *g)
+{
+	if(!g) return NULL;
+	return g->obj_guid;
+}
+
+void 
+obj_setName(myobj* g, char* h)
+{
+	if(!g || !h) return;
+	g->Name = strdup(h);
+}
+
+char*
+obj_getName(myobj *g)
+{
+	if(!g) return NULL;
+	return g->Name;
+}
+
+void
+obj_setAmount(myobj *g, gnc_numeric h)
+{
+	if(!g) return;
+	g->Amount = h;
+}
+
+gnc_numeric
+obj_getAmount(myobj *g)
+{
+	if(!g) return double_to_gnc_numeric(0,0,GNC_HOW_DENOM_EXACT);
+	return g->Amount;
+}
+
+static QofObject obj_object_def = {
+  interface_version:     QOF_OBJECT_VERSION,
+  e_type:                TEST_MODULE_NAME,
+  type_label:            TEST_MODULE_DESC,
+  create:                (gpointer)obj_create,
+  book_begin:            NULL,
+  book_end:              NULL,
+  is_dirty:              NULL,
+  mark_clean:            NULL,
+  foreach:               qof_collection_foreach,
+  printable:             NULL,
+  version_cmp:           (int (*)(gpointer,gpointer)) qof_instance_version_cmp,
+};
+
+gboolean myobjRegister (void)
+{
+  static QofParam params[] = {
+	{ OBJ_NAME,		QOF_TYPE_STRING,	(QofAccessFunc)obj_getName,		(QofSetterFunc)obj_setName		},
+	{ OBJ_AMOUNT,   QOF_TYPE_NUMERIC,   (QofAccessFunc)obj_getAmount,   (QofSetterFunc)obj_setAmount	},
+	{ OBJ_GUID,		QOF_TYPE_GUID,		(QofAccessFunc)obj_getGUID,		(QofSetterFunc)obj_setGUID		},
+	{ OBJ_DATE,		QOF_TYPE_DATE,		(QofAccessFunc)obj_getDate,		(QofSetterFunc)obj_setDate		},
+	{ OBJ_DISCOUNT, QOF_TYPE_DOUBLE,	(QofAccessFunc)obj_getDiscount, (QofSetterFunc)obj_setDiscount  },
+	{ OBJ_ACTIVE,   QOF_TYPE_BOOLEAN,   (QofAccessFunc)obj_getActive,   (QofSetterFunc)obj_setActive	},
+	{ OBJ_VERSION,  QOF_TYPE_INT32,		(QofAccessFunc)obj_getVersion,  (QofSetterFunc)obj_setVersion   },
+	{ OBJ_MINOR,	QOF_TYPE_INT64,		(QofAccessFunc)obj_getMinor,	(QofSetterFunc)obj_setMinor		},
+    { QOF_PARAM_BOOK, QOF_ID_BOOK,		(QofAccessFunc)qof_instance_get_book, NULL },
+    { QOF_PARAM_GUID, QOF_TYPE_GUID,	(QofAccessFunc)qof_instance_get_guid, NULL },
+    { NULL },
+  };
+
+  qof_class_register (TEST_MODULE_NAME, NULL, params);
+
+  return qof_object_register (&obj_object_def);
+}
+
+static void 
+test_merge (void)
+{
+	QofBook *target, *import;
+	double init_value, discount;
+	myobj *import_obj, *target_obj, *new_obj;
+	int result;
+	Timespec ts, tc;
+	gboolean active;
+	gint32 version;
+	gint64 minor;
+	gchar *import_init, *target_init;
+	gnc_numeric obj_amount;
+	
+	target = qof_book_new();
+	import = qof_book_new();
+	init_value = 1.00;
+	result = 0;
+	discount = 0.5;
+	active = TRUE;
+	version = 1;
+	minor = 1;
+	import_init = "test";
+	target_init = "testing";
+	qof_date_format_set(QOF_DATE_FORMAT_UK);
+	timespecFromTime_t(&ts,time(NULL));
+
+	do_test ((NULL != target), "#1 target book is NULL");
+
+	/* import book objects - tests used */
+	do_test ((NULL != import), "#2 import book is NULL");
+	import_obj = g_new(myobj, 1);
+	do_test ((NULL != import_obj), "#3 new object create");
+	qof_instance_init (&import_obj->inst, TEST_MODULE_NAME, import);
+	do_test ((NULL != &import_obj->inst), "#4 instance init");
+	obj_setGUID(import_obj,qof_instance_get_guid(&import_obj->inst));
+	do_test ((NULL != &import_obj->obj_guid), "#5 guid set");
+	gnc_engine_gen_event(&import_obj->inst.entity, GNC_EVENT_CREATE);
+	do_test ((NULL != &import_obj->inst.entity), "#6 gnc event create");
+	obj_setName(import_obj, import_init);
+	do_test ((NULL != &import_obj->Name), "#7 string set");
+	obj_amount = double_to_gnc_numeric(init_value,1, GNC_HOW_DENOM_EXACT);
+	obj_setAmount(import_obj, obj_amount);
+	do_test ((gnc_numeric_check(obj_getAmount(import_obj)) == GNC_ERROR_OK), "#8 gnc_numeric set");
+	obj_setActive(import_obj, active);
+	do_test ((FALSE != &import_obj->active), "#9 gboolean set");
+	obj_setDiscount(import_obj, discount);
+	do_test ((discount == import_obj->discount), "#10 double set");
+	obj_setVersion(import_obj, version);
+	do_test ((version == import_obj->version), "#11 gint32 set");
+	obj_setMinor(import_obj, minor);
+	do_test ((minor == import_obj->minor), "#12 gint64 set");
+	obj_setDate(import_obj, ts );
+	tc = import_obj->date;
+	do_test ((timespec_cmp(&ts, &tc) == 0), "#13 date set");
+
+	obj_amount = gnc_numeric_add(obj_amount, obj_amount, 1, GNC_HOW_DENOM_EXACT);
+	discount = 0.25;
+	version = 2;
+	minor = 3;
+
+	/* second import object - test results would be the same, so not tested. */
+	new_obj = g_new(myobj, 1);
+	qof_instance_init (&new_obj->inst, TEST_MODULE_NAME, import);
+	obj_setGUID(new_obj,qof_instance_get_guid(&new_obj->inst));
+	gnc_engine_gen_event (&new_obj->inst.entity, GNC_EVENT_CREATE);
+	obj_setName(new_obj, import_init);
+	obj_setAmount(new_obj, obj_amount);
+	obj_setActive(new_obj, active);
+	obj_setDiscount(new_obj, discount);
+	obj_setVersion(new_obj, version);
+	obj_setMinor(new_obj, minor);
+	obj_setDate(new_obj, ts);
+
+	obj_amount = gnc_numeric_add(obj_amount, obj_amount, 1, GNC_HOW_DENOM_EXACT);
+	discount = 0.35;
+	version = 2;
+	minor = 3;
+	tc.tv_sec = ts.tv_sec -1;
+	tc.tv_nsec = 0;
+
+	/* target object - test results would be the same, so not tested. */
+	target_obj = g_new(myobj, 1);
+	qof_instance_init (&target_obj->inst, TEST_MODULE_NAME, target);
+	obj_setGUID(target_obj,qof_instance_get_guid(&target_obj->inst));
+	gnc_engine_gen_event (&target_obj->inst.entity, GNC_EVENT_CREATE);
+	obj_setName(target_obj, target_init);
+	obj_setAmount(target_obj, obj_amount);
+	obj_setActive(target_obj, active);
+	obj_setDiscount(target_obj, discount);
+	obj_setVersion(target_obj, version);
+	obj_setMinor(target_obj, minor);
+	obj_setDate(target_obj, tc );
+	
+	result = qof_book_mergeInit(import, target);
+	do_test ( result != -1, "FATAL: Merge could not be initialised!\t aborting . . ");
+	g_return_if_fail(result != -1);
+ 	qof_book_mergeRuleForeach(test_rule_loop, MERGE_REPORT);
+	qof_book_mergeRuleForeach(test_rule_loop, MERGE_UPDATE);
+	qof_book_mergeRuleForeach(test_rule_loop, MERGE_NEW);
+ 	/* reserved calls - test only */
+ 	qof_book_mergeRuleForeach(test_rule_loop, MERGE_ABSOLUTE);
+ 	qof_book_mergeRuleForeach(test_rule_loop, MERGE_DUPLICATE);
+
+	/* import should not be in the target - pass if import_init fails match with target */
+	do_test (((safe_strcmp(obj_getName(import_obj),obj_getName(target_obj))) != 0), "Init value test #1");
+	
+	/* a good commit returns zero */
+ 	do_test (qof_book_mergeCommit() == 0, "Commit failed");
+
+	/* import should be in the target - pass if import_init matches target */
+	do_test (((safe_strcmp(import_init,obj_getName(target_obj))) == 0), "Merged value test #1");
+
+	/* import should be the same as target - pass if values are the same */
+	do_test (((safe_strcmp(obj_getName(target_obj),obj_getName(import_obj))) == 0), "Merged value test #2");
+
+	/* check that the Amount really is a gnc_numeric */
+	do_test ((gnc_numeric_check(obj_getAmount(import_obj)) == GNC_ERROR_OK), "import gnc_numeric check");
+	do_test ((gnc_numeric_check(obj_getAmount(target_obj)) == GNC_ERROR_OK), "target gnc_numeric check");
+
+	/* obj_amount was changed after the import object was set, so expect a difference. */
+	do_test ((gnc_numeric_compare(obj_getAmount(import_obj), obj_amount) != GNC_ERROR_OK),
+			"gnc_numeric value check #1");
+
+	/* obj_amount is in the target object with the import value, expect a difference/ */
+	do_test ((gnc_numeric_compare(obj_getAmount(target_obj), obj_amount) != GNC_ERROR_OK),
+			"gnc_numeric value check #2");
+	
+	/* target had a different date, so import date should now be set */
+	/* note: If sensible defaults are not set in the create: 
+	an empty Timespec caused problems with the update - fix */
+	tc = target_obj->date;
+	do_test ((timespec_cmp(&ts, &tc) == 0), "date value check: 1");
+	tc = import_obj->date;
+	do_test ((timespec_cmp(&tc, &ts) == 0), "date value check: 2");
+	do_test ((timespec_cmp(&import_obj->date, &target_obj->date) == 0), "date value check: 3");
+
+}
+
+static void
+test_rule_loop (qof_book_mergeRule *rule, guint remainder)
+{
+	GSList *testing;
+	QofParam *eachParam;
+	char *importstring;
+	char *targetstring;
+	/* In this test rule_loop, any lines beginning with do_test() can be removed
+	from a working rule_loop routine. It would be wise to still use some of the
+	more obvious checks, e.g. that an entity or rule exists before querying the parameters.
+	
+	Take particular care with MERGE_NEW - targetEnt is always NULL until the Commit.
+	Do not attempt to use param_getfcn on targetEnt in the loop called by 
+	qof_book_mergeRuleForeach(rule_loop, MERGE_NEW);
+	
+	*/
+	gboolean skip_target;
+	
+	importstring = NULL;
+	targetstring = NULL;
+	skip_target = FALSE;
+	do_test ((rule != NULL), "loop:#1 Rule is NULL");
+	do_test (remainder > 0, "loop:#2 remainder error.");
+	do_test ((safe_strcmp(NULL, rule->mergeLabel) != 0), "loop:#3 object label\n");
+	do_test ((rule->importEnt != NULL), "loop:#4 empty import entity");
+	/* targetEnt is always NULL at this stage if MERGE_NEW is set */
+	if(rule->targetEnt == NULL) { skip_target = TRUE; }
+	if(!skip_target) {
+		do_test ((safe_strcmp(rule->importEnt->e_type, rule->targetEnt->e_type) == 0),
+			"loop: entity type mismatch");
+	}
+	do_test ((rule->mergeParam != NULL), "loop: empty parameter list");
+	testing = rule->mergeParam;
+	
+	while(testing != NULL) { // start of param loop
+		eachParam = testing->data;
+		do_test ((eachParam != NULL), "loop:#8 no QofParam data");
+		do_test ((eachParam->param_name != NULL), "loop:#9 no parameter name");
+		do_test ((eachParam->param_getfcn != NULL), "loop:#10 no get function");
+		do_test ((eachParam->param_setfcn != NULL), "loop:#11 no set function");
+		/* non-generic - test routines only! */
+		if(safe_strcmp(eachParam->param_type, QOF_TYPE_STRING) == 0) {
+			/* if you use this format, you would need to check the QOF_TYPE and
+			configure the get_fcn pointers yourself. This example only works for strings. */
+			importstring = g_strdup(eachParam->param_getfcn(rule->importEnt, eachParam));
+			do_test ((importstring != NULL), "loop:#12 direct get_fcn import");
+			do_test ((safe_strcmp(importstring, "test") == 0), "loop:#13 direct import comparison");
+			if(!skip_target) {
+			targetstring = eachParam->param_getfcn(rule->targetEnt, eachParam);		
+			do_test ((targetstring != NULL), "loop:#14 direct get_fcn target");
+			do_test ((safe_strcmp(targetstring, "testing") == 0), "loop:#15 direct target comparison");
+		}
+		}
+		/* param_as_string does the conversion for display purposes only */
+		/* do NOT use as_string for calculations or set_fcn */
+		importstring = qof_book_merge_param_as_string(eachParam, rule->importEnt);
+		do_test ((importstring != NULL), "loop:#16 import param_as_string is null");
+//		printf("importstring %s\t%s Type\n", importstring, eachParam->param_type);
+		if(!skip_target) {
+		targetstring = qof_book_merge_param_as_string(eachParam, rule->targetEnt);
+		do_test ((targetstring != NULL), "loop:#17 target param_as_string is null");
+//		printf("targetstring %s\t%s Type\n", targetstring, eachParam->param_type);
+			}
+		/* add your own code for user involvement here. */
+		/* either store the importstring and targetstring values and display separately,
+		perhaps in alphabetical/object_type/priority order, or, obtain user input as each
+		string is available. */
+		
+		testing = g_slist_next(testing);
+	} // end param loop
+	/* set each rule dependent on the user involvement response above. */
+	/* test routine just sets all MERGE_REPORT to MERGE_UPDATE */
+	qof_book_mergeUpdateResult(rule,MERGE_UPDATE);
+	do_test ((rule->mergeResult != MERGE_REPORT), "update result fail");
+}
+
+static void
+main_helper (void *closure, int argc, char **argv)
+{
+//	gnc_module_load("gnucash/engine", 0);
+	gnc_engine_init(argc, argv);
+	myobjRegister();
+	test_merge();
+	print_test_results();
+	exit(get_rv());
+}
+
+int
+main (int argc, char **argv)
+{
+	scm_boot_guile (argc, argv, main_helper, NULL);
+	return 0;
+}
Index: test-numeric.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-numeric.c,v
retrieving revision 1.18.2.2
retrieving revision 1.18.2.3
diff -Lsrc/engine/test/test-numeric.c -Lsrc/engine/test/test-numeric.c -u -r1.18.2.2 -r1.18.2.3
--- src/engine/test/test-numeric.c
+++ src/engine/test/test-numeric.c
@@ -131,21 +131,21 @@
 	check_unary_op (gnc_numeric_eq,
 	                gnc_numeric_create (5011617,167108327),
 	                rval,
-                   val, "expected %s = %s = reduce(%s)");
+                   val, "check_reduce(1) expected %s = %s = reduce(%s)");
 
 	val = gnc_numeric_create(17474724864LL,136048896LL);
 	rval = gnc_numeric_reduce (val);
 	check_unary_op (gnc_numeric_eq,
 	                gnc_numeric_create (4*17*17,9),
 	                rval,
-                   val, "expected %s = %s = reduce(%s)");
+                   val, "check_reduce(2) expected %s = %s = reduce(%s)");
 
 	val = gnc_numeric_create(1024LL,1099511627776LL);
 	rval = gnc_numeric_reduce (val);
 	check_unary_op (gnc_numeric_eq,
 	                gnc_numeric_create (1,1024*1024*1024),
 	                rval,
-                   val, "expected %s = %s = reduce(%s)");
+                   val, "check_reduce(3): expected %s = %s = reduce(%s)");
 }
 
 /* ======================================================= */
@@ -154,8 +154,8 @@
 check_equality_operator (void)
 {
 	int i, m;
-	gint deno, mult, numer;
-	gint64 f;
+	gint mult;
+	gint64 f, deno, numer;
 	gnc_numeric big, rbig;
 	gnc_numeric val, mval;
 	gnc_numeric bval, rval;
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/Makefile.am,v
retrieving revision 1.29.4.4
retrieving revision 1.29.4.5
diff -Lsrc/engine/test/Makefile.am -Lsrc/engine/test/Makefile.am -u -r1.29.4.4 -r1.29.4.5
--- src/engine/test/Makefile.am
+++ src/engine/test/Makefile.am
@@ -1,3 +1,5 @@
+# may need to use ln -s ./ qof in src/engine
+# INCLUDES = -DG_LOG_DOMAIN=\"qof_book_merge\"
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
@@ -12,11 +14,13 @@
   ${top_builddir}/src/gnc-module/libgncmodule.la \
   ${top_builddir}/src/test-core/libgncmod-test.la \
   ../libgncmod-engine.la \
+  ../qof_book_merge.lo \
   ../libgw-engine.la \
   ../libgw-kvp.la \
   ../test-core/libgncmod-test-engine.la \
   ${GLIB_LIBS} \
-  -lltdl
+  -lltdl \
+  -lglib
 
 # these tests are ordered kind more or less in the order
 # that they should be executed, with more basic tests coming first.
@@ -40,8 +44,10 @@
   test-transaction-reversal \
   test-transaction-voiding \
   test-freq-spec \
-  test-scm-query
-
+  test-scm-query \
+  test-book-merge 
+  
+ 
 GNC_TEST_DEPS := \
   --gnc-module-dir ${top_builddir}/src/gnc-module \
   --gnc-module-dir ${top_builddir}/src/engine \
@@ -65,6 +71,7 @@
   test-load-engine \
   test-lots \
   test-numeric \
+  test-book-merge \
   test-object \
   test-period \
   test-query \
Index: test-transaction-reversal.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-transaction-reversal.c,v
retrieving revision 1.3.4.3
retrieving revision 1.3.4.4
diff -Lsrc/engine/test/test-transaction-reversal.c -Lsrc/engine/test/test-transaction-reversal.c -u -r1.3.4.3 -r1.3.4.4
--- src/engine/test/test-transaction-reversal.c
+++ src/engine/test/test-transaction-reversal.c
@@ -56,7 +56,7 @@
   do
   {
     gboolean voyd;
-
+    
     transaction = get_random_transaction (book);
     voyd = xaccTransGetVoidStatus (transaction);
     if (voyd)
Index: test-engine-stuff.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test-core/test-engine-stuff.c,v
retrieving revision 1.52.4.9
retrieving revision 1.52.4.10
diff -Lsrc/engine/test-core/test-engine-stuff.c -Lsrc/engine/test-core/test-engine-stuff.c -u -r1.52.4.9 -r1.52.4.10
--- src/engine/test-core/test-engine-stuff.c
+++ src/engine/test-core/test-engine-stuff.c
@@ -1258,6 +1258,9 @@
     num = get_random_gnc_numeric ();
     xaccSplitSetAmount(ret, num);
 
+    if (num.num == 0)
+      fprintf(stderr, "get_random_split: Created split with zero amount: %p\n", ret);
+
     xaccSplitSetSlots_nc(ret, get_random_kvp_frame());
 
     return ret;
Index: taxtxf.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/locale-specific/us/taxtxf.scm,v
retrieving revision 1.16.4.1
retrieving revision 1.16.4.2
diff -Lsrc/report/locale-specific/us/taxtxf.scm -Lsrc/report/locale-specific/us/taxtxf.scm -u -r1.16.4.1 -r1.16.4.2
--- src/report/locale-specific/us/taxtxf.scm
+++ src/report/locale-specific/us/taxtxf.scm
@@ -632,7 +632,9 @@
                    (gnc:account-get-type account) #f)))
 
 	(set! work-done (+ 1 work-done))
-	(gnc:report-percent-done (* 100 (/ work-done work-to-do)))
+	(gnc:report-percent-done (* 100 (if (> work-to-do 0)
+					    (/ work-done work-to-do)
+					    1)))
         (if (gnc:account-is-inc-exp? account)
             (let* ((children (gnc:account-get-children account))
                    (to-special #f)	; clear special-splits-period
Index: qif-parse.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif/qif-parse.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -Lsrc/import-export/qif/qif-parse.c -Lsrc/import-export/qif/qif-parse.c -u -r1.1.2.2 -r1.1.2.3
--- src/import-export/qif/qif-parse.c
+++ src/import-export/qif/qif-parse.c
@@ -1,7 +1,7 @@
 /*
  * qif-parse.c -- parse QIF
  *
- * Written by:	Derek Atkins <derek at ihtfp.com>
+ * Written by:        Derek Atkins <derek at ihtfp.com>
  * Copyright (c) 2003 Derek Atkins <warlord at MIT.EDU>
  *
  * This program is free software; you can redistribute it and/or
@@ -80,14 +80,14 @@
 {
   regcomp(&category_regex,
       "^ *(\\[)?([^]/\\|]*)(]?)(/([^\\|]*))?(\\|(\\[)?([^]/]*)(]?)(/(.*))?)? *$",
-	  REG_EXTENDED);
+          REG_EXTENDED);
 
   qifp_regex_compiled = TRUE;
 }
 
 #define QIF_ADD_TYPE(ts,t) \
-	g_hash_table_insert(qif_bangtype_map, ts, GINT_TO_POINTER(t)); \
-	g_hash_table_insert(qif_bangtype_map, _(ts), GINT_TO_POINTER(t));
+        g_hash_table_insert(qif_bangtype_map, ts, GINT_TO_POINTER(t)); \
+        g_hash_table_insert(qif_bangtype_map, _(ts), GINT_TO_POINTER(t));
 
 static void
 build_bangtype_map()
@@ -114,7 +114,7 @@
 #undef QIF_ADD_TYPE
 
 #define QIF_ADD_ACT(ts,t) \
-	g_hash_table_insert(qif_action_map, ts, GINT_TO_POINTER(t));
+        g_hash_table_insert(qif_action_map, ts, GINT_TO_POINTER(t));
 
 static void
 build_action_map()
@@ -222,9 +222,9 @@
 
   /* Internal types */
   QIF_ADD_ATYPE("__any_bank__", make_list(5, BANK, CREDIT, CASH, ASSET,
-					  LIABILITY));
+                                          LIABILITY));
   QIF_ADD_ATYPE("__all__", make_list(7, BANK, CREDIT, CASH, ASSET, LIABILITY,
-				      STOCK, MUTUAL));
+                                      STOCK, MUTUAL));
   QIF_ADD_ATYPE("__stock__", make_list(2, STOCK, MUTUAL));
   QIF_ADD_ATYPE("__income__", make_list(1, INCOME));
   QIF_ADD_ATYPE("__expense__", make_list(1, EXPENSE));
@@ -284,9 +284,9 @@
 /* returns TRUE if successful, FALSE if there is a problem */
 gboolean
 qif_parse_split_category(const char* str,
-			 char** cat, gboolean *cat_is_acct, char** cat_class,
-			 char** miscx_cat, gboolean *miscx_cat_is_acct,
-			 char **miscx_class)
+                         char** cat, gboolean *cat_is_acct, char** cat_class,
+                         char** miscx_cat, gboolean *miscx_cat_is_acct,
+                         char **miscx_class)
 {
   /* This is a pretty f**ked up string.  Basically it looks like:
    *  ([)cat-or-acct(])(/(class))(|([)cat-of-acct(])(/ext))
@@ -308,7 +308,7 @@
   regmatch_t pmatch[12];
 
   g_return_val_if_fail(cat && cat_is_acct && cat_class &&
-		       miscx_cat && miscx_cat_is_acct && miscx_class, FALSE);
+                       miscx_cat && miscx_cat_is_acct && miscx_class, FALSE);
 
 
   if (!qifp_regex_compiled)
@@ -340,24 +340,24 @@
   }
 
   /* catgory name */
-  *cat = g_strndup(str+pmatch[2].rm_so, pmatch[2].rm_eo - pmatch[21].rm_so);
+  *cat = g_strndup(str+pmatch[2].rm_so, pmatch[2].rm_eo - pmatch[2].rm_so);
   /* category is account? */
   *cat_is_acct = (pmatch[1].rm_so != -1 && pmatch[3].rm_so != -1);
   /* category class */
   *cat_class = (pmatch[4].rm_so != -1 ?
-		g_strndup(str+pmatch[5].rm_so, pmatch[5].rm_eo - pmatch[5].rm_so) :
-		NULL);
+                g_strndup(str+pmatch[5].rm_so, pmatch[5].rm_eo - pmatch[5].rm_so) :
+                NULL);
 
   /* miscx category name */
   *miscx_cat = (pmatch[6].rm_so != -1 ?
-		g_strndup(str+pmatch[8].rm_so, pmatch[8].rm_eo - pmatch[8].rm_so) :
-		NULL);
+                g_strndup(str+pmatch[8].rm_so, pmatch[8].rm_eo - pmatch[8].rm_so) :
+                NULL);
   /* miscx cat is acct */
   *miscx_cat_is_acct  = (pmatch[7].rm_so != -1 && pmatch[9].rm_so != -1);
   /* miscx class */
   *miscx_class = (pmatch[10].rm_so != -1 ?
-		  g_strndup(str+pmatch[11].rm_so,
-			    pmatch[11].rm_eo - pmatch[11].rm_so) : NULL);
+                  g_strndup(str+pmatch[11].rm_so,
+                            pmatch[11].rm_eo - pmatch[11].rm_so) : NULL);
 
   return TRUE;
 }
@@ -413,7 +413,7 @@
   if (!result) {
     /* XXX: pop up a dialog? */
     PWARN("Unknown Action at line %d: %s.  Some transactions may be discarded",
-	  line->lineno, line->line);
+          line->lineno, line->line);
     return QIF_A_NONE;
   }
 
@@ -469,23 +469,23 @@
  */
 
 typedef struct _parse_helper {
-  QifContext		ctx;
+  QifContext                ctx;
 
-  GncImportFormat	budget;
-  GncImportFormat	limit;
-  GncImportFormat	amount;
-  GncImportFormat	d_amount;
-  GncImportFormat	price;
-  GncImportFormat	shares;
-  GncImportFormat	commission;
-  GncImportFormat	date;
+  GncImportFormat        budget;
+  GncImportFormat        limit;
+  GncImportFormat        amount;
+  GncImportFormat        d_amount;
+  GncImportFormat        price;
+  GncImportFormat        shares;
+  GncImportFormat        commission;
+  GncImportFormat        date;
 } *parse_helper_t;
 
 #define QIF_PARSE_CHECK_NUMBER(str,help) { \
-	if (str) (help) = gnc_import_test_numeric((str), (help)); \
+        if (str) (help) = gnc_import_test_numeric((str), (help)); \
 }
 #define QIF_PARSE_PARSE_NUMBER(str,fmt,val) { \
-	if (str) gnc_import_parse_numeric((str), (fmt), (val)); \
+        if (str) gnc_import_parse_numeric((str), (fmt), (val)); \
 }
 
 static void
@@ -556,10 +556,10 @@
       QIF_PARSE_CHECK_NUMBER(split->amountstr, helper->amount);
 
       if (node) {
-	split = node->data;
-	node = node->next;
+        split = node->data;
+        node = node->next;
       } else
-	split = NULL;
+        split = NULL;
     } while (split);
   }
 }
@@ -586,7 +586,7 @@
     QIF_PARSE_PARSE_NUMBER(itxn->pricestr, helper->price, &itxn->price);
     QIF_PARSE_PARSE_NUMBER(itxn->sharesstr, helper->shares, &itxn->shares);
     QIF_PARSE_PARSE_NUMBER(itxn->commissionstr, helper->commission,
-			   &itxn->commission);
+                           &itxn->commission);
 
     qif_invst_txn_setup_splits(helper->ctx, txn);
 
@@ -597,10 +597,10 @@
       QIF_PARSE_PARSE_NUMBER(split->amountstr, helper->amount, &split->amount);
 
       if (node) {
-	split = node->data;
-	node = node->next;
+        split = node->data;
+        node = node->next;
       } else
-	split = NULL;
+        split = NULL;
     } while (split);
 
     qif_txn_setup_splits(txn);
@@ -659,8 +659,8 @@
 
   if (helper.date & (helper.date - 1)) {
     helper.date = gnc_import_choose_fmt(_("The Date format is ambiguous.  "
-					  "Please choose the correct format."),
-					helper.date, arg);
+                                          "Please choose the correct format."),
+                                        helper.date, arg);
   }
 
   /* now parse it.. */
@@ -668,9 +668,9 @@
 }
 
 typedef struct {
-  QifContext	ctx;
-  GList *	list;
-  const char*	type;
+  QifContext        ctx;
+  GList *        list;
+  const char*        type;
 } qif_merge_t;
 
 static void
@@ -744,7 +744,7 @@
 
   if (split->cat_class) {
     split->cat_class = (QifClass) qif_object_map_lookup(ctx, QIF_O_CLASS,
-							split->cat_class->name);
+                                                        split->cat_class->name);
   }
 }
 
@@ -775,7 +775,7 @@
 
   if (txn->from_acct)
     txn->from_acct = (QifAccount) qif_object_map_lookup(ctx, QIF_O_ACCOUNT,
-							txn->from_acct->name);
+                                                        txn->from_acct->name);
 
   if (txn->invst_info)
     qif_massage_itxn(txn->invst_info, ctx);
Index: main.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/scm/main.scm,v
retrieving revision 1.109.2.8
retrieving revision 1.109.2.9
diff -Lsrc/scm/main.scm -Lsrc/scm/main.scm -u -r1.109.2.8 -r1.109.2.9
--- src/scm/main.scm
+++ src/scm/main.scm
@@ -358,7 +358,7 @@
      (_ "This is a development version. It may or may not work.\n")
      (_ "Report bugs and other problems to gnucash-devel at gnucash.org.\n")
      (_ "You can also lookup and file bug reports at http://bugzilla.gnome.org\n")
-     (_ "The last stable version was ") "GnuCash 1.8.9" "\n"
+     (_ "The last stable version was ") "GnuCash 1.8.10" "\n"
      (_ "The next stable version will be ") "GnuCash 2.0"
      "\n\n"))))
 
Index: main-window.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/scm/main-window.scm,v
retrieving revision 1.23.2.6
retrieving revision 1.23.2.7
diff -Lsrc/scm/main-window.scm -Lsrc/scm/main-window.scm -u -r1.23.2.6 -r1.23.2.7
--- src/scm/main-window.scm
+++ src/scm/main-window.scm
@@ -207,7 +207,7 @@
       (gnc:book-kvp-changed book))
 			    
     (gnc:kvp-option-dialog gnc:id-book
-			   slots "Book Options"
+			   slots (_ "Book Options")
 			   changed_cb)))
 
 (gnc:hook-remove-dangler gnc:*book-opened-hook* 
Index: dialog-sx-from-trans.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-sx-from-trans.c,v
retrieving revision 1.26.4.3
retrieving revision 1.26.4.4
diff -Lsrc/gnome/dialog-sx-from-trans.c -Lsrc/gnome/dialog-sx-from-trans.c -u -r1.26.4.3 -r1.26.4.4
--- src/gnome/dialog-sx-from-trans.c
+++ src/gnome/dialog-sx-from-trans.c
@@ -173,6 +173,8 @@
   GtkWidget *w;
 
   retval.type = BAD_END;
+  g_date_clear( &(retval.end_date), 1 );
+  retval.n_occurrences = 0;
 
   w = glade_xml_get_widget(sxfti->gxml, SXFTD_NEVER_END_BUTTON);
   if(gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(w))) {
Index: dialog-find-transactions.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-find-transactions.c,v
retrieving revision 1.37.4.2
retrieving revision 1.37.4.3
diff -Lsrc/gnome/dialog-find-transactions.c -Lsrc/gnome/dialog-find-transactions.c -u -r1.37.4.2 -r1.37.4.3
--- src/gnome/dialog-find-transactions.c
+++ src/gnome/dialog-find-transactions.c
@@ -96,36 +96,36 @@
 
   /* Build parameter list in reverse order */
   if (params == NULL) {
-    params = gnc_search_param_prepend (params, "All Accounts",
+    params = gnc_search_param_prepend (params, N_("All Accounts"),
 				       ACCOUNT_MATCH_ALL_TYPE,
 				       type, SPLIT_TRANS, TRANS_SPLITLIST,
 				       SPLIT_ACCOUNT_GUID, NULL);
-    params = gnc_search_param_prepend (params, "Account", GNC_ID_ACCOUNT,
+    params = gnc_search_param_prepend (params, N_("Account"), GNC_ID_ACCOUNT,
 				       type, SPLIT_ACCOUNT, QUERY_PARAM_GUID,
 				       NULL);
-    params = gnc_search_param_prepend (params, "Balanced", NULL,
+    params = gnc_search_param_prepend (params, N_("Balanced"), NULL,
 				       type, SPLIT_TRANS, TRANS_IS_BALANCED,
 				       NULL);
-    params = gnc_search_param_prepend (params, "Reconcile", RECONCILED_MATCH_TYPE,
+    params = gnc_search_param_prepend (params, N_("Reconcile"), RECONCILED_MATCH_TYPE,
 				       type, SPLIT_RECONCILE, NULL);
-    params = gnc_search_param_prepend (params, "Share Price", NULL,
+    params = gnc_search_param_prepend (params, N_("Share Price"), NULL,
 				       type, SPLIT_SHARE_PRICE, NULL);
-    params = gnc_search_param_prepend (params, "Shares", NULL,
+    params = gnc_search_param_prepend (params, N_("Shares"), NULL,
 				       type, SPLIT_AMOUNT, NULL);
-    params = gnc_search_param_prepend (params, "Value", NULL,
+    params = gnc_search_param_prepend (params, N_("Value"), NULL,
 				       type, SPLIT_VALUE, NULL);
-    params = gnc_search_param_prepend (params, "Date Posted", NULL,
+    params = gnc_search_param_prepend (params, N_("Date Posted"), NULL,
 				       type, SPLIT_TRANS, TRANS_DATE_POSTED,
 				       NULL);
-    params = gnc_search_param_prepend (params, "Notes", NULL,
+    params = gnc_search_param_prepend (params, N_("Notes"), NULL,
 				       type, SPLIT_TRANS, TRANS_NOTES, NULL);
-    params = gnc_search_param_prepend (params, "Action", NULL,
+    params = gnc_search_param_prepend (params, N_("Action"), NULL,
 				       type, SPLIT_ACTION, NULL);
-    params = gnc_search_param_prepend (params, "Number", NULL,
+    params = gnc_search_param_prepend (params, N_("Number"), NULL,
 				       type, SPLIT_TRANS, TRANS_NUM, NULL);
-    params = gnc_search_param_prepend (params, "Memo", NULL,
+    params = gnc_search_param_prepend (params, N_("Memo"), NULL,
 				       type, SPLIT_MEMO, NULL);
-    params = gnc_search_param_prepend (params, "Description", NULL,
+    params = gnc_search_param_prepend (params, N_("Description"), NULL,
 				       type, SPLIT_TRANS, TRANS_DESCRIPTION,
 				       NULL);
   }
--- /dev/null
+++ src/gnome/druid-merge.c
@@ -0,0 +1,427 @@
+/********************************************************************\
+ * druid-merge.c  --  account hierarchy merge functionality         *
+ * Copyright (C) 2001 Gnumatic, Inc.                                *
+ * Copyright (C) 2004 Neil Williams <linux at codehelp.co.uk>          *
+ *                                                                  *
+ * This program is free software; you can redistribute it and/or    *
+ * modify it under the terms of the GNU General Public License as   *
+ * published by the Free Software Foundation; either version 2 of   *
+ * the License, or (at your option) any later version.              *
+ *                                                                  *
+ * This program is distributed in the hope that it will be useful,  *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
+ * GNU General Public License for more details.                     *
+ *                                                                  *
+ * You should have received a copy of the GNU General Public License*
+ * along with this program; if not, contact:                        *
+ *                                                                  *
+ * Free Software Foundation           Voice:  +1-617-542-5942       *
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
+ * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
+\********************************************************************/
+
+#include "config.h"
+
+#include <gnome.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <libgnomeui/gnome-window-icon.h>
+
+#include "dialog-utils.h"
+#include "druid-merge.h"
+#include "druid-utils.h"
+#include "gnc-component-manager.h"
+#include "gnc-gui-query.h"
+#include "qof_book_merge.h"
+#include "druid-hierarchy.h"
+#include "gnc-ui-util.h"
+#include "Account.h"
+#include "global-options.h"
+#include "gnc-trace.h"
+
+static GtkWidget			*qof_book_merge_window = NULL;
+static GtkWidget			*druid_hierarchy_window = NULL;
+static QofSession			*previous_session = NULL;
+static gint					count = 0;
+static qof_book_mergeRule	*currentRule = NULL;
+static QofSession 			*merge_session = NULL;
+static QofBook				*mergeBook = NULL;
+static QofBook				*targetBook = NULL;
+static gchar 				*buffer = "";
+
+void collision_rule_loop	( qof_book_mergeRule*, 	guint );
+void progress_rule_loop 	( qof_book_mergeRule*, 	guint );
+
+static GtkWidget*
+merge_get_widget (const char *name)
+{
+  if (!qof_book_merge_window) return NULL;
+
+  return gnc_glade_lookup_widget (qof_book_merge_window, name);
+}
+
+static void
+delete_merge_window (void)
+{
+  if (!qof_book_merge_window) return;
+
+  gtk_widget_destroy (qof_book_merge_window);
+  qof_book_merge_window = NULL;
+}
+
+static void
+gnc_merge_destroy_cb (GtkObject *obj, gpointer user_data)
+{
+
+}
+
+static gboolean
+on_qof_start_page_next(GnomeDruidPage  *gnomedruidpage,
+                       gpointer         arg1,
+                       gpointer         user_data)
+{
+	gtk_widget_show(druid_hierarchy_window);
+	gtk_widget_hide(qof_book_merge_window);
+	return FALSE;
+}
+
+static void
+on_MergeUpdate_clicked 	(GtkButton       *button,
+              		    gpointer         user_data)
+{
+	qof_book_mergeUpdateResult(currentRule, MERGE_UPDATE); 
+	count = 0;
+ 	qof_book_mergeRuleForeach(collision_rule_loop, MERGE_REPORT);
+}
+
+static void
+on_MergeDuplicate_clicked 	(GtkButton       *button,
+              			    gpointer         user_data)
+{
+	if(currentRule->mergeAbsolute == FALSE) { 
+		qof_book_mergeUpdateResult(currentRule, MERGE_DUPLICATE); 
+		count = 0;
+	}
+	if(currentRule->mergeAbsolute == TRUE) { 
+		qof_book_mergeUpdateResult(currentRule, MERGE_ABSOLUTE); 
+		count = 0;
+	}
+ 	qof_book_mergeRuleForeach(collision_rule_loop, MERGE_REPORT);
+}
+
+static void
+on_MergeNew_clicked (GtkButton       *button,
+              		gpointer         user_data)
+{
+	if(currentRule->mergeAbsolute == FALSE) { 
+		qof_book_mergeUpdateResult(currentRule, MERGE_NEW);
+	}
+	count = 0;
+ 	qof_book_mergeRuleForeach(collision_rule_loop, MERGE_REPORT);
+}
+
+static gboolean
+on_qof_book_merge_next (GnomeDruidPage  *gnomedruidpage,
+                       gpointer         arg1,
+                       gpointer         user_data)
+{
+    GtkWidget *top;
+	GtkLabel *output;
+    const char *message = _("You must resolve all collisions.");
+
+	if(count > 0) {
+		top = gtk_widget_get_toplevel (GTK_WIDGET (gnomedruidpage));
+	    gnc_error_dialog(top, message);
+		return TRUE;
+	}
+	buffer = "";
+	gnc_suspend_gui_refresh ();
+	output = GTK_LABEL(merge_get_widget("OutPut"));
+	gtk_label_set_text(output, buffer);
+	gtk_widget_show(GTK_WIDGET(output));
+	gnc_resume_gui_refresh ();
+	return FALSE;
+}
+
+static void
+on_cancel (	GnomeDruid      *gnomedruid,
+			gpointer         user_data)
+{
+	gnc_suspend_gui_refresh ();
+	delete_merge_window();
+	qof_session_set_current_session(previous_session);
+	qof_book_destroy(mergeBook);
+	qof_session_end(merge_session);	
+	gnc_resume_gui_refresh ();
+}
+
+void currency_transfer_cb ( QofEntity* ent, gpointer user_data)
+{
+	if(!ent) return;
+	if(xaccAccountGetCommodity((Account*)ent) == NULL) {
+		xaccAccountSetCommodity((Account*)ent, gnc_default_currency());
+	}
+}
+
+void reference_parent_cb ( QofEntity* ent, gpointer user_data)
+{
+	if(!ent) return;
+	if(xaccAccountGetParent((Account*)ent) == NULL) {
+		xaccGroupInsertAccount(xaccGroupGetRoot(xaccGetAccountGroup(gnc_get_current_book())), (Account*)ent);
+	}
+}
+
+static void
+on_finish (GnomeDruidPage  *gnomedruidpage,
+           gpointer         arg1,
+           gpointer         user_data)
+{
+	gint result;
+    GtkWidget *top;
+    const char *message = _("Error: the Commit operation failed.");
+
+	gnc_suspend_gui_refresh ();
+	result = qof_book_mergeCommit();
+	if(result != 0) {
+		top = gtk_widget_get_toplevel (GTK_WIDGET (gnomedruidpage));
+	    gnc_error_dialog(top, message);
+	}
+	delete_merge_window ();
+	/*
+	Account has a new setparent parameter that takes 
+	a QofEntity. Account converts this into an AccountGroup based on
+	the GUID in the reference. This needs improving as child accounts 
+	are currently being re-parented to top-level.
+	*/
+	qof_session_set_current_session(previous_session);
+	qof_object_foreach(GNC_ID_ACCOUNT, gnc_get_current_book(), reference_parent_cb,  NULL);
+	qof_object_foreach(GNC_ID_ACCOUNT, gnc_get_current_book(), currency_transfer_cb, NULL);
+	qof_book_destroy(mergeBook);
+	qof_session_end(merge_session);
+	gnc_resume_gui_refresh ();
+}
+
+static void
+on_qof_book_merge_prepare (GnomeDruidPage  *gnomedruidpage,
+                            gpointer         arg1,
+                            gpointer         user_data)
+{
+	gint result;
+	GtkLabel *progress;
+
+    gnc_suspend_gui_refresh ();
+	progress = GTK_LABEL (merge_get_widget("ResultsBox"));
+	/* blank out old data */
+	gtk_label_set_text(progress, "");
+	result = 0;
+	g_return_if_fail(mergeBook != NULL);
+	g_return_if_fail(targetBook != NULL);
+	result = qof_book_mergeInit(mergeBook, targetBook);
+	g_return_if_fail(result == 0);
+	qof_book_mergeRuleForeach(progress_rule_loop, MERGE_NEW);
+ 	qof_book_mergeRuleForeach(progress_rule_loop, MERGE_ABSOLUTE);
+ 	qof_book_mergeRuleForeach(progress_rule_loop, MERGE_DUPLICATE);
+ 	qof_book_mergeRuleForeach(progress_rule_loop, MERGE_UPDATE);
+	gtk_label_set_text(progress, buffer);
+ 	qof_book_mergeRuleForeach(collision_rule_loop, MERGE_REPORT);
+	gnc_resume_gui_refresh ();
+}
+
+static GtkWidget *
+gnc_create_merge_druid (void)
+{
+  GtkWidget *dialog;
+  GtkWidget *druid;
+  GladeXML *xml;
+
+	xml = gnc_glade_xml_new ("merge.glade", "Merge Druid");
+
+	glade_xml_signal_connect(xml, "on_start_page_next",
+		GTK_SIGNAL_FUNC (on_qof_start_page_next));
+	
+	glade_xml_signal_connect(xml, "on_qof_book_merge_prepare",
+		GTK_SIGNAL_FUNC (on_qof_book_merge_prepare));
+
+	glade_xml_signal_connect(xml, "on_qof_book_merge_next",
+		GTK_SIGNAL_FUNC (on_qof_book_merge_next));
+
+	glade_xml_signal_connect (xml, "on_finish", GTK_SIGNAL_FUNC (on_finish));
+
+	glade_xml_signal_connect (xml, "on_cancel", GTK_SIGNAL_FUNC (on_cancel));
+	
+	glade_xml_signal_connect(xml, "on_MergeUpdate_clicked",
+		GTK_SIGNAL_FUNC (on_MergeUpdate_clicked));
+		
+	glade_xml_signal_connect(xml, "on_MergeDuplicate_clicked",
+		GTK_SIGNAL_FUNC (on_MergeDuplicate_clicked));
+		
+	glade_xml_signal_connect(xml, "on_MergeNew_clicked",
+		GTK_SIGNAL_FUNC (on_MergeNew_clicked));
+
+	dialog = glade_xml_get_widget (xml, "Merge Druid");
+	gnome_window_icon_set_from_default (GTK_WINDOW (dialog));
+
+	druid = glade_xml_get_widget (xml, "merge_druid");
+	gnc_druid_set_colors (GNOME_DRUID (druid));
+	gtk_widget_show (glade_xml_get_widget (xml, "start_page"));
+
+	gtk_signal_connect (GTK_OBJECT(dialog), "destroy",
+                      GTK_SIGNAL_FUNC(gnc_merge_destroy_cb), NULL);
+	return dialog;
+}
+
+void progress_rule_loop(qof_book_mergeRule *rule, guint remainder)
+{
+	GtkLabel *progress;
+	
+	progress = GTK_LABEL(merge_get_widget("ResultsBox"));
+	buffer = "";
+	g_return_if_fail(rule != NULL);
+	currentRule = rule;
+	if(rule->mergeResult == MERGE_NEW) {
+		if (remainder == 1) { 
+			buffer = g_strconcat(buffer, 
+				g_strdup_printf("%i %s tagged as NEW.\n", remainder, rule->mergeLabel), NULL);
+			gtk_label_set_text (progress, buffer);
+			}
+		else { 
+			buffer = g_strconcat(buffer, 
+				g_strdup_printf("%i entities of type %s are tagged as NEW.\n", 
+				remainder, rule->mergeLabel), NULL); 
+			gtk_label_set_text (progress, buffer);
+		}
+		gtk_widget_show(GTK_WIDGET(progress));
+		return;
+	}
+	if(rule->mergeResult ==  MERGE_ABSOLUTE) {
+		if (remainder == 1) { 
+			buffer = g_strconcat(buffer, 
+				g_strdup_printf("%i %s tagged as an absolute GUID match.\n", 
+				remainder, rule->mergeLabel), NULL); 
+			gtk_label_set_text (progress, buffer);
+		}
+		else { 
+			buffer = g_strconcat(buffer, 
+				g_strdup_printf("%i entities of type %s tagged as an absolute GUID match.\n", 
+				remainder, rule->mergeLabel), NULL);
+			gtk_label_set_text (progress, buffer);
+		}
+		gtk_widget_show(GTK_WIDGET(progress));
+		return;
+	}
+	if(rule->mergeResult == MERGE_DUPLICATE) {
+		if (remainder == 1) { 
+			buffer = g_strconcat(buffer, g_strdup_printf("%i %s tagged as a duplicate.\n", 
+				remainder, rule->mergeLabel), NULL); 
+			gtk_label_set_text (progress, buffer);
+		}
+		else { 
+			buffer = g_strconcat(buffer, g_strdup_printf("%i entities of type %s tagged as a duplicate.\n", 
+				remainder, rule->mergeLabel), NULL);
+			gtk_label_set_text (progress, buffer);
+		}
+		gtk_widget_show(GTK_WIDGET(progress));
+		return;
+	}
+	if(rule->mergeResult == MERGE_UPDATE) {
+		if (remainder == 1) { 
+			buffer = g_strconcat(buffer, g_strdup_printf("%i %s tagged as to be updated.\n", 
+				remainder, rule->mergeLabel), NULL); 
+			gtk_label_set_text (progress, buffer);
+		}
+		else { 
+			buffer = g_strconcat(buffer, g_strdup_printf("%i entities of type %s tagged as to be updated.\n", 
+				remainder, rule->mergeLabel), NULL);
+			gtk_label_set_text (progress, buffer);
+		}
+		gtk_widget_show(GTK_WIDGET(progress));
+		return;
+	}
+	g_free(buffer);
+}
+
+void collision_rule_loop(qof_book_mergeRule *rule, guint remainder)
+{
+	GSList *user_reports;
+	QofParam *one_param;
+	gchar *importstring, *targetstring;
+	gchar *buffer;
+	GtkLabel *output;
+	
+	g_return_if_fail(rule != NULL);
+	buffer = "";
+	/* there is a rule awaiting resolution, don't print any more */
+	if(count > 0) return;
+	gnc_suspend_gui_refresh ();
+	user_reports = rule->mergeParam;
+	currentRule = rule;
+	output = GTK_LABEL(merge_get_widget("OutPut"));
+	gtk_label_set_text(output, buffer);
+	gtk_widget_show(GTK_WIDGET(output));
+	gnc_resume_gui_refresh ();
+	count = 1; /* user display text counts from 1, not zero */
+	importstring = targetstring = NULL;
+	gnc_suspend_gui_refresh ();
+ 	if(remainder == 1) { 
+		buffer = g_strdup_printf("\n%i conflict needs to be resolved.\n", remainder);
+	}
+	else { 
+		buffer = g_strdup_printf("\n%i conflicts need to be resolved.\n", remainder); 
+	}
+	buffer = g_strconcat(buffer, g_strdup_printf("\n%i parameter values for this \"%s\" object.\n", 
+		   g_slist_length(user_reports), rule->targetEnt->e_type), NULL);
+	while(user_reports != NULL) {
+		one_param = user_reports->data;
+		buffer = g_strconcat(buffer, g_strdup_printf("%i:Parameter name: %s ", 
+			count, one_param->param_name), NULL);
+		importstring = qof_book_merge_param_as_string(one_param, rule->importEnt);
+		buffer = g_strconcat(buffer, g_strdup_printf("Import data : %s ", importstring), NULL);
+		targetstring = qof_book_merge_param_as_string(one_param, rule->targetEnt);
+		buffer = g_strconcat(buffer, g_strdup_printf("Original data : %s\n", targetstring), NULL);
+		user_reports = g_slist_next(user_reports);
+		count++;
+	}
+	gtk_label_set_text(output,buffer);
+	gtk_widget_show(GTK_WIDGET(output));
+	gnc_resume_gui_refresh ();
+	g_free(buffer);
+}
+
+GtkWidget*
+qof_book_merge_running (void)
+{
+	if (qof_book_merge_window) return qof_book_merge_window;
+	return NULL;
+}
+
+
+void
+gnc_ui_qof_book_merge_druid (void)
+{
+	
+	if (qof_book_merge_window) return;
+	/*	QofSession changes to avoid using current book */
+    gnc_engine_suspend_events ();
+	previous_session = qof_session_get_current_session();
+	targetBook = qof_session_get_book(previous_session);
+	merge_session = qof_session_new();
+	qof_session_set_current_session(merge_session);
+	mergeBook = qof_session_get_book(merge_session);
+	gnc_engine_resume_events ();
+	g_return_if_fail(targetBook != NULL);
+	g_return_if_fail(mergeBook != NULL);
+	g_return_if_fail(merge_session != NULL);
+	qof_book_merge_window = gnc_create_merge_druid();
+	g_return_if_fail(qof_book_merge_window != NULL);
+	gnc_ui_hierarchy_druid();
+	druid_hierarchy_window = gnc_ui_hierarchy_running();
+	gtk_widget_hide (druid_hierarchy_window);
+	gtk_object_set_data (GTK_OBJECT (druid_hierarchy_window), "Merge Druid", qof_book_merge_window);
+	gtk_widget_show (qof_book_merge_window);
+	g_return_if_fail(targetBook != NULL);
+	g_return_if_fail(mergeBook != NULL);
+	g_return_if_fail(merge_session != NULL);
+	return;
+}
--- /dev/null
+++ src/gnome/druid-merge.h
@@ -0,0 +1,87 @@
+/********************************************************************\
+ * druid-merge.h -- account hierarchy merge functionality           *
+ * Copyright (C) 2001 Gnumatic, Inc.                                *
+ * Copyright (C) 2004 Neil Williams <linux at codehelp.co.uk>          *
+ *                                                                  *
+ * This program is free software; you can redistribute it and/or    *
+ * modify it under the terms of the GNU General Public License as   *
+ * published by the Free Software Foundation; either version 2 of   *
+ * the License, or (at your option) any later version.              *
+ *                                                                  *
+ * This program is distributed in the hope that it will be useful,  *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
+ * GNU General Public License for more details.                     *
+ *                                                                  *
+ * You should have received a copy of the GNU General Public License*
+ * along with this program; if not, contact:                        *
+ *                                                                  *
+ * Free Software Foundation           Voice:  +1-617-542-5942       *
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
+ * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
+\********************************************************************/
+
+#ifndef DRUID_MERGE_H
+#define DRUID_MERGE_H
+/** @addtogroup GUI
+	@{ */
+/** @addtogroup NewHierarchy Merging a new account tree into an existing file
+
+<b>Collision handling principles.</b>\n
+\n
+This druid builds a second ::QofBook in memory using ::QofSession and
+populates the book with accounts created using the usual New Account Tree
+code. The druid then uses ::qof_book_mergeInit to begin the merge 
+of the new book (created with QofSession) with the existing QofBook
+(loaded by the user), with user intervention and collision handling.
+
+	-# Always check for a ::GUID first and compare. qof_book_merge only accepts valid ::QofBook
+	data  and therefore ALL objects in the import book will	include valid GUID's.
+	-# If the original import data did not contain a GUID (e.g. an external non-GnuCash source)
+	the GUID values will have been created by QofSession and will not match any existing
+	GUID's in the target book so objects that do not have a GUID match cannot be assumed to
+	be ::MERGE_NEW - parameter values must be checked.
+
+- If a GUID match exists, set qof_book_mergeRule::mergeAbsolute to \a TRUE.
+	-# If ALL parameters in the import object match the target object with the same \a GUID, 
+	set ::qof_book_mergeResult to \a MERGE_ABSOLUTE.
+	-# If any parameters differ, set ::MERGE_UPDATE.
+- If the import object \a GUID does not match an existing object,
+mergeAbsolute is unchanged from the default \a FALSE
+The parameter values of the object are compared to other objects of the same
+type in the target book.
+	-# If the same data exists in the target book with a different GUID, the object 
+	is tagged as DUPLICATE.
+	-# If the data has changed, the object is tagged as REPORT. 
+	-# If the data does not match, the object is tagged as NEW
+
+More information is at http://code.neil.williamsleesmill.me.uk/
+
+Each foreach function uses g_return_if_fail checks to protect the target book. If
+any essential data is missing, the loop returns without changing the target book.
+Note that this will not set or return an error value. However, g_return is only 
+used for critical errors that arise from programming errors, not for invalid import data 
+which should be cleaned up before creating the import QofBook.
+
+Only ::qof_book_mergeInit, ::qof_book_mergeUpdateResult and ::qof_book_mergeCommit return 
+any error values to the calling process. 
+
+	@{ */
+/** @file  druid_merge.h
+	@brief API for merging two \c QofBook* structures with collision handling
+	@author Copyright (c) 2004 Neil Williams <linux at codehelp.co.uk>
+*/
+
+void gnc_ui_qof_book_merge_druid (void);
+GtkWidget* qof_book_merge_running (void);
+
+/** \brief 	gncCommodity is not QOF enabled, need to set a default commodity before the merge */
+void currency_transfer_cb ( QofEntity* ent, gpointer user_data);
+
+/** \brief workaround for AccountGroup not being fully QOF enabled. */
+void reference_parent_cb ( QofEntity* ent, gpointer user_data);
+
+/** @} */
+/** @} */
+
+#endif
Index: window-main.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/window-main.c,v
retrieving revision 1.180.4.13
retrieving revision 1.180.4.14
diff -Lsrc/gnome/window-main.c -Lsrc/gnome/window-main.c -u -r1.180.4.13 -r1.180.4.14
--- src/gnome/window-main.c
+++ src/gnome/window-main.c
@@ -44,6 +44,7 @@
 #include "dialog-utils.h"
 #include "druid-acct-period.h"
 #include "druid-loan.h"
+#include "druid-merge.h"
 #include "gfec.h"
 #include "global-options.h"
 #include "gnc-engine.h"
@@ -73,7 +74,6 @@
 static GnomeUIInfo * gnc_main_window_toolbar_prefix (void);
 static GnomeUIInfo * gnc_main_window_toolbar_suffix (void);
 
-
 /**
  * gnc_main_window_get_mdi_child
  *
@@ -766,6 +766,12 @@
 }
 
 static void
+gnc_main_window_file_hierarchy_merge_cb(GtkWidget *w, gpointer data)
+{
+	gnc_ui_qof_book_merge_druid();
+}
+
+static void
 gnc_main_window_file_new_account_tree_cb(GtkWidget * w, gpointer data)
 {
 }
@@ -809,6 +815,13 @@
       gnc_main_window_file_new_account_tree_cb, NULL, NULL, 
       GNOME_APP_PIXMAP_NONE, NULL, 0, 0, NULL
     },    
+	{
+		GNOME_APP_UI_ITEM,
+		N_("Add New Account Hierarchy"),
+		N_("Extend the current book by merging with new account type categories"),
+		gnc_main_window_file_hierarchy_merge_cb, NULL, NULL,
+		GNOME_APP_PIXMAP_NONE, NULL, 0, 0, NULL
+	},
     GNOMEUIINFO_SEPARATOR,
     GNOMEUIINFO_MENU_OPEN_ITEM(gnc_main_window_file_open_cb, NULL),
     {
Index: dialog-tax-info.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-tax-info.c,v
retrieving revision 1.18.6.7
retrieving revision 1.18.6.8
diff -Lsrc/gnome/dialog-tax-info.c -Lsrc/gnome/dialog-tax-info.c -u -r1.18.6.7 -r1.18.6.8
--- src/gnome/dialog-tax-info.c
+++ src/gnome/dialog-tax-info.c
@@ -576,7 +576,7 @@
   frame = gnc_glade_lookup_widget (GTK_WIDGET (clist),
                                    "payer_name_source_frame");
 
-  if (txf_info->payer_name_source)
+  if (txf_info && txf_info->payer_name_source)
   {
     gboolean current;
 
Index: window-register.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/window-register.c,v
retrieving revision 1.198.4.15
retrieving revision 1.198.4.16
diff -Lsrc/gnome/window-register.c -Lsrc/gnome/window-register.c -u -r1.198.4.15 -r1.198.4.16
--- src/gnome/window-register.c
+++ src/gnome/window-register.c
@@ -683,11 +683,12 @@
 {
   RegWindow *regData = data;
 
-  if ( regData ) {
-    gnc_reg_save_size( regData );
-  }
+  if ( NULL == regData )  return TRUE;
+
+  gnc_reg_save_size( regData );
 
-  if (gnc_split_reg_check_close(regData->gsr) != FALSE) {
+  if (gnc_split_reg_check_close(regData->gsr) != FALSE) 
+  {
     gnc_ledger_display_close (regData->ledger);
     return FALSE;
   }
Index: gnc-plugin-page-account-tree.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/Attic/gnc-plugin-page-account-tree.c,v
retrieving revision 1.1.2.33
retrieving revision 1.1.2.34
diff -Lsrc/gnome/gnc-plugin-page-account-tree.c -Lsrc/gnome/gnc-plugin-page-account-tree.c -u -r1.1.2.33 -r1.1.2.34
--- src/gnome/gnc-plugin-page-account-tree.c
+++ src/gnome/gnc-plugin-page-account-tree.c
@@ -35,6 +35,7 @@
 #include "dialog-account.h"
 #include "dialog-options.h"
 #include "dialog-transfer.h"
+#include "druid-merge.h"
 #include "global-options.h"
 #include "gnc-book.h"
 #include "gnc-component-manager.h"
@@ -96,6 +97,7 @@
 
 /* Command callbacks */
 static void gnc_plugin_page_account_tree_cmd_new_account (EggAction *action, GncPluginPageAccountTree *plugin_page);
+static void gnc_plugin_page_account_tree_cmd_file_hierarchy_merge (EggAction *action, GncPluginPageAccountTree *plugin_page);
 static void gnc_plugin_page_account_tree_cmd_open_account (EggAction *action, GncPluginPageAccountTree *page);
 static void gnc_plugin_page_account_tree_cmd_open_subaccounts (EggAction *action, GncPluginPageAccountTree *page);
 static void gnc_plugin_page_account_tree_cmd_edit_account (EggAction *action, GncPluginPageAccountTree *page);
@@ -125,6 +127,9 @@
 	{ "FileNewAccountAction", N_("New Account..."), GNC_STOCK_NEW_ACCOUNT, NULL,
 	  N_("Create a new Account"),
 	  G_CALLBACK (gnc_plugin_page_account_tree_cmd_new_account) },
+	{ "FileAddAccountHierarchyDruidAction", N_("Add New Account Hierarchy..."), NULL, NULL,
+	  N_("Extend the current book by merging with new account type categories"),
+	  G_CALLBACK (gnc_plugin_page_account_tree_cmd_file_hierarchy_merge) },
 	{ "FileOpenAccountAction", N_("Open Account"), GNC_STOCK_OPEN_ACCOUNT, "<control>o",
 	  N_("Open the selected account"),
 	  G_CALLBACK (gnc_plugin_page_account_tree_cmd_open_account) },
@@ -709,6 +714,12 @@
 }
 
 static void
+gnc_plugin_page_account_tree_cmd_file_hierarchy_merge (EggAction *action, GncPluginPageAccountTree *page)
+{
+	gnc_ui_qof_book_merge_druid();
+}
+
+static void
 gnc_plugin_page_account_tree_cmd_open_account (EggAction *action,
 					       GncPluginPageAccountTree *page)
 {
Index: druid-loan.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-loan.c,v
retrieving revision 1.17.4.5
retrieving revision 1.17.4.6
diff -Lsrc/gnome/druid-loan.c -Lsrc/gnome/druid-loan.c -u -r1.17.4.5 -r1.17.4.6
--- src/gnome/druid-loan.c
+++ src/gnome/druid-loan.c
@@ -552,7 +552,7 @@
                         GtkAlignment *a;
                         GNCOptionInfo typeOptInfo[] = {
                                 { _("Fixed"), _("A Fixed-Rate loan"), ld_prm_type_changed, ldd },
-				/* Translators: ARM = Adjustable Rate Mortgage */
+                                /* Translators: ARM = Adjustable Rate Mortgage */
                                 { _("3/1 Year"),   _("A 3/1 Year ARM"),         ld_prm_type_changed, ldd },
                                 { _("5/1 Year"),   _("A 5/1 Year ARM"),         ld_prm_type_changed, ldd },
                                 { _("7/1 Year"),   _("A 7/1 Year ARM"),         ld_prm_type_changed, ldd },
@@ -639,8 +639,8 @@
 
                                 /* Add payment checkbox. */
 
-				/* Translators: %s is "Taxes",
-				 * "Insurance", or similar. */
+                                /* Translators: %s is "Taxes",
+                                 * "Insurance", or similar. */
                                 g_string_sprintf( str, _("... pay \"%s\"?"),
                                                   rouid->optData->name );
                                 rouid->optCb =
@@ -798,7 +798,7 @@
                             GTK_SIGNAL_FUNC(ld_destroy),
                             ldd );
 
-	gnome_window_icon_set_from_default (GTK_WINDOW (ldd->dialog));
+        gnome_window_icon_set_from_default (GTK_WINDOW (ldd->dialog));
         gtk_widget_show_all( ldd->dialog );
         return ldd;
 }
@@ -863,7 +863,7 @@
 
         /* Get all widgets */
 #define GET_CASTED_WIDGET( cast, name ) \
-	(cast( glade_xml_get_widget( ldd->gxml, name ) ))
+        (cast( glade_xml_get_widget( ldd->gxml, name ) ))
 
         /* prm = params */
         ldd->prmTable =
@@ -1170,7 +1170,7 @@
         ldd->ld.primaryAcct = gnc_account_sel_get_account( ldd->prmAccountGAS );
         if ( ldd->ld.primaryAcct == NULL ) {
                 gnc_info_dialog( ldd->dialog,
-				 _("Please select a valid loan account.") );
+                                 _("Please select a valid loan account.") );
                 return TRUE;
         } 
         if ( ! ldd->ld.repPriAcct ) {
@@ -1257,8 +1257,8 @@
                         gnc_account_sel_get_account( ldd->optEscrowGAS );
                 if ( ldd->ld.escrowAcct == NULL ) {
                         gnc_info_dialog( ldd->dialog,
-					 _("Please select a valid "
-					   "Escrow Account.") );
+                                         _("Please select a valid "
+                                           "Escrow Account.") );
                         return TRUE;
                 }
                 
@@ -1323,22 +1323,22 @@
                 gnc_account_sel_get_account( ldd->repAssetsFromGAS );
         if ( ldd->ld.repFromAcct == NULL ) {
                 gnc_info_dialog( ldd->dialog,
-				 _("Please select a valid \"from\" account."));
+                                 _("Please select a valid \"from\" account."));
                 return TRUE;
         }
         ldd->ld.repPriAcct =
                 gnc_account_sel_get_account( ldd->repPrincToGAS );
         if ( ldd->ld.repPriAcct == NULL ) {
                 gnc_info_dialog( ldd->dialog,
-				 _("Please select a valid \"to\" account.") );
+                                 _("Please select a valid \"to\" account.") );
                 return TRUE;
         }
         ldd->ld.repIntAcct =
                 gnc_account_sel_get_account( ldd->repIntToGAS );
         if ( ldd->ld.repIntAcct == NULL ) {
                 gnc_info_dialog( ldd->dialog,
-				 _("Please select a valid "
-				   "\"interest\" account.") );
+                                 _("Please select a valid "
+                                   "\"interest\" account.") );
                 return TRUE;
         }
         gnc_frequency_save_state( ldd->repGncFreq,
@@ -1448,7 +1448,7 @@
 
         rod = ldd->ld.repayOpts[ldd->currentIdx];
         str = g_string_sized_new( 32 );
-	/* Translators: %s is "Taxes", or "Insurance", or similar */
+        /* Translators: %s is "Taxes", or "Insurance", or similar */
         g_string_sprintf( str, _("Payment: \"%s\""), rod->name );
         gnome_druid_page_standard_set_title( GNOME_DRUID_PAGE_STANDARD(gdp),
                                              str->str );
@@ -1542,8 +1542,8 @@
                 rod->from = gnc_account_sel_get_account( ldd->payAcctFromGAS );
                 if ( rod->from == NULL ) {
                         gnc_info_dialog( ldd->dialog,
-					 _("Please select a valid "
-					   "\"from\" account.") );
+                                         _("Please select a valid "
+                                           "\"from\" account.") );
                         return TRUE;
                 }
         }
@@ -1551,8 +1551,8 @@
         rod->to   = gnc_account_sel_get_account( ldd->payAcctToGAS );
         if ( rod->to == NULL ) {
                 gnc_info_dialog( ldd->dialog,
-				 _("Please select a valid "
-				   "\"to\" account.") );
+                                 _("Please select a valid "
+                                   "\"to\" account.") );
                 return TRUE;
         }
         
@@ -2264,7 +2264,7 @@
         paymentSX->name  = g_strdup(ldd->ld.repMemo);
         paymentSX->start = *ldd->ld.startDate;
         paymentSX->last  = *ldd->ld.repStartDate;
-	g_date_subtract_months( &paymentSX->last, 1 );
+        g_date_subtract_months( &paymentSX->last, 1 );
         {
                 paymentSX->end = *ldd->ld.repStartDate;
                 g_date_add_months( &paymentSX->end, ldd->ld.numMonRemain - 1);
@@ -2616,8 +2616,9 @@
         RevRepaymentRow *rrr = g_new0( RevRepaymentRow, 1 );
         if ( !key || !val ) {
                 DEBUG( "%.8x, %.8x",
-                       (unsigned int)key,
-                       (unsigned int)val );
+                       GPOINTER_TO_UINT(key),
+                       GPOINTER_TO_UINT(val));
+                return;
         }
         rrr->date = *(GDate*)key;
         rrr->numCells = (gnc_numeric*)val;
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/Makefile.am,v
retrieving revision 1.107.4.15
retrieving revision 1.107.4.16
diff -Lsrc/gnome/Makefile.am -Lsrc/gnome/Makefile.am -u -r1.107.4.15 -r1.107.4.16
--- src/gnome/Makefile.am
+++ src/gnome/Makefile.am
@@ -44,6 +44,7 @@
   druid-budget-create.c \
   druid-acct-period.c \
   druid-hierarchy.c \
+  druid-merge.c \
   druid-loan.c \
   druid-stock-split.c \
   gnc-embedded-window.c \
@@ -94,6 +95,7 @@
   druid-budget-create.h \
   druid-acct-period.h \
   druid-hierarchy.h \
+  druid-merge.h \
   druid-loan.h \
   druid-stock-split.h \
   gnc-embedded-window.h \
Index: druid-hierarchy.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-hierarchy.c,v
retrieving revision 1.21.4.10
retrieving revision 1.21.4.11
diff -Lsrc/gnome/druid-hierarchy.c -Lsrc/gnome/druid-hierarchy.c -u -r1.21.4.10 -r1.21.4.11
--- src/gnome/druid-hierarchy.c
+++ src/gnome/druid-hierarchy.c
@@ -32,6 +32,7 @@
 #include "dialog-new-user.h"
 #include "dialog-utils.h"
 #include "druid-hierarchy.h"
+#include "druid-merge.h"
 #include "druid-utils.h"
 #include "gnc-amount-edit.h"
 #include "gnc-currency-edit.h"
@@ -47,9 +48,15 @@
 #include "global-options.h"
 #include "io-example-account.h"
 #include "top-level.h"
+#include "qofbook.h"
+
+#include "gnc-trace.h"
+static short module = MOD_IMPORT; 
 
 static GtkWidget *hierarchy_window = NULL;
+GtkWidget *qof_book_merge_window = NULL;
 static AccountGroup *our_final_group = NULL;
+QofBook *temporary;
 
 typedef struct {
   GtkWidget *dialog;
@@ -325,7 +332,7 @@
 	GtkCellRenderer *renderer;
 
 	locale_dir = gnc_get_ea_locale_dir (GNC_ACCOUNTS_DIR);
- 	list = gnc_load_example_account_list (gnc_get_current_book (),
+ 	list = gnc_load_example_account_list (temporary,
 					      locale_dir);
 	g_free (locale_dir);
 
@@ -378,6 +385,7 @@
   {
     /* Build the categories tree if necessary */
     gnc_suspend_gui_refresh ();
+    temporary = qof_book_new();
     account_categories_tree_view_prepare (data);
     gnc_resume_gui_refresh ();
 
@@ -795,97 +803,118 @@
            gpointer         arg1,
            hierarchy_data  *data)
 {
-  gnc_suspend_gui_refresh ();
-
-  if (our_final_group)
-    xaccGroupForEachAccount (our_final_group, (AccountCallback)starting_balance_helper,
-                             data, TRUE);
-
-  delete_hierarchy_window ();
-
-  gncp_new_user_finish ();
-
-  gnc_set_first_startup (FALSE);
-
-  if (our_final_group)
-    xaccGroupConcatGroup (gnc_get_current_group (), our_final_group);
-
-  g_free(data);
-  gnc_resume_gui_refresh ();
+	gnc_suspend_gui_refresh ();
+	
+	if (our_final_group)
+	  xaccGroupForEachAccount (our_final_group, (AccountCallback)starting_balance_helper,
+				   data, TRUE);
+	ENTER (" ");
+	qof_book_merge_window = gtk_object_get_data (GTK_OBJECT (hierarchy_window), "Merge Druid");
+	if(qof_book_merge_window) {
+		DEBUG ("qof_book_merge_window found");
+		if (our_final_group) 
+			xaccGroupConcatGroup (gnc_get_current_group (), our_final_group);
+		gtk_widget_show(qof_book_merge_window);
+		qof_book_destroy(temporary);
+		delete_hierarchy_window ();
+		gnc_resume_gui_refresh ();
+		LEAVE (" ");
+		return;
+	}
+	delete_hierarchy_window ();
+	
+	gncp_new_user_finish ();
+	
+	gnc_set_first_startup (FALSE);
+	
+	if (our_final_group)
+	xaccGroupConcatGroup (gnc_get_current_group (), our_final_group);
+	qof_book_destroy(temporary);
+	
+	g_free(data);
+	gnc_resume_gui_refresh ();
+	LEAVE (" ");
 }
 
 static GtkWidget *
 gnc_create_hierarchy_druid (void)
 {
-  hierarchy_data *data;
-  GtkWidget *balance_edit;
-  GtkWidget *dialog;
-  GtkWidget *druid;
-  GtkTreeView *tree_view;
-  GtkWidget *box;
-  GladeXML *xml;
-
-  data = g_new0 (hierarchy_data, 1);
-  xml = gnc_glade_xml_new ("account.glade", "Hierarchy Druid");
-
-  dialog = glade_xml_get_widget (xml, "Hierarchy Druid");
-  gnome_window_icon_set_from_default (GTK_WINDOW (dialog));
-  data->dialog = dialog;
-
-  druid = glade_xml_get_widget (xml, "hierarchy_druid");
-  gnc_druid_set_colors (GNOME_DRUID (druid));
-
-  gtk_widget_show (glade_xml_get_widget (xml, "start_page"));
-  gtk_widget_show (glade_xml_get_widget (xml, "newUserDruidFinishPage"));
-
-  /* Currency Page */
-  data->currency_selector = gnc_currency_edit_new();
-  gnc_currency_edit_set_currency (GNC_CURRENCY_EDIT(data->currency_selector), gnc_default_currency());
-  gtk_widget_show (data->currency_selector);
-  box = glade_xml_get_widget (xml, "currency_chooser_vbox");
-  gtk_box_pack_start(GTK_BOX(box), data->currency_selector, FALSE, FALSE, 0);
-
-  /* Categories Page */
-  balance_edit = gnc_amount_edit_new ();
-  data->balance_edit = GNC_AMOUNT_EDIT(balance_edit);
-  gnc_amount_edit_set_evaluate_on_enter (GNC_AMOUNT_EDIT (balance_edit), TRUE);
-  gtk_widget_show (balance_edit);
-  box = glade_xml_get_widget (xml, "start_balance_box");
-  gtk_box_pack_start (GTK_BOX (box), balance_edit, TRUE, TRUE, 0);
-  g_signal_connect (G_OBJECT (balance_edit), "amount_changed",
-                    G_CALLBACK (on_balance_changed), data);
-  g_signal_connect (G_OBJECT (balance_edit), "focus_out_event",
-                    G_CALLBACK (on_balance_focus_out), data);
-
-  /* Opening Balances Page */
-  tree_view = GTK_TREE_VIEW(glade_xml_get_widget (xml, "account_categories_tree_view"));
-  g_signal_connect (G_OBJECT (gtk_tree_view_get_selection (tree_view)), "changed",
-		    G_CALLBACK (categories_tree_selection_changed), data);
-  gtk_tree_selection_set_mode (gtk_tree_view_get_selection (tree_view), GTK_SELECTION_SINGLE);
-  data->categories_tree = tree_view;
-
-  data->category_accounts_box = GTK_BOX(glade_xml_get_widget (xml, "accounts_in_category"));
-  data->category_description = GTK_LABEL(glade_xml_get_widget (xml, "account_types_description_entry"));
-
-  data->final_account_tree_box = glade_xml_get_widget (xml, "final_account_tree_box");
-  data->final_account_tree = NULL;
-
-  data->balance_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
-  g_signal_connect (G_OBJECT(dialog), "destroy",
-                    G_CALLBACK (gnc_hierarchy_destroy_cb), data);
-
-  glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func, data);
+	hierarchy_data *data;
+	GtkWidget *balance_edit;
+	GtkWidget *dialog;
+	GtkWidget *druid;
+	GtkTreeView *tree_view;
+	GtkWidget *box;
+	GladeXML *xml;
+	
+	data = g_new0 (hierarchy_data, 1);
+	xml = gnc_glade_xml_new ("account.glade", "Hierarchy Druid");
+	
+	dialog = glade_xml_get_widget (xml, "Hierarchy Druid");
+	gnome_window_icon_set_from_default (GTK_WINDOW (dialog));
+	data->dialog = dialog;
+	
+	druid = glade_xml_get_widget (xml, "hierarchy_druid");
+	gnc_druid_set_colors (GNOME_DRUID (druid));
+	
+	gtk_widget_show (glade_xml_get_widget (xml, "start_page"));
+	gtk_widget_show (glade_xml_get_widget (xml, "newUserDruidFinishPage"));
+	
+	/* Currency Page */
+	data->currency_selector = gnc_currency_edit_new();
+	gnc_currency_edit_set_currency (GNC_CURRENCY_EDIT(data->currency_selector), gnc_default_currency());
+	gtk_widget_show (data->currency_selector);
+	box = glade_xml_get_widget (xml, "currency_chooser_vbox");
+	gtk_box_pack_start(GTK_BOX(box), data->currency_selector, FALSE, FALSE, 0);
+
+	/* Categories Page */
+	balance_edit = gnc_amount_edit_new ();
+	data->balance_edit = GNC_AMOUNT_EDIT(balance_edit);
+	gnc_amount_edit_set_evaluate_on_enter (GNC_AMOUNT_EDIT (balance_edit), TRUE);
+	gtk_widget_show (balance_edit);
+	box = glade_xml_get_widget (xml, "start_balance_box");
+	gtk_box_pack_start (GTK_BOX (box), balance_edit, TRUE, TRUE, 0);
+	g_signal_connect (G_OBJECT (balance_edit), "amount_changed",
+			  G_CALLBACK (on_balance_changed), data);
+	g_signal_connect (G_OBJECT (balance_edit), "focus_out_event",
+			  G_CALLBACK (on_balance_focus_out), data);
+	
+	/* Opening Balances Page */
+	tree_view = GTK_TREE_VIEW(glade_xml_get_widget (xml, "account_categories_tree_view"));
+	g_signal_connect (G_OBJECT (gtk_tree_view_get_selection (tree_view)), "changed",
+			  G_CALLBACK (categories_tree_selection_changed), data);
+	gtk_tree_selection_set_mode (gtk_tree_view_get_selection (tree_view), GTK_SELECTION_SINGLE);
+	data->categories_tree = tree_view;
+	
+	data->category_accounts_box = GTK_BOX(glade_xml_get_widget (xml, "accounts_in_category"));
+	data->category_description = GTK_LABEL(glade_xml_get_widget (xml, "account_types_description_entry"));
+	
+	data->final_account_tree_box = glade_xml_get_widget (xml, "final_account_tree_box");
+	data->final_account_tree = NULL;
+	
+	data->balance_hash = g_hash_table_new (g_str_hash, g_str_equal);
+	
+	g_signal_connect (G_OBJECT(dialog), "destroy",
+			  G_CALLBACK (gnc_hierarchy_destroy_cb), data);
+	
+	glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func, data);
+	
+	return dialog;
+}
 
-  return dialog;
+GtkWidget*
+gnc_ui_hierarchy_running (void)
+{
+	if (hierarchy_window) return hierarchy_window;
+	return NULL;
 }
 
 void
 gnc_ui_hierarchy_druid (void)
 {
-  if (hierarchy_window) return;
+	if (hierarchy_window) return;
 
-  hierarchy_window = gnc_create_hierarchy_druid ();
+	hierarchy_window = gnc_create_hierarchy_druid ();
 
-  return;
+	return;
 }
Index: window-reconcile.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/window-reconcile.c,v
retrieving revision 1.103.4.8
retrieving revision 1.103.4.9
diff -Lsrc/gnome/window-reconcile.c -Lsrc/gnome/window-reconcile.c -u -r1.103.4.8 -r1.103.4.9
--- src/gnome/window-reconcile.c
+++ src/gnome/window-reconcile.c
@@ -752,24 +752,18 @@
     gnc_reconcile_interest_xfer_run( &data );
   }
 
-  while (TRUE)
+  result = gtk_dialog_run(GTK_DIALOG(dialog));
+  if (result == GTK_RESPONSE_OK)
   {
-    result = gtk_dialog_run(GTK_DIALOG(dialog));
-    if (result == GTK_RESPONSE_OK)
-    {
-      *new_ending = gnc_amount_edit_get_amount (GNC_AMOUNT_EDIT (end_value));
-      *statement_date = gnc_date_edit_get_date(GNC_DATE_EDIT(date_value));
-
-      if (gnc_reverse_balance(account))
-        *new_ending = gnc_numeric_neg (*new_ending);
+    *new_ending = gnc_amount_edit_get_amount (GNC_AMOUNT_EDIT (end_value));
+    *statement_date = gnc_date_edit_get_date(GNC_DATE_EDIT(date_value));
 
-      xaccAccountSetReconcileChildrenStatus(account, data.include_children);
+    if (gnc_reverse_balance(account))
+      *new_ending = gnc_numeric_neg (*new_ending);
 
-      gnc_save_reconcile_interval(account, *statement_date);
-    }
+    xaccAccountSetReconcileChildrenStatus(account, data.include_children);
 
-    /* cancel or delete */
-    break;
+    gnc_save_reconcile_interval(account, *statement_date);
   }
   gtk_widget_destroy (dialog);
 
Index: dialog-sxsincelast.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-sxsincelast.c,v
retrieving revision 1.65.4.7
retrieving revision 1.65.4.8
diff -Lsrc/gnome/dialog-sxsincelast.c -Lsrc/gnome/dialog-sxsincelast.c -u -r1.65.4.7 -r1.65.4.8
--- src/gnome/dialog-sxsincelast.c
+++ src/gnome/dialog-sxsincelast.c
@@ -205,8 +205,8 @@
  * An reminder instance of the containing SX.
  **/
 typedef struct reminderInstanceTuple_ {
-        GDate	*endDate;
-        GDate	*occurDate;
+        GDate        *endDate;
+        GDate        *occurDate;
         void    *sxStateData;
         gboolean isSelected;
         reminderTuple *parentRT;
@@ -426,17 +426,17 @@
       (NULL,
        ngettext 
        ("There are no Scheduled Transactions to be entered at this time.\n"
-	"(%d transaction automatically created)",
-	"There are no Scheduled Transactions to be entered at this time.\n"
-	"(%d transactions automatically created)",
-	-(ret)),
+        "(%d transaction automatically created)",
+        "There are no Scheduled Transactions to be entered at this time.\n"
+        "(%d transactions automatically created)",
+        -(ret)),
        -(ret));
   }
 }
 
 static gboolean
 show_handler (const char *class, gint component_id,
-	      gpointer user_data, gpointer iter_data)
+              gpointer user_data, gpointer iter_data)
 {
         GtkWidget *window = user_data;
 
@@ -466,12 +466,12 @@
         int autoCreateCount;
         sxSinceLastData        *sxsld;
 
-	if (gnc_forall_gui_components (DIALOG_SXSINCELAST_CM_CLASS,
-				       show_handler, NULL))
-		return 0;
+        if (gnc_forall_gui_components (DIALOG_SXSINCELAST_CM_CLASS,
+                                       show_handler, NULL))
+                return 0;
 
 
-	sxsld = g_new0( sxSinceLastData, 1 );
+        sxsld = g_new0( sxSinceLastData, 1 );
 
         sxsld->toCreateList = sxsld->reminderList = sxsld->toRemoveList = NULL;
         sxsld->sxInitStates = g_hash_table_new( g_direct_hash, g_direct_equal );
@@ -521,8 +521,8 @@
    
 static void
 dialog_widgets_attach_handlers(GladeXML *dialog_xml, 
-			       widgetSignalHandlerTuple *handler_info, 
-			       sxSinceLastData *sxsld)
+                               widgetSignalHandlerTuple *handler_info, 
+                               sxSinceLastData *sxsld)
 {
         int i;
         GtkWidget *w;
@@ -1074,7 +1074,7 @@
         }
         g_list_free( tci->createdTxnGUIDs );
         tci->createdTxnGUIDs = NULL;
-	gnc_resume_gui_refresh();
+        gnc_resume_gui_refresh();
 }
 
 /**
@@ -1388,7 +1388,7 @@
                       toDelPtr;
                       toDelPtr = toDelPtr->next ) {
 
-                        row = (gint)toDelPtr->data;
+                        row = GPOINTER_TO_INT(toDelPtr->data);
                         tdt = (toDeleteTuple*)gtk_clist_get_row_data( cl, row );
                         elt = g_list_find( sxList, tdt->sx );
                         sxList = g_list_remove_link( sxList, elt );
@@ -1444,7 +1444,7 @@
         }
 
         if ( !gnc_verify_dialog( sxsld->sincelast_window, TRUE,
-				 lastrun_cancel_check_msg ) ) {
+                                 lastrun_cancel_check_msg ) ) {
                 return TRUE;
         }
 
@@ -1610,7 +1610,7 @@
         g_signal_connect( G_OBJECT(sxsld->sincelast_window), "destroy",
 			  G_CALLBACK( sxsincelast_destroy ), sxsld );
 
-	dialog_widgets_attach_handlers(sxsld->gxml, widgets, sxsld);
+        dialog_widgets_attach_handlers(sxsld->gxml, widgets, sxsld);
         druid_pages_attach_handlers( sxsld->gxml, pages, sxsld );
 
         /* gnc-init the option menu[s]. */
@@ -1844,7 +1844,7 @@
                 for ( insts = tct->instanceList;
                       insts;
                       insts = insts->next ) {
-                        gboolean allVarsBound;
+                        gboolean allVarsBound = FALSE;
 
                         tci = (toCreateInstance*)insts->data;
                 
@@ -1863,24 +1863,24 @@
 
                         switch ( tci->state ) {
                         case TO_CREATE:
-                                allVarsBound = TRUE;
-                                g_hash_table_foreach( tci->varBindings,
-                                                      andequal_numerics_set,
-                                                      &allVarsBound );
-                                rowText[1] = ( allVarsBound
-                                               ? _( "Ready to create" )
-					       /* READY_TEXT */ 
-					       : _( "Needs values for variables" )
-                                               /* NEEDS_BINDINGS_TEXT */ );
-                                break;
+                            allVarsBound = TRUE;
+                            g_hash_table_foreach( tci->varBindings,
+                                                  andequal_numerics_set,
+                                                  &allVarsBound );
+                            rowText[1] = ( allVarsBound
+                                           ? _( "Ready to create" )
+                                           /* READY_TEXT */ 
+                                           : _( "Needs values for variables" )
+                                           /* NEEDS_BINDINGS_TEXT */ );
+                            break;
                         case IGNORE:
-			    rowText[1] = _( "Ignored" ) /* IGNORE_TEXT */ ;
-			    break;
+                            rowText[1] = _( "Ignored" ) /* IGNORE_TEXT */ ;
+                            break;
                         case POSTPONE:
-			    rowText[1] = _( "Postponed" ) /* POSTPONE_TEXT */ ;
-			    break;
+                            rowText[1] = _( "Postponed" ) /* POSTPONE_TEXT */ ;
+                            break;
                         default:
-                                g_assert( FALSE );
+                            g_assert( FALSE );
                         }
                                 
                         tci->node = gtk_ctree_insert_node( ct, sxNode, NULL,
@@ -1987,7 +1987,7 @@
                                               SX_OBSOLETE_CLIST ));
 
         tmp_str = g_string_new(NULL);
-        //rowtext[2] = g_new0(gchar, MAX_DATE_LENGTH+1 ); 
+        rowtext[2] = g_strdup( _("Obsolete") );
 
         gtk_clist_freeze( cl );
         gtk_clist_clear( cl );
@@ -2003,10 +2003,10 @@
 
                 fs = xaccSchedXactionGetFreqSpec( tdt->sx );
                 xaccFreqSpecGetFreqStr( fs, tmp_str );
+                /* XXX are we leaking memory here, by not 
+                 * freeing previous rrowtext[1] ?? */
                 rowtext[1] = tmp_str->str;
 
-                rowtext[2] = g_strdup( _("Obsolete") );
-
                 gtk_clist_insert( cl, row, rowtext );
                 gtk_clist_set_row_data( cl, row, tdt );
                 if ( tdt->isSelected ) {
@@ -2388,8 +2388,8 @@
         gnc_ledger_display_close( sxsld->to_create_ledger );
         sxsld->to_create_ledger = NULL;
 
-	gnc_unregister_gui_component_by_data( DIALOG_SXSINCELAST_CM_CLASS,
-					      sxsld->sincelast_window );
+        gnc_unregister_gui_component_by_data( DIALOG_SXSINCELAST_CM_CLASS,
+                                              sxsld->sincelast_window );
 
         g_free( sxsld );
 }
@@ -2696,7 +2696,7 @@
 
         ag = gnc_book_get_template_group( gnc_get_current_book () );
         id = guid_to_string( xaccSchedXactionGetGUID(sx) );
-	if ( ag && id ) {
+        if ( ag && id ) {
                 acct = xaccGetAccountFromName( ag, id );
                 if ( acct ) {
                         createUD.tci = tci;
@@ -2705,7 +2705,7 @@
                                                        create_each_transaction_helper,
                                                        /*tct*/ &createUD );
                 }
-	}
+        }
 }
 
 static void
@@ -2926,7 +2926,7 @@
         for ( ; varList ; varList = varList->next ) {
                 gchar *varName;
                 GString *gstr;
-		const gchar *numValueStr;
+                const gchar *numValueStr;
                 gnc_numeric *numValue, *tmpNumValue;
 
                 varName = (gchar*)varList->data;
@@ -3052,7 +3052,7 @@
 print_vars_helper( gpointer key, gpointer value, gpointer user_data )
 {
         DEBUG( "\"%s\" -> %.8x [%s]",
-               (gchar*)key, (unsigned int)value,
+               (gchar*)key, GPOINTER_TO_UINT(value),
                gnc_numeric_to_string( *(gnc_numeric*)value ) );
 }
 
@@ -3569,7 +3569,7 @@
         Query *q;
 
         q = xaccMallocQuery();
-	xaccQuerySetBook (q, gnc_get_current_book ());
+        xaccQuerySetBook (q, gnc_get_current_book ());
         sxsld->ac_ledger = gnc_ledger_display_query( q,
                                                      GENERAL_LEDGER,
                                                      REG_STYLE_LEDGER );
@@ -3612,7 +3612,7 @@
         Query *q;
 
         q = xaccMallocQuery();
-	xaccQuerySetBook (q, gnc_get_current_book ());
+        xaccQuerySetBook (q, gnc_get_current_book ());
         sxsld->created_ledger = gnc_ledger_display_query( q,
                                                           GENERAL_LEDGER,
                                                           REG_STYLE_LEDGER );
Index: druid-hierarchy.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-hierarchy.h,v
retrieving revision 1.1
retrieving revision 1.1.6.1
diff -Lsrc/gnome/druid-hierarchy.h -Lsrc/gnome/druid-hierarchy.h -u -r1.1 -r1.1.6.1
--- src/gnome/druid-hierarchy.h
+++ src/gnome/druid-hierarchy.h
@@ -24,5 +24,5 @@
 #define DRUID_HIERARCHY_H
 
 void gnc_ui_hierarchy_druid (void);
-
+GtkWidget* gnc_ui_hierarchy_running (void);
 #endif
Index: dialog-scheduledxaction.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-scheduledxaction.c,v
retrieving revision 1.71.2.9
retrieving revision 1.71.2.10
diff -Lsrc/gnome/dialog-scheduledxaction.c -Lsrc/gnome/dialog-scheduledxaction.c -u -r1.71.2.9 -r1.71.2.10
--- src/gnome/dialog-scheduledxaction.c
+++ src/gnome/dialog-scheduledxaction.c
@@ -1807,7 +1807,7 @@
         sxd = (SchedXactionDialog*)d;
         cl = GTK_CLIST(glade_xml_get_widget( sxd->gxml, SX_LIST ));
         for( sel = cl->selection; sel; sel = g_list_next(sel) ) {
-                row = (int)sel->data;
+                row = GPOINTER_TO_INT(sel->data);
                 /* get the clist row for this listitem */
                 sx = (SchedXaction*)gtk_clist_get_row_data( cl, row );
                 /* get the object UD */
@@ -1844,7 +1844,7 @@
         realConfDelOpenMsg = g_string_new( beingEditedMessage );
         beingEditedList = NULL;
         for ( ; sel ; sel = sel->next ) {
-                sx = (SchedXaction*)gtk_clist_get_row_data( cl, (int)sel->data );
+                sx = (SchedXaction*)gtk_clist_get_row_data( cl, GPOINTER_TO_INT(sel->data));
                 g_string_sprintfa( realConfDeleteMsg, "\n\"%s\"",
                                    xaccSchedXactionGetName( sx ) );
                 if ( (l = gnc_find_gui_components( DIALOG_SCHEDXACTION_EDITOR_CM_CLASS,
@@ -1907,7 +1907,7 @@
                         gpointer unused;
                         gboolean foundP;
 
-                        sx = (SchedXaction*)gtk_clist_get_row_data( cl, (int)sel->data );
+                        sx = (SchedXaction*)gtk_clist_get_row_data( cl, GPOINTER_TO_INT(sel->data));
                         sxList = g_list_remove( sxList, (gpointer)sx );
                         foundP = g_hash_table_lookup_extended( sxd->sxData, sx,
                                                                &unused,
@@ -1928,7 +1928,7 @@
                 sel = g_list_reverse( sel );
                 gtk_clist_unselect_all( cl );
                 for ( ; sel; sel = sel->next ) {
-                        gtk_clist_remove( cl, (int)sel->data );
+                        gtk_clist_remove( cl, GPOINTER_TO_INT(sel->data) );
                 }
                 g_list_free( sel );
                 sel = NULL;
Index: register.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/register.glade,v
retrieving revision 1.13.4.6
retrieving revision 1.13.4.7
diff -Lsrc/gnome/glade/register.glade -Lsrc/gnome/glade/register.glade -u -r1.13.4.6 -r1.13.4.7
--- src/gnome/glade/register.glade
+++ src/gnome/glade/register.glade
@@ -403,7 +403,7 @@
 		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
 		      <property name="snap_to_ticks">False</property>
 		      <property name="wrap">False</property>
-		      <property name="adjustment">0 0 100000 1 10 10</property>
+		      <property name="adjustment">0 0 1000000000 1 10 10</property>
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>
@@ -1023,12 +1023,6 @@
 	      </child>
 
 	      <child>
-		<widget class="GtkMenuItem" id="separator13">
-		  <property name="visible">True</property>
-		</widget>
-	      </child>
-
-	      <child>
 		<widget class="GtkMenuItem" id="menu_cut_trans">
 		  <property name="visible">True</property>
 		  <property name="tooltip" translatable="yes">Cut the selected transaction</property>
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/Makefile.am,v
retrieving revision 1.21.4.6
retrieving revision 1.21.4.7
diff -Lsrc/gnome/glade/Makefile.am -Lsrc/gnome/glade/Makefile.am -u -r1.21.4.6 -r1.21.4.7
--- src/gnome/glade/Makefile.am
+++ src/gnome/glade/Makefile.am
@@ -6,6 +6,7 @@
 	commodities.glade \
 	fincalc.glade \
 	lots.glade \
+	merge.glade \
 	newuser.glade \
 	price.glade \
 	print.glade \
--- /dev/null
+++ src/gnome/glade/merge.glade
@@ -0,0 +1,332 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" >
+
+<glade-interface>
+  <requires lib="gnome" />
+
+  <widget class="GtkWindow" id="Merge Druid">
+    <property name="title" translatable="yes">Merge Account Hierarchy Setup</property>
+    <property name="type">GTK_WINDOW_TOPLEVEL</property>
+    <property name="modal">no</property>
+    <property name="allow_shrink">no</property>
+    <property name="allow_grow">yes</property>
+    <property name="height-request">560</property>
+    <property name="window-position">GTK_WIN_POS_CENTER</property>
+    <property name="visible">yes</property>
+
+    <child>
+      <widget class="GnomeDruid" id="merge_druid">
+        <property name="visible">yes</property>
+
+        <signal name="cancel" handler="on_cancel" />
+
+        <child>
+          <widget class="GnomeDruidPageEdge" id="start_page">
+            <property name="title" translatable="yes">Merge Account Hierarchy Setup</property>
+            <property name="text" translatable="yes">This druid will merge your new hierarchy into the currently open 
+GnuCash file.
+
+You will be asked how to proceed if some accounts clash with the
+account tree in your existing GnuCash data file.
+
+There is NO way to undo this operation! Please ensure you 
+have a backup of your file BEFORE continuing! You will be 
+given the option to cancel the merge at all stages until the 
+final merge operation. Once you click Finish, the new 
+account tree will be committed to your current data file.
+
+There is currently no currency or price support in the merge 
+operation, the new accounts will inherit any default currency
+ or you can change the currency after the merge is complete.
+
+Click 'Cancel'  if you do not wish to merge your new 
+account types now.</property>
+            <property name="position">GNOME_EDGE_START</property>
+            <property name="visible">yes</property>
+            <property name="title_color">#ffffff</property>
+            <property name="text_color">#000000</property>
+            <property name="background_color">#191970</property>
+            <property name="logo_background_color">#ffffff</property>
+            <property name="textbox_color">#ffffff</property>
+
+            <signal name="next" handler="on_start_page_next" />
+          </widget>
+        </child>
+
+        <child>
+          <widget class="GnomeDruidPageStandard" id="summary_page">
+            <property name="title" translatable="yes">Your new accounts are ready to merge</property>
+            <property name="visible">yes</property>
+            <property name="title_foreground">#ffffff</property>
+            <property name="background">#191970</property>
+            <property name="logo_background">#ffffff</property>
+
+            <child internal-child="vbox">
+              <widget class="GtkVBox" id="druid-vbox7">
+                <property name="homogeneous">no</property>
+                <property name="spacing">0</property>
+                <property name="visible">yes</property>
+
+                <child>
+                  <widget class="GtkLabel" id="label2">
+                    <property name="label" translatable="yes">The next screen will allow you to resolve
+any conflicts in merging your new account
+tree into your current GnuCash file.</property>
+                    <property name="justify">GTK_JUSTIFY_CENTER</property>
+                    <property name="wrap">no</property>
+                    <property name="xalign">0.5</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="visible">yes</property>
+                  </widget>
+                  <packing>
+                    <property name="padding">0</property>
+                    <property name="expand">yes</property>
+                    <property name="fill">no</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">yes</property>
+                <property name="fill">yes</property>
+              </packing>
+            </child>
+          </widget>
+        </child>
+
+        <child>
+          <widget class="GnomeDruidPageStandard" id="qof_book_merge">
+            <property name="title" translatable="yes">Please resolve any conflicts in the merge</property>
+            <property name="visible">yes</property>
+            <property name="title_foreground">#ffffff</property>
+            <property name="background">#191970</property>
+            <property name="logo_background">#ffffff</property>
+
+            <signal name="prepare" handler="on_qof_book_merge_prepare" />
+            <signal name="next" handler="on_qof_book_merge_next" />
+
+            <child internal-child="vbox">
+              <widget class="GtkVBox" id="druid-vbox6">
+                <property name="homogeneous">no</property>
+                <property name="spacing">0</property>
+                <property name="visible">yes</property>
+
+                <child>
+                  <widget class="GtkHBox" id="hbox105">
+                    <property name="homogeneous">no</property>
+                    <property name="spacing">0</property>
+                    <property name="visible">yes</property>
+
+                    <child>
+                      <widget class="GtkVBox" id="vbox121">
+                        <property name="homogeneous">no</property>
+                        <property name="spacing">0</property>
+                        <property name="visible">yes</property>
+
+                        <child>
+                          <widget class="GtkLabel" id="ResultsBox">
+                            <property name="label" translatable="yes">Number of reports still to be reconciled.</property>
+                            <property name="justify">GTK_JUSTIFY_CENTER</property>
+                            <property name="wrap">no</property>
+                            <property name="xalign">0.5</property>
+                            <property name="yalign">0.5</property>
+                            <property name="xpad">0</property>
+                            <property name="ypad">0</property>
+                            <property name="visible">yes</property>
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">no</property>
+                            <property name="fill">no</property>
+                          </packing>
+                        </child>
+
+                        <child>
+                          <widget class="GtkHBox" id="hbox106">
+                            <property name="homogeneous">no</property>
+                            <property name="spacing">0</property>
+                            <property name="visible">yes</property>
+
+                            <child>
+                              <widget class="GtkScrolledWindow" id="scrolledwindow27">
+                                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+                                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                                <property name="visible">yes</property>
+
+                                <child>
+                                  <widget class="GtkViewport" id="viewport1">
+                                    <property name="border_width">5</property>
+                                    <property name="shadow_type">GTK_SHADOW_IN</property>
+                                    <property name="visible">yes</property>
+
+                                    <child>
+                                      <widget class="GtkLabel" id="OutPut">
+                                        <property name="label" translatable="yes"></property>
+                                        <property name="justify">GTK_JUSTIFY_LEFT</property>
+                                        <property name="wrap">no</property>
+                                        <property name="xalign">0.5</property>
+                                        <property name="yalign">0.5</property>
+                                        <property name="xpad">0</property>
+                                        <property name="ypad">0</property>
+                                        <property name="mnemonic_widget">MergeUpdate</property>
+                                        <property name="visible">yes</property>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                </child>
+
+                                <child internal-child="hscrollbar">
+                                  <widget class="GtkHScrollbar" id="convertwidget1">
+                                    <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+                                    <property name="visible">yes</property>
+                                  </widget>
+                                </child>
+
+                                <child internal-child="vscrollbar">
+                                  <widget class="GtkVScrollbar" id="convertwidget2">
+                                    <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+                                    <property name="visible">yes</property>
+                                  </widget>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="padding">0</property>
+                                <property name="expand">yes</property>
+                                <property name="fill">yes</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">yes</property>
+                            <property name="fill">yes</property>
+                          </packing>
+                        </child>
+
+                        <child>
+                          <widget class="GtkLabel" id="Static">
+                            <property name="label" translatable="yes">You have three choices for each collision.
+The import object can be allowed to overwrite the target - use this to update your existing book.
+The import object can be ignored - use this if the import is a duplicate of an object in the existing book.
+The import object can be created as a new object in the existing book.</property>
+                            <property name="justify">GTK_JUSTIFY_CENTER</property>
+                            <property name="wrap">no</property>
+                            <property name="xalign">0.5</property>
+                            <property name="yalign">0.5</property>
+                            <property name="xpad">0</property>
+                            <property name="ypad">0</property>
+                            <property name="visible">yes</property>
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">no</property>
+                            <property name="fill">no</property>
+                          </packing>
+                        </child>
+
+                        <child>
+                          <widget class="GtkButton" id="MergeUpdate">
+                            <property name="border_width">5</property>
+                            <property name="tooltip" translatable="yes">overwrite the original with the import data</property>
+                            <property name="can_focus">yes</property>
+                            <property name="has_focus">yes</property>
+                            <property name="label" translatable="yes">1. Update your existing book with the import data</property>
+                            <property name="relief">GTK_RELIEF_NORMAL</property>
+                            <property name="visible">yes</property>
+
+                            <signal name="clicked" handler="on_MergeUpdate_clicked" />
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">no</property>
+                            <property name="fill">no</property>
+                          </packing>
+                        </child>
+
+                        <child>
+                          <widget class="GtkButton" id="MergeDuplicate">
+                            <property name="border_width">5</property>
+                            <property name="tooltip" translatable="yes">ignore the import, leave the original untouched</property>
+                            <property name="can_focus">yes</property>
+                            <property name="label" translatable="yes">2. Ignore the import data, leave original unchanged</property>
+                            <property name="relief">GTK_RELIEF_NORMAL</property>
+                            <property name="visible">yes</property>
+
+                            <signal name="clicked" handler="on_MergeDuplicate_clicked" />
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">no</property>
+                            <property name="fill">no</property>
+                          </packing>
+                        </child>
+
+                        <child>
+                          <widget class="GtkButton" id="MergeNew">
+                            <property name="border_width">5</property>
+                            <property name="tooltip" translatable="yes">Add the import as a new object, leave original in place</property>
+                            <property name="can_focus">yes</property>
+                            <property name="label" translatable="yes">3.  Import the data as a NEW object</property>
+                            <property name="relief">GTK_RELIEF_NORMAL</property>
+                            <property name="visible">yes</property>
+
+                            <signal name="clicked" handler="on_MergeNew_clicked" />
+                          </widget>
+                          <packing>
+                            <property name="padding">0</property>
+                            <property name="expand">no</property>
+                            <property name="fill">no</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="padding">0</property>
+                        <property name="expand">yes</property>
+                        <property name="fill">yes</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="padding">0</property>
+                    <property name="expand">yes</property>
+                    <property name="fill">yes</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="padding">0</property>
+                <property name="expand">yes</property>
+                <property name="fill">yes</property>
+              </packing>
+            </child>
+          </widget>
+        </child>
+
+        <child>
+          <widget class="GnomeDruidPageEdge" id="MergeDruidFinishPage">
+            <property name="title" translatable="yes">Commit Merged Account Hierachy to data file</property>
+            <property name="text" translatable="yes">Press `Finish' to merge your new accounts into the current GnuCash file.
+
+Press `Back' to review your selections.
+
+Press `Cancel' to close this dialog without creating any new accounts.
+
+REMEMBER: There is no way to undo this final operation!
+Make sure you have a backup before clicking Finish.</property>
+            <property name="position">GNOME_EDGE_FINISH</property>
+            <property name="visible">yes</property>
+            <property name="title_color">#ffffff</property>
+            <property name="text_color">#000000</property>
+            <property name="background_color">#191970</property>
+            <property name="logo_background_color">#ffffff</property>
+            <property name="textbox_color">#ffffff</property>
+
+            <signal name="finish" handler="on_finish" />
+          </widget>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
Index: window-report.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/window-report.c,v
retrieving revision 1.15.4.10
retrieving revision 1.15.4.11
diff -Lsrc/report/report-gnome/window-report.c -Lsrc/report/report-gnome/window-report.c -u -r1.15.4.10 -r1.15.4.11
--- src/report/report-gnome/window-report.c
+++ src/report/report-gnome/window-report.c
@@ -1143,7 +1143,8 @@
     if (ptr != SCM_BOOL_F) {
       title = gh_scm2newstr(ptr, NULL);
     }
-    prm->win         = gnc_options_dialog_new(title);
+    /* Don't forget to translate the window title */
+    prm->win         = gnc_options_dialog_new(_(title));
     
     if (title) {
       free(title);
Index: dialog-column-view.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/dialog-column-view.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -Lsrc/report/report-gnome/dialog-column-view.h -Lsrc/report/report-gnome/dialog-column-view.h -u -r1.1.4.1 -r1.1.4.2
--- src/report/report-gnome/dialog-column-view.h
+++ src/report/report-gnome/dialog-column-view.h
@@ -20,8 +20,14 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
  ********************************************************************/
 
+#ifndef GNC_DIALOG_COLUMN_VIEW_H
+#define GNC_DIALOG_COLUMN_VIEW_H
+
 #include <libguile.h>
+#include <gtk/gtk.h>
 
 typedef struct gncp_column_view_edit gnc_column_view_edit;
 
 GtkWidget * gnc_column_view_edit_options(SCM options, SCM view);
+
+#endif
Index: gnc-plugin-page-account-tree-ui.xml
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/ui/Attic/gnc-plugin-page-account-tree-ui.xml,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -Lsrc/gnome/ui/gnc-plugin-page-account-tree-ui.xml -Lsrc/gnome/ui/gnc-plugin-page-account-tree-ui.xml -u -r1.1.2.5 -r1.1.2.6
--- src/gnome/ui/gnc-plugin-page-account-tree-ui.xml
+++ src/gnome/ui/gnc-plugin-page-account-tree-ui.xml
@@ -2,6 +2,7 @@
   <menubar>
     <menu name="File" action="FileAction">
       <placeholder name="FileNewPlaceholder">
+        <menuitem name="FileAddAccountHierarchyDruid" action="FileAddAccountHierarchyDruidAction"/>
         <menuitem name="FileNewAccount" action="FileNewAccountAction"/>
       </placeholder>
       <placeholder name="FileOpenPlaceholder">
Index: split-register-control.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register-control.c,v
retrieving revision 1.43.2.4
retrieving revision 1.43.2.5
diff -Lsrc/register/ledger-core/split-register-control.c -Lsrc/register/ledger-core/split-register-control.c -u -r1.43.2.4 -r1.43.2.5
--- src/register/ledger-core/split-register-control.c
+++ src/register/ledger-core/split-register-control.c
@@ -1354,8 +1354,7 @@
   }
  
   /* See if we are tabbing off the end of the very last line */
-  do
-  {
+  do {
     VirtualLocation virt_loc;
 
     if (!changed && !info->blank_split_edited)
@@ -1396,8 +1395,7 @@
   }
 
   /* See if we are tabbing off the end of a blank split */
-  do
-  {
+  do {
     VirtualLocation virt_loc;
     int old_virt_row;
 
@@ -1437,8 +1435,7 @@
 
     return FALSE;
 
-  } while (FALSE);
-
+  } while(FALSE);
 
   {
     int old_virt_row;
Index: dialog-search.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/dialog-search.h,v
retrieving revision 1.10.4.1
retrieving revision 1.10.4.2
diff -Lsrc/gnome-search/dialog-search.h -Lsrc/gnome-search/dialog-search.h -u -r1.10.4.1 -r1.10.4.2
--- src/gnome-search/dialog-search.h
+++ src/gnome-search/dialog-search.h
@@ -24,6 +24,8 @@
 #ifndef _GNC_DIALOG_SEARCH_H
 #define _GNC_DIALOG_SEARCH_H
 
+#include <gtk/gtk.h>
+
 #include "GNCId.h"
 #include "QueryNew.h"
 
--- /dev/null
+++ src/report/stylesheets/stylesheet-easy.scm
@@ -0,0 +1,360 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; stylesheet-easy.scm: stylesheet with nicer formatting for
+;; printing and easier configurability
+;;
+;; Copyright 2004 James Strandboge <jstrand1 at rochester.rr.com>
+;;
+;; This program is free software; you can redistribute it and/or    
+;; modify it under the terms of the GNU General Public License as   
+;; published by the Free Software Foundation; either version 2 of   
+;; the License, or (at your option) any later version.              
+;;                                                                  
+;; This program is distributed in the hope that it will be useful,  
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of   
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    
+;; GNU General Public License for more details.                     
+;;                                                                  
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, contact:
+;;
+;; Free Software Foundation           Voice:  +1-617-542-5942
+;; 59 Temple Place - Suite 330        Fax:    +1-617-542-2652
+;; Boston, MA  02111-1307,  USA       gnu at gnu.org
+;; 
+;; Based on work from:
+;; stylesheet-header.scm
+;; Copyright 2000 Bill Gribble <grib at gnumatic.com>
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+(define-module (gnucash report stylesheet-easy))
+
+(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
+(use-modules (gnucash gnc-module))
+
+(gnc:module-load "gnucash/report/report-system" 0)
+
+(define (easy-options)
+  (let* ((options (gnc:new-options))
+	 (opt-register 
+	  (lambda (opt) 
+	    (gnc:register-option options opt))))
+    (opt-register 
+     (gnc:make-string-option
+      (N_ "General")
+      (N_ "Preparer") "a"
+      (N_ "Name of person preparing the report") 
+      ""))
+    (opt-register 
+     (gnc:make-string-option
+      (N_ "General")
+      (N_ "Prepared for") "b"
+      (N_ "Name of organization or company prepared for") 
+      ""))
+    (opt-register 
+     (gnc:make-simple-boolean-option
+      (N_ "General")
+      (N_ "Show preparer info") "c"
+      (N_ "Name of organization or company") 
+      #f))
+    (opt-register 
+     (gnc:make-simple-boolean-option
+      (N_ "General")
+      (N_ "Enable Links") "c"
+      (N_ "Enable hyperlinks in reports") 
+      #t))
+    
+    (opt-register
+     (gnc:make-pixmap-option
+      (N_ "Images")
+      (N_ "Background Tile") "a" (N_ "Background tile for reports.")
+      ""))
+    (opt-register
+     (gnc:make-pixmap-option
+      (N_ "Images")
+      (N_ "Heading Banner") "b" (N_ "Banner for top of report.")
+      ""))
+    (opt-register
+     (gnc:make-multichoice-option
+      (N_ "Images")
+      (N_ "Heading Alignment") "c" (N_ "Banner for top of report.")
+      'left
+      (list (vector 'left
+                     (N_ "Left")
+                     (N_ "Align the banner to the left"))
+            (vector 'center
+                     (N_ "Center")
+                     (N_ "Align the banner in the center"))
+            (vector 'right
+                     (N_ "Right")
+                     (N_ "Align the banner to the right"))
+            )))
+    (opt-register
+     (gnc:make-pixmap-option
+      (N_ "Images")
+      (N_ "Logo") "d" (N_ "Company logo image.")
+      ""))
+
+    (opt-register
+     (gnc:make-color-option
+      (N_ "Colors")
+      (N_ "Background Color") "a" (N_ "General background color for report.")
+      (list #xff #xff #xff 0)
+      255 #f))      
+
+    (opt-register
+     (gnc:make-color-option
+      (N_ "Colors")
+      (N_ "Text Color") "b" (N_ "Normal body text color.")
+      (list #x00 #x00 #x00 0)
+      255 #f))      
+
+    (opt-register
+     (gnc:make-color-option
+      (N_ "Colors")
+      (N_ "Link Color") "c" (N_ "Link text color.")
+      (list #xb2 #x22 #x22 0)
+      255 #f))
+
+    (opt-register
+     (gnc:make-color-option
+      (N_ "Colors")
+      (N_ "Table Cell Color") "c" (N_ "Default background for table cells.")
+      (list #xff #xff #xff 0)
+      255 #f))      
+
+    (opt-register
+     (gnc:make-color-option
+      (N_ "Colors")
+      (N_ "Alternate Table Cell Color") "d"
+      (N_ "Default alternate background for table cells.")
+      (list #xff #xff #xff 0)
+      255 #f))
+
+    (opt-register
+     (gnc:make-color-option
+      (N_ "Colors")
+      (N_ "Subheading/Subtotal Cell Color") "e"
+      (N_ "Default color for subtotal rows.")
+      (list #xee #xe8 #xaa 0)
+      255 #f))
+
+    (opt-register
+     (gnc:make-color-option
+      (N_ "Colors")
+      (N_ "Sub-subheading/total Cell Color") "f"
+      (N_ "Color for subsubtotals")
+      (list #xfa #xfa #xd2 0)
+      255 #f))
+
+    (opt-register
+     (gnc:make-color-option
+      (N_ "Colors")
+      (N_ "Grand Total Cell Color") "g"
+      (N_ "Color for grand totals")
+      (list #xff #xff #x00 0)
+      255 #f))
+
+    (opt-register 
+     (gnc:make-number-range-option 
+      (N_ "Tables")
+      (N_ "Table cell spacing") "a" (N_ "Space between table cells")
+      1 0 20 0 1))
+
+    (opt-register 
+     (gnc:make-number-range-option 
+      (N_ "Tables")
+      (N_ "Table cell padding") "b" (N_ "Space between table cells")
+      1 0 20 0 1))
+
+    (opt-register 
+     (gnc:make-number-range-option 
+      (N_ "Tables")
+      (N_ "Table border width") "c" (N_ "Bevel depth on tables")
+      1 0 20 0 1))
+    options))
+
+(define (easy-renderer options doc)
+  (let* ((ssdoc (gnc:make-html-document))
+	 (opt-val 
+	  (lambda (section name)
+	    (gnc:option-value
+	     (gnc:lookup-option options section name))))
+	 (color-val
+	  (lambda (section name)
+	    (gnc:color-option->html
+	     (gnc:lookup-option options section name))))
+	 (preparer (opt-val (N_ "General") (N_ "Preparer")))
+	 (prepared-for (opt-val (N_ "General") (N_ "Prepared for")))
+	 (show-preparer? (opt-val (N_ "General") (N_ "Show preparer info")))
+	 (links? (opt-val (N_ "General") (N_ "Enable Links")))           
+	 (bgcolor (color-val (N_ "Colors") (N_ "Background Color")))
+	 (textcolor (color-val (N_ "Colors") (N_ "Text Color")))
+	 (linkcolor (color-val (N_ "Colors") (N_ "Link Color")))
+	 (normal-row-color (color-val (N_ "Colors") (N_ "Table Cell Color")))
+	 (alternate-row-color (color-val (N_ "Colors")
+					 (N_ "Alternate Table Cell Color")))
+	 (primary-subheading-color
+	  (color-val (N_ "Colors")
+		     (N_ "Subheading/Subtotal Cell Color")))
+	 (secondary-subheading-color
+	  (color-val (N_ "Colors") 
+		     (N_ "Sub-subheading/total Cell Color")))
+	 (grand-total-color (color-val (N_ "Colors")
+				       (N_ "Grand Total Cell Color")))
+	 (bgpixmap (opt-val (N_ "Images") (N_ "Background Tile")))
+	 (headpixmap (opt-val (N_ "Images") (N_ "Heading Banner")))
+	 (logopixmap (opt-val (N_ "Images") (N_ "Logo")))
+         (align (gnc:value->string(opt-val (N_ "Images") (N_ "Heading Alignment"))))
+	 (spacing (opt-val (N_ "Tables") (N_ "Table cell spacing")))
+	 (padding (opt-val (N_ "Tables") (N_ "Table cell padding")))
+	 (border (opt-val (N_ "Tables") (N_ "Table border width")))
+         (headcolumn 0))
+
+    ; center the document without elements inheriting anything
+    (gnc:html-document-add-object! ssdoc
+       (gnc:make-html-text "<center>"))
+
+    (gnc:html-document-set-style! 
+     ssdoc "body" 
+     'attribute (list "bgcolor" bgcolor)
+     'attribute (list "text" textcolor)
+     'attribute (list "link" linkcolor))
+
+    (gnc:html-document-set-style!
+     ssdoc "number-cell"
+     'tag "td"
+     'attribute (list "align" "right")
+     'attribute (list "nowrap"))
+
+    (if (and bgpixmap
+	     (not (string=? bgpixmap "")))
+	(gnc:html-document-set-style!
+	 ssdoc "body" 
+	 'attribute (list "background" bgpixmap)))
+    
+    (gnc:html-document-set-style!
+     ssdoc "table" 
+     'attribute (list "border" border)
+     'attribute (list "cellspacing" spacing)
+     'attribute (list "cellpadding" padding))
+
+    (gnc:html-document-set-style!
+     ssdoc "normal-row"
+     'attribute (list "bgcolor" normal-row-color)
+     'tag "tr")
+    (gnc:html-document-set-style!
+     ssdoc "alternate-row"
+     'attribute (list "bgcolor" alternate-row-color)
+     'tag "tr")       
+    (gnc:html-document-set-style!
+     ssdoc "primary-subheading"
+     'attribute (list "bgcolor" primary-subheading-color)
+     'tag "tr")       
+    (gnc:html-document-set-style!
+     ssdoc "secondary-subheading"
+     'attribute (list "bgcolor" secondary-subheading-color)
+     'tag "tr")       
+    (gnc:html-document-set-style!
+     ssdoc "grand-total"
+     'attribute (list "bgcolor" grand-total-color)
+     'tag "tr")   
+
+    (gnc:html-document-set-style!
+     ssdoc "text-cell"
+     'tag "td"
+     'attribute (list "align" "left"))
+
+    (gnc:html-document-set-style!
+     ssdoc "total-number-cell"
+     'tag '("td" "b")
+     'attribute (list "align" "right"))
+
+    (gnc:html-document-set-style!
+     ssdoc "total-label-cell"
+     'tag '("td" "b")
+     'attribute (list "align" "left"))
+
+    (gnc:html-document-set-style!
+     ssdoc "centered-label-cell"
+     'tag '("td" "b")
+     'attribute (list "align" "center"))
+
+    ;; don't surround marked-up links with <a> </a>
+    (if (not links?)
+	(gnc:html-document-set-style!
+	 ssdoc "a" 'tag ""))
+    
+    (let ((t (gnc:make-html-table)))
+      ;; we don't want a bevel for this table, but we don't want 
+      ;; that to propagate 
+      (gnc:html-table-set-style!
+       t "table" 
+       'attribute (list "border" 0)
+       'inheritable? #f)
+
+      ; set the header column to be the 2nd when we have a logo
+      ; do this so that when logo is not present, the document
+      ; is perfectly centered
+      (if (and logopixmap (> (string-length logopixmap) 0))
+        (set! headcolumn 1))
+
+      (gnc:html-table-set-cell! 
+       t 1 headcolumn
+       (if show-preparer? 
+	   ;; title plus preparer info 
+	   (gnc:make-html-text
+	    (gnc:html-markup-b 
+	     (gnc:html-document-title doc))  
+	    (gnc:html-markup-br)
+	    (_ "Prepared by: ")
+	    (gnc:html-markup-b preparer)
+	    (gnc:html-markup-br)
+	    (_ "Prepared for: ")
+	    (gnc:html-markup-b prepared-for)
+	    (gnc:html-markup-br)
+	    (_ "Date: ")
+	    (gnc:print-date 
+	     (cons (current-time) 0)))
+
+	   ;; title only 
+	   (gnc:make-html-text
+	    (gnc:html-markup-b 
+	     (gnc:html-document-title doc)))))
+      
+      ; only setup an image if we specified one
+      (if (and logopixmap (> (string-length logopixmap) 0))
+        (begin
+          (gnc:html-table-set-cell!
+            t 0 0
+            (gnc:make-html-text
+	      (gnc:html-markup-img logopixmap)))))
+      
+      (if (and headpixmap (> (string-length headpixmap) 0))
+        (begin
+          (gnc:html-table-set-cell!
+            t 0 headcolumn
+            (gnc:make-html-text 
+               (string-append 
+                 "<div align=\"" align "\">"
+                 "<img src=\"" headpixmap "\">"
+                 "</div>")))
+        )
+        (gnc:html-table-set-cell!
+          t 0 headcolumn
+          (gnc:make-html-text "&nbsp;")))
+      
+      (apply 
+       gnc:html-table-set-cell! 
+       t 2 headcolumn
+       (gnc:html-document-objects doc))
+      (gnc:html-document-add-object! ssdoc t))
+    ssdoc))
+
+(gnc:define-html-style-sheet 
+ 'version 1
+ 'name (N_ "Easy")
+ 'renderer easy-renderer
+ 'options-generator easy-options)
+
+(gnc:make-html-style-sheet "Easy" (N_ "Easy"))
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/stylesheets/Makefile.am,v
retrieving revision 1.6.4.2
retrieving revision 1.6.4.3
diff -Lsrc/report/stylesheets/Makefile.am -Lsrc/report/stylesheets/Makefile.am -u -r1.6.4.2 -r1.6.4.3
--- src/report/stylesheets/Makefile.am
+++ src/report/stylesheets/Makefile.am
@@ -39,7 +39,8 @@
 gncscmmod_DATA = \
   stylesheets.scm \
   stylesheet-plain.scm \
-  stylesheet-fancy.scm 
+  stylesheet-fancy.scm \
+  stylesheet-easy.scm
 
 uidir = $(GNC_UI_DIR)
 ui_DATA = \
Index: stylesheets.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/stylesheets/stylesheets.scm,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -Lsrc/report/stylesheets/stylesheets.scm -Lsrc/report/stylesheets/stylesheets.scm -u -r1.4 -r1.4.4.1
--- src/report/stylesheets/stylesheets.scm
+++ src/report/stylesheets/stylesheets.scm
@@ -10,3 +10,4 @@
 (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
 (use-modules (gnucash report stylesheet-plain))
 (use-modules (gnucash report stylesheet-fancy))
+(use-modules (gnucash report stylesheet-easy))
Index: dialog-commodity.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-commodity.c,v
retrieving revision 1.8.4.11
retrieving revision 1.8.4.12
diff -Lsrc/gnome-utils/dialog-commodity.c -Lsrc/gnome-utils/dialog-commodity.c -u -r1.8.4.11 -r1.8.4.12
--- src/gnome-utils/dialog-commodity.c
+++ src/gnome-utils/dialog-commodity.c
@@ -528,8 +528,6 @@
      if (node) {
        namespaces = g_list_remove_link (namespaces, node);
        g_list_free_1 (node);
-     } else {
-       node->data = "CURRENCY";
      }
 
      if (gnc_commodity_namespace_is_iso (init_string))
Index: dialog-account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-account.c,v
retrieving revision 1.5.4.19
retrieving revision 1.5.4.20
diff -Lsrc/gnome-utils/dialog-account.c -Lsrc/gnome-utils/dialog-account.c -u -r1.5.4.19 -r1.5.4.20
--- src/gnome-utils/dialog-account.c
+++ src/gnome-utils/dialog-account.c
@@ -1168,7 +1168,7 @@
     {
       text[0] = (gchar *) xaccAccountGetTypeStr(acct_type);
       row = gtk_clist_append(type_list, text);
-      gtk_clist_set_row_data(type_list, row, (gpointer)acct_type);
+      gtk_clist_set_row_data(type_list, row, GINT_TO_POINTER(acct_type));
     }
   }
   else
@@ -1191,7 +1191,7 @@
   if (aw->valid_types == NULL)
     return last_used_account_type;
 
-  if (g_list_index (aw->valid_types, (gpointer)last_used_account_type) != -1)
+  if (g_list_index (aw->valid_types, GINT_TO_POINTER(last_used_account_type)) != -1)
     return last_used_account_type;
 
   return ((GNCAccountType)(aw->valid_types->data));
Index: gnc-mdi-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-mdi-utils.c,v
retrieving revision 1.18.4.12
retrieving revision 1.18.4.13
diff -Lsrc/gnome-utils/gnc-mdi-utils.c -Lsrc/gnome-utils/gnc-mdi-utils.c -u -r1.18.4.12 -r1.18.4.13
--- src/gnome-utils/gnc-mdi-utils.c
+++ src/gnome-utils/gnc-mdi-utils.c
@@ -364,8 +364,8 @@
  */
 void
 gnc_mdi_child_auto_menu(GNCMDIChildInfo *mc,
-			GNCMDIAutoType type,
-			gchar *first_path, ...)
+                        GNCMDIAutoType type,
+                        gchar *first_path, ...)
 {
   GList *walker;
   va_list args;
@@ -374,10 +374,10 @@
   va_start(args, first_path);
   for (path = first_path; path != NULL; path = va_arg(args, gchar *)) {
     for (walker = g_list_first(mc->menu_names[type]);
-	 walker;
-	 walker = g_list_next(walker)) {
+         walker;
+         walker = g_list_next(walker)) {
       if (strcmp(path, walker->data) == 0)
-	break;
+        break;
     }
     if (walker) {
       /* Found. Don't add again. */
@@ -416,8 +416,8 @@
  */
 void
 gnc_mdi_child_auto_toolbar(GNCMDIChildInfo *mc,
-			   GNCMDIAutoType type,
-			   gchar *first_path, ...)
+                           GNCMDIAutoType type,
+                           gchar *first_path, ...)
 {
   GList *walker;
   gchar *path;
@@ -426,10 +426,10 @@
   va_start(args, first_path);
   for (path = first_path; path != NULL; path = va_arg(args, gchar *)) {
     for (walker = g_list_first(mc->toolbar_names[type]);
-	 walker;
-	 walker = g_list_next(walker)) {
+         walker;
+         walker = g_list_next(walker)) {
       if (strcmp(path, walker->data) == 0)
-	break;
+        break;
     }
     if (walker) {
       /* Found. Don't add again. */
@@ -762,7 +762,7 @@
  */
 void
 gnc_mdi_set_dispatch_cb (GNCMDIChildInfo * mc, GNCMDIDispatchType type,
-			 GtkCallback cb, gpointer data)
+                         GtkCallback cb, gpointer data)
 {
   g_return_if_fail(mc != NULL);
   g_return_if_fail(type < GNC_DISP_LAST);
@@ -812,7 +812,7 @@
       {
         if (oldbar->parent)
           gtk_widget_hide (GTK_WIDGET(oldbar)->parent);        
-	gnc_mdi_show_bars(childwin);
+          gnc_mdi_show_bars(childwin);
       }
     }
     else if (childwin->app)
@@ -873,7 +873,7 @@
   gnc_mdi_child_set_title (childwin);
 
   /* install menu hints if relevant */
-  if (mdi->active_child)
+  if (mdi && mdi->active_child)
   {
     /* the arg to this callback is SUPPOSED to be the last active child, 
      * but it gets to be NULL under some circumstances */
@@ -906,7 +906,7 @@
     if (mc && mc->toolbar) {
       gtk_toolbar_set_style (GTK_TOOLBAR(mc->toolbar), tbstyle);
       if (mc->app) {
-	gtk_widget_queue_resize(mc->app->dock);
+        gtk_widget_queue_resize(mc->app->dock);
       }
     }
   }
Index: gnc-query-list.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-query-list.c,v
retrieving revision 1.8.2.6
retrieving revision 1.8.2.7
diff -Lsrc/gnome-utils/gnc-query-list.c -Lsrc/gnome-utils/gnc-query-list.c -u -r1.8.2.6 -r1.8.2.7
--- src/gnome-utils/gnc-query-list.c
+++ src/gnome-utils/gnc-query-list.c
@@ -182,7 +182,7 @@
     if (safe_strcmp (type, QUERYCORE_BOOLEAN))
       continue;
 
-    result = (gboolean)(gnc_search_param_compute_value(param, entry));
+    result = (gboolean) GPOINTER_TO_INT(gnc_search_param_compute_value(param, entry));
     gnc_clist_set_check (clist, row, i, result);
   }
 }
Index: import-match-map.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-match-map.c,v
retrieving revision 1.4.4.3
retrieving revision 1.4.4.4
diff -Lsrc/import-export/import-match-map.c -Lsrc/import-export/import-match-map.c -u -r1.4.4.3 -r1.4.4.4
--- src/import-export/import-match-map.c
+++ src/import-export/import-match-map.c
@@ -238,7 +238,7 @@
 
     PINFO("P('%s') = '%d'\n", (char*)key, probability);
 
-    g_hash_table_insert(final_probabilities, key, (gpointer)probability);
+    g_hash_table_insert(final_probabilities, key, GINT_TO_POINTER(probability));
 }
 
 /** Frees an array of the same time that buildProperties built */
@@ -270,10 +270,10 @@
   struct account_info *account_i = (struct account_info*)data;
 
   /* if the current probability is greater than the stored, store the current */
-  if((gint32)value > account_i->probability)
+  if(GPOINTER_TO_INT(value) > account_i->probability)
     {
       /* Save the new highest probability and the assoaciated account name */
-      account_i->probability = (gint32)value;
+      account_i->probability = GPOINTER_TO_INT(value);
       account_i->account_name = key;
     }
 }
Index: import-backend.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-backend.c,v
retrieving revision 1.19.2.4
retrieving revision 1.19.2.5
diff -Lsrc/import-export/import-backend.c -Lsrc/import-export/import-backend.c -u -r1.19.2.4 -r1.19.2.5
--- src/import-export/import-backend.c
+++ src/import-export/import-backend.c
@@ -39,6 +39,7 @@
 #include "Account.h"
 #include "dialog-utils.h"
 #include "global-options.h"
+#include "Query.h"
 
 #include "gnc-engine-util.h"
 
@@ -58,7 +59,7 @@
 \********************************************************************/
 
 static const int MATCH_DATE_THRESHOLD=4; /*within 4 days*/
-static const int MATCH_DATE_NOT_THRESHOLD = 21;
+static const int MATCH_DATE_NOT_THRESHOLD = 14;
 /**Transaction's who have an online_id kvp frame have been downloaded 
   online can probably be skipped in the match list, since it is very 
   unlikely that they would match a transaction downloaded at a later
@@ -615,8 +616,11 @@
 	{
 	  /* If a transaction's amount doesn't match within the
 	     threshold, it's very unlikely to be the same transaction
-	     so we give it an extra -1 penality */
-	  prob = prob-1;
+	     so we give it an extra -5 penality. Changed 2004-11-27:
+	     The penalty is so high that we can forget about this
+	     split anyway and skip the rest of the tests. */
+	  return;
+	  /* prob = prob-5; */
 	  /* DEBUG("heuristics:  probability - 1 (amount)"); */
 	}
       
@@ -643,10 +647,13 @@
 	}
       else if (datediff_day > MATCH_DATE_NOT_THRESHOLD)
 	{
-	  /* Extra penalty if that split lies awfully far away
-	     from the given one. */
-	  prob = prob-10;
-	  /*DEBUG("heuristics:  probability - 10 (date)"); */
+	  /* Extra penalty if that split lies awfully far away from
+	     the given one. Changed 2004-11-27: The penalty is so high
+	     that we can forget about this split anyway and skip the
+	     rest of the tests. */
+	  return;
+	  /* prob = prob-5; */
+	  /*DEBUG("heuristics:  probability - 5 (date)"); */
 	}
       
       /* Check number heuristics */  
@@ -657,10 +664,16 @@
 		     xaccTransGetNum(xaccSplitGetParent(split)))
 	      ==0))
 	    {	
-	      /*An exact match of the Check number gives a +5 */
-	      prob = prob+5;
+	      /*An exact match of the Check number gives a +4 */
+	      prob = prob+4;
 	      /*DEBUG("heuristics:  probability + 5 (Check number)");*/
 	    }
+	  else if(strlen(xaccTransGetNum(gnc_import_TransInfo_get_trans (trans_info))) > 0 &&
+		  strlen(xaccTransGetNum(xaccSplitGetParent(split))) > 0)
+	    {
+	      /* If both number are not empty yet do not match, add a little extre penality */
+	      prob = prob-2;
+	    }
 	}
       
       /* Memo heuristics */  
@@ -758,13 +771,42 @@
 				   double fuzzy_amount_difference)
 {
   GList * list_element;
+  Query *query = xaccMallocQuery();
   g_assert (trans_info);
   
   /* Get list of splits of the originating account. */
-  list_element = 
-    g_list_first
-    (xaccAccountGetSplitList
-     (xaccSplitGetAccount (gnc_import_TransInfo_get_fsplit (trans_info))));
+  {
+    /* We used to traverse *all* splits of the account by using
+       xaccAccountGetSplitList, which is a bad idea because 90% of these
+       splits are outside the date range that is interesting. We should
+       rather use a query according to the date region, which is
+       implemented here. 
+    */
+    Account *importaccount = 
+      xaccSplitGetAccount (gnc_import_TransInfo_get_fsplit (trans_info));
+    time_t download_time = xaccTransGetDate (gnc_import_TransInfo_get_trans (trans_info));
+
+    xaccQuerySetBook (query, gnc_get_current_book());
+    xaccQueryAddSingleAccountMatch (query, importaccount,			    
+				    QOF_QUERY_AND);
+    xaccQueryAddDateMatchTT (query,
+			     TRUE, download_time - MATCH_DATE_NOT_THRESHOLD*86400/2,
+			     TRUE, download_time + MATCH_DATE_NOT_THRESHOLD*86400/2,
+			     QOF_QUERY_AND);
+    list_element = xaccQueryGetSplits (query);
+    /* Sigh. Doesnt help too much. We still create and run one query
+       for each imported transaction. Maybe it would improve
+       performance further if there is one single (master-)query at
+       the beginning, matching the full date range and all accounts in
+       question. However, this doesnt quite work because this function
+       here is called from each gnc_gen_trans_list_add_trans(), which
+       is called one at a time. Therefore the whole importer would
+       have to change its behaviour: Accept the imported txns via
+       gnc_gen_trans_list_add_trans(), and only when
+       gnc_gen_trans_list_run() is called, then calculate all the
+       different match candidates. Thats too much work for now.
+    */
+  }
 
   /* Traverse that list, calling split_find_match on each one. Note
      that xaccAccountForEachSplit is declared in Account.h but
@@ -775,6 +817,8 @@
 			process_threshold, fuzzy_amount_difference);
       list_element = g_list_next (list_element);
     }
+
+  xaccFreeQuery (query);
 }
 
 
Index: gnc-ofx-import.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/ofx/gnc-ofx-import.c,v
retrieving revision 1.28.4.5
retrieving revision 1.28.4.6
diff -Lsrc/import-export/ofx/gnc-ofx-import.c -Lsrc/import-export/ofx/gnc-ofx-import.c -u -r1.28.4.5 -r1.28.4.6
--- src/import-export/ofx/gnc-ofx-import.c
+++ src/import-export/ofx/gnc-ofx-import.c
@@ -1,4 +1,4 @@
-/********************************************************************\
+/*******************************************************************\
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
  * published by the Free Software Foundation; either version 2 of   *
@@ -66,64 +66,18 @@
    ofx_proc_transaction_cb can use it. */
 GNCImportMainMatcher *gnc_ofx_importer_gui = NULL;
 
-void gnc_file_ofx_import (void)
-{
-  extern int ofx_PARSER_msg;
-  extern int ofx_DEBUG_msg;
-  extern int ofx_WARNING_msg;
-  extern int ofx_ERROR_msg;
-  extern int ofx_INFO_msg;
-  extern int ofx_STATUS_msg;
-  char *filenames[3];
-  char *selected_filename;
-  char *default_dir;
-
-  ofx_PARSER_msg = false;
-  ofx_DEBUG_msg = false;
-  ofx_WARNING_msg = true;
-  ofx_ERROR_msg = true;
-  ofx_INFO_msg = true;
-  ofx_STATUS_msg = false;
-
-  ENTER(" ");
-
-  default_dir = gnc_lookup_string_option("__paths", "Import OFX", NULL);
-  if (default_dir == NULL)
-    gnc_init_default_directory(&default_dir);
-  selected_filename = gnc_file_dialog(_("Select an OFX/QFX file to process"),
-				      NULL,
-				      default_dir);
-
-  if(selected_filename!=NULL)
-    {
-      /* Remember the directory as the default. */
-      gnc_extract_directory(&default_dir, selected_filename);
-      gnc_set_string_option("__paths", "Import OFX", default_dir);
-      g_free(default_dir);
-
-      /*strncpy(file,selected_filename, 255);*/
-      DEBUG("Filename found: %s",selected_filename);
-      filenames[0]=NULL;
-      filenames[1]= (char *)selected_filename;
-      /*      filenames[1]=file;*/
-      filenames[2]=NULL;
-
-      /* Create the Generic transaction importer GUI. */
-      gnc_ofx_importer_gui = gnc_gen_trans_list_new(NULL, NULL, FALSE);
-
-      DEBUG("Opening selected file");
-      ofx_proc_file(2, filenames);
-      g_free(selected_filename);
-    }
-
-}
-
+/*
 int ofx_proc_status_cb(struct OfxStatusData data)
 {
   return 0;
 }
+*/
 
-int ofx_proc_security_cb(const struct OfxSecurityData data)
+int ofx_proc_security_cb(const struct OfxSecurityData data, void * security_user_data);
+int ofx_proc_transaction_cb(struct OfxTransactionData data, void * transaction_user_data);
+int ofx_proc_account_cb(struct OfxAccountData data, void * account_user_data);
+
+int ofx_proc_security_cb(const struct OfxSecurityData data, void * security_user_data)
 {
   char * tmp_exchange_code=NULL;
   char * tmp_default_fullname=NULL;
@@ -149,7 +103,7 @@
   return 0;
 }
 
-int ofx_proc_transaction_cb(struct OfxTransactionData data)
+int ofx_proc_transaction_cb(struct OfxTransactionData data, void * transaction_user_data)
 {
   char dest_string[255];
   time_t current_time; 
@@ -557,12 +511,14 @@
   return 0;
 }//end ofx_proc_transaction()
 
-int ofx_proc_statement_cb(struct OfxStatementData data)
+/*
+int ofx_proc_statement_cb(struct OfxStatementData data, void * statement_user_data)
 {
   return 0;
 }//end ofx_proc_statement()
+*/
 
-int ofx_proc_account_cb(struct OfxAccountData data)
+int ofx_proc_account_cb(struct OfxAccountData data, void * account_user_data)
 {
   Account *selected_account;
   gnc_commodity_table * commodity_table;
@@ -640,4 +596,62 @@
   return 0;
 }
 
+void gnc_file_ofx_import (void)
+{
+  extern int ofx_PARSER_msg;
+  extern int ofx_DEBUG_msg;
+  extern int ofx_WARNING_msg;
+  extern int ofx_ERROR_msg;
+  extern int ofx_INFO_msg;
+  extern int ofx_STATUS_msg;
+  const char *selected_filename;
+  char *default_dir;
+  LibofxContextPtr libofx_context = libofx_get_new_context();
+
+  ofx_PARSER_msg = false;
+  ofx_DEBUG_msg = false;
+  ofx_WARNING_msg = true;
+  ofx_ERROR_msg = true;
+  ofx_INFO_msg = true;
+  ofx_STATUS_msg = false;
+
+  gnc_should_log(MOD_IMPORT, GNC_LOG_TRACE);
+  DEBUG("gnc_file_ofx_import(): Begin...\n");
+
+  default_dir = gnc_lookup_string_option("__paths", "Import OFX", NULL);
+  if (default_dir == NULL)
+    gnc_init_default_directory(&default_dir);
+  selected_filename = gnc_file_dialog(_("Select an OFX/QFX file to process"),
+				      NULL,
+				      default_dir);
+
+  if(selected_filename!=NULL)
+    {
+      /* Remember the directory as the default. */
+      gnc_extract_directory(&default_dir, selected_filename);
+      gnc_set_string_option("__paths", "Import OFX", default_dir);
+      g_free(default_dir);
+
+      /*strncpy(file,selected_filename, 255);*/
+      DEBUG("Filename found: %s",selected_filename);
+
+      /* Create the Generic transaction importer GUI. */
+      gnc_ofx_importer_gui = gnc_gen_trans_list_new(NULL, NULL, FALSE);
+
+      /* Initialize libofx */
+
+      /*ofx_set_statement_cb(libofx_context, ofx_proc_statement_cb, 0);*/
+      ofx_set_account_cb(libofx_context, ofx_proc_account_cb, 0);
+      ofx_set_transaction_cb(libofx_context, ofx_proc_transaction_cb, 0);
+      ofx_set_security_cb(libofx_context, ofx_proc_security_cb, 0);
+      /*ofx_set_status_cb(libofx_context, ofx_proc_status_cb, 0);*/
+
+
+      DEBUG("Opening selected file");
+     libofx_proc_file(libofx_context, selected_filename, AUTODETECT);
+    }
+
+}
+
+
 /** @} */
Index: test-link.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/ofx/test/test-link.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -Lsrc/import-export/ofx/test/test-link.c -Lsrc/import-export/ofx/test/test-link.c -u -r1.1.4.1 -r1.1.4.2
--- src/import-export/ofx/test/test-link.c
+++ src/import-export/ofx/test/test-link.c
@@ -5,23 +5,3 @@
   return 0;
 }
 
-int ofx_proc_status_cb(struct OfxStatusData data)
-{
-	return 0;
-}
-int ofx_proc_security_cb(struct OfxSecurityData data)
-{
-	return 0;
-}
-int ofx_proc_transaction_cb(struct OfxTransactionData data)
-{
-	return 0;
-}
-int ofx_proc_statement_cb(struct OfxStatementData data)
-{
-	return 0;
-}
-int ofx_proc_account_cb(struct OfxAccountData data)
-{
-	return 0;
-}
Index: qif-objects.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-import/qif-objects.scm,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -Lsrc/import-export/qif-import/qif-objects.scm -Lsrc/import-export/qif-import/qif-objects.scm -u -r1.2.2.2 -r1.2.2.3
--- src/import-export/qif-import/qif-objects.scm
+++ src/import-export/qif-import/qif-objects.scm
@@ -358,6 +358,7 @@
 (define (make-qif-acct)
   (let ((retval (make-simple-obj <qif-acct>)))
     (qif-acct:set-type! retval "Bank")
+    (qif-acct:set-name! retval "Default Account")
     retval))
 
 (define qif-acct? 
Index: formulacell-gnome.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/formulacell-gnome.c,v
retrieving revision 1.2.4.1
retrieving revision 1.2.4.2
diff -Lsrc/register/register-gnome/formulacell-gnome.c -Lsrc/register/register-gnome/formulacell-gnome.c -u -r1.2.4.1 -r1.2.4.2
--- src/register/register-gnome/formulacell-gnome.c
+++ src/register/register-gnome/formulacell-gnome.c
@@ -60,7 +60,7 @@
     gunichar uc;
 
     if (event->type != GDK_KEY_PRESS)
-	return FALSE;
+        return FALSE;
 
     lc = gnc_localeconv ();
 
@@ -73,6 +73,7 @@
             if (!(event->state &
                   (GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_SHIFT_MASK)))
                 is_return = TRUE;
+            /* FALL THROUGH TO NEXT CASE */
 
         case GDK_KP_Enter:
             {
@@ -93,9 +94,9 @@
     }
 
     if (cell->print_info.monetary)
-	decimal_point = lc->mon_decimal_point[0];
+        decimal_point = lc->mon_decimal_point[0];
     else
-	decimal_point = lc->decimal_point[0];
+        decimal_point = lc->decimal_point[0];
 
     newval_gs = g_string_new ("");
     c = bcell->value;
Index: test-stuff.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/test-core/test-stuff.c,v
retrieving revision 1.7.6.1
retrieving revision 1.7.6.2
diff -Lsrc/test-core/test-stuff.c -Lsrc/test-core/test-stuff.c -u -r1.7.6.1 -r1.7.6.2
--- src/test-core/test-stuff.c
+++ src/test-core/test-stuff.c
@@ -321,22 +321,11 @@
 get_random_string_in_array(const char* str_list[])
 {
     int num;
-    const char *to_ret = NULL;
 
+	 /* count number of items in list */
     for(num = 0; str_list[num] != NULL; num++)
-    {
-        switch(get_random_int_in_range(0, num + 1))
-        {
-        case 0:
-            to_ret = str_list[num];
-        default:
-            if(str_list[num + 1] == NULL)
-            {
-                return to_ret;
-            }
-            to_ret = str_list[num + 1];
-        }
-    }
-
-    return to_ret;
+        ;
+	 
+	 num = get_random_int_in_range(0, num-1);
+	 return str_list[num];
 }


More information about the gnucash-changes mailing list