From 537ddae75c0f41343928d39f308f3ca670f000a8 Mon Sep 17 00:00:00 2001 From: Benjamin Poirier Date: Thu, 23 Aug 2012 14:55:04 -0400 Subject: menuconfig: Extend dialog_textbox so that it can exit on arbitrary keypresses The caller will be able to perform actions based on hotkeys in the displayed text. Signed-off-by: Benjamin Poirier Signed-off-by: Michal Marek --- scripts/kconfig/mconf.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'scripts/kconfig/mconf.c') diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index d856d40869e6..e097efb9c3ef 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c @@ -279,6 +279,8 @@ static void conf_choice(struct menu *menu); static void conf_string(struct menu *menu); static void conf_load(void); static void conf_save(void); +static int show_textbox_ext(const char *title, const char *text, int r, int c, + int *keys); static void show_textbox(const char *title, const char *text, int r, int c); static void show_helptext(const char *title, const char *text); static void show_help(struct menu *menu); @@ -618,10 +620,16 @@ static void conf(struct menu *menu) } } -static void show_textbox(const char *title, const char *text, int r, int c) +static int show_textbox_ext(const char *title, const char *text, int r, int c, + int *keys) { dialog_clear(); - dialog_textbox(title, text, r, c); + return dialog_textbox(title, text, r, c, keys); +} + +static void show_textbox(const char *title, const char *text, int r, int c) +{ + show_textbox_ext(title, text, r, c, (int []) {0}); } static void show_helptext(const char *title, const char *text) -- cgit v1.2.3-59-g8ed1b