[gnome-calculator/wip/rstrode/no-network-plz: 4/5] gnome-calculator: Update refresh interval when changed in gsettings
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator/wip/rstrode/no-network-plz: 4/5] gnome-calculator: Update refresh interval when changed in gsettings
- Date: Mon, 17 May 2021 05:19:25 +0000 (UTC)
commit 3e9e32ec2473f1b96f8ecdee917483bae9a02ded
Author: Ray Strode <rstrode redhat com>
Date: Thu May 13 14:08:27 2021 -0400
gnome-calculator: Update refresh interval when changed in gsettings
Right now the refresh interval is read at start up.
This commit makes sure it gets reread any time it's changed too.
src/gnome-calculator.vala | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/gnome-calculator.vala b/src/gnome-calculator.vala
index 1090fa25..49b0b92b 100644
--- a/src/gnome-calculator.vala
+++ b/src/gnome-calculator.vala
@@ -125,6 +125,11 @@ public class Calculator : Gtk.Application
load_window_position (last_opened_window);
CurrencyManager.get_default ().refresh_interval = settings.get_int ("refresh-interval");
CurrencyManager.get_default ().refresh_async ();
+
+ settings.changed["refresh-interval"].connect(() => {
+ CurrencyManager.get_default ().refresh_interval = settings.get_int ("refresh-interval");
+ CurrencyManager.get_default ().refresh_async ();
+ });
}
private MathWindow get_active_math_window ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]