Skip to content

Commit

Permalink
nconf: handle comment entries within choice/endchoice
Browse files Browse the repository at this point in the history
Equivalent to af6c159 (kconfig: handle comment entries within
choice/endchoice), but for nconfig instead.

Implement support for comment entries within choice groups. Comment entries
are displayed visually distinct from normal configs, and selecting them is
a no-op.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
  • Loading branch information
Peter Korsgaard authored and Michal Marek committed Jan 7, 2011
1 parent 0597fcd commit 39177ec
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/kconfig/nconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1266,9 +1266,13 @@ static void conf_choice(struct menu *menu)
if (child->sym == sym_get_choice_value(menu->sym))
item_make(child, ':', "<X> %s",
_(menu_get_prompt(child)));
else
else if (child->sym)
item_make(child, ':', " %s",
_(menu_get_prompt(child)));
else
item_make(child, ':', "*** %s ***",
_(menu_get_prompt(child)));

if (child->sym == active){
last_top_row = top_row(curses_menu);
selected_index = i;
Expand Down Expand Up @@ -1334,7 +1338,7 @@ static void conf_choice(struct menu *menu)
break;

child = item_data();
if (!child || !menu_is_visible(child))
if (!child || !menu_is_visible(child) || !child->sym)
continue;
switch (res) {
case ' ':
Expand Down

0 comments on commit 39177ec

Please sign in to comment.