summaryrefslogtreecommitdiff
path: root/src/gclue-locator.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gclue-locator.c')
-rw-r--r--src/gclue-locator.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gclue-locator.c b/src/gclue-locator.c
index a7dd890..d9e8cdc 100644
--- a/src/gclue-locator.c
+++ b/src/gclue-locator.c
@@ -81,15 +81,14 @@ static GParamSpec *gParamSpecs[LAST_PROP];
static void
set_location (GClueLocator *locator,
- GClueLocation *location)
+ GClueLocation *location,
+ const char *src_name)
{
GClueLocation *cur_location;
cur_location = gclue_location_source_get_location
(GCLUE_LOCATION_SOURCE (locator));
- g_debug ("New location available");
-
if (cur_location != NULL) {
guint64 cur_timestamp, new_timestamp;
double dist, speed;
@@ -97,7 +96,8 @@ set_location (GClueLocator *locator,
cur_timestamp = gclue_location_get_timestamp (cur_location);
new_timestamp = gclue_location_get_timestamp (location);
if (new_timestamp < cur_timestamp) {
- g_debug ("New location older than current, ignoring.");
+ g_debug ("New %s location older than current, ignoring.",
+ src_name);
return;
}
@@ -126,11 +126,12 @@ set_location (GClueLocator *locator,
* a reasonable speed, OR it is more or as accurate as
* the previous one.
*/
- g_debug ("Ignoring less accurate new location");
+ g_debug ("Ignoring less accurate new %s location", src_name);
return;
}
}
+ g_debug ("New location available from %s", src_name);
gclue_location_source_set_location (GCLUE_LOCATION_SOURCE (locator),
location);
}
@@ -183,7 +184,7 @@ on_location_changed (GObject *gobject,
GClueLocation *location;
location = gclue_location_source_get_location (source);
- set_location (locator, location);
+ set_location (locator, location, G_OBJECT_TYPE_NAME (source));
}
static gboolean
@@ -206,7 +207,7 @@ start_source (GClueLocator *locator,
location = gclue_location_source_get_location (src);
if (gclue_location_source_get_active (src) && location != NULL)
- set_location (locator, location);
+ set_location (locator, location, G_OBJECT_TYPE_NAME (src));
gclue_location_source_start (src);
}