Change the way colours are imported by the CSV account tree importer

When importing the account tree CSV file, change the importing of
colours so that only valid colours for accounts are updated, invalid
colours will result in the account color key slot being removed.
This commit is contained in:
Robert Fewell
2018-12-11 10:47:15 +00:00
parent 7a1f981b0c
commit 43beeca079

View File

@@ -283,6 +283,8 @@ csv_account_import (CsvImportInfo *info)
{
if (gdk_rgba_parse (&testcolor, color))
xaccAccountSetColor (acc, color);
else
xaccAccountSetColor (acc, "");
}
if (g_strcmp0 (hidden, "T") == 0)
@@ -323,6 +325,8 @@ csv_account_import (CsvImportInfo *info)
{
if (gdk_rgba_parse (&testcolor, color))
xaccAccountSetColor (acc, color);
else
xaccAccountSetColor (acc, "");
}
if (g_strcmp0 (notes, "") != 0)