Changeset 97278 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Oct 24, 2022 1:46:47 PM (2 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.cpp
r97277 r97278 1653 1653 1654 1654 1655 /** Menu action extension, used as ' Close' menu class. */1656 class UIActionMenuManager Close: public UIActionMenu1657 { 1658 Q_OBJECT; 1659 1660 public: 1661 1662 /** Constructs action passing @a pParent to the base-class. */ 1663 UIActionMenuManager Close(UIActionPool *pParent)1655 /** Menu action extension, used as 'Stop' menu class. */ 1656 class UIActionMenuManagerStop : public UIActionMenu 1657 { 1658 Q_OBJECT; 1659 1660 public: 1661 1662 /** Constructs action passing @a pParent to the base-class. */ 1663 UIActionMenuManagerStop(UIActionPool *pParent) 1664 1664 : UIActionMenu(pParent, ":/exit_16px.png") 1665 1665 {} … … 1670 1670 virtual void retranslateUi() RT_OVERRIDE 1671 1671 { 1672 setName(QApplication::translate("UIActionPool", "& Close"));1672 setName(QApplication::translate("UIActionPool", "&Stop")); 1673 1673 } 1674 1674 }; 1675 1675 1676 1676 /** Simple action extension, used as 'Perform Save' action class. */ 1677 class UIActionSimpleManager ClosePerformSave : public UIActionSimple1678 { 1679 Q_OBJECT; 1680 1681 public: 1682 1683 /** Constructs action passing @a pParent to the base-class. */ 1684 UIActionSimpleManager ClosePerformSave(UIActionPool *pParent)1677 class UIActionSimpleManagerStopPerformSave : public UIActionSimple 1678 { 1679 Q_OBJECT; 1680 1681 public: 1682 1683 /** Constructs action passing @a pParent to the base-class. */ 1684 UIActionSimpleManagerStopPerformSave(UIActionPool *pParent) 1685 1685 : UIActionSimple(pParent, ":/vm_save_state_16px.png", ":/vm_save_state_disabled_16px.png") 1686 1686 {} … … 1703 1703 1704 1704 /** Simple action extension, used as 'Perform Terminate' action class. */ 1705 class UIActionSimpleManager ClosePerformTerminate : public UIActionSimple1706 { 1707 Q_OBJECT; 1708 1709 public: 1710 1711 /** Constructs action passing @a pParent to the base-class. */ 1712 UIActionSimpleManager ClosePerformTerminate(UIActionPool *pParent)1705 class UIActionSimpleManagerStopPerformTerminate : public UIActionSimple 1706 { 1707 Q_OBJECT; 1708 1709 public: 1710 1711 /** Constructs action passing @a pParent to the base-class. */ 1712 UIActionSimpleManagerStopPerformTerminate(UIActionPool *pParent) 1713 1713 : UIActionSimple(pParent, ":/vm_discard_16px.png", ":/vm_discard_disabled_16px.png") 1714 1714 {} … … 1733 1733 1734 1734 /** Simple action extension, used as 'Perform Shutdown' action class. */ 1735 class UIActionSimpleManager ClosePerformShutdown : public UIActionSimple1736 { 1737 Q_OBJECT; 1738 1739 public: 1740 1741 /** Constructs action passing @a pParent to the base-class. */ 1742 UIActionSimpleManager ClosePerformShutdown(UIActionPool *pParent)1735 class UIActionSimpleManagerStopPerformShutdown : public UIActionSimple 1736 { 1737 Q_OBJECT; 1738 1739 public: 1740 1741 /** Constructs action passing @a pParent to the base-class. */ 1742 UIActionSimpleManagerStopPerformShutdown(UIActionPool *pParent) 1743 1743 : UIActionSimple(pParent, ":/vm_shutdown_16px.png", ":/vm_shutdown_disabled_16px.png") 1744 1744 {} … … 1761 1761 1762 1762 /** Simple action extension, used as 'Perform PowerOff' action class. */ 1763 class UIActionSimpleManager ClosePerformPowerOff : public UIActionSimple1764 { 1765 Q_OBJECT; 1766 1767 public: 1768 1769 /** Constructs action passing @a pParent to the base-class. */ 1770 UIActionSimpleManager ClosePerformPowerOff(UIActionPool *pParent)1763 class UIActionSimpleManagerStopPerformPowerOff : public UIActionSimple 1764 { 1765 Q_OBJECT; 1766 1767 public: 1768 1769 /** Constructs action passing @a pParent to the base-class. */ 1770 UIActionSimpleManagerStopPerformPowerOff(UIActionPool *pParent) 1771 1771 : UIActionSimple(pParent, ":/vm_poweroff_16px.png", ":/vm_poweroff_disabled_16px.png") 1772 1772 {} … … 3650 3650 m_pool[UIActionIndexMN_M_Group_M_Console_S_DeleteConnection] = new UIActionSimpleManagerConsolePerformDeleteConnection(this); 3651 3651 m_pool[UIActionIndexMN_M_Group_M_Console_S_ConfigureApplications] = new UIActionSimpleManagerConsolePerformConfigureApplications(this); 3652 m_pool[UIActionIndexMN_M_Group_M_ Close] = new UIActionMenuManagerClose(this);3653 m_pool[UIActionIndexMN_M_Group_M_ Close_S_SaveState] = new UIActionSimpleManagerClosePerformSave(this);3654 m_pool[UIActionIndexMN_M_Group_M_ Close_S_Terminate] = new UIActionSimpleManagerClosePerformTerminate(this);3655 m_pool[UIActionIndexMN_M_Group_M_ Close_S_Shutdown] = new UIActionSimpleManagerClosePerformShutdown(this);3656 m_pool[UIActionIndexMN_M_Group_M_ Close_S_PowerOff] = new UIActionSimpleManagerClosePerformPowerOff(this);3652 m_pool[UIActionIndexMN_M_Group_M_Stop] = new UIActionMenuManagerStop(this); 3653 m_pool[UIActionIndexMN_M_Group_M_Stop_S_SaveState] = new UIActionSimpleManagerStopPerformSave(this); 3654 m_pool[UIActionIndexMN_M_Group_M_Stop_S_Terminate] = new UIActionSimpleManagerStopPerformTerminate(this); 3655 m_pool[UIActionIndexMN_M_Group_M_Stop_S_Shutdown] = new UIActionSimpleManagerStopPerformShutdown(this); 3656 m_pool[UIActionIndexMN_M_Group_M_Stop_S_PowerOff] = new UIActionSimpleManagerStopPerformPowerOff(this); 3657 3657 m_pool[UIActionIndexMN_M_Group_M_Tools] = new UIActionMenuManagerToolsMachine(this); 3658 3658 m_pool[UIActionIndexMN_M_Group_M_Tools_T_Details] = new UIActionToggleManagerToolsMachineShowDetails(this); … … 3697 3697 m_pool[UIActionIndexMN_M_Machine_M_Console_S_ConfigureApplications] = new UIActionSimpleManagerConsolePerformConfigureApplications(this); 3698 3698 m_pool[UIActionIndexMN_M_Machine_M_Console_S_ShowLog] = new UIActionSimpleManagerConsolePerformShowLog(this); 3699 m_pool[UIActionIndexMN_M_Machine_M_ Close] = new UIActionMenuManagerClose(this);3700 m_pool[UIActionIndexMN_M_Machine_M_ Close_S_SaveState] = new UIActionSimpleManagerClosePerformSave(this);3701 m_pool[UIActionIndexMN_M_Machine_M_ Close_S_Terminate] = new UIActionSimpleManagerClosePerformTerminate(this);3702 m_pool[UIActionIndexMN_M_Machine_M_ Close_S_Shutdown] = new UIActionSimpleManagerClosePerformShutdown(this);3703 m_pool[UIActionIndexMN_M_Machine_M_ Close_S_PowerOff] = new UIActionSimpleManagerClosePerformPowerOff(this);3699 m_pool[UIActionIndexMN_M_Machine_M_Stop] = new UIActionMenuManagerStop(this); 3700 m_pool[UIActionIndexMN_M_Machine_M_Stop_S_SaveState] = new UIActionSimpleManagerStopPerformSave(this); 3701 m_pool[UIActionIndexMN_M_Machine_M_Stop_S_Terminate] = new UIActionSimpleManagerStopPerformTerminate(this); 3702 m_pool[UIActionIndexMN_M_Machine_M_Stop_S_Shutdown] = new UIActionSimpleManagerStopPerformShutdown(this); 3703 m_pool[UIActionIndexMN_M_Machine_M_Stop_S_PowerOff] = new UIActionSimpleManagerStopPerformPowerOff(this); 3704 3704 m_pool[UIActionIndexMN_M_Machine_M_Tools] = new UIActionMenuManagerToolsMachine(this); 3705 3705 m_pool[UIActionIndexMN_M_Machine_M_Tools_T_Details] = new UIActionToggleManagerToolsMachineShowDetails(this); … … 3813 3813 m_menuUpdateHandlers[UIActionIndexMN_M_Group_M_Console].ptfm = &UIActionPoolManager::updateMenuGroupConsole; 3814 3814 m_menuUpdateHandlers[UIActionIndexMN_M_Machine_M_Console].ptfm = &UIActionPoolManager::updateMenuMachineConsole; 3815 m_menuUpdateHandlers[UIActionIndexMN_M_Group_M_ Close].ptfm =&UIActionPoolManager::updateMenuGroupClose;3816 m_menuUpdateHandlers[UIActionIndexMN_M_Machine_M_ Close].ptfm =&UIActionPoolManager::updateMenuMachineClose;3815 m_menuUpdateHandlers[UIActionIndexMN_M_Group_M_Stop].ptfm = &UIActionPoolManager::updateMenuGroupClose; 3816 m_menuUpdateHandlers[UIActionIndexMN_M_Machine_M_Stop].ptfm = &UIActionPoolManager::updateMenuMachineClose; 3817 3817 m_menuUpdateHandlers[UIActionIndexMN_M_Group_M_Tools].ptfm = &UIActionPoolManager::updateMenuGroupTools; 3818 3818 m_menuUpdateHandlers[UIActionIndexMN_M_Machine_M_Tools].ptfm = &UIActionPoolManager::updateMenuMachineTools; … … 3972 3972 << action(UIActionIndexMN_M_Group_M_Console_S_DeleteConnection) 3973 3973 << action(UIActionIndexMN_M_Group_M_Console_S_ConfigureApplications) 3974 << action(UIActionIndexMN_M_Group_M_ Close_S_SaveState)3975 << action(UIActionIndexMN_M_Group_M_ Close_S_Terminate)3976 << action(UIActionIndexMN_M_Group_M_ Close_S_Shutdown)3977 << action(UIActionIndexMN_M_Group_M_ Close_S_PowerOff)3974 << action(UIActionIndexMN_M_Group_M_Stop_S_SaveState) 3975 << action(UIActionIndexMN_M_Group_M_Stop_S_Terminate) 3976 << action(UIActionIndexMN_M_Group_M_Stop_S_Shutdown) 3977 << action(UIActionIndexMN_M_Group_M_Stop_S_PowerOff) 3978 3978 << action(UIActionIndexMN_M_Group_M_Tools_T_Details) 3979 3979 << action(UIActionIndexMN_M_Group_M_Tools_T_Snapshots) … … 4014 4014 << action(UIActionIndexMN_M_Machine_M_Console_S_ConfigureApplications) 4015 4015 << action(UIActionIndexMN_M_Machine_M_Console_S_ShowLog) 4016 << action(UIActionIndexMN_M_Machine_M_ Close_S_SaveState)4017 << action(UIActionIndexMN_M_Machine_M_ Close_S_Terminate)4018 << action(UIActionIndexMN_M_Machine_M_ Close_S_Shutdown)4019 << action(UIActionIndexMN_M_Machine_M_ Close_S_PowerOff)4016 << action(UIActionIndexMN_M_Machine_M_Stop_S_SaveState) 4017 << action(UIActionIndexMN_M_Machine_M_Stop_S_Terminate) 4018 << action(UIActionIndexMN_M_Machine_M_Stop_S_Shutdown) 4019 << action(UIActionIndexMN_M_Machine_M_Stop_S_PowerOff) 4020 4020 << action(UIActionIndexMN_M_Machine_M_Tools_T_Details) 4021 4021 << action(UIActionIndexMN_M_Machine_M_Tools_T_Snapshots) … … 4282 4282 { 4283 4283 /* Get corresponding menu: */ 4284 UIMenu *pMenu = action(UIActionIndexMN_M_Group_M_ Close)->menu();4284 UIMenu *pMenu = action(UIActionIndexMN_M_Group_M_Stop)->menu(); 4285 4285 AssertPtrReturnVoid(pMenu); 4286 4286 /* Clear contents: */ … … 4292 4292 // the menu-bar, you have to leave there at least something. 4293 4293 // Remaining stuff will be appended from UIVirtualBoxManager. 4294 pMenu->addAction(action(UIActionIndexMN_M_Group_M_ Close_S_PowerOff));4294 pMenu->addAction(action(UIActionIndexMN_M_Group_M_Stop_S_PowerOff)); 4295 4295 #endif 4296 4296 … … 4301 4301 { 4302 4302 /* Get corresponding menu: */ 4303 UIMenu *pMenu = action(UIActionIndexMN_M_Machine_M_ Close)->menu();4303 UIMenu *pMenu = action(UIActionIndexMN_M_Machine_M_Stop)->menu(); 4304 4304 AssertPtrReturnVoid(pMenu); 4305 4305 /* Clear contents: */ … … 4311 4311 // the menu-bar, you have to leave there at least something. 4312 4312 // Remaining stuff will be appended from UIVirtualBoxManager. 4313 pMenu->addAction(action(UIActionIndexMN_M_Machine_M_ Close_S_PowerOff));4313 pMenu->addAction(action(UIActionIndexMN_M_Machine_M_Stop_S_PowerOff)); 4314 4314 #endif 4315 4315 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.h
r97277 r97278 84 84 UIActionIndexMN_M_Group_M_Console_S_DeleteConnection, 85 85 UIActionIndexMN_M_Group_M_Console_S_ConfigureApplications, 86 UIActionIndexMN_M_Group_M_ Close,87 UIActionIndexMN_M_Group_M_ Close_S_SaveState,88 UIActionIndexMN_M_Group_M_ Close_S_Terminate,89 UIActionIndexMN_M_Group_M_ Close_S_Shutdown,90 UIActionIndexMN_M_Group_M_ Close_S_PowerOff,86 UIActionIndexMN_M_Group_M_Stop, 87 UIActionIndexMN_M_Group_M_Stop_S_SaveState, 88 UIActionIndexMN_M_Group_M_Stop_S_Terminate, 89 UIActionIndexMN_M_Group_M_Stop_S_Shutdown, 90 UIActionIndexMN_M_Group_M_Stop_S_PowerOff, 91 91 UIActionIndexMN_M_Group_M_Tools, 92 92 UIActionIndexMN_M_Group_M_Tools_T_Details, … … 130 130 UIActionIndexMN_M_Machine_M_Console_S_ConfigureApplications, 131 131 UIActionIndexMN_M_Machine_M_Console_S_ShowLog, 132 UIActionIndexMN_M_Machine_M_ Close,133 UIActionIndexMN_M_Machine_M_ Close_S_SaveState,134 UIActionIndexMN_M_Machine_M_ Close_S_Terminate,135 UIActionIndexMN_M_Machine_M_ Close_S_Shutdown,136 UIActionIndexMN_M_Machine_M_ Close_S_PowerOff,132 UIActionIndexMN_M_Machine_M_Stop, 133 UIActionIndexMN_M_Machine_M_Stop_S_SaveState, 134 UIActionIndexMN_M_Machine_M_Stop_S_Terminate, 135 UIActionIndexMN_M_Machine_M_Stop_S_Shutdown, 136 UIActionIndexMN_M_Machine_M_Stop_S_PowerOff, 137 137 UIActionIndexMN_M_Machine_M_Tools, 138 138 UIActionIndexMN_M_Machine_M_Tools_T_Details, -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r97277 r97278 1707 1707 1708 1708 /* Check if current item could be saved: */ 1709 if (!isActionEnabled(UIActionIndexMN_M_Machine_M_ Close_S_SaveState, QList<UIVirtualMachineItem*>() << pItem))1709 if (!isActionEnabled(UIActionIndexMN_M_Machine_M_Stop_S_SaveState, QList<UIVirtualMachineItem*>() << pItem)) 1710 1710 continue; 1711 1711 … … 1727 1727 foreach (UIVirtualMachineItem *pItem, items) 1728 1728 { 1729 if (isActionEnabled(UIActionIndexMN_M_Group_M_ Close_S_Terminate, QList<UIVirtualMachineItem*>() << pItem))1729 if (isActionEnabled(UIActionIndexMN_M_Group_M_Stop_S_Terminate, QList<UIVirtualMachineItem*>() << pItem)) 1730 1730 { 1731 1731 machinesToTerminate << pItem->name(); … … 1764 1764 foreach (UIVirtualMachineItem *pItem, items) 1765 1765 { 1766 if (isActionEnabled(UIActionIndexMN_M_Machine_M_ Close_S_Shutdown, QList<UIVirtualMachineItem*>() << pItem))1766 if (isActionEnabled(UIActionIndexMN_M_Machine_M_Stop_S_Shutdown, QList<UIVirtualMachineItem*>() << pItem)) 1767 1767 { 1768 1768 machineNames << pItem->name(); … … 1822 1822 foreach (UIVirtualMachineItem *pItem, items) 1823 1823 { 1824 if (isActionEnabled(UIActionIndexMN_M_Machine_M_ Close_S_PowerOff, QList<UIVirtualMachineItem*>() << pItem))1824 if (isActionEnabled(UIActionIndexMN_M_Machine_M_Stop_S_PowerOff, QList<UIVirtualMachineItem*>() << pItem)) 1825 1825 { 1826 1826 machineNames << pItem->name(); … … 2114 2114 m_menuUpdateHandlers[UIActionIndexMN_M_Group_M_MoveToGroup] = &UIVirtualBoxManager::updateMenuGroupMoveToGroup; 2115 2115 m_menuUpdateHandlers[UIActionIndexMN_M_Group_M_Console] = &UIVirtualBoxManager::updateMenuGroupConsole; 2116 m_menuUpdateHandlers[UIActionIndexMN_M_Group_M_ Close] = &UIVirtualBoxManager::updateMenuGroupClose;2116 m_menuUpdateHandlers[UIActionIndexMN_M_Group_M_Stop] = &UIVirtualBoxManager::updateMenuGroupClose; 2117 2117 m_menuUpdateHandlers[UIActionIndexMN_M_Machine_M_MoveToGroup] = &UIVirtualBoxManager::updateMenuMachineMoveToGroup; 2118 2118 m_menuUpdateHandlers[UIActionIndexMN_M_Machine_M_Console] = &UIVirtualBoxManager::updateMenuMachineConsole; 2119 m_menuUpdateHandlers[UIActionIndexMN_M_Machine_M_ Close] = &UIVirtualBoxManager::updateMenuMachineClose;2119 m_menuUpdateHandlers[UIActionIndexMN_M_Machine_M_Stop] = &UIVirtualBoxManager::updateMenuMachineClose; 2120 2120 2121 2121 /* Build menu-bar: */ … … 2334 2334 this, &UIVirtualBoxManager::sltPerformShowLog); 2335 2335 2336 /* 'Group/ Close' menu connections: */2337 connect(actionPool()->action(UIActionIndexMN_M_Group_M_ Close_S_SaveState), &UIAction::triggered,2336 /* 'Group/Stop' menu connections: */ 2337 connect(actionPool()->action(UIActionIndexMN_M_Group_M_Stop_S_SaveState), &UIAction::triggered, 2338 2338 this, &UIVirtualBoxManager::sltPerformSaveMachineState); 2339 connect(actionPool()->action(UIActionIndexMN_M_Group_M_ Close_S_Terminate), &UIAction::triggered,2339 connect(actionPool()->action(UIActionIndexMN_M_Group_M_Stop_S_Terminate), &UIAction::triggered, 2340 2340 this, &UIVirtualBoxManager::sltPerformTerminateMachine); 2341 connect(actionPool()->action(UIActionIndexMN_M_Group_M_ Close_S_Shutdown), &UIAction::triggered,2341 connect(actionPool()->action(UIActionIndexMN_M_Group_M_Stop_S_Shutdown), &UIAction::triggered, 2342 2342 this, &UIVirtualBoxManager::sltPerformShutdownMachine); 2343 connect(actionPool()->action(UIActionIndexMN_M_Group_M_ Close_S_PowerOff), &UIAction::triggered,2343 connect(actionPool()->action(UIActionIndexMN_M_Group_M_Stop_S_PowerOff), &UIAction::triggered, 2344 2344 this, &UIVirtualBoxManager::sltPerformPowerOffMachine); 2345 2345 2346 /* 'Machine/ Close' menu connections: */2347 connect(actionPool()->action(UIActionIndexMN_M_Machine_M_ Close_S_SaveState), &UIAction::triggered,2346 /* 'Machine/Stop' menu connections: */ 2347 connect(actionPool()->action(UIActionIndexMN_M_Machine_M_Stop_S_SaveState), &UIAction::triggered, 2348 2348 this, &UIVirtualBoxManager::sltPerformSaveMachineState); 2349 connect(actionPool()->action(UIActionIndexMN_M_Machine_M_ Close_S_Terminate), &UIAction::triggered,2349 connect(actionPool()->action(UIActionIndexMN_M_Machine_M_Stop_S_Terminate), &UIAction::triggered, 2350 2350 this, &UIVirtualBoxManager::sltPerformTerminateMachine); 2351 connect(actionPool()->action(UIActionIndexMN_M_Machine_M_ Close_S_Shutdown), &UIAction::triggered,2351 connect(actionPool()->action(UIActionIndexMN_M_Machine_M_Stop_S_Shutdown), &UIAction::triggered, 2352 2352 this, &UIVirtualBoxManager::sltPerformShutdownMachine); 2353 connect(actionPool()->action(UIActionIndexMN_M_Machine_M_ Close_S_PowerOff), &UIAction::triggered,2353 connect(actionPool()->action(UIActionIndexMN_M_Machine_M_Stop_S_PowerOff), &UIAction::triggered, 2354 2354 this, &UIVirtualBoxManager::sltPerformPowerOffMachine); 2355 2355 … … 2790 2790 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_StartOrShow)); 2791 2791 pMenu->addMenu(actionPool()->action(UIActionIndexMN_M_Group_M_Console)->menu()); 2792 pMenu->addMenu(actionPool()->action(UIActionIndexMN_M_Group_M_ Close)->menu());2792 pMenu->addMenu(actionPool()->action(UIActionIndexMN_M_Group_M_Stop)->menu()); 2793 2793 pMenu->addSeparator(); 2794 2794 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Group_S_Refresh)); … … 2812 2812 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Group_S_Reset)); 2813 2813 // pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Group_S_Detach)); 2814 pMenu->addMenu(actionPool()->action(UIActionIndexMN_M_Group_M_ Close)->menu());2814 pMenu->addMenu(actionPool()->action(UIActionIndexMN_M_Group_M_Stop)->menu()); 2815 2815 pMenu->addSeparator(); 2816 2816 pMenu->addMenu(actionPool()->action(UIActionIndexMN_M_Group_M_Tools)->menu()); … … 2847 2847 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_StartOrShow)); 2848 2848 pMenu->addMenu(actionPool()->action(UIActionIndexMN_M_Machine_M_Console)->menu()); 2849 pMenu->addMenu(actionPool()->action(UIActionIndexMN_M_Machine_M_ Close)->menu());2849 pMenu->addMenu(actionPool()->action(UIActionIndexMN_M_Machine_M_Stop)->menu()); 2850 2850 pMenu->addSeparator(); 2851 2851 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Machine_S_Refresh)); … … 2872 2872 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Machine_S_Reset)); 2873 2873 // pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Machine_S_Detach)); 2874 pMenu->addMenu(actionPool()->action(UIActionIndexMN_M_Machine_M_ Close)->menu());2874 pMenu->addMenu(actionPool()->action(UIActionIndexMN_M_Machine_M_Stop)->menu()); 2875 2875 pMenu->addSeparator(); 2876 2876 pMenu->addMenu(actionPool()->action(UIActionIndexMN_M_Machine_M_Tools)->menu()); … … 2926 2926 if (pItem->itemType() == UIVirtualMachineItemType_Local) 2927 2927 { 2928 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_ Close_S_SaveState));2929 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_ Close_S_Shutdown));2930 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_ Close_S_PowerOff));2928 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_Stop_S_SaveState)); 2929 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_Stop_S_Shutdown)); 2930 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_Stop_S_PowerOff)); 2931 2931 } 2932 2932 else 2933 2933 { 2934 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_ Close_S_Terminate));2935 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_ Close_S_Shutdown));2936 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_ Close_S_PowerOff));2937 } 2938 2939 /* Configure 'Group' / ' Close' menu: */2940 actionPool()->action(UIActionIndexMN_M_Group_M_ Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexMN_M_Group_M_Close_S_Shutdown, items));2934 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_Stop_S_Terminate)); 2935 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_Stop_S_Shutdown)); 2936 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_Stop_S_PowerOff)); 2937 } 2938 2939 /* Configure 'Group' / 'Stop' menu: */ 2940 actionPool()->action(UIActionIndexMN_M_Group_M_Stop_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexMN_M_Group_M_Stop_S_Shutdown, items)); 2941 2941 } 2942 2942 … … 3071 3071 if (pItem->itemType() == UIVirtualMachineItemType_Local) 3072 3072 { 3073 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_ Close_S_SaveState));3074 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_ Close_S_Shutdown));3075 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_ Close_S_PowerOff));3073 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_Stop_S_SaveState)); 3074 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_Stop_S_Shutdown)); 3075 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_Stop_S_PowerOff)); 3076 3076 } 3077 3077 else 3078 3078 { 3079 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_ Close_S_Terminate));3080 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_ Close_S_Shutdown));3081 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_ Close_S_PowerOff));3082 } 3083 3084 /* Configure 'Machine' / ' Close' menu: */3085 actionPool()->action(UIActionIndexMN_M_Machine_M_ Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexMN_M_Machine_M_Close_S_Shutdown, items));3079 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_Stop_S_Terminate)); 3080 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_Stop_S_Shutdown)); 3081 pMenu->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_Stop_S_PowerOff)); 3082 } 3083 3084 /* Configure 'Machine' / 'Stop' menu: */ 3085 actionPool()->action(UIActionIndexMN_M_Machine_M_Stop_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexMN_M_Machine_M_Stop_S_Shutdown, items)); 3086 3086 } 3087 3087 … … 3225 3225 actionPool()->action(UIActionIndexMN_M_Machine_M_Console_S_ShowLog)->setEnabled(isActionEnabled(UIActionIndexMN_M_Machine_M_Console_S_ShowLog, items)); 3226 3226 3227 /* Enable/disable group- closeactions: */3228 actionPool()->action(UIActionIndexMN_M_Group_M_ Close)->setEnabled(isActionEnabled(UIActionIndexMN_M_Group_M_Close, items));3229 actionPool()->action(UIActionIndexMN_M_Group_M_ Close_S_SaveState)->setEnabled(isActionEnabled(UIActionIndexMN_M_Group_M_Close_S_SaveState, items));3230 actionPool()->action(UIActionIndexMN_M_Group_M_ Close_S_Terminate)->setEnabled(isActionEnabled(UIActionIndexMN_M_Group_M_Close_S_Terminate, items));3231 actionPool()->action(UIActionIndexMN_M_Group_M_ Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexMN_M_Group_M_Close_S_Shutdown, items));3232 actionPool()->action(UIActionIndexMN_M_Group_M_ Close_S_PowerOff)->setEnabled(isActionEnabled(UIActionIndexMN_M_Group_M_Close_S_PowerOff, items));3233 3234 /* Enable/disable machine- closeactions: */3235 actionPool()->action(UIActionIndexMN_M_Machine_M_ Close)->setEnabled(isActionEnabled(UIActionIndexMN_M_Machine_M_Close, items));3236 actionPool()->action(UIActionIndexMN_M_Machine_M_ Close_S_SaveState)->setEnabled(isActionEnabled(UIActionIndexMN_M_Machine_M_Close_S_SaveState, items));3237 actionPool()->action(UIActionIndexMN_M_Machine_M_ Close_S_Terminate)->setEnabled(isActionEnabled(UIActionIndexMN_M_Machine_M_Close_S_Terminate, items));3238 actionPool()->action(UIActionIndexMN_M_Machine_M_ Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexMN_M_Machine_M_Close_S_Shutdown, items));3239 actionPool()->action(UIActionIndexMN_M_Machine_M_ Close_S_PowerOff)->setEnabled(isActionEnabled(UIActionIndexMN_M_Machine_M_Close_S_PowerOff, items));3227 /* Enable/disable group-stop actions: */ 3228 actionPool()->action(UIActionIndexMN_M_Group_M_Stop)->setEnabled(isActionEnabled(UIActionIndexMN_M_Group_M_Stop, items)); 3229 actionPool()->action(UIActionIndexMN_M_Group_M_Stop_S_SaveState)->setEnabled(isActionEnabled(UIActionIndexMN_M_Group_M_Stop_S_SaveState, items)); 3230 actionPool()->action(UIActionIndexMN_M_Group_M_Stop_S_Terminate)->setEnabled(isActionEnabled(UIActionIndexMN_M_Group_M_Stop_S_Terminate, items)); 3231 actionPool()->action(UIActionIndexMN_M_Group_M_Stop_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexMN_M_Group_M_Stop_S_Shutdown, items)); 3232 actionPool()->action(UIActionIndexMN_M_Group_M_Stop_S_PowerOff)->setEnabled(isActionEnabled(UIActionIndexMN_M_Group_M_Stop_S_PowerOff, items)); 3233 3234 /* Enable/disable machine-stop actions: */ 3235 actionPool()->action(UIActionIndexMN_M_Machine_M_Stop)->setEnabled(isActionEnabled(UIActionIndexMN_M_Machine_M_Stop, items)); 3236 actionPool()->action(UIActionIndexMN_M_Machine_M_Stop_S_SaveState)->setEnabled(isActionEnabled(UIActionIndexMN_M_Machine_M_Stop_S_SaveState, items)); 3237 actionPool()->action(UIActionIndexMN_M_Machine_M_Stop_S_Terminate)->setEnabled(isActionEnabled(UIActionIndexMN_M_Machine_M_Stop_S_Terminate, items)); 3238 actionPool()->action(UIActionIndexMN_M_Machine_M_Stop_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexMN_M_Machine_M_Stop_S_Shutdown, items)); 3239 actionPool()->action(UIActionIndexMN_M_Machine_M_Stop_S_PowerOff)->setEnabled(isActionEnabled(UIActionIndexMN_M_Machine_M_Stop_S_PowerOff, items)); 3240 3240 3241 3241 /* Get current item: */ … … 3504 3504 return isAtLeastOneItemStarted(items); 3505 3505 } 3506 case UIActionIndexMN_M_Group_M_ Close:3507 case UIActionIndexMN_M_Machine_M_ Close:3506 case UIActionIndexMN_M_Group_M_Stop: 3507 case UIActionIndexMN_M_Machine_M_Stop: 3508 3508 { 3509 3509 return (isItemsLocal(items) && isAtLeastOneItemStarted(items)) 3510 3510 || (isItemsCloud(items) && isAtLeastOneItemDiscardable(items)); 3511 3511 } 3512 case UIActionIndexMN_M_Group_M_ Close_S_SaveState:3513 case UIActionIndexMN_M_Machine_M_ Close_S_SaveState:3514 { 3515 return isActionEnabled(UIActionIndexMN_M_Machine_M_ Close, items)3512 case UIActionIndexMN_M_Group_M_Stop_S_SaveState: 3513 case UIActionIndexMN_M_Machine_M_Stop_S_SaveState: 3514 { 3515 return isActionEnabled(UIActionIndexMN_M_Machine_M_Stop, items) 3516 3516 && isItemsLocal(items); 3517 3517 } 3518 case UIActionIndexMN_M_Group_M_ Close_S_Terminate:3519 case UIActionIndexMN_M_Machine_M_ Close_S_Terminate:3520 { 3521 return isActionEnabled(UIActionIndexMN_M_Machine_M_ Close, items)3518 case UIActionIndexMN_M_Group_M_Stop_S_Terminate: 3519 case UIActionIndexMN_M_Machine_M_Stop_S_Terminate: 3520 { 3521 return isActionEnabled(UIActionIndexMN_M_Machine_M_Stop, items) 3522 3522 && isAtLeastOneItemDiscardable(items); 3523 3523 } 3524 case UIActionIndexMN_M_Group_M_ Close_S_Shutdown:3525 case UIActionIndexMN_M_Machine_M_ Close_S_Shutdown:3526 { 3527 return isActionEnabled(UIActionIndexMN_M_Machine_M_ Close, items)3524 case UIActionIndexMN_M_Group_M_Stop_S_Shutdown: 3525 case UIActionIndexMN_M_Machine_M_Stop_S_Shutdown: 3526 { 3527 return isActionEnabled(UIActionIndexMN_M_Machine_M_Stop, items) 3528 3528 && isAtLeastOneItemAbleToShutdown(items); 3529 3529 } 3530 case UIActionIndexMN_M_Group_M_ Close_S_PowerOff:3531 case UIActionIndexMN_M_Machine_M_ Close_S_PowerOff:3532 { 3533 return isActionEnabled(UIActionIndexMN_M_Machine_M_ Close, items)3530 case UIActionIndexMN_M_Group_M_Stop_S_PowerOff: 3531 case UIActionIndexMN_M_Machine_M_Stop_S_PowerOff: 3532 { 3533 return isActionEnabled(UIActionIndexMN_M_Machine_M_Stop, items) 3534 3534 && isAtLeastOneItemStarted(items); 3535 3535 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r96808 r97278 931 931 else if ( isSingleCloudProviderGroupSelected() 932 932 || isSingleCloudProfileGroupSelected()) 933 m_pToolBar->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_ Close_S_Terminate));933 m_pToolBar->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_Stop_S_Terminate)); 934 934 m_pToolBar->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_StartOrShow)); 935 935 } … … 943 943 m_pToolBar->addAction(actionPool()->action(UIActionIndexMN_M_Machine_S_Discard)); 944 944 else if (isCloudMachineItemSelected()) 945 m_pToolBar->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_ Close_S_Terminate));945 m_pToolBar->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_Stop_S_Terminate)); 946 946 m_pToolBar->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_StartOrShow)); 947 947 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r97277 r97278 1500 1500 pMenuGroup->addAction(actionPool()->action(UIActionIndexMN_M_Group_S_Reset)); 1501 1501 // pMenuGroup->addAction(actionPool()->action(UIActionIndexMN_M_Group_S_Detach)); 1502 pMenuGroup->addMenu(actionPool()->action(UIActionIndexMN_M_Group_M_ Close)->menu());1502 pMenuGroup->addMenu(actionPool()->action(UIActionIndexMN_M_Group_M_Stop)->menu()); 1503 1503 pMenuGroup->addSeparator(); 1504 1504 pMenuGroup->addAction(actionPool()->action(UIActionIndexMN_M_Group_S_Discard)); … … 1528 1528 pMenuMachine->addAction(actionPool()->action(UIActionIndexMN_M_Machine_S_Reset)); 1529 1529 // pMenuMachine->addAction(actionPool()->action(UIActionIndexMN_M_Machine_S_Detach)); 1530 pMenuMachine->addMenu(actionPool()->action(UIActionIndexMN_M_Machine_M_ Close)->menu());1530 pMenuMachine->addMenu(actionPool()->action(UIActionIndexMN_M_Machine_M_Stop)->menu()); 1531 1531 pMenuMachine->addSeparator(); 1532 1532 pMenuMachine->addAction(actionPool()->action(UIActionIndexMN_M_Machine_S_Discard)); … … 1550 1550 pMenuGroup->addAction(actionPool()->action(UIActionIndexMN_M_Group_M_StartOrShow)); 1551 1551 pMenuGroup->addMenu(actionPool()->action(UIActionIndexMN_M_Group_M_Console)->menu()); 1552 pMenuGroup->addMenu(actionPool()->action(UIActionIndexMN_M_Group_M_ Close)->menu());1552 pMenuGroup->addMenu(actionPool()->action(UIActionIndexMN_M_Group_M_Stop)->menu()); 1553 1553 pMenuGroup->addSeparator(); 1554 1554 pMenuGroup->addAction(actionPool()->action(UIActionIndexMN_M_Group_S_Refresh)); … … 1567 1567 pMenuMachine->addAction(actionPool()->action(UIActionIndexMN_M_Machine_M_StartOrShow)); 1568 1568 pMenuMachine->addMenu(actionPool()->action(UIActionIndexMN_M_Machine_M_Console)->menu()); 1569 pMenuMachine->addMenu(actionPool()->action(UIActionIndexMN_M_Machine_M_ Close)->menu());1569 pMenuMachine->addMenu(actionPool()->action(UIActionIndexMN_M_Machine_M_Stop)->menu()); 1570 1570 pMenuMachine->addSeparator(); 1571 1571 pMenuMachine->addAction(actionPool()->action(UIActionIndexMN_M_Machine_S_Refresh));
Note:
See TracChangeset
for help on using the changeset viewer.