MCPcopy Create free account
hub / github.com/Entware/Entware / setMenuLink

Method setMenuLink

scripts/config/qconf.cc:1608–1663  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1606}
1607
1608void ConfigMainWindow::setMenuLink(struct menu *menu)
1609{
1610 struct menu *parent;
1611 ConfigList* list = NULL;
1612 ConfigItem* item;
1613
1614 if (configList->menuSkip(menu))
1615 return;
1616
1617 switch (configList->mode) {
1618 case singleMode:
1619 list = configList;
1620 parent = menu_get_parent_menu(menu);
1621 if (!parent)
1622 return;
1623 list->setRootMenu(parent);
1624 break;
1625 case menuMode:
1626 if (menu->flags & MENU_ROOT) {
1627 menuList->setRootMenu(menu);
1628 configList->clearSelection();
1629 list = configList;
1630 } else {
1631 parent = menu_get_parent_menu(menu->parent);
1632 if (!parent)
1633 return;
1634
1635 /* Select the config view */
1636 item = configList->findConfigItem(parent);
1637 if (item) {
1638 configList->setSelected(item, true);
1639 configList->scrollToItem(item);
1640 }
1641
1642 menuList->setRootMenu(parent);
1643 menuList->clearSelection();
1644 list = menuList;
1645 }
1646 break;
1647 case fullMode:
1648 list = configList;
1649 break;
1650 default:
1651 break;
1652 }
1653
1654 if (list) {
1655 item = list->findConfigItem(menu);
1656 if (item) {
1657 list->setSelected(item, true);
1658 list->scrollToItem(item);
1659 list->setFocus();
1660 helpText->setInfo(menu);
1661 }
1662 }
1663}
1664
1665void ConfigMainWindow::listFocusChanged(void)

Callers

nothing calls this directly

Calls 6

menu_get_parent_menuFunction · 0.85
menuSkipMethod · 0.80
setRootMenuMethod · 0.80
findConfigItemMethod · 0.80
setSelectedMethod · 0.80
setInfoMethod · 0.80

Tested by

no test coverage detected