weather: Rework weather management

This commit brings a few changes that I was too lazy to
split in different commits:

 * Remove a few useless arguments in the GcalWeatherService API
 * Move the weather management code from GcalWindow to GcalWeatherSettings
 * A few style changes
This commit is contained in:
Georges Basile Stavracas Neto
2018-01-27 20:36:29 -02:00
parent ab20672aeb
commit 499db7bfd4
13 changed files with 568 additions and 392 deletions
+1 -10
View File
@@ -27,21 +27,12 @@
G_BEGIN_DECLS
#define GCAL_WEATHER_CHECK_INTERVAL_RENEW_DFLT (3 * 60 * 60) /* seconds */
#define GCAL_WEATHER_CHECK_INTERVAL_NEW_DFLT (5 * 60) /* seconds */
#define GCAL_WEATHER_VALID_TIMESPAN_DFLT (24 * 60 * 60) /* seconds */
#define GCAL_WEATHER_FORECAST_MAX_DAYS_DFLT 3
#define GCAL_TYPE_WEATHER_SERVICE (gcal_weather_service_get_type())
G_DECLARE_FINAL_TYPE (GcalWeatherService, gcal_weather_service, GCAL, WEATHER_SERVICE, GObject)
GcalWeatherService* gcal_weather_service_new (GTimeZone *time_zone,
guint max_days,
guint check_interval_new,
guint check_interval_renew,
gint64 valid_timespan);
GcalWeatherService* gcal_weather_service_new (void);
GTimeZone* gcal_weather_service_get_time_zone (GcalWeatherService *self);