diff options
author | Benjamin Poirier <bpoirier@suse.de> | 2012-08-23 14:55:04 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2012-09-27 18:08:14 +0200 |
commit | 537ddae75c0f41343928d39f308f3ca670f000a8 (patch) | |
tree | 623517db039bdc4d5b49bfb83ef8647428421ad2 /scripts/kconfig/mconf.c | |
parent | b9d29abd98a2bbeb3a6c49c1607348c92bc80105 (diff) | |
download | op-kernel-dev-537ddae75c0f41343928d39f308f3ca670f000a8.zip op-kernel-dev-537ddae75c0f41343928d39f308f3ca670f000a8.tar.gz |
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 <bpoirier@suse.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/kconfig/mconf.c')
-rw-r--r-- | scripts/kconfig/mconf.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index d856d40..e097efb 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) |