[gnome-weather/wip/cdavis/api-updates] Adapt to libgweather API changes




commit b7396eceeb3cac79b9da9b9666adf819512a00a4
Author: Christopher Davis <christopherdavis gnome org>
Date:   Wed Feb 10 10:27:33 2021 -0800

    Adapt to libgweather API changes
    
    libgweather's API has changed for the GNOME 40 cycle.
    
    See https://gitlab.gnome.org/GNOME/libgweather/-/issues/59
    
    Fixes https://gitlab.gnome.org/GNOME/gnome-weather/-/issues/141

 src/misc/util.js    | 2 +-
 src/shared/world.js | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/misc/util.js b/src/misc/util.js
index 7d16199..9594ae8 100644
--- a/src/misc/util.js
+++ b/src/misc/util.js
@@ -148,7 +148,7 @@ function getEnabledProviders() {
     if (provider_override) {
         return (GWeather.Provider.METAR | GWeather.Provider[provider_override]);
     } else {
-        return (GWeather.Provider.METAR | GWeather.Provider.YR_NO | GWeather.Provider.OWM);
+        return (GWeather.Provider.METAR | GWeather.Provider.MET_NO | GWeather.Provider.OWM);
     }
 }
 
diff --git a/src/shared/world.js b/src/shared/world.js
index 2c13756..6bc681d 100644
--- a/src/shared/world.js
+++ b/src/shared/world.js
@@ -230,8 +230,12 @@ var WorldModel = GObject.registerClass({
                 return info;
         }
 
-        let info = new GWeather.Info({ location: newLocation,
-                                       enabled_providers: this._providers });
+        let info = new GWeather.Info({
+            application_id: pkg.name,
+            contact_info: 'https://gitlab.gnome.org/GNOME/gnome-weather/-/raw/master/gnome-weather.doap',
+            location: newLocation,
+            enabled_providers: this._providers
+        });
         this._addInfoInternal(info, isCurrentLocation);
 
         return info;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]