about summary refs log tree commit diff
path: root/clients/tui
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2020-07-02 11:35:14 +0200
committerSebastien Bacher <seb128@ubuntu.com>2020-07-02 11:52:25 +0200
commitc6c4e39b012d544c1f1ed816686c8ae1599da793 (patch)
tree094d5e07c1d135d0ee67d99e051fd6a9a367a6a4 /clients/tui
parent7368e45ff5b3b8b328d55408bcd403e4d6c564d0 (diff)
parentacd7b014c72673f5b0c0b91309e27028886da167 (diff)
Merge remote-tracking branch 'salsa/debian/master' into ubuntu/master
Diffstat (limited to 'clients/tui')
-rw-r--r--clients/tui/nmtui-connect.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/clients/tui/nmtui-connect.c b/clients/tui/nmtui-connect.c
index 1ea20305..ea332096 100644
--- a/clients/tui/nmtui-connect.c
+++ b/clients/tui/nmtui-connect.c
@@ -222,6 +222,17 @@ add_and_activate_callback (GObject      *client,
 }
 
 static void
+deactivate_connection (NMActiveConnection *ac)
+{
+	GError *error = NULL;
+
+	if (!nm_client_deactivate_connection (nm_client, ac, NULL, &error)) {
+		nmt_newt_message_dialog (_("Could not deactivate connection: %s"), error->message);
+		g_clear_error (&error);
+	}
+}
+
+static void
 activate_connection (NMConnection *connection,
                      NMDevice     *device,
                      NMObject     *specific_object)
@@ -349,7 +360,7 @@ listbox_activated (NmtNewtListbox *listbox,
 		return;
 
 	if (ac)
-		nm_client_deactivate_connection (nm_client, ac, NULL, NULL);
+		deactivate_connection (ac);
 	else
 		activate_connection (connection, device, specific_object);
 }