diff options
author | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-07-28 23:57:48 +0200 |
---|---|---|
committer | Sam Ravnborg <sam@neptun.ravnborg.org> | 2006-09-30 11:19:20 +0200 |
commit | f3cbcdc955d0d2c8b4c52d6b73fc536b01b68c64 (patch) | |
tree | 3619243852b54799123f0fead031b8b45abf7aca /scripts/kconfig/lxdialog/inputbox.c | |
parent | 2982de6993e6d9944f2215d7cb9b558b465a0c99 (diff) | |
download | blackbird-obmc-linux-f3cbcdc955d0d2c8b4c52d6b73fc536b01b68c64.tar.gz blackbird-obmc-linux-f3cbcdc955d0d2c8b4c52d6b73fc536b01b68c64.zip |
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>
Diffstat (limited to 'scripts/kconfig/lxdialog/inputbox.c')
-rw-r--r-- | scripts/kconfig/lxdialog/inputbox.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/kconfig/lxdialog/inputbox.c b/scripts/kconfig/lxdialog/inputbox.c index 9c53098d6b74..edb7975dbaa2 100644 --- a/scripts/kconfig/lxdialog/inputbox.c +++ b/scripts/kconfig/lxdialog/inputbox.c @@ -106,7 +106,7 @@ int dialog_inputbox(const char *title, const char *prompt, int height, int width wrefresh(dialog); - while (key != ESC) { + while (key != KEY_ESC) { key = wgetch(dialog); if (button == -1) { /* Input box selected */ @@ -215,12 +215,14 @@ int dialog_inputbox(const char *title, const char *prompt, int height, int width return (button == -1 ? 0 : button); case 'X': case 'x': - key = ESC; - case ESC: + key = KEY_ESC; + break; + case KEY_ESC: + key = on_key_esc(dialog); break; } } delwin(dialog); - return 255; /* ESC pressed */ + return KEY_ESC; /* ESC pressed */ } |