Lines Matching +full:machine +full:- +full:mode +full:- +full:visible

1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
5 * Introduced single menu mode (show all sub-menus in one large tree).
6 * 2002-11-06 Petr Baudis <pasky@ucw.cz>
24 #include "mnconf-common.h"
28 "--------\n"
30 "Features can either be built-in, modularized, or ignored. Parameters\n"
37 " - - are selected by other feature,\n"
44 "through the available options (i.e. Y->N->M->Y).\n"
49 "----------\n"
52 " Submenus are designated by \"--->\", empty ones by \"----\".\n"
56 " through all visible items which use that hotkey.\n"
80 "-----------\n"
97 "-----------\n"
107 "--------\n"
116 "-----------------------------\n"
131 "-----------------\n"
149 "------------------------------\n"
159 "Note that this mode can eventually be a little more CPU expensive\n"
161 "default mode.\n"
165 "-------\n"
166 "Pressing the forward-slash (/) anywhere brings up a search dialog box.\n"
170 "--------------------------------\n"
184 "<Enter> selects submenus ---> (or empty submenus ----). "
188 "Legend: [*] built-in [ ] excluded <M> module < > module capable",
214 "configurations available on a single machine.\n"
228 "available on a single machine.\n"
242 "-----------------------------------------------------------------\n"
247 " -> Bus options (PCI, PCMCIA, EISA, ISA)\n"
248 " -> PCI support (PCI [=y])\n"
249 "(1) -> PCI access mode (<choice> [=y])\n"
254 "-----------------------------------------------------------------\n"
262 " this symbol to be visible in the menu (selectable)\n"
266 " selectable menu item - and the current value is displayed inside\n"
298 snprintf(menu_backtitle, sizeof(menu_backtitle), "%s - %s", in set_config_filename()
299 config_filename, rootmenu.prompt->text); in set_config_filename()
318 tmp = pos->next; in set_subtitle()
324 if (sp->text) { in set_subtitle()
326 pos->next = xcalloc(1, sizeof(*pos)); in set_subtitle()
327 pos = pos->next; in set_subtitle()
331 pos->text = sp->text; in set_subtitle()
343 tmp = pos->next; in reset_subtitle()
374 help.max_width = getmaxx(stdscr) - 10; in show_help()
439 conf(data.target->parent, data.target); in search_conf()
460 bool visible; in build_conf() local
466 visible = menu_is_visible(menu); in build_conf()
469 else if (!show_all_options && !visible) in build_conf()
472 sym = menu->sym; in build_conf()
473 prop = menu->prompt; in build_conf()
477 switch (prop->type) { in build_conf()
482 menu->data ? "-->" : "++>", in build_conf()
487 menu_is_empty(menu) ? "----" : "--->"); in build_conf()
490 if (single_menu_mode && menu->data) in build_conf()
504 item_make("---%*c%s", indent + 1, ' ', prompt); in build_conf()
520 for (child = menu->list; child; child = child->next) { in build_conf()
521 if (menu_is_visible(child) && child->sym == def_sym) in build_conf()
552 item_add_str(" --->"); in build_conf()
553 if (def_menu->list) { in build_conf()
556 indent -= 2; in build_conf()
563 item_make("---%*c%s", indent + 1, ' ', menu_get_prompt(menu)); in build_conf()
580 item_make("-%c-", val == no ? ' ' : '*'); in build_conf()
591 if (sym->rev_dep.tri == mod) in build_conf()
596 item_make("-%c-", ch); in build_conf()
603 tmp = indent - tmp + 4; in build_conf()
617 if (menu->prompt->type == P_MENU) { in build_conf()
618 item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->"); in build_conf()
625 for (child = menu->list; child; child = child->next) in build_conf()
627 indent -= doint; in build_conf()
636 active = sym_get_choice_value(menu->sym); in conf_choice()
643 for (child = menu->list; child; child = child->next) { in conf_choice()
646 if (child->sym) in conf_choice()
653 if (child->sym == active) in conf_choice()
655 if (child->sym == sym_get_choice_value(menu->sym)) in conf_choice()
669 if (!child->sym) in conf_choice()
672 sym_set_tristate_value(child->sym, yes); in conf_choice()
679 active = child->sym; in conf_choice()
685 case -ERRDISPLAYTOOSMALL: in conf_choice()
699 switch (sym_get_type(menu->sym)) { in conf_string()
715 sym_get_string_value(menu->sym)); in conf_string()
718 if (sym_set_string_value(menu->sym, dialog_input_result)) in conf_string()
811 if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL) in conf()
822 sym = submenu->sym; in conf()
831 submenu->data = (void *) (long) !submenu->data; in conf()
838 else if (submenu->prompt->type == P_MENU) in conf()
919 res = -1; in handle_exit()
934 case -1: in handle_exit()
961 char *mode; in main() local
966 if (ac > 1 && strcmp(av[1], "-s") == 0) { in main()
975 mode = getenv("MENUCONFIG_MODE"); in main()
976 if (mode) { in main()
977 if (!strcasecmp(mode, "single_menu")) in main()