Changeset 52467 in vbox
- Timestamp:
- Aug 22, 2014 11:55:21 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 95682
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r52464 r52467 2594 2594 result = static_cast<UIExtraDataMetaDefs::RuntimeMenuMachineActionType>(result | value); 2595 2595 } 2596 /* Defaults: */ 2597 if (result == UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Invalid) 2598 { 2599 result = static_cast<UIExtraDataMetaDefs::RuntimeMenuMachineActionType>(result | UIExtraDataMetaDefs::RuntimeMenuMachineActionType_KeyboardSettings); 2600 result = static_cast<UIExtraDataMetaDefs::RuntimeMenuMachineActionType>(result | UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SaveState); 2601 result = static_cast<UIExtraDataMetaDefs::RuntimeMenuMachineActionType>(result | UIExtraDataMetaDefs::RuntimeMenuMachineActionType_PowerOff); 2602 } 2596 2603 /* Return result: */ 2597 2604 return result; … … 2685 2692 if (value != UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Invalid) 2686 2693 result = static_cast<UIExtraDataMetaDefs::RuntimeMenuDevicesActionType>(result | value); 2694 } 2695 /* Defaults: */ 2696 if (result == UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Invalid) 2697 { 2698 result = static_cast<UIExtraDataMetaDefs::RuntimeMenuDevicesActionType>(result | UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrives); 2699 result = static_cast<UIExtraDataMetaDefs::RuntimeMenuDevicesActionType>(result | UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFolders); 2687 2700 } 2688 2701 /* Return result: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp
r52459 r52467 173 173 protected: 174 174 175 void retranslateUi() {} 175 void retranslateUi() 176 { 177 setName(QApplication::translate("UIActionPool", "&Keyboard")); 178 } 176 179 }; 177 180 … … 199 202 }; 200 203 201 class UIActionMenuMouse Integration: public UIActionMenu202 { 203 Q_OBJECT; 204 205 public: 206 207 UIActionMenuMouse Integration(UIActionPool *pParent)204 class UIActionMenuMouse : public UIActionMenu 205 { 206 Q_OBJECT; 207 208 public: 209 210 UIActionMenuMouse(UIActionPool *pParent) 208 211 : UIActionMenu(pParent) {} 209 212 210 213 protected: 211 214 212 void retranslateUi() {} 215 void retranslateUi() 216 { 217 setName(QApplication::translate("UIActionPool", "&Mouse")); 218 } 213 219 }; 214 220 … … 728 734 }; 729 735 730 class UIActionMenuHardD isks : public UIActionMenu731 { 732 Q_OBJECT; 733 734 public: 735 736 UIActionMenuHardD isks(UIActionPool *pParent)736 class UIActionMenuHardDrives : public UIActionMenu 737 { 738 Q_OBJECT; 739 740 public: 741 742 UIActionMenuHardDrives(UIActionPool *pParent) 737 743 : UIActionMenu(pParent, ":/hd_16px.png", ":/hd_disabled_16px.png") 738 744 { … … 742 748 protected: 743 749 744 void retranslateUi() {} 745 }; 746 747 class UIActionSimpleShowStorageSettingsDialog : public UIActionSimple 748 { 749 Q_OBJECT; 750 751 public: 752 753 UIActionSimpleShowStorageSettingsDialog(UIActionPool *pParent) 750 void retranslateUi() 751 { 752 setName(QApplication::translate("UIActionPool", "&Hard Drives")); 753 } 754 }; 755 756 class UIActionSimpleShowHardDrivesSettingsDialog : public UIActionSimple 757 { 758 Q_OBJECT; 759 760 public: 761 762 UIActionSimpleShowHardDrivesSettingsDialog(UIActionPool *pParent) 754 763 : UIActionSimple(pParent, ":/hd_settings_16px.png", ":/hd_settings_disabled_16px.png") {} 755 764 … … 758 767 QString shortcutExtraDataID() const 759 768 { 760 return QString(" StorageSettingsDialog");761 } 762 763 void retranslateUi() 764 { 765 setName(QApplication::translate("UIActionPool", "& Storage Settings..."));766 setStatusTip(QApplication::translate("UIActionPool", "Change the settings of storage devices"));769 return QString("HardDriveSettingsDialog"); 770 } 771 772 void retranslateUi() 773 { 774 setName(QApplication::translate("UIActionPool", "&Hard Drive Settings...")); 775 setStatusTip(QApplication::translate("UIActionPool", "Change the settings of hard drives")); 767 776 } 768 777 }; … … 952 961 953 962 UIActionMenuSharedFolders(UIActionPool *pParent) 954 : UIActionMenu(pParent) {} 955 956 protected: 957 958 void retranslateUi() {} 963 : UIActionMenu(pParent, ":/sf_16px.png", ":/sf_disabled_16px.png") {} 964 965 protected: 966 967 void retranslateUi() 968 { 969 setName(QApplication::translate("UIActionPool", "&Shared Folders")); 970 } 959 971 }; 960 972 … … 1018 1030 protected: 1019 1031 1020 void retranslateUi() {} 1032 void retranslateUi() 1033 { 1034 setName(QApplication::translate("UIActionPool", "&Video Capture")); 1035 } 1021 1036 }; 1022 1037 … … 1442 1457 m_pool[UIActionIndexRT_M_Machine_M_Keyboard] = new UIActionMenuKeyboard(this); 1443 1458 m_pool[UIActionIndexRT_M_Machine_M_Keyboard_S_Settings] = new UIActionSimpleKeyboardSettings(this); 1444 m_pool[UIActionIndexRT_M_Machine_M_Mouse] = new UIActionMenuMouse Integration(this);1459 m_pool[UIActionIndexRT_M_Machine_M_Mouse] = new UIActionMenuMouse(this); 1445 1460 m_pool[UIActionIndexRT_M_Machine_M_Mouse_T_Integration] = new UIActionToggleMouseIntegration(this); 1446 1461 m_pool[UIActionIndexRT_M_Machine_S_TypeCAD] = new UIActionSimplePerformTypeCAD(this); … … 1469 1484 /* 'Devices' actions: */ 1470 1485 m_pool[UIActionIndexRT_M_Devices] = new UIActionMenuDevices(this); 1471 m_pool[UIActionIndexRT_M_Devices_M_HardDrives] = new UIActionMenuHardD isks(this);1472 m_pool[UIActionIndexRT_M_Devices_M_HardDrives_S_Settings] = new UIActionSimpleShow StorageSettingsDialog(this);1486 m_pool[UIActionIndexRT_M_Devices_M_HardDrives] = new UIActionMenuHardDrives(this); 1487 m_pool[UIActionIndexRT_M_Devices_M_HardDrives_S_Settings] = new UIActionSimpleShowHardDrivesSettingsDialog(this); 1473 1488 m_pool[UIActionIndexRT_M_Devices_M_OpticalDevices] = new UIActionMenuOpticalDevices(this); 1474 1489 m_pool[UIActionIndexRT_M_Devices_M_FloppyDevices] = new UIActionMenuFloppyDevices(this); … … 1746 1761 updateMenuMachineKeyboard(); 1747 1762 1763 /* 'Keyboard Settings' action: */ 1764 const bool fAllowToShowActionKeyboardSettings = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_KeyboardSettings); 1765 action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings)->setEnabled(fAllowToShowActionKeyboardSettings); 1766 if (fAllowToShowActionKeyboardSettings) 1767 { 1768 pMenu->addAction(action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings)); 1769 fSeparator2 = true; 1770 } 1771 1748 1772 /* 'Mouse' submenu: */ 1749 1773 const bool fAllowToShowActionMouse = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Mouse); … … 1824 1848 if (fAllowToShowActionSaveState) 1825 1849 { 1826 //pMenu->addAction(action(UIActionIndexRT_M_Machine_S_Save));1827 //fSeparator4 = true;1850 pMenu->addAction(action(UIActionIndexRT_M_Machine_S_Save)); 1851 fSeparator4 = true; 1828 1852 } 1829 1853 … … 1842 1866 if (fAllowToShowActionPowerOff) 1843 1867 { 1844 //pMenu->addAction(action(UIActionIndexRT_M_Machine_S_PowerOff));1845 //fSeparator4 = true;1868 pMenu->addAction(action(UIActionIndexRT_M_Machine_S_PowerOff)); 1869 fSeparator4 = true; 1846 1870 } 1847 1871 … … 2231 2255 if (fAllowToShowActionHardDrives) 2232 2256 { 2233 //pMenu->addAction(action(UIActionIndexRT_M_Devices_M_HardDrives));2234 //fSeparator1 = true;2257 pMenu->addAction(action(UIActionIndexRT_M_Devices_M_HardDrives)); 2258 fSeparator1 = true; 2235 2259 } 2236 2260 updateMenuDevicesHardDrives(); … … 2306 2330 if (fAllowToShowActionSharedFolders) 2307 2331 { 2308 //pMenu->addAction(action(UIActionIndexRT_M_Devices_M_SharedFolders));2309 //fSeparator1 = true;2332 pMenu->addAction(action(UIActionIndexRT_M_Devices_M_SharedFolders)); 2333 fSeparator1 = true; 2310 2334 } 2311 2335 updateMenuDevicesSharedFolders();
Note:
See TracChangeset
for help on using the changeset viewer.