2002-10-20 Benoit Gr�goire <bock@step.polymtl.ca>

* src/import-export/Trasaction-matcher.c: Fix compiler warnings.
	* src/import-export/ofx/gnc-ofx-import.c: Give the user more information for account creation.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7366 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Benoit Grégoire 2002-10-21 01:39:47 +00:00
parent 708bfc5bc8
commit 5b5cded278
5 changed files with 38 additions and 10 deletions

View File

@ -1,3 +1,7 @@
2002-10-20 Benoit Grégoire <bock@step.polymtl.ca>
* src/import-export/Trasaction-matcher.c: Fix compiler warnings.
* src/import-export/ofx/gnc-ofx-import.c: Give the user more information for account creation.
2002-10-20 Derek Atkins <derek@ihtfp.com>
* configure.in -- remove -Wno-uninitialized -Wno-unused, in preparation
for the "new g-wrap" which should output code that wont cause these

View File

@ -33,7 +33,7 @@
#include <glade/glade.h>
#include <stdlib.h>
#include <stdlib.h>
#include <math.h>
#include "gnc-generic-import.h"
#include "Account.h"
@ -108,7 +108,7 @@ struct _transactioninfo
char action_text[10];
char date_text[20];
char amount_text[20];
char * clist_text[NUM_COLUMNS_DOWNLOADED_CLIST];
const char * clist_text[NUM_COLUMNS_DOWNLOADED_CLIST];
GList * match_list;
struct _matchinfo * selected_match_info;
Action action;
@ -125,7 +125,7 @@ struct _matchinfo
char probability_text[10];
char date_text[20];
char amount_text[20];
char * clist_text[NUM_COLUMNS_MATCHER_CLIST];
const char * clist_text[NUM_COLUMNS_MATCHER_CLIST];
};
static void downloaded_transaction_refresh_gui( struct _transmatcherdialog * matcher,struct _transactioninfo * transaction_info)
@ -177,7 +177,7 @@ if(transaction_info==matcher->selected_trans_info)
gnc_numeric_to_double(xaccSplitGetAmount(transaction_info->first_split)));
transaction_info->clist_text[DOWNLOADED_CLIST_AMOUNT]=transaction_info->amount_text;
transaction_info->clist_text[DOWNLOADED_CLIST_DESCRIPTION]=xaccTransGetDescription(transaction_info->trans);
transaction_info->clist_text[DOWNLOADED_CLIST_DESCRIPTION]==xaccTransGetDescription(transaction_info->trans);
transaction_info->clist_text[DOWNLOADED_CLIST_MEMO]=xaccSplitGetMemo(transaction_info->first_split);
@ -218,7 +218,7 @@ downloaded_transaction_select_cb (GtkCList *clist,
{
match_info = list_element->data;
row_number = gtk_clist_append(matcher->match_clist,
match_info->clist_text);
(char **)(match_info->clist_text));
gtk_clist_set_row_data (matcher->match_clist,
row_number,
match_info);
@ -757,7 +757,7 @@ void gnc_import_add_trans(Transaction *trans)
}
row_number = gtk_clist_append(matcher->downloaded_clist,
transaction_info->clist_text);
(char **)(transaction_info->clist_text));
gtk_clist_set_row_data_full(matcher->downloaded_clist,
row_number,
transaction_info,

View File

@ -102,7 +102,7 @@
<name>online_id_label</name>
<label>Online account ID here...</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>True</wrap>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>

View File

@ -42,7 +42,8 @@ AM_CFLAGS = \
-I${top_srcdir}/src/gnome-utils \
-I${top_srcdir}/src/import-export \
${GLIB_CFLAGS} \
${LIBOFX_CFLAGS}
${LIBOFX_CFLAGS} \
${GTKHTML_CFLAGS}
EXTRA_DIST = \
.cvsignore

View File

@ -23,6 +23,19 @@
#define _GNU_SOURCE
#include "config.h"
#include <stdio.h>
@ -43,6 +56,10 @@
#include "gnc-book.h"
#include "gnc-ui-util.h"
#include "dialog-utils.h"
static short module = MOD_IMPORT;
/********************************************************************\
* gnc_file_ofx_import
@ -76,7 +93,7 @@ void gnc_file_ofx_import (void)
gnc_should_log(MOD_IMPORT, GNC_LOG_TRACE);
DEBUG("gnc_file_ofx_import(): Begin...\n");
selected_filename = gnc_file_dialog("Select an OFX/QFX file to process",
selected_filename = gnc_file_dialog(_("Select an OFX/QFX file to process"),
NULL,
NULL);
@ -131,6 +148,7 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data)
time_t current_time;
Account *account;
Account *investment_account;
gchar investment_account_text[256] = "";
gnc_commodity *investment_commodity;
GNCBook *book;
Transaction *transaction;
@ -289,7 +307,12 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data)
NULL);
if(investment_commodity!=NULL)
{
investment_account = gnc_import_select_account(data.unique_id, 1, data.security_data_ptr->secname, investment_commodity, STOCK);
strncat(investment_account_text,
_("A Stock or Mutual Fund account for the following security: \""),
sizeof(investment_account_text)-strlen(investment_account_text));
strncat(investment_account_text,data.security_data_ptr->secname,sizeof(investment_account_text)-strlen(investment_account_text));
strncat(investment_account_text,_("\"\nWarning: Ofx investment transactions require two accounts."),sizeof(investment_account_text)-strlen(investment_account_text));
investment_account = gnc_import_select_account(data.unique_id, 1, investment_account_text, investment_commodity, STOCK);
if(investment_account!=NULL&&data.unitprice_valid==true&&data.units_valid==true)
{