[gnome-control-center] thunderbolt: react to security level changes



commit 05f2c5ef7c23d38148e3d584dfe2519f7c784766
Author: Christian Kellner <christian kellner me>
Date:   Wed Jan 23 17:59:45 2019 +0100

    thunderbolt: react to security level changes
    
    Listen for security level changes, which in theory should not really
    happen at all with the exception that on hardware where force power
    is not support and boltd has not yet seen the thunderbolt controller
    because it was powered down. Then we should get an initial change
    from 'unknown' to the real level. Handle it in the same way that
    as if boltd was restarted, i.e. the dbus name owner changed

 panels/thunderbolt/cc-bolt-panel.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/panels/thunderbolt/cc-bolt-panel.c b/panels/thunderbolt/cc-bolt-panel.c
index f45916627..8b64f5c86 100644
--- a/panels/thunderbolt/cc-bolt-panel.c
+++ b/panels/thunderbolt/cc-bolt-panel.c
@@ -205,6 +205,14 @@ bolt_client_ready (GObject      *source,
                            panel,
                            0);
 
+  /* Treat security-level changes, which should rarely happen, as
+   * if the name owner changed, i.e. as if boltd got restarted */
+  g_signal_connect_object (client,
+                           "notify::security-level",
+                           G_CALLBACK (on_bolt_name_owner_changed_cb),
+                           panel,
+                           0);
+
   panel->client = client;
 
   cc_bolt_device_dialog_set_client (panel->device_dialog, client);


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