From b20a836c6907af031c430d2758cb676e06ca0437 Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Sun, 24 Nov 2002 21:41:10 +0000 Subject: [PATCH] 2002-11-24 Christian Stimming * src/import-export/ofx/gnc-ofx-import.c: As a trial, use new generic transaction importer GUI. Changes are marked with 'CS:'. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7540 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 5 +++++ src/import-export/ofx/gnc-ofx-import.c | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0eb3c889cc..2b3856d226 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-11-24 Christian Stimming + + * src/import-export/ofx/gnc-ofx-import.c: As a trial, use new + generic transaction importer GUI. Changes are marked with 'CS:'. + 2002-11-24 Derek Atkins * src/engine/Account.c -- fix some compiler warnings diff --git a/src/import-export/ofx/gnc-ofx-import.c b/src/import-export/ofx/gnc-ofx-import.c index 90f5c32a59..cb99bde2db 100644 --- a/src/import-export/ofx/gnc-ofx-import.c +++ b/src/import-export/ofx/gnc-ofx-import.c @@ -43,7 +43,7 @@ #include "gnc-engine-util.h" #include "gnc-book.h" #include "gnc-ui-util.h" - +#include "gnc-gen-transaction.h" #include "dialog-utils.h" @@ -60,6 +60,10 @@ SCM scm_gnc_file_ofx_import () return SCM_EOL; } +/* CS: Store the reference to the created importer gui so that the + ofx_proc_transaction_cb can use it. */ +GNCGenTransaction *gnc_ofx_importer_gui = NULL; + void gnc_file_ofx_import (void) { extern int ofx_PARSER_msg; @@ -93,6 +97,9 @@ void gnc_file_ofx_import (void) filenames[1]= (char *)selected_filename; /* filenames[1]=file;*/ filenames[2]=NULL; + + /* CS: Create the Generic transaction importer GUI. */ + gnc_ofx_importer_gui = gnc_gen_trans_new(NULL, NULL); DEBUG("Opening selected file"); ofx_proc_file(2, filenames); } @@ -490,7 +497,10 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data) } - gnc_import_add_trans(transaction); + /* Previous importer GUI: gnc_import_add_trans(transaction); */ + /* CS: Use new importer GUI. */ + if (gnc_ofx_importer_gui) + gnc_gen_trans_add_trans (gnc_ofx_importer_gui, transaction); } else {