[gcalctool] Load currency rates when doing typed currency conversion



commit b285dd969b66b192274fad908b83e02da0357cef
Author: Robert Ancell <robert ancell gmail com>
Date:   Sat Mar 6 20:40:47 2010 +1100

    Load currency rates when doing typed currency conversion

 NEWS          |    2 ++
 src/display.c |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index b932616..baf8347 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,8 @@ Overview of changes in gcalctool 5.30.0
 
     * Fix spacebar not working when display has focus (Bug #611971)
 
+    * Load currency rates when doing typed currency conversion
+
 Overview of changes in gcalctool 5.29.92
 
     * Add shortcuts to base buttons (Ctrl+B, Ctrl+O, Ctrl+D, Ctrl+H)
diff --git a/src/display.c b/src/display.c
index e22d164..00253c6 100644
--- a/src/display.c
+++ b/src/display.c
@@ -936,6 +936,8 @@ convert(const MPNumber *x, const char *x_units, const char *z_units, MPNumber *z
     };
     
     /* See if currency */
+    if (currency_rates_needs_update())
+        currency_download_rates();
     currency_load_rates();
     if (currency_get_index(x_units) >= 0 && currency_get_index(z_units) >= 0)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]