gnucash maint: gnc_pricedb_nth_price: Clarify code and cache results.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

gnucash maint: gnc_pricedb_nth_price: Clarify code and cache results.

John Ralls-4
Updated via  https://github.com/Gnucash/gnucash/commit/f9f714c7 (commit)
        from  https://github.com/Gnucash/gnucash/commit/fc153643 (commit)



commit f9f714c78d067715bb8314aa2c7986325e04c898
Author: John Ralls <[hidden email]>
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(-)

_______________________________________________
gnucash-patches mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-patches