mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Remove a vertical black line from import matcher
When change a row to skipping it, a pixbuf is created with just a vertical black line and looks odd. There is no reason to create a pixbuf so change the value in the store to NULL. Do the same when the 'match missing' is displayed.
This commit is contained in:
parent
161bb5f65d
commit
d50d3de8b5
@ -1171,6 +1171,7 @@ refresh_model_row (GNCImportMainMatcher *gui,
|
|||||||
const gchar *ro_text;
|
const gchar *ro_text;
|
||||||
gchar *int_required_class, *int_prob_required_class, *int_not_required_class;
|
gchar *int_required_class, *int_prob_required_class, *int_not_required_class;
|
||||||
gchar *class_extension = NULL;
|
gchar *class_extension = NULL;
|
||||||
|
gboolean show_pixbuf = TRUE;
|
||||||
Split *split;
|
Split *split;
|
||||||
time64 date;
|
time64 date;
|
||||||
gnc_numeric amount;
|
gnc_numeric amount;
|
||||||
@ -1302,6 +1303,7 @@ refresh_model_row (GNCImportMainMatcher *gui,
|
|||||||
{
|
{
|
||||||
color = get_required_color (int_required_class);
|
color = get_required_color (int_required_class);
|
||||||
ro_text = _("Match missing!");
|
ro_text = _("Match missing!");
|
||||||
|
show_pixbuf = FALSE;
|
||||||
remove_child_row (model, iter);
|
remove_child_row (model, iter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1327,6 +1329,7 @@ refresh_model_row (GNCImportMainMatcher *gui,
|
|||||||
{
|
{
|
||||||
color = get_required_color (int_required_class);
|
color = get_required_color (int_required_class);
|
||||||
ro_text = _("Match missing!");
|
ro_text = _("Match missing!");
|
||||||
|
show_pixbuf = FALSE;
|
||||||
remove_child_row (model, iter);
|
remove_child_row (model, iter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1334,11 +1337,13 @@ refresh_model_row (GNCImportMainMatcher *gui,
|
|||||||
case GNCImport_SKIP:
|
case GNCImport_SKIP:
|
||||||
color = get_required_color (int_required_class);
|
color = get_required_color (int_required_class);
|
||||||
ro_text = _("Do not import (no action selected)");
|
ro_text = _("Do not import (no action selected)");
|
||||||
|
show_pixbuf = FALSE;
|
||||||
remove_child_row (model, iter);
|
remove_child_row (model, iter);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
color = "white";
|
color = "white";
|
||||||
ro_text = "WRITEME, this is an unknown action";
|
ro_text = "WRITEME, this is an unknown action";
|
||||||
|
show_pixbuf = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1360,14 +1365,8 @@ refresh_model_row (GNCImportMainMatcher *gui,
|
|||||||
-1);
|
-1);
|
||||||
if (gnc_import_TransInfo_get_action (info) == GNCImport_SKIP)
|
if (gnc_import_TransInfo_get_action (info) == GNCImport_SKIP)
|
||||||
{
|
{
|
||||||
/*Show the best match's confidence pixmap in the info column*/
|
/*If skipping the row, there is no best match's confidence pixmap*/
|
||||||
gtk_tree_store_set (store, iter,
|
gtk_tree_store_set (store, iter, DOWNLOADED_COL_ACTION_PIXBUF, NULL, -1);
|
||||||
DOWNLOADED_COL_ACTION_PIXBUF,
|
|
||||||
gen_probability_pixbuf (gnc_import_MatchInfo_get_probability
|
|
||||||
(gnc_import_TransInfo_get_selected_match (info)),
|
|
||||||
gui->user_settings,
|
|
||||||
GTK_WIDGET(gui->view)),
|
|
||||||
-1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_tree_store_set (store, iter,
|
gtk_tree_store_set (store, iter,
|
||||||
@ -1377,6 +1376,7 @@ refresh_model_row (GNCImportMainMatcher *gui,
|
|||||||
if (gnc_import_TransInfo_get_action (info) == GNCImport_CLEAR)
|
if (gnc_import_TransInfo_get_action (info) == GNCImport_CLEAR)
|
||||||
{
|
{
|
||||||
/*Show the best match's confidence pixmap in the info column*/
|
/*Show the best match's confidence pixmap in the info column*/
|
||||||
|
if (show_pixbuf)
|
||||||
gtk_tree_store_set (store, iter,
|
gtk_tree_store_set (store, iter,
|
||||||
DOWNLOADED_COL_ACTION_PIXBUF,
|
DOWNLOADED_COL_ACTION_PIXBUF,
|
||||||
gen_probability_pixbuf (gnc_import_MatchInfo_get_probability
|
gen_probability_pixbuf (gnc_import_MatchInfo_get_probability
|
||||||
@ -1384,6 +1384,8 @@ refresh_model_row (GNCImportMainMatcher *gui,
|
|||||||
gui->user_settings,
|
gui->user_settings,
|
||||||
GTK_WIDGET(gui->view)),
|
GTK_WIDGET(gui->view)),
|
||||||
-1);
|
-1);
|
||||||
|
else
|
||||||
|
gtk_tree_store_set (store, iter, DOWNLOADED_COL_ACTION_PIXBUF, NULL, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_tree_store_set (store, iter,
|
gtk_tree_store_set (store, iter,
|
||||||
@ -1393,6 +1395,7 @@ refresh_model_row (GNCImportMainMatcher *gui,
|
|||||||
if (gnc_import_TransInfo_get_action (info) == GNCImport_UPDATE)
|
if (gnc_import_TransInfo_get_action (info) == GNCImport_UPDATE)
|
||||||
{
|
{
|
||||||
/*Show the best match's confidence pixmap in the info column*/
|
/*Show the best match's confidence pixmap in the info column*/
|
||||||
|
if (show_pixbuf)
|
||||||
gtk_tree_store_set (store, iter,
|
gtk_tree_store_set (store, iter,
|
||||||
DOWNLOADED_COL_ACTION_PIXBUF,
|
DOWNLOADED_COL_ACTION_PIXBUF,
|
||||||
gen_probability_pixbuf (gnc_import_MatchInfo_get_probability
|
gen_probability_pixbuf (gnc_import_MatchInfo_get_probability
|
||||||
@ -1400,6 +1403,8 @@ refresh_model_row (GNCImportMainMatcher *gui,
|
|||||||
gui->user_settings,
|
gui->user_settings,
|
||||||
GTK_WIDGET(gui->view)),
|
GTK_WIDGET(gui->view)),
|
||||||
-1);
|
-1);
|
||||||
|
else
|
||||||
|
gtk_tree_store_set (store, iter, DOWNLOADED_COL_ACTION_PIXBUF, NULL, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// show child row if 'show matched info' is toggled
|
// show child row if 'show matched info' is toggled
|
||||||
|
Loading…
Reference in New Issue
Block a user