diff -Nru gnome-shell-extension-weather-0.2/debian/bzr-builder.manifest gnome-shell-extension-weather-0.2/debian/bzr-builder.manifest --- gnome-shell-extension-weather-0.2/debian/bzr-builder.manifest 2013-07-23 10:04:40.000000000 +0000 +++ gnome-shell-extension-weather-0.2/debian/bzr-builder.manifest 2013-07-24 10:14:36.000000000 +0000 @@ -1,2 +1,2 @@ -# bzr-builder format 0.3 deb-version 0.2-0+20130723 -lp:gnome-shell-extension-weather revid:git-v1:a84f75dfc8e5d7a43d014029a5f44cbb7fe6c1e7 +# bzr-builder format 0.3 deb-version 0.2-0+20130724 +lp:gnome-shell-extension-weather revid:git-v1:80a518a35dc7ef902be0c51e02ad9da4a3d15bdd diff -Nru gnome-shell-extension-weather-0.2/debian/changelog gnome-shell-extension-weather-0.2/debian/changelog --- gnome-shell-extension-weather-0.2/debian/changelog 2013-07-23 10:04:40.000000000 +0000 +++ gnome-shell-extension-weather-0.2/debian/changelog 2013-07-24 10:14:36.000000000 +0000 @@ -1,6 +1,6 @@ -gnome-shell-extension-weather (0.2-0+20130723~quantal1) quantal; urgency=low +gnome-shell-extension-weather (0.2-0+20130724~quantal1) quantal; urgency=low * Auto build. - -- Launchpad Package Builder Tue, 23 Jul 2013 10:04:40 +0000 + -- Launchpad Package Builder Wed, 24 Jul 2013 10:14:36 +0000 diff -Nru gnome-shell-extension-weather-0.2/src/extension.js gnome-shell-extension-weather-0.2/src/extension.js --- gnome-shell-extension-weather-0.2/src/extension.js 2013-07-23 10:04:40.000000000 +0000 +++ gnome-shell-extension-weather-0.2/src/extension.js 2013-07-24 10:14:36.000000000 +0000 @@ -81,7 +81,7 @@ this.variation("speed_units"); this.variation("distance_units"); this.variation("pressure_units"); - this.variation("cities"); + this.variation("cities_names"); this.variation("city_name"); this.variation("symbolic_icon"); this.variation("text_in_panel"); @@ -157,8 +157,8 @@ this.loadInterfaceConfig(); this.location = this.city; - if(this.location) - { this.status("Location ("+this.location.get_city_name()+") loaded"); + if(this.city_name) + { this.status("Location ("+this.city_name+") loaded"); this.info = new GWeather.Info({ world: this.world, location: this.location, forecast_type: GWeather.ForecastType.LIST, @@ -175,8 +175,10 @@ this.refreshUI(); - if(typeof this.info != "undefined") - this.info.update(); this.status("Weather started"); this.status(0); + if(this.city_name) + { + this.info.update(); + } this.status("Weather started"); this.status(0); return 0; }, @@ -204,6 +206,8 @@ delete this.GWeatherSettings; this.status("GWeather setting connection stopped"); } + this.build = 0; + this.weatherStatus(0); this.status("Stopped"); this.status(0); return 0; }, @@ -311,7 +315,7 @@ let clockFormatVar = this.variation("clock_format"); this.status("Variation readed"); let first = false; - if(typeof this.build == "undefined") + if(!this.build) { first = true; this.status("First build"); this.build = that.info.get_update(); @@ -666,7 +670,7 @@ } } - if(this.variation("cities") || this.variation("city_name",true)) + if(this.variation("cities_names") || this.variation("city_name",true)) { this.rebuildLocationSelectorItem(); this.status("Location selector rebuilded"); } @@ -1111,7 +1115,7 @@ { let that = this; this.settings = Convenience.getSettings(WEATHER_SETTINGS_SCHEMA); - this.settingsC = this.settings.connect("changed",function(){that.status("**** SETTING CHANGED ****");that.settingsChanged();}); + this.settingsC = this.settings.connect("changed",function(){that.status("**** SETTING CHANGED ("+arguments[1]+") ****");that.settingsChanged();}); return 0; }, @@ -1119,7 +1123,7 @@ { let that = this; this.GWeatherSettings = Convenience.getSettings(WEATHER_GWEATHER_SETTINGS_SCHEMA); - this.GWeatherSettingsC = this.GWeatherSettings.connect("changed",function(){that.status("**** GWEATHER SETTING CHANGED ****");that.settingsChanged();}); + this.GWeatherSettingsC = this.GWeatherSettings.connect("changed",function(){that.status("**** GWEATHER SETTING CHANGED ("+arguments[1]+") ****");that.settingsChanged();}); return 0; }, @@ -1127,12 +1131,12 @@ { let that = this; this.InterfaceSettings = Convenience.getSettings("org.gnome.desktop.interface"); - this.InterfaceSettingsC = this.InterfaceSettings.connect("changed",function(){that.status("**** INTERFACE SETTING CHANGED ****");that.settingsChanged();}); + this.InterfaceSettingsC = this.InterfaceSettings.connect("changed",function(){that.status("**** INTERFACE SETTING CHANGED ("+arguments[1]+") ****");that.settingsChanged();}); }, settingsChanged : function() { - if(this.variation("cities",true) || this.variation("symbolic_icon",true) || this.variation("position_in_panel",true)) + if(this.variation("cities_names",true) || this.variation("symbolic_icon",true) || this.variation("position_in_panel",true)) this.refreshUI(); if(this.variation("clock_format",true) || this.variation("temperature_units",true) || this.variation("speed_units",true) @@ -1140,9 +1144,9 @@ || this.variation("comment_in_panel",true) || this.variation("wind_direction",true)) this.refresh(); - if(this.variation("city_name", true)) + if(this.variation("city_name")) { this.status("Location has changed"); - this.restart(); this.status("Location changed to "+this.location.get_city_name()); + this.restart(); this.status("Location changed to "+this.city_name); return 0; } @@ -1257,6 +1261,14 @@ return 0; }, + get cities_names() + { + if(!this.cities) + return ""; + else + return this.cities.join(", "); + }, + get actual_city() { if(!this.settings) @@ -1316,7 +1328,7 @@ get city_name() { - if(typeof this.city == "undefined") + if(!this.city) return ""; else return this.city.get_city_name();