diff options
Diffstat (limited to 'scripts/config/mconf.c')
-rw-r--r-- | scripts/config/mconf.c | 19 |
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; |