diff options
| author | Michael Biebl <biebl@debian.org> | 2020-06-28 18:58:14 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-06-28 18:58:14 +0200 |
| commit | a54ac63bbf9b2c71026ac9028a8ffaf186cf3c82 (patch) | |
| tree | 6a32883bd916c4096357b35298beff6db8bcd0b5 /clients/tui | |
| parent | 45e8e1149027529194982212c804c0468aa01d98 (diff) | |
New upstream version 1.25.90 upstream/1.25.90
Diffstat (limited to 'clients/tui')
| -rw-r--r-- | clients/tui/nmtui-connect.c | 13 |
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); } |