mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
kconfig/lxdialog: let <ESC><ESC> behave as expected
<ESC><ESC> is used to step one back in the dialogs. When lxdialog became built-in pressing <ESC> once would cause one step back and pressing <ESC><ESC> would cause two steps back. This patch - based on concept from Roman Zippel <zippel@linux-m68k.org> - makes one <ESC> a noop and pressing <ESC><ESC> will cause one step backward. In addition the final yes/no dialog now has the option to go back to the the kernel configuration. So if you get too far out you can now go back to configuring the kernel without saving and starting all over again. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
2982de6993
commit
f3cbcdc955
8 changed files with 76 additions and 30 deletions
|
@ -92,7 +92,7 @@ int dialog_textbox(const char *title, const char *tbuf, int height, int width)
|
|||
wmove(dialog, cur_y, cur_x); /* Restore cursor position */
|
||||
wrefresh(dialog);
|
||||
|
||||
while ((key != ESC) && (key != '\n')) {
|
||||
while ((key != KEY_ESC) && (key != '\n')) {
|
||||
key = wgetch(dialog);
|
||||
switch (key) {
|
||||
case 'E': /* Exit */
|
||||
|
@ -228,13 +228,14 @@ int dialog_textbox(const char *title, const char *tbuf, int height, int width)
|
|||
wmove(dialog, cur_y, cur_x);
|
||||
wrefresh(dialog);
|
||||
break;
|
||||
case ESC:
|
||||
case KEY_ESC:
|
||||
key = on_key_esc(dialog);
|
||||
break;
|
||||
}
|
||||
}
|
||||
delwin(text);
|
||||
delwin(dialog);
|
||||
return 255; /* ESC pressed */
|
||||
return key; /* ESC pressed */
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue