diff options
Diffstat (limited to 'modules/cal-config-weather/e-source-weather.c')
-rw-r--r-- | modules/cal-config-weather/e-source-weather.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/modules/cal-config-weather/e-source-weather.c b/modules/cal-config-weather/e-source-weather.c index 63db1bc14b..3440224173 100644 --- a/modules/cal-config-weather/e-source-weather.c +++ b/modules/cal-config-weather/e-source-weather.c @@ -212,12 +212,21 @@ void e_source_weather_set_location (ESourceWeather *extension, const gchar *location) { + gchar *new_location; + g_return_if_fail (E_IS_SOURCE_WEATHER (extension)); g_mutex_lock (extension->priv->property_lock); + new_location = e_util_strdup_strip (location); + if (g_strcmp0 (extension->priv->location, new_location) == 0) { + g_mutex_unlock (extension->priv->property_lock); + g_free (new_location); + return; + } + g_free (extension->priv->location); - extension->priv->location = e_util_strdup_strip (location); + extension->priv->location = new_location; g_mutex_unlock (extension->priv->property_lock); @@ -238,6 +247,9 @@ e_source_weather_set_units (ESourceWeather *extension, { g_return_if_fail (E_IS_SOURCE_WEATHER (extension)); + if (extension->priv->units == units) + return; + extension->priv->units = units; g_object_notify (G_OBJECT (extension), "units"); |