gnucash maint: gnc_pricedb_nth_price: Clarify code and cache results.
John Ralls
jralls at code.gnucash.org
Fri Jan 25 11:49:48 EST 2019
Updated via https://github.com/Gnucash/gnucash/commit/f9f714c7 (commit)
from https://github.com/Gnucash/gnucash/commit/fc153643 (commit)
commit f9f714c78d067715bb8314aa2c7986325e04c898
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Jan 24 17:07:19 2019 -0800
gnc_pricedb_nth_price: Clarify code and cache results.
Use built-in glib functions to retrieve the list of per-currency price
lists, concatenate them into a single list, instead of doing it all in
hand-rolled loops.
Sorting is preformed by the calling GncTreeViewPrice so this removes
sorting from gnc_pricedb_nth_price.
There's no concurrency concern because gnc_pricedb_nth_price is a
GUI callback and so must run in the GUI thread.
Summary of changes:
libgnucash/engine/gnc-pricedb.c | 112 +++++++++++++++++-----------------------
1 file changed, 46 insertions(+), 66 deletions(-)
More information about the gnucash-patches
mailing list