Changeset 85445 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jul 23, 2020 6:56:39 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.cpp
r85434 r85445 1422 1422 1423 1423 /** Constructs action passing @a pParent to the base-class. */ 1424 UIActionSimpleSelectorConsolePerformCopyCommand(UIActionPool *pParent, bool fSerial )1424 UIActionSimpleSelectorConsolePerformCopyCommand(UIActionPool *pParent, bool fSerial, bool fUnix) 1425 1425 : UIActionSimple(pParent) 1426 1426 , m_fSerial(fSerial) 1427 , m_fUnix(fUnix) 1427 1428 { 1428 1429 if (m_fSerial) … … 1449 1450 if (m_fSerial) 1450 1451 { 1451 setName(QApplication::translate("UIActionPool", "&Copy Command (serial)")); 1452 if (m_fUnix) 1453 setName(QApplication::translate("UIActionPool", "&Copy Command (serial) for Unix")); 1454 else 1455 setName(QApplication::translate("UIActionPool", "&Copy Command (serial) for Windows")); 1452 1456 setStatusTip(QApplication::translate("UIActionPool", "Copy console command for serial connection")); 1453 1457 } 1454 1458 else 1455 1459 { 1456 setName(QApplication::translate("UIActionPool", "&Copy Command (VNC)")); 1460 if (m_fUnix) 1461 setName(QApplication::translate("UIActionPool", "&Copy Command (VNC) for Unix")); 1462 else 1463 setName(QApplication::translate("UIActionPool", "&Copy Command (VNC) for Windows")); 1457 1464 setStatusTip(QApplication::translate("UIActionPool", "Copy console command for VNC connection")); 1458 1465 } … … 1463 1470 /** Holds whether this command is of serial type. */ 1464 1471 bool m_fSerial; 1472 /** Holds whether this command is for unix. */ 1473 bool m_fUnix; 1465 1474 }; 1466 1475 … … 3458 3467 m_pool[UIActionIndexST_M_Machine_M_Console_S_CreateConnection] = new UIActionSimpleSelectorConsolePerformCreateConnection(this); 3459 3468 m_pool[UIActionIndexST_M_Machine_M_Console_S_DeleteConnection] = new UIActionSimpleSelectorConsolePerformDeleteConnection(this); 3460 m_pool[UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerial] = new UIActionSimpleSelectorConsolePerformCopyCommand(this, true); 3461 m_pool[UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNC] = new UIActionSimpleSelectorConsolePerformCopyCommand(this, false); 3469 m_pool[UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerialUnix] = new UIActionSimpleSelectorConsolePerformCopyCommand(this, true, true); 3470 m_pool[UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerialWindows] = new UIActionSimpleSelectorConsolePerformCopyCommand(this, true, false); 3471 m_pool[UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNCUnix] = new UIActionSimpleSelectorConsolePerformCopyCommand(this, false, true); 3472 m_pool[UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNCWindows] = new UIActionSimpleSelectorConsolePerformCopyCommand(this, false, false); 3462 3473 m_pool[UIActionIndexST_M_Machine_M_Console_S_ConfigureApplications] = new UIActionSimpleSelectorConsolePerformConfigureApplications(this); 3463 3474 m_pool[UIActionIndexST_M_Machine_M_Close] = new UIActionMenuSelectorClose(this); … … 4318 4329 << action(UIActionIndexST_M_Machine_M_Console_S_CreateConnection) 4319 4330 << action(UIActionIndexST_M_Machine_M_Console_S_DeleteConnection) 4320 << action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerial) 4321 << action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNC) 4331 << action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerialUnix) 4332 << action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerialWindows) 4333 << action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNCUnix) 4334 << action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNCWindows) 4322 4335 << action(UIActionIndexST_M_Machine_M_Console_S_ConfigureApplications) 4323 4336 // << action(UIActionIndexST_M_Machine_M_Close_S_Detach) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.h
r85434 r85445 111 111 UIActionIndexST_M_Machine_M_Console_S_CreateConnection, 112 112 UIActionIndexST_M_Machine_M_Console_S_DeleteConnection, 113 UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerial, 114 UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNC, 113 UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerialUnix, 114 UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerialWindows, 115 UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNCUnix, 116 UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNCWindows, 115 117 UIActionIndexST_M_Machine_M_Console_S_ConfigureApplications, 116 118 UIActionIndexST_M_Machine_M_Close, -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r85434 r85445 1274 1274 } 1275 1275 1276 void UIVirtualBoxManager::sltPerformCopyCommandSerial ()1276 void UIVirtualBoxManager::sltPerformCopyCommandSerialUnix() 1277 1277 { 1278 1278 /* Get current item: */ … … 1291 1291 } 1292 1292 1293 void UIVirtualBoxManager::sltPerformCopyCommand VNC()1293 void UIVirtualBoxManager::sltPerformCopyCommandSerialWindows() 1294 1294 { 1295 1295 /* Get current item: */ … … 1302 1302 CCloudMachine comMachine = pCloudItem->machine(); 1303 1303 1304 /* Put copied serial command to clipboard: */ 1305 QClipboard *pClipboard = QGuiApplication::clipboard(); 1306 AssertPtrReturnVoid(pClipboard); 1307 pClipboard->setText(comMachine.GetSerialConsoleCommandWindows()); 1308 } 1309 1310 void UIVirtualBoxManager::sltPerformCopyCommandVNCUnix() 1311 { 1312 /* Get current item: */ 1313 UIVirtualMachineItem *pItem = currentItem(); 1314 AssertMsgReturnVoid(pItem, ("Current item should be selected!\n")); 1315 UIVirtualMachineItemCloud *pCloudItem = pItem->toCloud(); 1316 AssertPtrReturnVoid(pCloudItem); 1317 1318 /* Acquire cloud machine: */ 1319 CCloudMachine comMachine = pCloudItem->machine(); 1320 1304 1321 /* Put copied VNC command to clipboard: */ 1305 1322 QClipboard *pClipboard = QGuiApplication::clipboard(); 1306 1323 AssertPtrReturnVoid(pClipboard); 1307 1324 pClipboard->setText(comMachine.GetVNCConsoleCommand()); 1325 } 1326 1327 void UIVirtualBoxManager::sltPerformCopyCommandVNCWindows() 1328 { 1329 /* Get current item: */ 1330 UIVirtualMachineItem *pItem = currentItem(); 1331 AssertMsgReturnVoid(pItem, ("Current item should be selected!\n")); 1332 UIVirtualMachineItemCloud *pCloudItem = pItem->toCloud(); 1333 AssertPtrReturnVoid(pCloudItem); 1334 1335 /* Acquire cloud machine: */ 1336 CCloudMachine comMachine = pCloudItem->machine(); 1337 1338 /* Put copied VNC command to clipboard: */ 1339 QClipboard *pClipboard = QGuiApplication::clipboard(); 1340 AssertPtrReturnVoid(pClipboard); 1341 pClipboard->setText(comMachine.GetVNCConsoleCommandWindows()); 1308 1342 } 1309 1343 … … 2167 2201 connect(actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_DeleteConnection), &UIAction::triggered, 2168 2202 this, &UIVirtualBoxManager::sltPerformDeleteConsoleConnectionForMachine); 2169 connect(actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerial), &UIAction::triggered, 2170 this, &UIVirtualBoxManager::sltPerformCopyCommandSerial); 2171 connect(actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNC), &UIAction::triggered, 2172 this, &UIVirtualBoxManager::sltPerformCopyCommandVNC); 2203 connect(actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerialUnix), &UIAction::triggered, 2204 this, &UIVirtualBoxManager::sltPerformCopyCommandSerialUnix); 2205 connect(actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerialWindows), &UIAction::triggered, 2206 this, &UIVirtualBoxManager::sltPerformCopyCommandSerialWindows); 2207 connect(actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNCUnix), &UIAction::triggered, 2208 this, &UIVirtualBoxManager::sltPerformCopyCommandVNCUnix); 2209 connect(actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNCWindows), &UIAction::triggered, 2210 this, &UIVirtualBoxManager::sltPerformCopyCommandVNCWindows); 2173 2211 connect(actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_ConfigureApplications), &UIAction::triggered, 2174 2212 this, &UIVirtualBoxManager::sltOpenCloudConsoleManagerWindow); … … 2711 2749 2712 2750 /* Copy command to clipboard actions: */ 2713 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerial)); 2714 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNC)); 2751 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerialUnix)); 2752 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerialWindows)); 2753 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNCUnix)); 2754 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNCWindows)); 2715 2755 pMenu->addSeparator(); 2716 2756 … … 2880 2920 actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CreateConnection)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Console_S_CreateConnection, items)); 2881 2921 actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_DeleteConnection)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Console_S_DeleteConnection, items)); 2882 actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerial)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerial, items)); 2883 actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNC)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNC, items)); 2922 actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerialUnix)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerialUnix, items)); 2923 actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerialWindows)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerialWindows, items)); 2924 actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNCUnix)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNCUnix, items)); 2925 actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNCWindows)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNCWindows, items)); 2884 2926 actionPool()->action(UIActionIndexST_M_Machine_M_Console_S_ConfigureApplications)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Console_S_ConfigureApplications, items)); 2885 2927 … … 3160 3202 case UIActionIndexST_M_Machine_M_Console_S_CreateConnection: 3161 3203 case UIActionIndexST_M_Machine_M_Console_S_DeleteConnection: 3162 case UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerial: 3163 case UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNC: 3204 case UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerialUnix: 3205 case UIActionIndexST_M_Machine_M_Console_S_CopyCommandSerialWindows: 3206 case UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNCUnix: 3207 case UIActionIndexST_M_Machine_M_Console_S_CopyCommandVNCWindows: 3164 3208 case UIActionIndexST_M_Machine_M_Console_S_ConfigureApplications: 3165 3209 { -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h
r85425 r85445 253 253 /** Handles call to copy console connection key fingerprint. */ 254 254 void sltCopyConsoleConnectionFingerprint(); 255 /** Handles call to copy serial console command. */ 256 void sltPerformCopyCommandSerial(); 257 /** Handles call to copy VNC console command. */ 258 void sltPerformCopyCommandVNC(); 255 /** Handles call to copy serial console command for Unix. */ 256 void sltPerformCopyCommandSerialUnix(); 257 /** Handles call to copy serial console command for Windows. */ 258 void sltPerformCopyCommandSerialWindows(); 259 /** Handles call to copy VNC console command for Unix. */ 260 void sltPerformCopyCommandVNCUnix(); 261 /** Handles call to copy VNC console command for Windows. */ 262 void sltPerformCopyCommandVNCWindows(); 259 263 /** Handles call to execute external application. */ 260 264 void sltExecuteExternalApplication();
Note:
See TracChangeset
for help on using the changeset viewer.