summaryrefslogtreecommitdiff
path: root/src/gclue-location-source.c
diff options
context:
space:
mode:
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>2015-09-09 20:16:15 +0100
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>2015-09-10 14:14:07 +0100
commitb6f55e3506fd5c2427ba6e8b09e7c8ab1cf08c73 (patch)
tree258c953692434f18f58355847f33ca76149a04dc /src/gclue-location-source.c
parentebc44cb10297177eca12e83ced86132c2d1a1aa0 (diff)
downloadgeoclue-b6f55e3506fd5c2427ba6e8b09e7c8ab1cf08c73.tar.gz
location: Add gclue_location_duplicate()
Add a method to duplicate a location object and make use of that from location-source.
Diffstat (limited to 'src/gclue-location-source.c')
-rw-r--r--src/gclue-location-source.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/gclue-location-source.c b/src/gclue-location-source.c
index 8a7f59e..afd7b6c 100644
--- a/src/gclue-location-source.c
+++ b/src/gclue-location-source.c
@@ -351,23 +351,18 @@ gclue_location_source_set_location (GClueLocationSource *source,
{
GClueLocationSourcePrivate *priv = source->priv;
GClueLocation *cur_location;
- GeocodeLocation *gloc;
gdouble speed, heading;
- gloc = GEOCODE_LOCATION (location);
cur_location = priv->location;
- priv->location = gclue_location_new_with_description
- (geocode_location_get_latitude (gloc),
- geocode_location_get_longitude (gloc),
- geocode_location_get_accuracy (gloc),
- geocode_location_get_description (gloc));
+ priv->location = gclue_location_duplicate (location);
speed = gclue_location_get_speed (location);
if (speed == GCLUE_LOCATION_SPEED_UNKNOWN) {
if (cur_location != NULL && priv->compute_movement) {
guint64 cur_timestamp, timestamp;
- timestamp = geocode_location_get_timestamp (gloc);
+ timestamp = geocode_location_get_timestamp
+ (GEOCODE_LOCATION (location));
cur_timestamp = geocode_location_get_timestamp
(GEOCODE_LOCATION (cur_location));