Commit e091c423 authored by Paolo Borelli's avatar Paolo Borelli

Create the Weather.Info with GObject.new

The normal constructor implicitely queries the online providers
while we just want the static data.

https://bugzilla.gnome.org/show_bug.cgi?id=708498
parent c7265efd
......@@ -139,8 +139,11 @@ private class Item : Object, ContentItem {
local_time = wallclock.date_time;
date_time = local_time.to_timezone (time_zone);
// We don't need to call update(), we're using only astronomical data
weather_info = new GWeather.Info (location, GWeather.ForecastType.LIST);
// We don't use the normal constructor since we only want static data
// and we do not want update() to be called.
weather_info = (GWeather.Info) Object.new (typeof (GWeather.Info),
location: location,
enabled_providers: GWeather.Provider.NONE);
}
public void get_thumb_properties (out string text, out string subtext, out Gdk.Pixbuf? pixbuf, out string css_class) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment