aboutsummaryrefslogtreecommitdiff
path: root/scripts/config/mconf.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-07-15 06:01:05 +0000
committerEric Andersen <andersen@codepoet.org>2004-07-15 06:01:05 +0000
commit837f058fb307e0bcf7b9ad4f02a44ea3047f427e (patch)
treebde5459d496b1afc91b7d4a261b66252a47ca414 /scripts/config/mconf.c
parent449f2bca967dc4682a52487fe4a53f13c3623002 (diff)
downloadbusybox-w32-837f058fb307e0bcf7b9ad4f02a44ea3047f427e.tar.gz
busybox-w32-837f058fb307e0bcf7b9ad4f02a44ea3047f427e.tar.bz2
busybox-w32-837f058fb307e0bcf7b9ad4f02a44ea3047f427e.zip
Peter Kjellerstedt at axis.com writes:
Hello, the attached patch should bring extra/config in line with the Linux 2.6.7 sources. The following are the commit messages for the respective files from the Linux bk-repository: checklist.c: * fix menuconfig choice item help display confdata.c: * config: choice fix * kconfig: don't rename target dir when saving config expr.c, expr.h: * config: disable debug prints mconf.c: * fix menuconfig choice item help display menu.c: * Kconfig: use select statements symbol.c: * config: choice fix * Avoid bogus warning about recursive dependencies * c99 struct initialiser conversions textbox.c: * janitor: don't init statics to 0 util.c: * fix lxdialog behaviour //Peter
Diffstat (limited to 'scripts/config/mconf.c')
-rw-r--r--scripts/config/mconf.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/scripts/config/mconf.c b/scripts/config/mconf.c
index fe4562b17..0ac3a8d07 100644
--- a/scripts/config/mconf.c
+++ b/scripts/config/mconf.c
@@ -515,9 +515,9 @@ static void conf_choice(struct menu *menu)
515 struct menu *child; 515 struct menu *child;
516 struct symbol *active; 516 struct symbol *active;
517 517
518 active = sym_get_choice_value(menu->sym);
518 while (1) { 519 while (1) {
519 current_menu = menu; 520 current_menu = menu;
520 active = sym_get_choice_value(menu->sym);
521 cdone(); cinit(); 521 cdone(); cinit();
522 for (child = menu->list; child; child = child->next) { 522 for (child = menu->list; child; child = child->next) {
523 if (!menu_is_visible(child)) 523 if (!menu_is_visible(child))
@@ -525,19 +525,28 @@ static void conf_choice(struct menu *menu)
525 cmake(); 525 cmake();
526 cprint_tag("%p", child); 526 cprint_tag("%p", child);
527 cprint_name("%s", menu_get_prompt(child)); 527 cprint_name("%s", menu_get_prompt(child));
528 items[item_no - 1]->selected = (child->sym == active); 528 if (child->sym == sym_get_choice_value(menu->sym))
529 items[item_no - 1]->selected = 1; /* ON */
530 else if (child->sym == active)
531 items[item_no - 1]->selected = 2; /* SELECTED */
532 else
533 items[item_no - 1]->selected = 0; /* OFF */
529 } 534 }
530 535
531 switch (dialog_checklist(prompt ? prompt : "Main Menu", 536 switch (dialog_checklist(prompt ? prompt : "Main Menu",
532 radiolist_instructions, 15, 70, 6, 537 radiolist_instructions, 15, 70, 6,
533 item_no, items, FLAG_RADIO)) { 538 item_no, items, FLAG_RADIO)) {
534 case 0: 539 case 0:
535 if (sscanf(first_sel_item(item_no, items)->tag, "%p", &menu) != 1) 540 if (sscanf(first_sel_item(item_no, items)->tag, "%p", &child) != 1)
536 break; 541 break;
537 sym_set_tristate_value(menu->sym, yes); 542 sym_set_tristate_value(child->sym, yes);
538 return; 543 return;
539 case 1: 544 case 1:
540 show_help(menu); 545 if (sscanf(first_sel_item(item_no, items)->tag, "%p", &child) == 1) {
546 show_help(child);
547 active = child->sym;
548 } else
549 show_help(menu);
541 break; 550 break;
542 case 255: 551 case 255:
543 return; 552 return;