diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2019-04-11 20:17:22 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2019-04-11 21:10:09 +0200 |
| commit | 136c0e42f01dc3adfa29fb57f34f7d23234b8429 (patch) | |
| tree | 0320563b195f58960dbedd1a1004d01c975a733b | |
| parent | f7c19d5ab4d5e13f25054b546fc93cc467aab0e1 (diff) | |
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.
| -rwxr-xr-x | menuconfig.py | 8 |
1 files changed, 4 insertions, 4 deletions
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(): # '<choice (name if any)>'. 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 # '<choice (name if any)>'. 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 |
