summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2018-05-24 18:14:50 +0200
committerBenjamin Berg <bberg@redhat.com>2018-05-24 19:23:08 +0200
commit44ff6ba4ddfd2a8ac01a5cd10b972c6b626f87e7 (patch)
tree211d830a71e7fd8f36f8ac7901fd36339cb05c65
parent36d4c8e38cbe9315d9f77a3b3ac5a1934f912c3b (diff)
downloadgnome-control-center-wip/benzea/stable-updates.tar.gz
network/net-vpn: Fix disconnecting of connection_removed_cb handlerwip/benzea/stable-updates
The disconnect was for the wrong object (connection rather than client). Fix this by simply moving to use g_signal_connect_object which obsoletes the explicit disconnect calls.
-rw-r--r--panels/network/net-vpn.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/panels/network/net-vpn.c b/panels/network/net-vpn.c
index 920db0773..490cfee46 100644
--- a/panels/network/net-vpn.c
+++ b/panels/network/net-vpn.c
@@ -112,14 +112,14 @@ net_vpn_set_connection (NetVpn *vpn, NMConnection *connection)
priv->connection = g_object_ref (connection);
client = net_object_get_client (NET_OBJECT (vpn));
- g_signal_connect (client,
+ g_signal_connect_object (client,
NM_CLIENT_CONNECTION_REMOVED,
G_CALLBACK (connection_removed_cb),
- vpn);
- g_signal_connect (connection,
+ vpn, 0);
+ g_signal_connect_object (connection,
NM_CONNECTION_CHANGED,
G_CALLBACK (connection_changed_cb),
- vpn);
+ vpn, 0);
priv->service_type = net_vpn_connection_to_type (priv->connection);
}
@@ -384,12 +384,6 @@ net_vpn_finalize (GObject *object)
g_object_unref (priv->active_connection);
}
- g_signal_handlers_disconnect_by_func (priv->connection,
- connection_removed_cb,
- vpn);
- g_signal_handlers_disconnect_by_func (priv->connection,
- connection_changed_cb,
- vpn);
g_object_unref (priv->connection);
g_free (priv->service_type);