summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2019-06-24 15:25:15 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2019-06-24 15:31:29 +0200
commit9272d54a67700c9f8f212db2eb4dcd8404bb94a4 (patch)
tree0f248b1059f417487e087d17338b5efab232164e
parent9ef81a0820c7951e6dffc047e83d83a467c128b2 (diff)
downloadnetwork-manager-applet-bg/fix-editor-crash.tar.gz
editor: register to the connection-removed signal only oncebg/fix-editor-crash
The callback was called multiple times for a single removal because it was registered multiple times. Fixes: 4d7546e7d0e56c3a102a12ba03695eac6f8109f8
-rw-r--r--src/connection-editor/nm-connection-list.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/connection-editor/nm-connection-list.c b/src/connection-editor/nm-connection-list.c
index ad1bde97..6e23eb26 100644
--- a/src/connection-editor/nm-connection-list.c
+++ b/src/connection-editor/nm-connection-list.c
@@ -981,7 +981,6 @@ connection_added (NMClient *client,
gtk_tree_path_free (path);
}
- g_signal_connect (client, NM_CLIENT_CONNECTION_REMOVED, G_CALLBACK (connection_removed), self);
g_signal_connect (connection, NM_CONNECTION_CHANGED, G_CALLBACK (connection_changed), self);
gtk_tree_model_filter_refilter (priv->filter);
}
@@ -1011,6 +1010,10 @@ nm_connection_list_new (void)
NM_CLIENT_CONNECTION_ADDED,
G_CALLBACK (connection_added),
list);
+ g_signal_connect (priv->client,
+ NM_CLIENT_CONNECTION_REMOVED,
+ G_CALLBACK (connection_removed),
+ list);
add_connection_buttons (list);
initialize_treeview (list);