X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=config%2Fmenu.c;h=da50f79a8e8db59f1995c8875fbdcbff41aa646d;hb=e3bae36f433a174644e8a2fe8bdad6c5f4fc0050;hp=b4fb0c88b6e0e0672b03053a71a98aec96a38e3b;hpb=b629618bef6049d6f0cc7506c3b6116f6cfaa62f;p=carl9170fw.git diff --git a/config/menu.c b/config/menu.c index b4fb0c8..da50f79 100644 --- a/config/menu.c +++ b/config/menu.c @@ -736,6 +736,17 @@ static void get_prompt_str(struct gstr *r, struct property *prop, str_printf(r, " Prompt: %s\n", prop->text); get_dep_str(r, prop->menu->dep, " Depends on: "); + /* + * Most prompts in Linux have visibility that exactly matches their + * dependencies. For these, we print only the dependencies to improve + * readability. However, prompts with inline "if" expressions and + * prompts with a parent that has a "visible if" expression have + * differing dependencies and visibility. In these rare cases, we + * print both. + */ + if (!expr_eq(prop->menu->dep, prop->visible.expr)) + get_dep_str(r, prop->visible.expr, " Visible if: "); + menu = prop->menu->parent; for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) { bool accessible = menu_is_visible(menu);