[gnome-control-center/gnome-3-26] privacy: update location state in panel when it changes



commit e7bf364cbb826dc32271a073a2a2f7abac78cb57
Author: Julian Sparber <julian sparber net>
Date:   Mon Nov 20 18:50:05 2017 +0100

    privacy: update location state in panel when it changes
    
    Add a signal handler for changes of the location setting to update
    (on/off/In use) lable.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=785891

 panels/privacy/cc-privacy-panel.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/panels/privacy/cc-privacy-panel.c b/panels/privacy/cc-privacy-panel.c
index 30f03f1..428dafe 100644
--- a/panels/privacy/cc-privacy-panel.c
+++ b/panels/privacy/cc-privacy-panel.c
@@ -833,6 +833,10 @@ add_location (CcPrivacyPanel *self)
                    w, "active",
                    G_SETTINGS_BIND_DEFAULT);
 
+  g_signal_connect_object (priv->location_settings, "changed::" LOCATION_ENABLED,
+                           G_CALLBACK (update_location_label), self,
+                           G_CONNECT_SWAPPED);
+
   priv->location_app_switches = g_hash_table_new_full (g_str_hash,
                                                        g_str_equal,
                                                        g_free,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]