Emmanuele Bassi
a4d21a72c7
Adapt to the libgweather API changes
...
The deprecated GweatherForecastType enumeration was dropped from the
API, and gweather_info_new() lost the forecast type parameter.
This requires bumping up the minimum version of libgweather we require
to build Calendar. Ideally, we could do a version check and an ifdef
dance to keep Calendar building with the previous versions of
libgweather, but since we were requiring version 3.24 I don't think it's
worth it.
2017-12-12 03:04:28 +00:00
Georges Basile Stavracas Neto
23a9de1108
weather-service: major reorganization and cleanup
...
To make it more like the actual code style of GNOME Calendar.
Hope Florian doesn't get (too) mad of me removing and modifying
so much on his code. I'm sorry dude, my OCD didn't allow me to
just flood the gate.
2017-12-11 23:10:55 -02:00
Florian Brosch
eceb826e77
Whitespace changes
2017-12-11 22:13:16 -02:00
Florian Brosch
9ac45e840d
weather, timer: Set log domains
2017-12-11 21:38:08 -02:00
Florian Brosch
0b332c311c
weather: start the right timer.
2017-12-11 21:38:08 -02:00
Florian Brosch
1a98df6524
weather: Update on 00:00
2017-12-11 21:38:08 -02:00
Florian Brosch
24d9e0c390
weather: Change the way I calculate begin-of-day
2017-12-11 21:38:08 -02:00
Florian Brosch
660e1c6178
Avoid single line comments.
2017-12-11 21:38:08 -02:00
Florian Brosch
c502102653
weather: Rename timer to duration timer.
...
In preparation for my next commit.
2017-12-11 21:38:08 -02:00
Florian Brosch
9ff8b9ddf0
weather: Use network status
2017-12-11 21:38:08 -02:00
Florian Brosch
91ec4990ab
weather: Use shorter timeouts if local weather info is invalid
2017-12-11 21:38:06 -02:00
Florian Brosch
50e675da05
timer: Improve duration api
...
- rename duration setter
- add duration getter
2017-12-11 21:34:23 -02:00
Florian Brosch
2a0a6064aa
weather: Rename check-interval to check-interval-renew.
...
In preparation for check-interval-new.
2017-12-11 21:33:47 -02:00
Florian Brosch
83d6eaef9a
weather: Introduce a proper timer for forecasts.
2017-12-11 21:32:01 -02:00
Florian Brosch
72dc615bfd
weather: Drop gcal_weather_service_get_location_name()
2017-12-11 21:32:01 -02:00
Florian Brosch
9d4bf09ca7
weather: Use find_nearest_city instead of new_detached
2017-12-11 21:32:01 -02:00
Florian Brosch
d1ee082142
weather: Re-use old weather predictions on errors
2017-12-11 21:32:00 -02:00
Florian Brosch
eb3e4a4078
Synchronise weather on application.sync.
2017-12-11 21:29:33 -02:00
Florian Brosch
75fc1f41e6
weather: steal a data point from tomorrow in case there is none for "today".
...
This commit also improves night/day icon selection.
2017-12-11 21:29:33 -02:00
Florian Brosch
2cbdba9a95
weather: Display service attributions in AboutDialog.
...
Note that this injects strings we can't translate.
2017-12-11 21:29:33 -02:00
Florian Brosch
a58047257b
weather: Use -night icons only for fold-results when it makes sense.
2017-12-11 21:29:33 -02:00
Florian Brosch
b1b5cf2d73
weather: Change weather icon selection heuristic.
...
The original version used conditions as key. This does
not work out for all providers. They might return no
value while gweather derives icons from other fields.
2017-12-11 21:29:33 -02:00
Florian Brosch
d701f2c7a6
weather: Add optional reading point logging
2017-12-11 21:23:20 -02:00
Florian Brosch
c5c832241e
Weather: Change weather update signal.
2017-12-11 21:23:20 -02:00
Florian Brosch
0248cf918e
weather: Rename WeatherInfo.weather_info to gweather_info
...
This should make next commit less confusing.
2017-12-11 21:23:19 -02:00
Florian Brosch
45d365ff42
weather: Improve weather folding
2017-12-11 21:23:19 -02:00
Florian Brosch
0c51e061e2
weather: Improve logging
2017-12-11 21:23:19 -02:00
Florian Brosch
30612fee5c
weather: Add a TODO
...
We should switch to a async version of geocode_reverse_resolve.
2017-12-11 21:23:19 -02:00
Florian Brosch
8d85af0960
weather: Prepare global time zone support.
...
This patch allows to change time-zones for
weather reports.
2017-12-11 21:23:19 -02:00
Florian Brosch
13342ac82e
weather: Properly extract and translate weather information.
...
Completes commit 98cc78d6de66fc3a79abd9148ba03e9b21f89fb1.
2017-12-11 21:23:19 -02:00
Florian Brosch
d7c9e70c31
weather: Simplify and inline property param flags
2017-12-11 21:23:19 -02:00
Florian Brosch
17af30b19c
weather: Allow to set a fix location.
2017-12-11 21:23:19 -02:00
Florian Brosch
83bec27ad5
Initial weather service.
...
This commit introduces two new classes:
1. GCalWeatherService
2. GCalWeatherInfo
GcalWeatherservice picks-up the current location and periodically
fetches weather reports represented by GcalWeatherInfo.
The weather part is not complete yet.
2017-12-11 21:23:19 -02:00