diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/datetime-service.c | 7 | ||||
-rw-r--r-- | src/location-geoclue.c | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c index a8f941a..7b7c2db 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -1256,16 +1256,15 @@ on_use_geoclue_changed_cb (GSettings *settings, gchar *key G_GNUC_UNUSED, gpointer user_data G_GNUC_UNUSED) { - const gboolean using = geo_location != NULL; - const gboolean should_use = g_settings_get_boolean (conf, "show-auto-detected-location"); + const gboolean use_geoclue = g_settings_get_boolean (conf, "show-auto-detected-location"); - if (using && !should_use) + if (geo_location && !use_geoclue) { g_signal_handlers_disconnect_by_func (geo_location, update_location_menu_items, 0); g_clear_object (&geo_location); update_location_menu_items (); } - else if (should_use && !using) + else if (use_geoclue && !geo_location) { geo_location = indicator_datetime_location_geoclue_new (); g_signal_connect (geo_location, "notify::timezone", diff --git a/src/location-geoclue.c b/src/location-geoclue.c index 2e57f39..87358fb 100644 --- a/src/location-geoclue.c +++ b/src/location-geoclue.c @@ -52,7 +52,7 @@ set_timezone (IndicatorDatetimeLocationGeoclue * self, const gchar * timezone) { priv_t * p = self->priv; - if (p->timezone != timezone) + if (g_strcmp0 (p->timezone, timezone)) { g_free (p->timezone); p->timezone = g_strdup (timezone); |