[gnome-calculator] Fixed broken currency conversion on first start (fixes #199)



commit ff46fc308d01368569ef2a5be60edaf3c0b31bd6
Author: Robert Roth <robert roth off gmail com>
Date:   Tue Jan 5 13:13:09 2021 +0200

    Fixed broken currency conversion on first start (fixes #199)

 lib/currency.vala         | 2 +-
 src/gnome-calculator.vala | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/lib/currency.vala b/lib/currency.vala
index e366522c..0ee65563 100644
--- a/lib/currency.vala
+++ b/lib/currency.vala
@@ -27,7 +27,7 @@ public class CurrencyManager : Object
             return default_currency_manager;
 
         default_currency_manager = new CurrencyManager ();
-
+        default_currency_manager.refresh_interval = new Settings ("org.gnome.calculator").get_int 
("refresh-interval");
         default_currency_manager.currencies.append (new Currency ("AED", _("UAE Dirham"), "إ.د"));
         default_currency_manager.currencies.append (new Currency ("AUD", _("Australian Dollar"), "$"));
         default_currency_manager.currencies.append (new Currency ("BDT", _("Bangladeshi Taka"), "৳"));
diff --git a/src/gnome-calculator.vala b/src/gnome-calculator.vala
index 6edf4c8b..b2b52d58 100644
--- a/src/gnome-calculator.vala
+++ b/src/gnome-calculator.vala
@@ -121,7 +121,6 @@ public class Calculator : Gtk.Application
         last_opened_window = create_new_window (settings);
         // restore the first window position from the settings
         load_window_position (last_opened_window);
-        CurrencyManager.get_default ().refresh_interval = settings.get_int ("refresh-interval");
     }
 
     private MathWindow get_active_math_window ()


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