merge: branch 'ih/nmtui_esc'

nmtui: fix deletion confirmation with ESC key press

Closes #1460

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1835
This commit is contained in:
Íñigo Huguet 2024-01-19 06:56:13 +00:00
commit 4f90b3e036
2 changed files with 2 additions and 2 deletions

View file

@ -282,7 +282,7 @@ nmt_newt_message_dialog(const char *message, ...)
* Displays the given message in a dialog box with two buttons with
* the indicated labels, and waits for the user to click one.
*
* Returns: which button was clicked: 0 for @button1 or 1 for @button2
* Returns: which button was clicked: 1 for @button1, 2 for @button2 or 0 otherwise
*/
int
nmt_newt_choice_dialog(const char *button1, const char *button2, const char *message, ...)

View file

@ -511,7 +511,7 @@ nmt_remove_connection(NMRemoteConnection *connection)
_("Delete"),
_("Are you sure you want to delete the connection '%s'?"),
nm_connection_get_id(NM_CONNECTION(connection)));
if (choice == 1)
if (choice != 2)
return;
g_object_ref(connection);