month-cell: hold weather service while this widget exists
Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
cf40734243
commit
74b1296d07
@@ -202,7 +202,6 @@ manage_weather_service (GcalWeatherSettings *self)
|
||||
}
|
||||
|
||||
gcal_weather_service_set_location (weather_service, location);
|
||||
gcal_weather_service_hold (weather_service);
|
||||
gcal_weather_service_activate (weather_service);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -293,6 +293,9 @@ gcal_month_cell_finalize (GObject *object)
|
||||
{
|
||||
GcalMonthCell *self = (GcalMonthCell *)object;
|
||||
|
||||
GcalWeatherService *weather_service = gcal_context_get_weather_service (self->context);
|
||||
gcal_weather_service_release (weather_service);
|
||||
|
||||
gcal_clear_date_time (&self->date);
|
||||
g_clear_object (&self->context);
|
||||
|
||||
@@ -497,6 +500,9 @@ gcal_month_cell_set_context (GcalMonthCell *self,
|
||||
self,
|
||||
0);
|
||||
|
||||
GcalWeatherService *weather_service = gcal_context_get_weather_service (self->context);
|
||||
gcal_weather_service_hold (weather_service);
|
||||
|
||||
update_weather (self);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_CONTEXT]);
|
||||
|
||||
Reference in New Issue
Block a user