From: Sam Ravnborg <sam@ravnborg.org>
To: Rob Landley <rob@landley.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Kconfig choice menu help text is not working in -test8
Date: Sat, 25 Oct 2003 13:26:37 +0200 [thread overview]
Message-ID: <20031025112637.GA901@mars.ravnborg.org> (raw)
In-Reply-To: <200310250244.56881.rob@landley.net>
On Sat, Oct 25, 2003 at 02:44:56AM -0500, Rob Landley wrote:
> I'm banging away on the bzip patch, adding a choice menu to kconfig for
> bzip/gzip/uncompressed, and I notice that the help text isn't working right.
Anders Gustafsson <andersg@0x63.nu> posted this patch some time ago.
I never came around testing it.
Sam
ChangeSet@1.1292, 2003-08-24 22:22:55+02:00, andersg@0x63.nu
Make menuconfig display helptext in "choice" menus.
kconfig/mconf.c | 20 ++++++++++++++++----
lxdialog/checklist.c | 3 ++-
2 files changed, 18 insertions(+), 5 deletions(-)
diff -Nru a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
--- a/scripts/kconfig/mconf.c Sun Aug 24 22:26:52 2003
+++ b/scripts/kconfig/mconf.c Sun Aug 24 22:26:52 2003
@@ -607,6 +607,7 @@
struct symbol *active;
int stat;
+ active = sym_get_choice_value(menu->sym);
while (1) {
cprint_init();
cprint("--title");
@@ -618,13 +619,18 @@
cprint("6");
current_menu = menu;
- active = sym_get_choice_value(menu->sym);
for (child = menu->list; child; child = child->next) {
if (!menu_is_visible(child))
continue;
cprint("%p", child);
cprint("%s", menu_get_prompt(child));
- cprint(child->sym == active ? "ON" : "OFF");
+ if (sym_get_choice_value(menu->sym) == child->sym) {
+ cprint("ON");
+ }else if (active== child->sym) {
+ cprint("SELECTED");
+ }else{
+ cprint("OFF");
+ }
}
stat = exec_conf();
@@ -634,9 +640,15 @@
break;
sym_set_tristate_value(menu->sym, yes);
return;
- case 1:
- show_help(menu);
+ case 1: {
+ struct menu *tmp;
+ if (sscanf(input_buf, "%p", &tmp) == 1) {
+ show_help(tmp);
+ active=tmp->sym;
+ } else
+ show_help(menu);
break;
+ }
case 255:
return;
}
diff -Nru a/scripts/lxdialog/checklist.c b/scripts/lxdialog/checklist.c
--- a/scripts/lxdialog/checklist.c Sun Aug 24 22:26:52 2003
+++ b/scripts/lxdialog/checklist.c Sun Aug 24 22:26:52 2003
@@ -138,7 +138,7 @@
/* Initializes status */
for (i = 0; i < item_no; i++) {
status[i] = !strcasecmp (items[i * 3 + 2], "on");
- if (!choice && status[i])
+ if ((!choice && status[i]) || (!strcasecmp (items[i * 3 + 2], "selected")))
choice = i;
}
@@ -302,6 +302,7 @@
case 'H':
case 'h':
case '?':
+ fprintf (stderr, "%s", items[(scroll + choice) * 3]);
delwin (dialog);
free (status);
return 1;
next prev parent reply other threads:[~2003-10-25 11:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-25 7:44 Kconfig choice menu help text is not working in -test8 Rob Landley
2003-10-25 11:26 ` Sam Ravnborg [this message]
2003-10-25 21:24 ` Rob Landley
2003-10-25 21:30 ` Sam Ravnborg
2003-10-26 3:16 ` [patch] make Kconfig choice menu help text work " Rob Landley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031025112637.GA901@mars.ravnborg.org \
--to=sam@ravnborg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob@landley.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox