[gnome-control-center] wifi: Use g_signal_connect_object
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] wifi: Use g_signal_connect_object
- Date: Tue, 14 Aug 2018 00:06:12 +0000 (UTC)
commit 3642cb2d825248f1ec38e0dbd8fea5ea14193e6e
Author: Robert Ancell <robert ancell canonical com>
Date: Mon Aug 6 10:28:39 2018 +1200
wifi: Use g_signal_connect_object
The previous code used the g_signal_connect which could leave the signals
connected even after the NetDeviceWifi object was destroyed.
Automatic crash reports in Ubuntu indicate that this might be happening:
https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1718727
panels/network/net-device-wifi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/panels/network/net-device-wifi.c b/panels/network/net-device-wifi.c
index b2d5b3d5f..3d3a54d80 100644
--- a/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c
@@ -1597,10 +1597,10 @@ net_device_wifi_constructed (GObject *object)
} else
gtk_widget_set_sensitive (widget, TRUE);
- g_signal_connect (client, NM_CLIENT_CONNECTION_ADDED,
- G_CALLBACK (client_connection_added_cb), device_wifi);
- g_signal_connect (client, NM_CLIENT_CONNECTION_REMOVED,
- G_CALLBACK (client_connection_removed_cb), device_wifi);
+ g_signal_connect_object (client, NM_CLIENT_CONNECTION_ADDED,
+ G_CALLBACK (client_connection_added_cb), device_wifi, 0);
+ g_signal_connect_object (client, NM_CLIENT_CONNECTION_REMOVED,
+ G_CALLBACK (client_connection_removed_cb), device_wifi, 0);
widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder, "heading_list"));
g_object_bind_property (device_wifi, "title", widget, "label", 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]