mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2002-11-18 Benoit Gr�goire <bock@step.polymtl.ca>
* src/import-export/Transaction-matcher.c: Remove constant length strings and replace with moving pointers. I wish _("string") could be used as a could initializer like "string" can... git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7499 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
ed7e5bfc88
commit
7b07c0e188
@ -1,3 +1,8 @@
|
||||
2002-11-18 Benoit Grégoire <bock@step.polymtl.ca>
|
||||
* src/import-export/Transaction-matcher.c: Remove constant length
|
||||
strings and replace with moving pointers. I wish _("string")
|
||||
could be used as a could initializer like "string" can...
|
||||
|
||||
2002-11-17 Joshua Sled <jsled@asynchronous.org>
|
||||
|
||||
* src/gnome/dialog-sxsincelast.c:
|
||||
|
@ -84,13 +84,19 @@ struct _transmatcherdialog {
|
||||
GtkCList * downloaded_clist;
|
||||
GtkCList * match_clist;
|
||||
struct _transactioninfo * selected_trans_info;
|
||||
|
||||
char * action_add_text;
|
||||
char * action_reconcile_text;
|
||||
char * action_replace_text;
|
||||
char * action_ignore_text;
|
||||
};
|
||||
|
||||
struct _transactioninfo
|
||||
{
|
||||
|
||||
Transaction * trans;
|
||||
Split * first_split;
|
||||
char action_text[10];
|
||||
const char * action_text;
|
||||
char date_text[20];
|
||||
char amount_text[20];
|
||||
char balance_text[20];
|
||||
@ -320,13 +326,13 @@ static void downloaded_transaction_refresh_gui( struct _transmatcherdialog * mat
|
||||
transaction_info);
|
||||
switch(transaction_info->action)
|
||||
{
|
||||
case ADD: strncpy(transaction_info->action_text,_("ADD"),sizeof(transaction_info->action_text));
|
||||
case ADD: transaction_info->action_text = matcher->action_add_text;
|
||||
break;
|
||||
case RECONCILE: strncpy(transaction_info->action_text,_("RECONCILE"),sizeof(transaction_info->action_text));
|
||||
case RECONCILE: transaction_info->action_text= matcher->action_reconcile_text;
|
||||
break;
|
||||
case REPLACE: strncpy(transaction_info->action_text,_("REPLACE"),sizeof(transaction_info->action_text));
|
||||
case REPLACE:transaction_info->action_text=matcher->action_replace_text;
|
||||
break;
|
||||
case IGNORE: strncpy(transaction_info->action_text,_("IGNORE"),sizeof(transaction_info->action_text));
|
||||
case IGNORE: transaction_info->action_text=matcher->action_ignore_text;
|
||||
break;
|
||||
default:
|
||||
PERR("Unknown action");
|
||||
@ -610,6 +616,10 @@ on_matcher_cancel_clicked (GtkButton *button,
|
||||
gtk_clist_clear(matcher->downloaded_clist);
|
||||
matcher->initialised=FALSE;
|
||||
gtk_widget_destroy(matcher->transaction_matcher);
|
||||
g_free (matcher->action_add_text);
|
||||
g_free (matcher->action_reconcile_text);
|
||||
g_free (matcher->action_replace_text);
|
||||
g_free (matcher->action_ignore_text);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -692,6 +702,11 @@ init_matcher_gui(struct _transmatcherdialog * matcher)
|
||||
matcher->downloaded_clist = (GtkCList *)glade_xml_get_widget (xml, "downloaded_clist");
|
||||
matcher->match_clist = (GtkCList *)glade_xml_get_widget (xml, "match_clist");
|
||||
|
||||
matcher->action_add_text = g_strdup(_("ADD"));
|
||||
matcher->action_reconcile_text = g_strdup(_("RECONCILE"));
|
||||
matcher->action_replace_text = g_strdup(_("REPLACE"));
|
||||
matcher->action_ignore_text = g_strdup(_("IGNORE"));
|
||||
|
||||
gtk_widget_show(matcher->transaction_matcher);
|
||||
matcher->initialised=TRUE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user