2002-12-9 Benoit Gr�goire <bock@step.polymtl.ca>

* src/import-export/import-main-matcher.c:
	* src/import-export/generic-import.glade: Change colors, remove
	imbalance column and put it's info into the "Select action column",
	 when appropriate.  Change many strings after discussion with
	Wilddev.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7665 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Benoit Grégoire
2002-12-09 05:34:33 +00:00
parent 91b9ba5590
commit b7e686ad4e
3 changed files with 42 additions and 60 deletions

View File

@@ -1,3 +1,10 @@
2002-12-9 Benoit Gr<47>goire <bock@step.polymtl.ca>
* src/import-export/import-main-matcher.c:
* src/import-export/generic-import.glade: Change colors, remove
imbalance column and put it's info into the "Select action column",
when appropriate. Change many strings after discussion with
Wilddev.
2002-12-8 Benoit Gr<47>goire <bock@step.polymtl.ca>
* src/import-export/import-account-matcher.c,h: Add param to
gnc_import_select_account():

View File

@@ -28,7 +28,7 @@
<modal>False</modal>
<default_width>800</default_width>
<default_height>600</default_height>
<allow_shrink>False</allow_shrink>
<allow_shrink>True</allow_shrink>
<allow_grow>True</allow_grow>
<auto_shrink>False</auto_shrink>
<auto_close>False</auto_close>
@@ -244,7 +244,7 @@
<modal>False</modal>
<default_width>1000</default_width>
<default_height>600</default_height>
<allow_shrink>False</allow_shrink>
<allow_shrink>True</allow_shrink>
<allow_grow>True</allow_grow>
<auto_shrink>False</auto_shrink>
<auto_close>False</auto_close>
@@ -363,8 +363,8 @@
<handler>downloaded_transaction_unselect_cb</handler>
<last_modification_time>Thu, 22 Aug 2002 02:05:02 GMT</last_modification_time>
</signal>
<columns>10</columns>
<column_widths>67,89,49,109,43,58,32,29,34,33</column_widths>
<columns>9</columns>
<column_widths>67,89,49,109,43,58,32,29,34</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>True</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
@@ -434,24 +434,11 @@
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label847730</name>
<label>Imbalance</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label847786</name>
<label>ADD</label>
<label>A</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
@@ -464,7 +451,7 @@
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label847787</name>
<label>RECONCILE</label>
<label>R</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
@@ -490,7 +477,7 @@
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label847789</name>
<label>Specific action to be taken</label>
<label>Select Import Action</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
@@ -508,7 +495,10 @@
-Yellow transactions probably require your intervention or they will be imported unbalanced.
-Green transactions will be imported balanced (you may still want to double check the match or destination account).
Click in &quot;Specific action to be taken&quot; to change the matching transaction to reconcile, or the destination account of the auto-balance split (if required).</label>
-Select &quot;A&quot; to Add the transaction as new
-Select &quot;R&quot; to Reconcile a matching transaction
-Select neither to Skip (The transaction won't be imported at all)
-&quot;Select Import Action&quot; allows you to change the matching transaction to reconcile, or the destination account of the auto-balance split (if required).</label>
<justify>GTK_JUSTIFY_LEFT</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
@@ -539,7 +529,7 @@ Click in &quot;Specific action to be taken&quot; to change the matching transact
<modal>False</modal>
<default_width>800</default_width>
<default_height>600</default_height>
<allow_shrink>False</allow_shrink>
<allow_shrink>True</allow_shrink>
<allow_grow>True</allow_grow>
<auto_shrink>False</auto_shrink>
<auto_close>True</auto_close>
@@ -789,7 +779,7 @@ click &quot;Ok&quot;.</label>
<modal>False</modal>
<default_width>800</default_width>
<default_height>600</default_height>
<allow_shrink>False</allow_shrink>
<allow_shrink>True</allow_shrink>
<allow_grow>True</allow_grow>
<auto_shrink>False</auto_shrink>
<auto_close>False</auto_close>

View File

@@ -56,17 +56,16 @@ struct _generic_transaction_info
int selected_row;
};
#define NUM_COLUMNS_DOWNLOADED_CLIST 10
#define NUM_COLUMNS_DOWNLOADED_CLIST 9
#define DOWNLOADED_CLIST_ACCOUNT 1
#define DOWNLOADED_CLIST_DATE 0
#define DOWNLOADED_CLIST_AMOUNT 2
#define DOWNLOADED_CLIST_DESCRIPTION 3
#define DOWNLOADED_CLIST_MEMO 4
#define DOWNLOADED_CLIST_IMBALANCE 5
#define DOWNLOADED_CLIST_ACTION_ADD 6
#define DOWNLOADED_CLIST_ACTION_CLEAR 7
#define DOWNLOADED_CLIST_ACTION_EDIT 8
#define DOWNLOADED_CLIST_ACTION_INFO 9
#define DOWNLOADED_CLIST_ACTION_ADD 5
#define DOWNLOADED_CLIST_ACTION_CLEAR 6
#define DOWNLOADED_CLIST_ACTION_EDIT 7
#define DOWNLOADED_CLIST_ACTION_INFO 8
static short module = MOD_IMPORT;
static char * fleche_xpm[] = {
@@ -429,13 +428,13 @@ GNCGenTransaction *gnc_gen_trans_list_new (GtkWidget *parent,
checkbox_unchecked_xpm);
/*Initialise the colors */
info->color_back_red.red=65535;
info->color_back_red.green=32766;
info->color_back_red.blue=32766;
info->color_back_red.green=16383;
info->color_back_red.blue=16383;
info->color_back_green.red=49151;
info->color_back_green.green=65535;
info->color_back_green.blue=49151;
info->color_back_yellow.red=65535;
info->color_back_yellow.green=65535;
info->color_back_yellow.green=55255;
info->color_back_yellow.blue=0;
info->color_back_white.red=65535;
info->color_back_white.green=65535;
@@ -447,9 +446,6 @@ GNCGenTransaction *gnc_gen_trans_list_new (GtkWidget *parent,
gtk_clist_set_column_auto_resize (GTK_CLIST (info->clist),
DOWNLOADED_CLIST_AMOUNT,
TRUE);
gtk_clist_set_column_auto_resize (GTK_CLIST (info->clist),
DOWNLOADED_CLIST_IMBALANCE,
TRUE);
gtk_clist_set_column_auto_resize (GTK_CLIST (info->clist),
DOWNLOADED_CLIST_ACTION_ADD,
TRUE);
@@ -532,7 +528,7 @@ refresh_clist_row (GNCGenTransaction *gui,
char *text[NUM_COLUMNS_DOWNLOADED_CLIST];
char **old_text = g_new(char *, NUM_COLUMNS_DOWNLOADED_CLIST);/* Should be g_new?*/
gint i;
gchar *tmp;
gchar *tmp,*imbalance;
g_assert (gui);
g_assert (info);
DEBUG("Begin");
@@ -582,21 +578,6 @@ refresh_clist_row (GNCGenTransaction *gui,
DOWNLOADED_CLIST_MEMO,
text[DOWNLOADED_CLIST_MEMO]);
/*Imbalance*/
if(gnc_import_TransInfo_is_balanced(info)==TRUE)
{
text[DOWNLOADED_CLIST_IMBALANCE]=g_strdup("");
}
else
{
text[DOWNLOADED_CLIST_IMBALANCE]=g_strdup(xaccPrintAmount (xaccTransGetImbalance(gnc_import_TransInfo_get_trans(info) ),
gnc_commodity_print_info (xaccTransGetCurrency(gnc_import_TransInfo_get_trans (info)),TRUE) )
);
}
gtk_clist_set_text (GTK_CLIST (gui->clist), row_number,
DOWNLOADED_CLIST_IMBALANCE,
text[DOWNLOADED_CLIST_IMBALANCE]);
/*Actions*/
text[DOWNLOADED_CLIST_ACTION_ADD] = g_strdup("");
text[DOWNLOADED_CLIST_ACTION_CLEAR] = g_strdup("");
@@ -610,12 +591,14 @@ refresh_clist_row (GNCGenTransaction *gui,
case GNCImport_ADD:
if(gnc_import_TransInfo_is_balanced(info)==TRUE)
{
text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup(_("Add, transaction already balanced"));
text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup(_("New, already balanced"));
gtk_clist_set_background (GTK_CLIST (gui->clist), row_number,
&(gui->color_back_green));
}
else
{
imbalance=g_strdup(xaccPrintAmount (gnc_numeric_neg(xaccTransGetImbalance(gnc_import_TransInfo_get_trans(info) )),
gnc_commodity_print_info (xaccTransGetCurrency(gnc_import_TransInfo_get_trans (info)),TRUE) ));
if (gnc_import_TransInfo_get_destacc (info) != NULL)
{
gtk_clist_set_background (GTK_CLIST (gui->clist), row_number,
@@ -625,20 +608,22 @@ refresh_clist_row (GNCGenTransaction *gui,
gnc_get_account_separator ());
if(gnc_import_TransInfo_get_destacc_selected_manually(info)==TRUE)
{
text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup_printf(_("Add, auto-balance into (user-selected) \"%s\""),tmp);
text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup_printf(_("New, transfer %s to (manual) \"%s\""),imbalance,tmp);
}
else
{
text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup_printf(_("Add, auto-balance into (auto-selected) \"%s\""),tmp);
text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup_printf(_("New, transfer %s to (auto) \"%s\""),imbalance,tmp);
}
free (tmp);
g_free (tmp);
}
else
{
gtk_clist_set_background (GTK_CLIST (gui->clist), row_number,
&(gui->color_back_yellow));
text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup(_("Add UNBALANCED (no auto-balance account)"));
text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup_printf(_("New, UNBALANCED (need acct to transfer %s)!"),imbalance);
}
g_free (imbalance);
}
break;
case GNCImport_CLEAR:
@@ -648,24 +633,24 @@ refresh_clist_row (GNCGenTransaction *gui,
&(gui->color_back_green));
if(gnc_import_TransInfo_get_match_selected_manually(info)==TRUE)
{
text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup(_("Reconcile (user-selected) match"));
text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup(_("Reconcile (manual) match"));
}
else
{
text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup(_("Reconcile (auto-selected) match"));
text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup(_("Reconcile (auto) match"));
}
}
else
{
gtk_clist_set_background (GTK_CLIST (gui->clist), row_number,
&(gui->color_back_red));
text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup_printf(_("Please select a match (or another action)"));
text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup_printf(_("Match missing!"));
}
break;
case GNCImport_EDIT: text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup("NOT SUPPORTED YET!");
break;
case GNCImport_SKIP:
text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup(_("Skip this transaction (no action selected)"));
text[DOWNLOADED_CLIST_ACTION_INFO] = g_strdup(_("Do not import (no action selected)"));
gtk_clist_set_background (GTK_CLIST (gui->clist), row_number,
&(gui->color_back_red));
break;