[gnome-weather] Fix compatibility with mozjs52
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-weather] Fix compatibility with mozjs52
- Date: Sun, 20 Aug 2017 15:17:29 +0000 (UTC)
commit 30d47890bff7115193b0acb535994295b1fcc82b
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sun Aug 20 15:43:54 2017 +0200
Fix compatibility with mozjs52
New mozjs/gjs changes the rules around exports, so all exported
classes must be declared with "var".
src/app/city.js | 4 ++--
src/app/currentLocationController.js | 4 ++--
src/app/forecast.js | 2 +-
src/app/weeklyForecast.js | 2 +-
src/app/window.js | 2 +-
src/app/world.js | 2 +-
src/service/searchProvider.js | 2 +-
src/shared/world.js | 2 +-
8 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/app/city.js b/src/app/city.js
index a48871a..1d13653 100644
--- a/src/app/city.js
+++ b/src/app/city.js
@@ -31,7 +31,7 @@ const SPINNER_SIZE = 128;
const SCROLLING_ANIMATION_TIME = 400000; //us
-const WeatherWidget = new Lang.Class({
+var WeatherWidget = new Lang.Class({
Name: 'WeatherWidget',
Extends: Gtk.Frame,
Template: 'resource:///org/gnome/Weather/Application/weather-widget.ui',
@@ -199,7 +199,7 @@ const WeatherWidget = new Lang.Class({
}
});
-const WeatherView = new Lang.Class({
+var WeatherView = new Lang.Class({
Name: 'WeatherView',
Extends: Gtk.Stack,
Template: 'resource:///org/gnome/Weather/Application/city.ui',
diff --git a/src/app/currentLocationController.js b/src/app/currentLocationController.js
index c070598..a5238b3 100644
--- a/src/app/currentLocationController.js
+++ b/src/app/currentLocationController.js
@@ -24,13 +24,13 @@ const Geoclue = imports.gi.Geoclue;
const Util = imports.misc.util;
-const AutoLocation = {
+var AutoLocation = {
DISABLED: 0,
ENABLED: 1,
NOT_AVAILABLE: 2
};
-const CurrentLocationController = new Lang.Class({
+var CurrentLocationController = new Lang.Class({
Name: 'CurrentLocationController',
_init: function(world) {
diff --git a/src/app/forecast.js b/src/app/forecast.js
index d63c2cd..9199170 100644
--- a/src/app/forecast.js
+++ b/src/app/forecast.js
@@ -27,7 +27,7 @@ const Util = imports.misc.util;
// In microseconds
const ONE_HOUR = 3600*1000*1000;
-const ForecastBox = new Lang.Class({
+var ForecastBox = new Lang.Class({
Name: 'ForecastBox',
Extends: Gtk.Frame,
diff --git a/src/app/weeklyForecast.js b/src/app/weeklyForecast.js
index e2cb21f..a03f43c 100644
--- a/src/app/weeklyForecast.js
+++ b/src/app/weeklyForecast.js
@@ -24,7 +24,7 @@ const Lang = imports.lang;
const Params = imports.misc.params;
const Util = imports.misc.util;
-const WeeklyForecastFrame = new Lang.Class({
+var WeeklyForecastFrame = new Lang.Class({
Name: 'WeeklyForecastFrame',
Extends: Gtk.Frame,
diff --git a/src/app/window.js b/src/app/window.js
index 8eb0499..6700adf 100644
--- a/src/app/window.js
+++ b/src/app/window.js
@@ -32,7 +32,7 @@ const Page = {
CITY: 1
};
-const MainWindow = new Lang.Class({
+var MainWindow = new Lang.Class({
Name: 'MainWindow',
Extends: Gtk.ApplicationWindow,
diff --git a/src/app/world.js b/src/app/world.js
index 31e2aa8..49b65bd 100644
--- a/src/app/world.js
+++ b/src/app/world.js
@@ -28,7 +28,7 @@ const Params = imports.misc.params;
const Util = imports.misc.util;
-const WorldContentView = new Lang.Class({
+var WorldContentView = new Lang.Class({
Name: 'WorldContentView',
Extends: Gtk.Popover,
diff --git a/src/service/searchProvider.js b/src/service/searchProvider.js
index 51605de..efc9055 100644
--- a/src/service/searchProvider.js
+++ b/src/service/searchProvider.js
@@ -34,7 +34,7 @@ function getCountryName(location) {
return location.get_name();
}
-const SearchProvider = new Lang.Class({
+var SearchProvider = new Lang.Class({
Name: 'WeatherSearchProvider',
_init: function(application) {
diff --git a/src/shared/world.js b/src/shared/world.js
index 578cbd6..be342fc 100644
--- a/src/shared/world.js
+++ b/src/shared/world.js
@@ -24,7 +24,7 @@ const Lang = imports.lang;
const Params = imports.misc.params;
const Util = imports.misc.util;
-const WorldModel = new Lang.Class({
+var WorldModel = new Lang.Class({
Name: 'WorldModel',
Extends: GObject.Object,
Signals: {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]