Changeset 52186 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jul 25, 2014 1:00:08 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 11 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc
r52116 r52186 270 270 <file alias="os_type_16px.png">images/os_type_16px.png</file> 271 271 <file alias="os_ubuntu.png">images/os_ubuntu.png</file> 272 <file alias="os_ubuntu_64.png">images/os_ubuntu_64.png</file> 272 273 </qresource> 273 274 </RCC> -
trunk/src/VBox/Frontends/VirtualBox/VirtualBox1_hidpi.qrc
r51922 r52186 247 247 <file alias="os_openbsd_hidpi.png">images/hidpi/os_openbsd_hidpi.png</file> 248 248 <file alias="os_opensuse_64_hidpi.png">images/hidpi/os_opensuse_64_hidpi.png</file> 249 <file alias="os_opensuse_hidpi.png">images/hidpi/os_opensuse_hidpi.png</file> 249 250 </qresource> 250 251 </RCC> -
trunk/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc
r52116 r52186 1 1 <RCC> 2 2 <qresource prefix="/"> 3 <file alias="os_ubuntu_64.png">images/os_ubuntu_64.png</file>4 3 <file alias="os_win2k.png">images/os_win2k.png</file> 5 4 <file alias="os_win2k12_64.png">images/os_win2k12_64.png</file> … … 185 184 <file alias="usb_remove_16px.png">images/usb_remove_16px.png</file> 186 185 <file alias="usb_remove_disabled_16px.png">images/usb_remove_disabled_16px.png</file> 186 <file alias="usb_settings_16px.png">images/usb_settings_16px.png</file> 187 <file alias="usb_settings_disabled_16px.png">images/usb_settings_disabled_16px.png</file> 187 188 <file alias="usb_unavailable_16px.png">images/usb_unavailable_16px.png</file> 188 189 <file alias="usb_unavailable_disabled_16px.png">images/usb_unavailable_disabled_16px.png</file> -
trunk/src/VBox/Frontends/VirtualBox/VirtualBox2_hidpi.qrc
r51922 r52186 1 1 <RCC> 2 2 <qresource prefix="/"> 3 <file alias="os_opensuse_hidpi.png">images/hidpi/os_opensuse_hidpi.png</file>4 3 <file alias="os_oracle_64_hidpi.png">images/hidpi/os_oracle_64_hidpi.png</file> 5 4 <file alias="os_oracle_hidpi.png">images/hidpi/os_oracle_hidpi.png</file> … … 179 178 <file alias="usb_remove_16px_hidpi.png">images/hidpi/usb_remove_16px_hidpi.png</file> 180 179 <file alias="usb_remove_disabled_16px_hidpi.png">images/hidpi/usb_remove_disabled_16px_hidpi.png</file> 180 <file alias="usb_settings_16px_hidpi.png">images/hidpi/usb_settings_16px_hidpi.png</file> 181 <file alias="usb_settings_disabled_16px_hidpi.png">images/hidpi/usb_settings_disabled_16px_hidpi.png</file> 181 182 <file alias="usb_unavailable_16px_hidpi.png">images/hidpi/usb_unavailable_16px_hidpi.png</file> 182 183 <file alias="usb_unavailable_disabled_16px_hidpi.png">images/hidpi/usb_unavailable_disabled_16px_hidpi.png</file> -
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r52180 r52186 565 565 case RuntimeMenuDevicesActionType_FloppyDevices: strResult = "FloppyDevices"; break; 566 566 case RuntimeMenuDevicesActionType_USBDevices: strResult = "USBDevices"; break; 567 case RuntimeMenuDevicesActionType_USBDevicesSettings: strResult = "USBDevicesSettings"; break; 567 568 case RuntimeMenuDevicesActionType_WebCams: strResult = "WebCams"; break; 568 569 case RuntimeMenuDevicesActionType_SharedClipboard: strResult = "SharedClipboard"; break; … … 597 598 keys << "FloppyDevices"; values << RuntimeMenuDevicesActionType_FloppyDevices; 598 599 keys << "USBDevices"; values << RuntimeMenuDevicesActionType_USBDevices; 600 keys << "USBDevicesSettings"; values << RuntimeMenuDevicesActionType_USBDevicesSettings; 599 601 keys << "WebCams"; values << RuntimeMenuDevicesActionType_WebCams; 600 602 keys << "SharedClipboard"; values << RuntimeMenuDevicesActionType_SharedClipboard; -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r52180 r52186 435 435 RuntimeMenuDevicesActionType_FloppyDevices = RT_BIT(3), 436 436 RuntimeMenuDevicesActionType_USBDevices = RT_BIT(4), 437 RuntimeMenuDevicesActionType_WebCams = RT_BIT(5), 438 RuntimeMenuDevicesActionType_SharedClipboard = RT_BIT(6), 439 RuntimeMenuDevicesActionType_DragAndDrop = RT_BIT(7), 440 RuntimeMenuDevicesActionType_Network = RT_BIT(8), 441 RuntimeMenuDevicesActionType_NetworkSettings = RT_BIT(9), 442 RuntimeMenuDevicesActionType_SharedFolders = RT_BIT(10), 443 RuntimeMenuDevicesActionType_SharedFoldersSettings = RT_BIT(11), 444 RuntimeMenuDevicesActionType_VRDEServer = RT_BIT(12), 445 RuntimeMenuDevicesActionType_VideoCapture = RT_BIT(13), 446 RuntimeMenuDevicesActionType_VideoCaptureSettings = RT_BIT(14), 447 RuntimeMenuDevicesActionType_InstallGuestTools = RT_BIT(15), 437 RuntimeMenuDevicesActionType_USBDevicesSettings = RT_BIT(5), 438 RuntimeMenuDevicesActionType_WebCams = RT_BIT(6), 439 RuntimeMenuDevicesActionType_SharedClipboard = RT_BIT(7), 440 RuntimeMenuDevicesActionType_DragAndDrop = RT_BIT(8), 441 RuntimeMenuDevicesActionType_Network = RT_BIT(9), 442 RuntimeMenuDevicesActionType_NetworkSettings = RT_BIT(10), 443 RuntimeMenuDevicesActionType_SharedFolders = RT_BIT(11), 444 RuntimeMenuDevicesActionType_SharedFoldersSettings = RT_BIT(12), 445 RuntimeMenuDevicesActionType_VRDEServer = RT_BIT(13), 446 RuntimeMenuDevicesActionType_VideoCapture = RT_BIT(14), 447 RuntimeMenuDevicesActionType_VideoCaptureSettings = RT_BIT(15), 448 RuntimeMenuDevicesActionType_InstallGuestTools = RT_BIT(16), 448 449 RuntimeMenuDevicesActionType_All = 0xFFFF 449 450 }; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp
r52184 r52186 216 216 void retranslateUi() 217 217 { 218 setName(QApplication::translate("UIActionPool", " Configure &Shortcuts..."));218 setName(QApplication::translate("UIActionPool", "&Keyboard Settings...")); 219 219 setStatusTip(QApplication::translate("UIActionPool", "Display the global settings window to configure shortcuts")); 220 220 } … … 915 915 { 916 916 setName(QApplication::translate("UIActionPool", "&USB Devices")); 917 } 918 }; 919 920 class UIActionSimpleShowUSBDevicesSettingsDialog : public UIActionSimple 921 { 922 Q_OBJECT; 923 924 public: 925 926 UIActionSimpleShowUSBDevicesSettingsDialog(UIActionPool *pParent) 927 : UIActionSimple(pParent, ":/usb_settings_16px.png", ":/usb_settings_disabled_16px.png") 928 { 929 retranslateUi(); 930 } 931 932 protected: 933 934 QString shortcutExtraDataID() const 935 { 936 return QString("USBDevicesSettingsDialog"); 937 } 938 939 void retranslateUi() 940 { 941 setName(QApplication::translate("UIActionPool", "&USB Settings...")); 942 setStatusTip(QApplication::translate("UIActionPool", "Change the settings of USB devices")); 917 943 } 918 944 }; … … 1570 1596 m_pool[UIActionIndexRT_M_Devices_M_FloppyDevices] = new UIActionMenuFloppyDevices(this); 1571 1597 m_pool[UIActionIndexRT_M_Devices_M_USBDevices] = new UIActionMenuUSBDevices(this); 1598 m_pool[UIActionIndexRT_M_Devices_M_USBDevices_S_Settings] = new UIActionSimpleShowUSBDevicesSettingsDialog(this); 1572 1599 m_pool[UIActionIndexRT_M_Devices_M_WebCams] = new UIActionMenuWebCams(this); 1573 1600 m_pool[UIActionIndexRT_M_Devices_M_SharedClipboard] = new UIActionMenuSharedClipboard(this); … … 1642 1669 /* Recache reconfiguration action restrictions: */ 1643 1670 bool fReconfigurationAllowed = gEDataManager->machineReconfigurationEnabled(strMachineID); 1644 if ( fReconfigurationAllowed)1671 if (!fReconfigurationAllowed) 1645 1672 { 1646 1673 m_restrictedActionsMenuMachine[UIActionRestrictionLevel_Base] = (RuntimeMenuMachineActionType) … … 1648 1675 m_restrictedActionsMenuDevices[UIActionRestrictionLevel_Base] = (RuntimeMenuDevicesActionType) 1649 1676 (m_restrictedActionsMenuDevices[UIActionRestrictionLevel_Base] | RuntimeMenuDevicesActionType_HardDrivesSettings); 1677 m_restrictedActionsMenuDevices[UIActionRestrictionLevel_Base] = (RuntimeMenuDevicesActionType) 1678 (m_restrictedActionsMenuDevices[UIActionRestrictionLevel_Base] | RuntimeMenuDevicesActionType_USBDevicesSettings); 1650 1679 m_restrictedActionsMenuDevices[UIActionRestrictionLevel_Base] = (RuntimeMenuDevicesActionType) 1651 1680 (m_restrictedActionsMenuDevices[UIActionRestrictionLevel_Base] | RuntimeMenuDevicesActionType_NetworkSettings); … … 1658 1687 /* Recache snapshot related action restrictions: */ 1659 1688 bool fSnapshotOperationsAllowed = gEDataManager->machineSnapshotOperationsEnabled(strMachineID); 1660 if ( fSnapshotOperationsAllowed)1689 if (!fSnapshotOperationsAllowed) 1661 1690 { 1662 1691 m_restrictedActionsMenuMachine[UIActionRestrictionLevel_Base] = (RuntimeMenuMachineActionType) … … 1667 1696 CExtPack extPack = vboxGlobal().virtualBox().GetExtensionPackManager().Find(GUI_ExtPackName); 1668 1697 bool fExtensionPackOperationsAllowed = !extPack.isNull() && extPack.GetUsable(); 1669 if ( fExtensionPackOperationsAllowed)1698 if (!fExtensionPackOperationsAllowed) 1670 1699 { 1671 1700 m_restrictedActionsMenuDevices[UIActionRestrictionLevel_Base] = (RuntimeMenuDevicesActionType) … … 2177 2206 fSeparator1 = true; 2178 2207 } 2208 updateMenuDevicesUSBDevices(); 2179 2209 2180 2210 /* 'Web Cams' submenu: */ … … 2277 2307 if (fAllowToShowActionHardDrivesSettings) 2278 2308 pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings)); 2309 } 2310 2311 void UIActionPoolRuntime::updateMenuDevicesUSBDevices() 2312 { 2313 /* Get corresponding menu: */ 2314 QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->menu(); 2315 AssertPtrReturnVoid(pMenu); 2316 /* Clear contents: */ 2317 pMenu->clear(); 2318 2319 /* 'USB Devices Settings' action: */ 2320 const bool fAllowToShowActionUSBDevicesSettings = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_USBDevicesSettings); 2321 gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings)->setEnabled(fAllowToShowActionUSBDevicesSettings); 2322 if (fAllowToShowActionUSBDevicesSettings) 2323 pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings)); 2279 2324 } 2280 2325 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h
r52184 r52186 75 75 UIActionIndexRT_M_Devices_M_FloppyDevices, 76 76 UIActionIndexRT_M_Devices_M_USBDevices, 77 UIActionIndexRT_M_Devices_M_USBDevices_S_Settings, 77 78 UIActionIndexRT_M_Devices_M_WebCams, 78 79 UIActionIndexRT_M_Devices_M_SharedClipboard, … … 200 201 /** Update 'Devices' : 'Hard Drives' menu routine. */ 201 202 void updateMenuDevicesHardDrives(); 203 /** Update 'Devices' : 'USB' menu routine. */ 204 void updateMenuDevicesUSBDevices(); 202 205 /** Update 'Devices' : 'Network' menu routine. */ 203 206 void updateMenuDevicesNetwork(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r52184 r52186 858 858 m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices)); 859 859 m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)); 860 m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings)); 860 861 m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams)); 861 862 m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard)); … … 924 925 connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->menu(), SIGNAL(aboutToShow()), 925 926 this, SLOT(sltPrepareUSBMenu())); 927 connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings), SIGNAL(triggered()), 928 this, SLOT(sltOpenUSBDevicesSettingsDialog())); 926 929 connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams)->menu(), SIGNAL(aboutToShow()), 927 930 this, SLOT(sltPrepareWebCamMenu())); … … 933 936 this, SLOT(sltPrepareNetworkMenu())); 934 937 connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings), SIGNAL(triggered()), 935 this, SLOT(sltOpenNetwork AdaptersDialog()));938 this, SLOT(sltOpenNetworkSettingsDialog())); 936 939 connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings), SIGNAL(triggered()), 937 this, SLOT(sltOpenSharedFolders Dialog()));940 this, SLOT(sltOpenSharedFoldersSettingsDialog())); 938 941 connect(gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer), SIGNAL(toggled(bool)), 939 942 this, SLOT(sltToggleVRDE(bool))); … … 1524 1527 } 1525 1528 1526 void UIMachineLogic::sltOpenNetworkAdaptersDialog() 1529 void UIMachineLogic::sltOpenUSBDevicesSettingsDialog() 1530 { 1531 /* Machine settings: Storage page: */ 1532 sltOpenVMSettingsDialog("#usb"); 1533 } 1534 1535 void UIMachineLogic::sltOpenNetworkSettingsDialog() 1527 1536 { 1528 1537 /* Open VM settings : Network page: */ … … 1530 1539 } 1531 1540 1532 void UIMachineLogic::sltOpenSharedFolders Dialog()1541 void UIMachineLogic::sltOpenSharedFoldersSettingsDialog() 1533 1542 { 1534 1543 /* Do not process if additions are not loaded! */ … … 1623 1632 /* Clear menu initially: */ 1624 1633 pMenu->clear(); 1634 1635 /* Add settings action: */ 1636 pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings)); 1625 1637 1626 1638 /* Get current host: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r52184 r52186 87 87 88 88 /* Wrapper to open Machine settings / Network page: */ 89 void openNetwork AdaptersDialog() { sltOpenNetworkAdaptersDialog(); }89 void openNetworkSettingsDialog() { sltOpenNetworkSettingsDialog(); } 90 90 91 91 #ifdef Q_WS_MAC … … 220 220 void sltOpenVMSettingsDialog(const QString &strCategory = QString(), const QString &strControl = QString()); 221 221 void sltOpenStorageSettingsDialog(); 222 void sltOpenNetworkAdaptersDialog(); 223 void sltOpenSharedFoldersDialog(); 222 void sltOpenUSBDevicesSettingsDialog(); 223 void sltOpenNetworkSettingsDialog(); 224 void sltOpenSharedFoldersSettingsDialog(); 224 225 void sltPrepareStorageMenu(); 225 226 void sltMountStorageMedium(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r52184 r52186 982 982 const CHost host = vboxGlobal().host(); 983 983 const CMachine machine = session().GetConsole().GetMachine(); 984 RuntimeMenuDevicesActionType restriction = RuntimeMenuDevicesActionType_Invalid; 984 985 985 986 /* Storage stuff: */ … … 1000 1001 pFloppyDevicesMenu->setData(iDevicesCountFD); 1001 1002 if (!iDevicesCountCD) 1002 gpActionPool->toRuntime()->setRestrictionForMenuDevices(UIActionPool::UIActionRestrictionLevel_Session, 1003 RuntimeMenuDevicesActionType_OpticalDevices); 1003 restriction = (RuntimeMenuDevicesActionType)(restriction | RuntimeMenuDevicesActionType_OpticalDevices); 1004 1004 if (!iDevicesCountFD) 1005 gpActionPool->toRuntime()->setRestrictionForMenuDevices(UIActionPool::UIActionRestrictionLevel_Session, 1006 RuntimeMenuDevicesActionType_FloppyDevices); 1005 restriction = (RuntimeMenuDevicesActionType)(restriction | RuntimeMenuDevicesActionType_FloppyDevices); 1007 1006 } 1008 1007 … … 1023 1022 } 1024 1023 if (!fAtLeastOneAdapterActive) 1025 gpActionPool->toRuntime()->setRestrictionForMenuDevices(UIActionPool::UIActionRestrictionLevel_Session, 1026 RuntimeMenuDevicesActionType_Network); 1024 restriction = (RuntimeMenuDevicesActionType)(restriction | RuntimeMenuDevicesActionType_Network); 1027 1025 } 1028 1026 … … 1034 1032 && machine.GetUSBProxyAvailable(); 1035 1033 if (!fUSBEnabled) 1036 gpActionPool->toRuntime()->setRestrictionForMenuDevices(UIActionPool::UIActionRestrictionLevel_Session, 1037 RuntimeMenuDevicesActionType_USBDevices); 1034 restriction = (RuntimeMenuDevicesActionType)(restriction | RuntimeMenuDevicesActionType_USBDevices); 1038 1035 } 1039 1036 … … 1044 1041 const bool fWebCamsEnabled = host.isOk() && !machine.GetUSBControllers().isEmpty(); 1045 1042 if (!fWebCamsEnabled) 1046 gpActionPool->toRuntime()->setRestrictionForMenuDevices(UIActionPool::UIActionRestrictionLevel_Session, 1047 RuntimeMenuDevicesActionType_WebCams); 1048 } 1043 restriction = (RuntimeMenuDevicesActionType)(restriction | RuntimeMenuDevicesActionType_WebCams); 1044 } 1045 1046 /* Apply cumulative restriction: */ 1047 gpActionPool->toRuntime()->setRestrictionForMenuDevices(UIActionPool::UIActionRestrictionLevel_Session, restriction); 1049 1048 1050 1049 #ifdef Q_WS_MAC … … 1563 1562 { 1564 1563 if (msgCenter().UIMessageCenter::cannotStartWithoutNetworkIf(machine.GetName(), failedInterfaceNames.join(", "))) 1565 machineLogic()->openNetwork AdaptersDialog();1564 machineLogic()->openNetworkSettingsDialog(); 1566 1565 else 1567 1566 {
Note:
See TracChangeset
for help on using the changeset viewer.