|
|
9b746a |
From 3f7c47e70915bb085d956d0b3c36d36e4c0da05b Mon Sep 17 00:00:00 2001
|
|
|
9b746a |
From: Carlos Garnacho <carlosg@gnome.org>
|
|
|
9b746a |
Date: Mon, 16 Dec 2019 14:06:43 +0100
|
|
|
9b746a |
Subject: [PATCH] network: Use connect object on signals
|
|
|
9b746a |
|
|
|
9b746a |
This ensures the signals are disconnected on panel finalization.
|
|
|
9b746a |
---
|
|
|
9b746a |
panels/network/cc-network-panel.c | 16 ++++++++--------
|
|
|
9b746a |
1 file changed, 8 insertions(+), 8 deletions(-)
|
|
|
9b746a |
|
|
|
9b746a |
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
|
|
|
9b746a |
index 1a072a65a..deb4b967e 100644
|
|
|
9b746a |
--- a/panels/network/cc-network-panel.c
|
|
|
9b746a |
+++ b/panels/network/cc-network-panel.c
|
|
|
9b746a |
@@ -881,14 +881,14 @@ cc_network_panel_init (CcNetworkPanel *panel)
|
|
|
9b746a |
|
|
|
9b746a |
/* use NetworkManager client */
|
|
|
9b746a |
panel->client = nm_client_new (NULL, NULL);
|
|
|
9b746a |
- g_signal_connect (panel->client, "notify::nm-running" ,
|
|
|
9b746a |
- G_CALLBACK (manager_running), panel);
|
|
|
9b746a |
- g_signal_connect (panel->client, "notify::active-connections",
|
|
|
9b746a |
- G_CALLBACK (active_connections_changed), panel);
|
|
|
9b746a |
- g_signal_connect (panel->client, "device-added",
|
|
|
9b746a |
- G_CALLBACK (device_added_cb), panel);
|
|
|
9b746a |
- g_signal_connect (panel->client, "device-removed",
|
|
|
9b746a |
- G_CALLBACK (device_removed_cb), panel);
|
|
|
9b746a |
+ g_signal_connect_object (panel->client, "notify::nm-running" ,
|
|
|
9b746a |
+ G_CALLBACK (manager_running), panel, 0);
|
|
|
9b746a |
+ g_signal_connect_object (panel->client, "notify::active-connections",
|
|
|
9b746a |
+ G_CALLBACK (active_connections_changed), panel, 0);
|
|
|
9b746a |
+ g_signal_connect_object (panel->client, "device-added",
|
|
|
9b746a |
+ G_CALLBACK (device_added_cb), panel, 0);
|
|
|
9b746a |
+ g_signal_connect_object (panel->client, "device-removed",
|
|
|
9b746a |
+ G_CALLBACK (device_removed_cb), panel, 0);
|
|
|
9b746a |
|
|
|
9b746a |
/* Setup ModemManager client */
|
|
|
9b746a |
system_bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
|
|
|
9b746a |
--
|
|
|
9b746a |
2.24.0
|
|
|
9b746a |
|