Changeset 74559 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Oct 1, 2018 4:46:39 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r74556 r74559 473 473 /* Get selected items: */ 474 474 QList<UIVirtualMachineItem*> items = currentItems(); 475 AssertMsgReturnVoid(!items.isEmpty(), ("At least one item should be selected!\n"));476 475 477 476 /* Populate the list of VM names: */ … … 1988 1987 /* Determine whether Machine or Group menu should be shown at all: */ 1989 1988 const bool fGlobalMenuShown = m_pWidget->isGlobalItemSelected(); 1990 const bool fMachineOrGroupMenuShown = m_pWidget->isMachineItemSelected() || m_pWidget->isGroupItemSelected();1991 1989 const bool fMachineMenuShown = !isSingleGroupSelected(); 1992 m_pMachineMenuAction->setVisible(fMachine OrGroupMenuShown && fMachineMenuShown);1993 m_pGroupMenuAction->setVisible( fMachineOrGroupMenuShown &&!fMachineMenuShown);1990 m_pMachineMenuAction->setVisible(fMachineMenuShown); 1991 m_pGroupMenuAction->setVisible(!fMachineMenuShown); 1994 1992 1995 1993 /* Determine whether Media actions should be visible: */ … … 2004 2002 2005 2003 /* Determine whether Snapshots actions should be visible: */ 2006 const bool fSnapshotMenuShown = fMachineOrGroupMenuShown &&m_pWidget->currentMachineTool() == ToolTypeMachine_Snapshots;2004 const bool fSnapshotMenuShown = m_pWidget->currentMachineTool() == ToolTypeMachine_Snapshots; 2007 2005 m_pSnapshotMenuAction->setVisible(fSnapshotMenuShown); 2008 2006 2009 2007 /* Determine whether Logs actions should be visible: */ 2010 const bool fLogViewerMenuShown = fMachineOrGroupMenuShown &&m_pWidget->currentMachineTool() == ToolTypeMachine_Logs;2008 const bool fLogViewerMenuShown = m_pWidget->currentMachineTool() == ToolTypeMachine_Logs; 2011 2009 const bool fLogViewerActionsShown = fLogViewerMenuShown || !m_pWidget->isToolOpened(ToolTypeMachine_Logs); 2012 2010 m_pLogViewerMenuAction->setVisible(fLogViewerMenuShown); … … 2021 2019 2022 2020 /* Update actions visibility: */ 2023 foreach (UIAction *pAction, m_ machineActions)2024 pAction->setVisible(fM achineOrGroupMenuShown);2025 foreach (UIAction *pAction, m_ groupActions)2026 pAction->setVisible(f MachineOrGroupMenuShown);2021 foreach (UIAction *pAction, m_virtualMediaManagerActions) 2022 pAction->setVisible(fMediumActionsShown); 2023 foreach (UIAction *pAction, m_hostNetworkManagerActions) 2024 pAction->setVisible(fNetworkActionsShown); 2027 2025 foreach (UIAction *pAction, m_snapshotActions) 2028 2026 pAction->setVisible(fSnapshotMenuShown); 2029 2027 foreach (UIAction *pAction, m_logViewerActions) 2030 2028 pAction->setVisible(fLogViewerActionsShown); 2031 foreach (UIAction *pAction, m_virtualMediaManagerActions)2032 pAction->setVisible(fMediumActionsShown);2033 foreach (UIAction *pAction, m_hostNetworkManagerActions)2034 pAction->setVisible(fNetworkActionsShown);2035 2029 2036 2030 /* Show action shortcuts: */
Note:
See TracChangeset
for help on using the changeset viewer.