summaryrefslogtreecommitdiff
path: root/extra/config/mconf.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-07-15 05:54:13 +0000
committerEric Andersen <andersen@codepoet.org>2004-07-15 05:54:13 +0000
commit6c2efd66d94ce13ac5b70aefd71cf2e66f4acbdf (patch)
tree4614629205be8798da130da69d369387d093ce38 /extra/config/mconf.c
parentdb5a9ef35b66e495feb4daf2e9576883dd52926f (diff)
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 'extra/config/mconf.c')
-rw-r--r--extra/config/mconf.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/extra/config/mconf.c b/extra/config/mconf.c
index 2193c7351..810032d59 100644
--- a/extra/config/mconf.c
+++ b/extra/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;