Previously the account color slot has been populated with "Not Set"
when any field for the account has been edited and saved. This routine
should run once and remove all such entries.
The problem is that if the currently open file has a report tab with
another tab to its right and selected then when the selected tab is
closed by the shutdown code Gtk sends a "realize" signal to the report
page. That sets an idle event to gnc_plugin_page_report_load_uri, but the
shutdown code proceeds to destroy the page and GnuCash has loaded the new
session before the idle event fires. By that time there's no page so
GNC_PLUGIN_PAGE_REPORT_GET_PRIVATE naturally returns NULL and the first
dereference crashes.
I couldn't find an easy way to avoid queuing the idle so I opted to protect
the function from the NULL priv.
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.
If an existing account colour was specified and subsequently removed
the color key would be "Not Set". Change this to remove the key when
the colour is changed to default, i.e. removed.
causes description and notes fields to be mangled.
Simple error, but rewrote the function to be more idiomatic, resisting
temptation to abuse the ternary operator.
Österreichischer Einheitskontenrahmen, Stand Mai 2017
Von der Webseite der Kammer der Steuerberater und Wirtschaftsprüfer
(https://www.ksw.or.at/), Fachgutachten Betriebswirtschaft, KSF/BW 6.
While using the tab key to navigate the fields of the edit account
dialogue, it stops in the notes field as it accepts tabs so by
disallowing use keyboard navigation can proceed.
If there is more than one account source in the import it makes it
difficult to allocate the transactions so add a toggle button to show
or hide the source account column with the default being that of the
calling function.
The amount column was being sorted by string as opposed to amount value.
Added a DOUBLE value to the model store to hold a converted gnc_numeric
amount value and use that for sorting the tree view amount column. Also
made the amount column right justified so numbers align.
There are a very few left that need deeper study, but this gets
rid of most of the noise. For the most part it's just getting rid of
extra variables or removing an assignment that is always
replaced later but before any reads of the variable. A few are
discarded result variables.