* Kconfig choice menu help text is not working in -test8 @ 2003-10-25 7:44 Rob Landley 2003-10-25 11:26 ` Sam Ravnborg 0 siblings, 1 reply; 5+ messages in thread From: Rob Landley @ 2003-10-25 7:44 UTC (permalink / raw) To: linux-kernel 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. To see this bug in action, go to "processor type and features", and descend into the "subarchitecture menu" at the top of it. Pull up the help text on anything, it'll say there's no help available. Now look at arch/i386/Kconfig, and note that there IS help text for all those menu choices. It's just not displaying it... Rob ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kconfig choice menu help text is not working in -test8 2003-10-25 7:44 Kconfig choice menu help text is not working in -test8 Rob Landley @ 2003-10-25 11:26 ` Sam Ravnborg 2003-10-25 21:24 ` Rob Landley 0 siblings, 1 reply; 5+ messages in thread From: Sam Ravnborg @ 2003-10-25 11:26 UTC (permalink / raw) To: Rob Landley; +Cc: linux-kernel 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; ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kconfig choice menu help text is not working in -test8 2003-10-25 11:26 ` Sam Ravnborg @ 2003-10-25 21:24 ` Rob Landley 2003-10-25 21:30 ` Sam Ravnborg 0 siblings, 1 reply; 5+ messages in thread From: Rob Landley @ 2003-10-25 21:24 UTC (permalink / raw) To: Sam Ravnborg; +Cc: linux-kernel On Saturday 25 October 2003 06:26, Sam Ravnborg wrote: > 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 I just tested it. No effect on this problem, maybe it fixes something else... (Looking at the patch, it prints stuff to stderr, adds adds a "selected" case to something that was previously on/off... I don't think it's really addressing this issue...) Rob ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kconfig choice menu help text is not working in -test8 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 0 siblings, 1 reply; 5+ messages in thread From: Sam Ravnborg @ 2003-10-25 21:30 UTC (permalink / raw) To: Rob Landley; +Cc: Sam Ravnborg, linux-kernel On Sat, Oct 25, 2003 at 04:24:07PM -0500, Rob Landley wrote: > On Saturday 25 October 2003 06:26, Sam Ravnborg wrote: > > 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 > > I just tested it. No effect on this problem, maybe it fixes something else... > > (Looking at the patch, it prints stuff to stderr, adds adds a "selected" case > to something that was previously on/off... I don't think it's really > addressing this issue...) That explains why Roman Zippel did not apply it - thanks for the testing. Sam ^ permalink raw reply [flat|nested] 5+ messages in thread
* [patch] make Kconfig choice menu help text work in -test8 2003-10-25 21:30 ` Sam Ravnborg @ 2003-10-26 3:16 ` Rob Landley 0 siblings, 0 replies; 5+ messages in thread From: Rob Landley @ 2003-10-26 3:16 UTC (permalink / raw) To: Sam Ravnborg; +Cc: linux-kernel, Roman Zippel > > (Looking at the patch, it prints stuff to stderr, adds adds a "selected" > > case to something that was previously on/off... I don't think it's > > really addressing this issue...) > > That explains why Roman Zippel did not apply it - thanks for the testing. > > Sam I had a spare couple of hours this evening, so I whipped up a patch of my own to actually fix the thing, working from first principles and tracing through yacc and lexx code at one point. With the benefit of hindsight, it turns out the other patch wasn't actually that far off. I only noticed that just now, I had to figure out how mconf.c was shelling out to lxdialog and getting data back on stderr first to realize that yes, printing stuff to stderr is in fact an important part of getting this to work. :) Here's the fix. Go to into "processor type and features" from the main menu, then the "subarchitecture" menu at the top of that, and notice the entries in it now have help options. Rob diff -ru linux-2.6.0-test8/scripts/kconfig/mconf.c linux-test8-new/scripts/kconfig/mconf.c --- linux-2.6.0-test8/scripts/kconfig/mconf.c 2003-10-17 16:42:56.000000000 -0500 +++ linux-test8-new/scripts/kconfig/mconf.c 2003-10-25 21:59:31.000000000 -0500 @@ -635,7 +635,9 @@ sym_set_tristate_value(menu->sym, yes); return; case 1: - show_help(menu); + if(sscanf(input_buf, "%p", &child) != 1) + break; + show_help(child); break; case 255: return; diff -ru linux-2.6.0-test8/scripts/lxdialog/checklist.c linux-test8-new/scripts/lxdialog/checklist.c --- linux-2.6.0-test8/scripts/lxdialog/checklist.c 2003-10-17 16:43:10.000000000 -0500 +++ linux-test8-new/scripts/lxdialog/checklist.c 2003-10-25 21:56:04.000000000 -0500 @@ -299,12 +299,6 @@ continue; /* wait for another key press */ } switch (key) { - case 'H': - case 'h': - case '?': - delwin (dialog); - free (status); - return 1; case TAB: case KEY_LEFT: case KEY_RIGHT: @@ -314,6 +308,11 @@ print_buttons(dialog, height, width, button); wrefresh (dialog); break; + case 'H': + case 'h': + case '?': + button=1; + /* Fall through */ case 'S': case 's': case ' ': @@ -347,7 +346,9 @@ } } - } + } else { + fprintf(stderr,"%s",items[choice * 3]); + } delwin (dialog); free (status); return button; ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-10-26 4:09 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-10-25 7:44 Kconfig choice menu help text is not working in -test8 Rob Landley 2003-10-25 11:26 ` Sam Ravnborg 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox