NetworkManager/src/libnmt-newt
Íñigo Huguet 8f5a4f957f nmtui: fix deletion confirmation with ESC key press
When deleting a profile, the confirmation dialog shows "Cancel" and
"Delete" buttons. ESC key should do nothing, but in some distributions
like Debian and Ubuntu newt has a downstream patch that enables it (see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584098).

In that case, when pressing ESC the return value of the dialog is not
"Cancel" (1) or "Delete" (2), but the "otherwise" value (0). Fix it by
not checking if "Cancel" is pressed. Instead, check if "Delete" was
pressed, and continue deleting only in that case.

Also, fix the doc comment that incorrectly says that the dialog returns
0/1 for the buttons, it is 1/2.
2024-01-18 10:16:45 +01:00
..
meson.build build: move "clients/tui/newt/" to "src/libnmt-newt/" 2021-03-02 08:38:26 +01:00
nmt-newt-button-box.c all: use NM_MAX() instead of MAX() 2023-11-15 09:32:21 +01:00
nmt-newt-button-box.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-button.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-button.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-checkbox.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-checkbox.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-component.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-component.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-container.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-container.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-entry-numeric.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-entry-numeric.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-entry.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-entry.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-form.c all: use NM_MIN() instead of MIN() 2023-11-15 09:32:20 +01:00
nmt-newt-form.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-grid.c all: fix "-Wcast-align=strict" warnings for GArray casts 2022-12-09 09:15:55 +01:00
nmt-newt-grid.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-hacks.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-hacks.h build: move "clients/tui/newt/" to "src/libnmt-newt/" 2021-03-02 08:38:26 +01:00
nmt-newt-label.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-label.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-listbox.c doc: replace all (allow-none) annotations by (optional) and/or (nullable) 2023-03-27 11:49:43 +02:00
nmt-newt-listbox.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-popup.c all: fix "-Wcast-align=strict" warnings for GArray casts 2022-12-09 09:15:55 +01:00
nmt-newt-popup.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-section.c all: use NM_MAX() instead of MAX() 2023-11-15 09:32:21 +01:00
nmt-newt-section.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-separator.c build: move "clients/tui/newt/" to "src/libnmt-newt/" 2021-03-02 08:38:26 +01:00
nmt-newt-separator.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-stack.c newt: fix validity evaluation for stacks 2022-09-28 09:09:09 +02:00
nmt-newt-stack.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-textbox.c all: use NM_MIN() instead of MIN() 2023-11-15 09:32:20 +01:00
nmt-newt-textbox.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-toggle-button.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmt-newt-toggle-button.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt-types.h build: move "clients/tui/newt/" to "src/libnmt-newt/" 2021-03-02 08:38:26 +01:00
nmt-newt-utils.c nmtui: fix deletion confirmation with ESC key press 2024-01-18 10:16:45 +01:00
nmt-newt-utils.h build: move "clients/tui/newt/" to "src/libnmt-newt/" 2021-03-02 08:38:26 +01:00
nmt-newt-widget.c doc: use "Returns:" annotation instead of deprecated aliases 2023-03-29 11:46:48 +02:00
nmt-newt-widget.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmt-newt.h build: move "clients/tui/newt/" to "src/libnmt-newt/" 2021-03-02 08:38:26 +01:00
README.md all: add some README.md files describing the purpose of our sources 2021-08-19 17:51:11 +02:00

libnmt-newt

A helper library of UI elements on top of libnewt and libnm, for nmtui.