diff --git a/NightLightSwitch@claudiux/files/NightLightSwitch@claudiux/6.4/applet.js b/NightLightSwitch@claudiux/files/NightLightSwitch@claudiux/6.4/applet.js index 29b149e78bf..f86ff09ca2d 100644 --- a/NightLightSwitch@claudiux/files/NightLightSwitch@claudiux/6.4/applet.js +++ b/NightLightSwitch@claudiux/files/NightLightSwitch@claudiux/6.4/applet.js @@ -1,6 +1,6 @@ const Applet = imports.ui.applet; const Gio = imports.gi.Gio; -const GWeather = imports.gi.GWeather; +//~ const GWeather = imports.gi.GWeather; const PopupMenu = imports.ui.popupMenu; const Util = imports.misc.util; const St = imports.gi.St; @@ -176,21 +176,22 @@ class NightLightSwitch extends Applet.IconApplet { lat = lat.unpack(); // type (d) lon = lon.unpack(); // type (d) //~ global.log("lat: "+lat+" - lon: "+lon); - if (Math.round(lat) == 91 || Math.round(lon) == 181) { - this.sunrise = 6; - this.sunset = 12; - } else { - this.weather = GWeather.Info.new(GWeather.Location.new_detached("local", null, lat, lon)); - let sunrise = this.weather.get_sunrise().trim().split(":"); - let sunset = this.weather.get_sunset().trim().split(":"); - //~ global.log("sunrise: " + sunrise); - //~ global.log("sunset: " + sunset); - this.sunrise = parseInt(sunrise[0][0])*10+parseInt(sunrise[0][1])+(parseInt(sunrise[0][3])*10+parseInt(sunrise[0][4]))/60; - this.sunset = parseInt(sunset[0][0])*10+parseInt(sunset[0][1])+(parseInt(sunset[0][3])*10+parseInt(sunset[0][4]))/60; - } - this.sunrise = Math.round(this.sunrise * 4)/4; - this.sunset = Math.round(this.sunset * 4)/4; - //~ global.log("sunrise: " + this.sunrise + " - sunset: " + this.sunset); + + //~ if (Math.round(lat) == 91 || Math.round(lon) == 181) { + //~ this.sunrise = 6; + //~ this.sunset = 12; + //~ } else { + //~ this.weather = GWeather.Info.new(GWeather.Location.new_detached("local", null, lat, lon)); + //~ let sunrise = this.weather.get_sunrise().trim().split(":"); + //~ let sunset = this.weather.get_sunset().trim().split(":"); + //~ //global.log("sunrise: " + sunrise); + //~ //global.log("sunset: " + sunset); + //~ this.sunrise = parseInt(sunrise[0][0])*10+parseInt(sunrise[0][1])+(parseInt(sunrise[0][3])*10+parseInt(sunrise[0][4]))/60; + //~ this.sunset = parseInt(sunset[0][0])*10+parseInt(sunset[0][1])+(parseInt(sunset[0][3])*10+parseInt(sunset[0][4]))/60; + //~ } + //~ this.sunrise = Math.round(this.sunrise * 4)/4; + //~ this.sunset = Math.round(this.sunset * 4)/4; + //~ //global.log("sunrise: " + this.sunrise + " - sunset: " + this.sunset); let items = this._applet_context_menu._getMenuItems(); if (this.context_menu_item_configure == null) { diff --git a/NightLightSwitch@claudiux/files/NightLightSwitch@claudiux/CHANGELOG.md b/NightLightSwitch@claudiux/files/NightLightSwitch@claudiux/CHANGELOG.md index 728b6b0ea2b..61563eb76f7 100644 --- a/NightLightSwitch@claudiux/files/NightLightSwitch@claudiux/CHANGELOG.md +++ b/NightLightSwitch@claudiux/files/NightLightSwitch@claudiux/CHANGELOG.md @@ -1,2 +1,6 @@ +### v1.0.1~20250124 + * Fixes #6800. No longer requires the gir1.2-gweather-4.0 package. + ### v1.0.0~20250123 * Fully functional. + * Needs the gir1.2-gweather-4.0 package. diff --git a/NightLightSwitch@claudiux/files/NightLightSwitch@claudiux/metadata.json b/NightLightSwitch@claudiux/files/NightLightSwitch@claudiux/metadata.json index 642efb77a79..0a1c131d93b 100644 --- a/NightLightSwitch@claudiux/files/NightLightSwitch@claudiux/metadata.json +++ b/NightLightSwitch@claudiux/files/NightLightSwitch@claudiux/metadata.json @@ -5,5 +5,5 @@ "uuid": "NightLightSwitch@claudiux", "name": "Night Light Switch", "author": "claudiux", - "version": "1.0.0" + "version": "1.0.1" }