[gnome-settings-daemon] color: Request location updates with a larger time granularity
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] color: Request location updates with a larger time granularity
- Date: Mon, 24 Jul 2017 15:04:54 +0000 (UTC)
commit 991e82f5ad7997919055dfa3827cffb2c976c77c
Author: Rui Matos <tiagomatos gmail com>
Date: Sun Jul 23 17:49:04 2017 +0200
color: Request location updates with a larger time granularity
By default geoclue gives us location updates whenever they're
available which might be very frequently. As these updates are written
to disk and we don't really need them very frequently, we can request
them to be less frequent. Once per hour should be good enough for
our night light purposes.
https://bugzilla.gnome.org/show_bug.cgi?id=785342
plugins/color/gsd-night-light.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plugins/color/gsd-night-light.c b/plugins/color/gsd-night-light.c
index a8818de..6af94ef 100644
--- a/plugins/color/gsd-night-light.c
+++ b/plugins/color/gsd-night-light.c
@@ -449,6 +449,8 @@ on_geoclue_simple_ready (GObject *source_object,
self->geoclue_simple = geoclue_simple;
self->geoclue_client = gclue_simple_get_client (self->geoclue_simple);
+ g_object_set (G_OBJECT (self->geoclue_client),
+ "time-threshold", 60*60, NULL); /* 1 hour */
g_signal_connect (self->geoclue_simple, "notify::location",
G_CALLBACK (on_location_notify), user_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]