diff options
author | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2015-09-09 20:24:57 +0100 |
---|---|---|
committer | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2015-09-10 14:14:07 +0100 |
commit | ebc44cb10297177eca12e83ced86132c2d1a1aa0 (patch) | |
tree | 70749066cdc8e3f3d77e57831d570309560e1f07 | |
parent | a7f419bc5a69e7c93d5845538d4dd467d6f0968c (diff) |
location: Ensure speed change notification
-rw-r--r-- | src/gclue-location.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gclue-location.c b/src/gclue-location.c index 993b0a4..2b563a3 100644 --- a/src/gclue-location.c +++ b/src/gclue-location.c @@ -393,9 +393,9 @@ gclue_location_set_speed_from_prev_location (GClueLocation *location, GCLUE_IS_LOCATION (prev_location)); if (prev_location == NULL) { - location->priv->speed = GCLUE_LOCATION_SPEED_UNKNOWN; + speed = GCLUE_LOCATION_SPEED_UNKNOWN; - return; + goto out; } gloc = GEOCODE_LOCATION (location); @@ -413,6 +413,7 @@ gclue_location_set_speed_from_prev_location (GClueLocation *location, speed = geocode_location_get_distance_from (gloc, prev_gloc) * 1000.0 / (timestamp - prev_timestamp); +out: location->priv->speed = speed; g_object_notify (G_OBJECT (location), "speed"); |