summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2011-01-06 16:42:45 +0100
committerMichal Marek <mmarek@suse.cz>2011-01-07 15:45:28 +0100
commit39177ec36236fb71257e51d0d198437b84170911 (patch)
treeeecfc6761f8df11452ba9dba82f5a08ddae568df /scripts
parent0597fcd08b858df83b9f20afd6035311d92c48f8 (diff)
downloadlwn-39177ec36236fb71257e51d0d198437b84170911.tar.gz
lwn-39177ec36236fb71257e51d0d198437b84170911.zip
nconf: handle comment entries within choice/endchoice
Equivalent to af6c1598 (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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/nconf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index eda49ffc1c8c..db56377393d7 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -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;
@@ -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 ' ':