[gnome-weather] Enable OpenWeatherMap backend
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-weather] Enable OpenWeatherMap backend
- Date: Sun, 21 Jul 2013 14:38:17 +0000 (UTC)
commit cae69b70f8941340519c81dcbc64aad754328817
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sun Jul 21 16:29:49 2013 +0200
Enable OpenWeatherMap backend
Set the appropriate bit in the GWeatherInfos we build
src/world.js | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/world.js b/src/world.js
index 3185587..88a81d8 100644
--- a/src/world.js
+++ b/src/world.js
@@ -66,10 +66,14 @@ const WorldModel = new Lang.Class({
},
_addLocationInternal: function(location) {
+ let providers = (GWeather.Provider.METAR |
+ GWeather.Provider.YR_NO);
+ if ('OWM' in GWeather.Provider)
+ providers |= GWeather.Provider.OWM;
+
let info = new GWeather.Info({ location: location,
forecast_type: GWeather.ForecastType.LIST,
- enabled_providers: (GWeather.Provider.METAR |
- GWeather.Provider.YR_NO) });
+ enabled_providers: providers });
let iter;
info.connect('updated', Lang.bind(this, function(info) {
let icon = Util.loadIcon(info.get_symbolic_icon_name(), ICON_SIZE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]