yahoo_weather
Neroth 12 years ago
parent d46b13d7b0
commit f4fa5d1f69
  1. 17
      src/extension.js

@ -507,10 +507,12 @@ const WeatherMenuButton = new Lang.Class({
}); });
} }
if (cities.length == 1) if (cities.length == 1)
this._selectCity.actor.hide(); this._selectCity.actor.hide();
else else
this._selectCity.actor.show(); this._selectCity.actor.show();
return 0;
}, },
extractLocation : function() extractLocation : function()
@ -582,11 +584,13 @@ const WeatherMenuButton = new Lang.Class({
continue; continue;
} }
this.refreshWeather(); this.refreshWeather();
return 0;
}, },
_onPreferencesActivate : function() { _onPreferencesActivate : function() {
let app = Shell.AppSystem.get_default().lookup_app('weather-settings.desktop'); let app = Shell.AppSystem.get_default().lookup_app('weather-settings.desktop');
app.activate(); app.activate();
return 0;
}, },
unit_to_unicode: function() { unit_to_unicode: function() {
@ -930,6 +934,7 @@ const WeatherMenuButton = new Lang.Class({
return '\u2935'; return '\u2935';
break; break;
} }
return 0;
}, },
icon_type : function(icon_name) icon_type : function(icon_name)
@ -975,6 +980,7 @@ const WeatherMenuButton = new Lang.Class({
return 0; return 0;
} }
}); });
return 0;
}, },
refreshWeather: function(recurse) refreshWeather: function(recurse)
@ -1325,6 +1331,7 @@ const WeatherMenuButton = new Lang.Class({
forecastUi.Summary.text = comment; forecastUi.Summary.text = comment;
forecastUi.Icon.icon_name = this.get_weather_icon_safely(code); forecastUi.Icon.icon_name = this.get_weather_icon_safely(code);
} }
return 0;
}); });
// Repeatedly refresh weather if recurse is set // Repeatedly refresh weather if recurse is set
@ -1333,7 +1340,7 @@ const WeatherMenuButton = new Lang.Class({
this.refreshWeather(true); this.refreshWeather(true);
})); }));
} }
return 0;
}, },
destroyCurrentWeather: function() { destroyCurrentWeather: function() {

Loading…
Cancel
Save