From 136c0e42f01dc3adfa29fb57f34f7d23234b8429 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Thu, 11 Apr 2019 20:17:22 +0200 Subject: menuconfig: Include all parents in menu paths Previously, symbols not defined with 'menuconfig' with children weren't listed in the children's menu paths. It was deliberate, but it's probably an anti-feature in retrospect, because it can make it harder to find stuff by following the menu path. Don't try to be clever and just list all the parent nodes in the menu path. --- menuconfig.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'menuconfig.py') diff --git a/menuconfig.py b/menuconfig.py index e6adc6f..e2120a1 100755 --- a/menuconfig.py +++ b/menuconfig.py @@ -1415,12 +1415,12 @@ def _draw_main(): # ''. menu_prompts.append(menu.prompt[0] if menu.prompt else standard_sc_expr_str(menu.item)) - menu = _parent_menu(menu) + menu = menu.parent menu_prompts.append("(top menu)") menu_prompts.reverse() # Hack: We can't put ACS_RARROW directly in the string. Temporarily - # represent it with NULL. Maybe using a Unicode character would be better. + # represent it with NULL. menu_path_str = " \0 ".join(menu_prompts) # Scroll the menu path to the right if needed to make the current menu's @@ -2731,14 +2731,14 @@ def _menu_path_info(node): path = "" - node = _parent_menu(node) + node = node.parent while node is not _kconf.top_node: # Promptless choices might appear among the parents. Use # standard_sc_expr_str() for them, so that they show up as # ''. path = " -> " + (node.prompt[0] if node.prompt else standard_sc_expr_str(node.item)) + path - node = _parent_menu(node) + node = node.parent return "(top menu)" + path -- cgit v1.2.3