From 367b4e17e76c30f0578b4343493ef22e49e1a6f6 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 10 Sep 2013 00:03:13 +0200 Subject: [PATCH 2/7] locator: Use the new gclue_location_info_equal https://bugs.freedesktop.org/show_bug.cgi?id=69105 --- src/gclue-locator.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/gclue-locator.c b/src/gclue-locator.c index f7e99d9..c5e5061 100644 --- a/src/gclue-locator.c +++ b/src/gclue-locator.c @@ -160,22 +160,16 @@ static void gclue_locator_update_location (GClueLocator *locator, GClueLocationInfo *location) { - gdouble accuracy, new_accuracy, distance; - const char *desc, *new_desc; + gdouble distance; if (locator->priv->location == NULL) goto update; - accuracy = gclue_location_info_get_accuracy (locator->priv->location); - new_accuracy = gclue_location_info_get_accuracy (location); - desc = gclue_location_info_get_description (locator->priv->location); - new_desc = gclue_location_info_get_description (location); distance = gclue_location_info_get_distance_from (locator->priv->location, location); - if (accuracy == new_accuracy && - g_strcmp0 (desc, new_desc) == 0 && + if (gclue_location_info_equal (locator->priv->location, location) && distance < locator->priv->threshold) { - g_debug ("Location remain unchanged"); + g_debug ("Location remains unchanged"); return; } -- 1.8.3.1