diff options
author | Fabrice Bellet <fabrice@bellet.info> | 2015-03-23 01:30:50 +0100 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@gnome.org> | 2016-07-22 08:53:17 -0500 |
commit | f1b1b75e6772502290cbff5be2c8f31b61bdb6df (patch) | |
tree | e244d3edf81f362b1fd324666cbd8e7e20ae8f54 | |
parent | 9f0d8a6e7444dd59729bac2c24717ea72aea5080 (diff) | |
download | empathy-f1b1b75e6772502290cbff5be2c8f31b61bdb6df.tar.gz |
location-manager: fix reduce accuracy setting
https://bugzilla.gnome.org/show_bug.cgi?id=746735
-rw-r--r-- | 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 8787eb2c5..6ba39acfb 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 * |