diff --git a/data/metadata.json.in b/data/metadata.json.in index b7fa807..f48ed51 100644 --- a/data/metadata.json.in +++ b/data/metadata.json.in @@ -2,7 +2,7 @@ "uuid": "@uuid@", "name": "OpenWeather", "description": "Weather extension to display weather information from http://openweathermap.org/ for many cities in GNOME Shell", -"shell-version": [ "3.6", "3.8", "3.10" ], +"shell-version": [ "3.6", "3.8", "3.10", "3.11.5", "3.12" ], "localedir": "@LOCALEDIR@", "url": "@url@" } diff --git a/src/extension.js b/src/extension.js index 6796a43..a1995db 100644 --- a/src/extension.js +++ b/src/extension.js @@ -220,12 +220,13 @@ const WeatherMenuButton = new Lang.Class({ reactive: false }); - if (ExtensionUtils.versionCheck(['3.9', '3.10'], Config.PACKAGE_VERSION)) { - _itemCurrent.actor.add_actor(this._currentWeather); - _itemFuture.actor.add_actor(this._futureWeather); - } else { + log("gnome-shell-version: "+Config.PACKAGE_VERSION); + if (ExtensionUtils.versionCheck(['3.6', '3.8'], Config.PACKAGE_VERSION)) { _itemCurrent.addActor(this._currentWeather); _itemFuture.addActor(this._futureWeather); + } else { + _itemCurrent.actor.add_actor(this._currentWeather); + _itemFuture.actor.add_actor(this._futureWeather); } this.menu.addMenuItem(_itemCurrent); @@ -662,10 +663,10 @@ const WeatherMenuButton = new Lang.Class({ item = new PopupMenu.PopupMenuItem(this.extractLocation(cities[i])); item.location = i; if (i == this._actual_city) { - if (ExtensionUtils.versionCheck(['3.9', '3.10'], Config.PACKAGE_VERSION)) - item.setOrnament(PopupMenu.Ornament.DOT); - else + if (ExtensionUtils.versionCheck(['3.6', '3.8'], Config.PACKAGE_VERSION)) item.setShowDot(true); + else + item.setOrnament(PopupMenu.Ornament.DOT); } this._selectCity.menu.addMenuItem(item); @@ -1138,7 +1139,7 @@ weather-storm.png = weather-storm-symbolic.svg load_json_async: function(url, params, fun) { if (_httpSession == undefined) { - if (ExtensionUtils.versionCheck(['3.6', '3.7'], Config.PACKAGE_VERSION)) { + if (ExtensionUtils.versionCheck(['3.6'], Config.PACKAGE_VERSION)) { // Soup session (see https://bugzilla.gnome.org/show_bug.cgi?id=661323#c64) (Simon Legner) _httpSession = new Soup.SessionAsync(); Soup.Session.prototype.add_feature.call(_httpSession, new Soup.ProxyResolverDefault()); diff --git a/src/prefs.js b/src/prefs.js index d79ee69..2fbc563 100644 --- a/src/prefs.js +++ b/src/prefs.js @@ -541,7 +541,7 @@ const WeatherPrefsWidget = new GObject.Class({ loadJsonAsync: function(url, params, fun, id) { if (_httpSession == undefined) { - if (ExtensionUtils.versionCheck(['3.6', '3.7'], Config.PACKAGE_VERSION)) { + if (ExtensionUtils.versionCheck(['3.6'], Config.PACKAGE_VERSION)) { // Soup session (see https://bugzilla.gnome.org/show_bug.cgi?id=661323#c64) (Simon Legner) _httpSession = new Soup.SessionAsync(); Soup.Session.prototype.add_feature.call(_httpSession, new Soup.ProxyResolverDefault());