[gnome-shell] weather: Pick up original settings values
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] weather: Pick up original settings values
- Date: Wed, 7 Aug 2019 19:14:39 +0000 (UTC)
commit ec6e1315a596fdbabc84c4f35f6d8ac903650732
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Aug 1 13:18:43 2019 +0000
weather: Pick up original settings values
We mirror Weather's location settings to not depend on the app running,
but then don't read the original values, oops.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1158
js/misc/weather.js | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/js/misc/weather.js b/js/misc/weather.js
index f097c76f6..51dd8acde 100644
--- a/js/misc/weather.js
+++ b/js/misc/weather.js
@@ -94,8 +94,10 @@ var WeatherClient = class {
});
this._settings.connect('changed::automatic-location',
this._onAutomaticLocationChanged.bind(this));
+ this._onAutomaticLocationChanged();
this._settings.connect('changed::locations',
this._onLocationsChanged.bind(this));
+ this._onLocationsChanged();
this._appSystem = Shell.AppSystem.get_default();
this._appSystem.connect('installed-changed',
@@ -259,8 +261,8 @@ var WeatherClient = class {
this._setLocation(location);
}
- _onAutomaticLocationChanged(settings, key) {
- let useAutoLocation = settings.get_boolean(key);
+ _onAutomaticLocationChanged() {
+ let useAutoLocation = this._settings.get_boolean('automatic-location');
if (this._autoLocationRequested == useAutoLocation)
return;
@@ -278,8 +280,9 @@ var WeatherClient = class {
this._setLocation(this._mostRecentLocation);
}
- _onLocationsChanged(settings, key) {
- let serialized = settings.get_value(key).deep_unpack().shift();
+ _onLocationsChanged() {
+ let locations = this._settings.get_value('locations').deep_unpack();
+ let serialized = locations.shift();
let mostRecentLocation = null;
if (serialized)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]