From 837f058fb307e0bcf7b9ad4f02a44ea3047f427e Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 15 Jul 2004 06:01:05 +0000 Subject: 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 --- scripts/config/mconf.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'scripts/config/mconf.c') 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) struct menu *child; struct symbol *active; + active = sym_get_choice_value(menu->sym); while (1) { current_menu = menu; - active = sym_get_choice_value(menu->sym); cdone(); cinit(); for (child = menu->list; child; child = child->next) { if (!menu_is_visible(child)) @@ -525,19 +525,28 @@ static void conf_choice(struct menu *menu) cmake(); cprint_tag("%p", child); cprint_name("%s", menu_get_prompt(child)); - items[item_no - 1]->selected = (child->sym == active); + if (child->sym == sym_get_choice_value(menu->sym)) + items[item_no - 1]->selected = 1; /* ON */ + else if (child->sym == active) + items[item_no - 1]->selected = 2; /* SELECTED */ + else + items[item_no - 1]->selected = 0; /* OFF */ } switch (dialog_checklist(prompt ? prompt : "Main Menu", radiolist_instructions, 15, 70, 6, item_no, items, FLAG_RADIO)) { case 0: - if (sscanf(first_sel_item(item_no, items)->tag, "%p", &menu) != 1) + if (sscanf(first_sel_item(item_no, items)->tag, "%p", &child) != 1) break; - sym_set_tristate_value(menu->sym, yes); + sym_set_tristate_value(child->sym, yes); return; case 1: - show_help(menu); + if (sscanf(first_sel_item(item_no, items)->tag, "%p", &child) == 1) { + show_help(child); + active = child->sym; + } else + show_help(menu); break; case 255: return; -- cgit v1.2.3-55-g6feb