|
|
a780b2 |
From 06b1f439c05a20b790cebb850d8ba514249583c4 Mon Sep 17 00:00:00 2001
|
|
|
a780b2 |
From: Carlos Garnacho <carlosg@gnome.org>
|
|
|
a780b2 |
Date: Tue, 3 Dec 2019 16:56:59 +0100
|
|
|
a780b2 |
Subject: [PATCH] network: Use g_signal_connect_object() when dealing with
|
|
|
a780b2 |
NMClient
|
|
|
a780b2 |
|
|
|
a780b2 |
We may get signal emissions and property changes during NMClient
|
|
|
a780b2 |
destruction, triggered from CcWifiPanel destruction. This triggers
|
|
|
a780b2 |
callbacks that were not meant to trigger on panel destruction.
|
|
|
a780b2 |
---
|
|
|
a780b2 |
panels/network/cc-wifi-panel.c | 28 ++++++++++++++--------------
|
|
|
a780b2 |
1 file changed, 14 insertions(+), 14 deletions(-)
|
|
|
a780b2 |
|
|
|
a780b2 |
diff --git a/panels/network/cc-wifi-panel.c b/panels/network/cc-wifi-panel.c
|
|
|
a780b2 |
index 2c1cd17b7..7dd182e59 100644
|
|
|
a780b2 |
--- a/panels/network/cc-wifi-panel.c
|
|
|
a780b2 |
+++ b/panels/network/cc-wifi-panel.c
|
|
|
a780b2 |
@@ -621,20 +621,20 @@ cc_wifi_panel_init (CcWifiPanel *self)
|
|
|
a780b2 |
/* Load NetworkManager */
|
|
|
a780b2 |
self->client = nm_client_new (NULL, NULL);
|
|
|
a780b2 |
|
|
|
a780b2 |
- g_signal_connect (self->client,
|
|
|
a780b2 |
- "device-added",
|
|
|
a780b2 |
- G_CALLBACK (device_added_cb),
|
|
|
a780b2 |
- self);
|
|
|
a780b2 |
-
|
|
|
a780b2 |
- g_signal_connect (self->client,
|
|
|
a780b2 |
- "device-removed",
|
|
|
a780b2 |
- G_CALLBACK (device_removed_cb),
|
|
|
a780b2 |
- self);
|
|
|
a780b2 |
-
|
|
|
a780b2 |
- g_signal_connect (self->client,
|
|
|
a780b2 |
- "notify::wireless-enabled",
|
|
|
a780b2 |
- G_CALLBACK (wireless_enabled_cb),
|
|
|
a780b2 |
- self);
|
|
|
a780b2 |
+ g_signal_connect_object (self->client,
|
|
|
a780b2 |
+ "device-added",
|
|
|
a780b2 |
+ G_CALLBACK (device_added_cb),
|
|
|
a780b2 |
+ self, 0);
|
|
|
a780b2 |
+
|
|
|
a780b2 |
+ g_signal_connect_object (self->client,
|
|
|
a780b2 |
+ "device-removed",
|
|
|
a780b2 |
+ G_CALLBACK (device_removed_cb),
|
|
|
a780b2 |
+ self, 0);
|
|
|
a780b2 |
+
|
|
|
a780b2 |
+ g_signal_connect_object (self->client,
|
|
|
a780b2 |
+ "notify::wireless-enabled",
|
|
|
a780b2 |
+ G_CALLBACK (wireless_enabled_cb),
|
|
|
a780b2 |
+ self, 0);
|
|
|
a780b2 |
|
|
|
a780b2 |
/* Load Wi-Fi devices */
|
|
|
a780b2 |
load_wifi_devices (self);
|
|
|
a780b2 |
--
|
|
|
a780b2 |
2.24.0
|
|
|
a780b2 |
|