Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39177ec3 authored by Peter Korsgaard's avatar Peter Korsgaard Committed by Michal Marek
Browse files

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: default avatarPeter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent 0597fcd0
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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 ' ':