[empathy/gnome-3-12] location-manager: fix reduce accuracy setting
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy/gnome-3-12] location-manager: fix reduce accuracy setting
- Date: Fri, 22 Jul 2016 13:53:55 +0000 (UTC)
commit f1b1b75e6772502290cbff5be2c8f31b61bdb6df
Author: Fabrice Bellet <fabrice bellet info>
Date: Mon Mar 23 01:30:50 2015 +0100
location-manager: fix reduce accuracy setting
https://bugzilla.gnome.org/show_bug.cgi?id=746735
libempathy-gtk/empathy-location-manager.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c
index 8787eb2..6ba39ac 100644
--- a/libempathy-gtk/empathy-location-manager.c
+++ b/libempathy-gtk/empathy-location-manager.c
@@ -368,6 +368,18 @@ publish_cb (GSettings *gsettings_loc,
}
static void
+reduce_accuracy_cb (GSettings *gsettings_loc,
+ const gchar *key,
+ gpointer user_data)
+{
+ EmpathyLocationManager *self = EMPATHY_LOCATION_MANAGER (user_data);
+
+ DEBUG ("Reduce Accuracy changed");
+
+ self->priv->reduce_accuracy = g_settings_get_boolean (gsettings_loc, key);
+}
+
+static void
account_manager_prepared_cb (GObject *source_object,
GAsyncResult *result,
gpointer user_data)
@@ -416,7 +428,12 @@ empathy_location_manager_init (EmpathyLocationManager *self)
"changed::" EMPATHY_PREFS_LOCATION_PUBLISH,
G_CALLBACK (publish_cb), self);
+ g_signal_connect (priv->gsettings_loc,
+ "changed::" EMPATHY_PREFS_LOCATION_REDUCE_ACCURACY,
+ G_CALLBACK (reduce_accuracy_cb), self);
+
publish_cb (priv->gsettings_loc, EMPATHY_PREFS_LOCATION_PUBLISH, self);
+ reduce_accuracy_cb (priv->gsettings_loc, EMPATHY_PREFS_LOCATION_REDUCE_ACCURACY, self);
}
EmpathyLocationManager *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]