summaryrefslogtreecommitdiff
path: root/nonprism/gnome-weather/nonprism.patch
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2017-11-14 20:20:08 +0100
committerAndreas Grapentin <andreas@grapentin.org>2017-11-14 20:20:08 +0100
commit1add05cf01f8943a9bbf5f5b4afe04630e72af58 (patch)
tree32c3cc47e54ef47fc18cdf38338ef6d14c3729d1 /nonprism/gnome-weather/nonprism.patch
parent44b3d7189986e967918f7b17a00536aa443d42a3 (diff)
downloadabslibre-1add05cf01f8943a9bbf5f5b4afe04630e72af58.tar.gz
abslibre-1add05cf01f8943a9bbf5f5b4afe04630e72af58.tar.bz2
abslibre-1add05cf01f8943a9bbf5f5b4afe04630e72af58.zip
nonprism/gnome-weather: updated to 3.26.0
Diffstat (limited to 'nonprism/gnome-weather/nonprism.patch')
-rw-r--r--nonprism/gnome-weather/nonprism.patch50
1 files changed, 24 insertions, 26 deletions
diff --git a/nonprism/gnome-weather/nonprism.patch b/nonprism/gnome-weather/nonprism.patch
index 3b4c4cfac..df6da2e9e 100644
--- a/nonprism/gnome-weather/nonprism.patch
+++ b/nonprism/gnome-weather/nonprism.patch
@@ -23,7 +23,7 @@ diff --git a/src/app/currentLocationController.js b/src/app/currentLocationContr
index c070598b3..10b436d54 100644
--- a/src/app/currentLocationController.js
+++ b/src/app/currentLocationController.js
-@@ -20,16 +20,9 @@ const GLib = imports.gi.GLib;
+@@ -20,104 +20,14 @@ const GLib = imports.gi.GLib;
const Gio = imports.gi.Gio;
const Lang = imports.lang;
const GWeather = imports.gi.GWeather;
@@ -31,16 +31,14 @@ index c070598b3..10b436d54 100644
const Util = imports.misc.util;
--const AutoLocation = {
+-var AutoLocation = {
- DISABLED: 0,
- ENABLED: 1,
- NOT_AVAILABLE: 2
-};
-
- const CurrentLocationController = new Lang.Class({
- Name: 'CurrentLocationController',
-
-@@ -37,89 +30,6 @@ const CurrentLocationController = new Lang.Class({
+ var CurrentLocationController = class CurrentLocationController {
+ constructor(world) {
this._world = world;
this._processStarted = false;
this._settings = Util.getSettings('org.gnome.Weather.Application');
@@ -49,25 +47,25 @@ index c070598b3..10b436d54 100644
- if (this.autoLocation == AutoLocation.ENABLED)
- this._startGeolocationService();
this.currentLocation = null;
- },
+ }
-
-- _startGeolocationService: function() {
+- _startGeolocationService() {
- this._processStarted = true;
- Geoclue.Simple.new(pkg.name,
- Geoclue.AccuracyLevel.CITY,
- null,
-- Lang.bind (this, this._onSimpleReady));
-- },
+- this._onSimpleReady.bind(this));
+- }
-
-- _geoLocationFailed: function(e) {
+- _geoLocationFailed(e) {
- log ("Failed to connect to GeoClue2 service: " + e.message);
- this.autoLocation = AutoLocation.NOT_AVAILABLE;
-- GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
+- GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
- this._world.currentLocationChanged(null);
-- }));
-- },
+- });
+- }
-
-- _onSimpleReady: function(object, result) {
+- _onSimpleReady(object, result) {
- try {
- this._simple = Geoclue.Simple.new_finish(result);
- }
@@ -80,17 +78,17 @@ index c070598b3..10b436d54 100644
- client.distance_threshold = 100;
-
- this._findLocation();
-- },
+- }
-
-- _findLocation: function() {
+- _findLocation() {
- this._locationUpdatedId =
- this._simple.connect("notify::location",
- this._onLocationUpdated.bind(this));
-
- this._onLocationUpdated(this._simple);
-- },
+- }
-
-- _onLocationUpdated: function(simple) {
+- _onLocationUpdated(simple) {
- let geoclueLocation = simple.get_location();
-
- this.currentLocation = GWeather.Location.new_detached(geoclueLocation.description,
@@ -98,25 +96,25 @@ index c070598b3..10b436d54 100644
- geoclueLocation.latitude,
- geoclueLocation.longitude);
- this._world.currentLocationChanged(this.currentLocation);
-- },
+- }
-
-- setAutoLocation: function(active) {
+- setAutoLocation(active) {
- this._settings.set_value('automatic-location', new GLib.Variant('b', active));
-
- if (this.autoLocation == AutoLocation.NOT_AVAILABLE)
- return;
- this._autoLocationChanged(active);
- this._syncAutoLocation(active);
-- },
+- }
-
-- _syncAutoLocation: function(autoLocation) {
+- _syncAutoLocation(autoLocation) {
- if (autoLocation)
- this.autoLocation = AutoLocation.ENABLED;
- else
- this.autoLocation = AutoLocation.DISABLED;
-- },
+- }
-
-- _autoLocationChanged: function(active) {
+- _autoLocationChanged(active) {
- if (active) {
- if (!this._processStarted) {
- this._startGeolocationService();
@@ -129,4 +127,4 @@ index c070598b3..10b436d54 100644
- this._simple.disconnect(this._locationUpdatedId);
- }
- }
- });
+ }