mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2002-12-14 Christian Stimming <stimming@tuhh.de>
* src/import-export/hbci/gnc-hbci-gettrans.c: Switch to always using the import-main-matcher. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7682 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
09996768ef
commit
ef48c2edd5
@ -1,3 +1,8 @@
|
||||
2002-12-14 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/import-export/hbci/gnc-hbci-gettrans.c: Switch to always
|
||||
using the import-main-matcher.
|
||||
|
||||
2002-12-13 Chris Lyttle <chris@wilddev.net>
|
||||
|
||||
* rpm/gnucash.spec.in: fix for problem reports on gnucash-user
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "Transaction.h"
|
||||
#include "gnc-engine-util.h"
|
||||
|
||||
#include "gnc-gen-transaction.h"
|
||||
/*#include "gnc-gen-transaction.h"*/
|
||||
#include "import-main-matcher.h"
|
||||
#include "global-options.h"
|
||||
|
||||
@ -44,16 +44,16 @@
|
||||
|
||||
/* static short module = MOD_IMPORT; */
|
||||
|
||||
static const gboolean DEFAULT_USE_GENERIC_MATCHER = FALSE;
|
||||
/*static const gboolean DEFAULT_USE_GENERIC_MATCHER = FALSE; */
|
||||
|
||||
static void *trans_list_cb (const HBCI_Transaction *trans, void *user_data);
|
||||
|
||||
struct trans_list_data
|
||||
{
|
||||
Account *gnc_acc;
|
||||
GNCGenTransaction *importer;
|
||||
/*GNCGenTransaction *importer;*/
|
||||
GNCImportMainMatcher *importer_generic;
|
||||
gboolean use_generic_matcher;
|
||||
/*gboolean use_generic_matcher;*/
|
||||
};
|
||||
|
||||
|
||||
@ -190,38 +190,38 @@ gnc_hbci_gettrans (GtkWidget *parent, Account *gnc_acc)
|
||||
|
||||
if (list_HBCI_Transaction_size(trans_list) > 0) {
|
||||
struct trans_list_data data;
|
||||
GNCGenTransaction *importer_gui = NULL;
|
||||
/*GNCGenTransaction *importer_gui = NULL;*/
|
||||
GNCImportMainMatcher *importer_generic_gui = NULL;
|
||||
|
||||
data.use_generic_matcher =
|
||||
gnc_lookup_boolean_option("Online Banking & Importing",
|
||||
"HBCI Use generic import matcher",
|
||||
DEFAULT_USE_GENERIC_MATCHER);
|
||||
|
||||
if(data.use_generic_matcher == TRUE)
|
||||
{
|
||||
importer_generic_gui = gnc_gen_trans_list_new(NULL, NULL, TRUE);
|
||||
data.importer_generic = importer_generic_gui;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*data.use_generic_matcher =
|
||||
gnc_lookup_boolean_option("Online Banking & Importing",
|
||||
"HBCI Use generic import matcher",
|
||||
DEFAULT_USE_GENERIC_MATCHER);
|
||||
|
||||
if(data.use_generic_matcher == TRUE)
|
||||
{*/
|
||||
importer_generic_gui = gnc_gen_trans_list_new(NULL, NULL, TRUE);
|
||||
data.importer_generic = importer_generic_gui;
|
||||
/* }
|
||||
else
|
||||
{
|
||||
importer_gui = gnc_gen_trans_new (NULL, NULL);
|
||||
gnc_gen_trans_freeze (importer_gui);
|
||||
gnc_gen_trans_set_fuzzy_amount (importer_gui, 0.0);
|
||||
data.importer = importer_gui;
|
||||
}
|
||||
}*/
|
||||
data.gnc_acc = gnc_acc;
|
||||
|
||||
list_HBCI_Transaction_foreach (trans_list, trans_list_cb, &data);
|
||||
|
||||
if(data.use_generic_matcher == FALSE)
|
||||
gnc_gen_trans_thaw (importer_gui);
|
||||
/*if(data.use_generic_matcher == FALSE)
|
||||
gnc_gen_trans_thaw (importer_gui);*/
|
||||
|
||||
GNCInteractor_hide (interactor);
|
||||
if(data.use_generic_matcher == TRUE)
|
||||
gnc_gen_trans_list_run (importer_generic_gui);
|
||||
else
|
||||
gnc_gen_trans_run (importer_gui);
|
||||
/*if(data.use_generic_matcher == TRUE)*/
|
||||
gnc_gen_trans_list_run (importer_generic_gui);
|
||||
/*else
|
||||
gnc_gen_trans_run (importer_gui);*/
|
||||
|
||||
}
|
||||
else {
|
||||
@ -324,15 +324,15 @@ static void *trans_list_cb (const HBCI_Transaction *h_trans,
|
||||
|
||||
/* Instead of xaccTransCommitEdit(gnc_trans) */
|
||||
/*gnc_import_add_trans(gnc_trans);*/
|
||||
if(data->use_generic_matcher == TRUE)
|
||||
/*if(data->use_generic_matcher == TRUE)
|
||||
{*/
|
||||
g_assert (data->importer_generic);
|
||||
gnc_gen_trans_list_add_trans (data->importer_generic, gnc_trans);
|
||||
/*}
|
||||
else
|
||||
{
|
||||
g_assert (data->importer_generic);
|
||||
gnc_gen_trans_list_add_trans (data->importer_generic, gnc_trans);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_assert (data->importer);
|
||||
gnc_gen_trans_add_trans (data->importer, gnc_trans);
|
||||
}
|
||||
g_assert (data->importer);
|
||||
gnc_gen_trans_add_trans (data->importer, gnc_trans);
|
||||
}*/
|
||||
return NULL;
|
||||
}
|
||||
|
@ -41,8 +41,8 @@
|
||||
(gnc:make-internal-option
|
||||
"__gui" "hbci_close_on_finish" 1))
|
||||
|
||||
(gnc:register-configuration-option
|
||||
(gnc:make-simple-boolean-option
|
||||
(N_ "Online Banking & Importing") (N_ "HBCI Use generic import matcher")
|
||||
"b" (N_ "Use the transaction matcher from the generic import infrastructure instead of the HBCI specific one")
|
||||
#f))
|
||||
;(gnc:register-configuration-option
|
||||
; (gnc:make-simple-boolean-option
|
||||
; (N_ "Online Banking & Importing") (N_ "HBCI Use generic import matcher")
|
||||
; "b" (N_ "Use the transaction matcher from the generic import infrastructure instead of the HBCI specific one")
|
||||
; #f))
|
Loading…
Reference in New Issue
Block a user