Changeset 73457 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 2, 2018 4:17:50 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 124084
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r73456 r73457 629 629 void UIVirtualBoxManager::sltOpenImportApplianceWizard(const QString &strFileName /* = QString() */) 630 630 { 631 /* Show Import Appliance wizard: */631 /* Initialize variables: */ 632 632 #ifdef VBOX_WS_MAC 633 633 const QString strTmpFile = ::darwinResolveAlias(strFileName); … … 689 689 void UIVirtualBoxManager::sltOpenPreferencesDialog() 690 690 { 691 /* Check that we do NOT handling that already: */692 if (actionPool()->action(UIActionIndex_M_Application_S_Preferences)->data().toBool())693 return;694 691 /* Remember that we handling that already: */ 695 actionPool()->action(UIActionIndex_M_Application_S_Preferences)->set Data(true);692 actionPool()->action(UIActionIndex_M_Application_S_Preferences)->setEnabled(false); 696 693 697 694 /* Don't show the inaccessible warning … … 706 703 /// @todo Is it possible at all if event-loop unwind? 707 704 /* Remember that we do NOT handling that already: */ 708 actionPool()->action(UIActionIndex_M_Application_S_Preferences)->set Data(false);705 actionPool()->action(UIActionIndex_M_Application_S_Preferences)->setEnabled(true); 709 706 } 710 707 … … 719 716 #ifdef VBOX_WS_MAC 720 717 QString strTmpFile = ::darwinResolveAlias(strFileName); 721 #else /* VBOX_WS_MAC */718 #else 722 719 QString strTmpFile = strFileName; 723 #endif /* !VBOX_WS_MAC */ 724 CVirtualBox vbox = vboxGlobal().virtualBox(); 720 #endif 721 CVirtualBox comVBox = vboxGlobal().virtualBox(); 722 723 /* No file specified: */ 725 724 if (strTmpFile.isEmpty()) 726 725 { 727 QString strBaseFolder = vbox.GetSystemProperties().GetDefaultMachineFolder();726 QString strBaseFolder = comVBox.GetSystemProperties().GetDefaultMachineFolder(); 728 727 QString strTitle = tr("Select a virtual machine file"); 729 728 QStringList extensions; … … 741 740 742 741 /* Make sure this machine can be opened: */ 743 CMachine newMachine = vbox.OpenMachine(strTmpFile);744 if (! vbox.isOk())745 { 746 msgCenter().cannotOpenMachine( vbox, strTmpFile);742 CMachine comMachineNew = comVBox.OpenMachine(strTmpFile); 743 if (!comVBox.isOk()) 744 { 745 msgCenter().cannotOpenMachine(comVBox, strTmpFile); 747 746 return; 748 747 } 749 748 750 749 /* Make sure this machine was NOT registered already: */ 751 CMachine oldMachine = vbox.FindMachine(newMachine.GetId());752 if (! oldMachine.isNull())753 { 754 msgCenter().cannotReregisterExistingMachine(strTmpFile, oldMachine.GetName());750 CMachine comMachineOld = comVBox.FindMachine(comMachineNew.GetId()); 751 if (!comMachineOld.isNull()) 752 { 753 msgCenter().cannotReregisterExistingMachine(strTmpFile, comMachineOld.GetName()); 755 754 return; 756 755 } 757 756 758 757 /* Register that machine: */ 759 vbox.RegisterMachine(newMachine);760 } 761 762 void UIVirtualBoxManager::sltOpenMachineSettingsDialog( const QString &strCategoryRef/* = QString() */,763 const QString &strControlRef/* = QString() */,758 comVBox.RegisterMachine(comMachineNew); 759 } 760 761 void UIVirtualBoxManager::sltOpenMachineSettingsDialog(QString strCategory /* = QString() */, 762 QString strControl /* = QString() */, 764 763 const QString &strID /* = QString() */) 765 {766 /* This slot should not be called when there is not selection: */767 AssertMsgReturnVoid(currentItem(), ("Current item should be selected!\n"));768 769 /* Check that we do NOT handling that already: */770 if (actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->data().toBool())771 return;772 /* Remember that we handling that already: */773 actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->setData(true);774 775 /* Process href from VM details / description: */776 if (!strCategoryRef.isEmpty() && strCategoryRef[0] != '#')777 {778 vboxGlobal().openURL(strCategoryRef);779 return;780 }781 782 /* Get category and control: */783 QString strCategory = strCategoryRef;784 QString strControl = strControlRef;785 /* Check if control is coded into the URL by %%: */786 if (strControl.isEmpty())787 {788 QStringList parts = strCategory.split("%%");789 if (parts.size() == 2)790 {791 strCategory = parts.at(0);792 strControl = parts.at(1);793 }794 }795 796 /* Don't show the inaccessible warning797 * if the user tries to open VM settings: */798 m_fFirstMediumEnumerationHandled = true;799 800 /* Create and execute corresponding VM settings window: */801 QPointer<UISettingsDialogMachine> pDlg = new UISettingsDialogMachine(this,802 QUuid(strID).isNull() ? currentItem()->id() : strID,803 strCategory, strControl);804 pDlg->execute();805 delete pDlg;806 807 /// @todo Is it possible at all if event-loop unwind?808 /* Remember that we do NOT handling that already: */809 actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->setData(false);810 }811 812 void UIVirtualBoxManager::sltOpenCloneMachineWizard()813 764 { 814 765 /* Get current item: */ … … 817 768 818 769 /* Lock the action preventing cascade calls: */ 770 actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->setEnabled(false); 771 772 /* Process href from VM details / description: */ 773 if (!strCategory.isEmpty() && strCategory[0] != '#') 774 { 775 vboxGlobal().openURL(strCategory); 776 } 777 else 778 { 779 /* Check if control is coded into the URL by %%: */ 780 if (strControl.isEmpty()) 781 { 782 QStringList parts = strCategory.split("%%"); 783 if (parts.size() == 2) 784 { 785 strCategory = parts.at(0); 786 strControl = parts.at(1); 787 } 788 } 789 790 /* Don't show the inaccessible warning 791 * if the user tries to open VM settings: */ 792 m_fFirstMediumEnumerationHandled = true; 793 794 /* Create and execute corresponding VM settings window: */ 795 QPointer<UISettingsDialogMachine> pDlg = new UISettingsDialogMachine(this, 796 QUuid(strID).isNull() ? pItem->id() : strID, 797 strCategory, strControl); 798 pDlg->execute(); 799 delete pDlg; 800 } 801 802 /// @todo Is it possible at all if event-loop unwind? 803 /* Unlock the action allowing further calls: */ 804 actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->setEnabled(true); 805 } 806 807 void UIVirtualBoxManager::sltOpenCloneMachineWizard() 808 { 809 /* Get current item: */ 810 UIVirtualMachineItem *pItem = currentItem(); 811 AssertMsgReturnVoid(pItem, ("Current item should be selected!\n")); 812 813 /* Lock the action preventing cascade calls: */ 819 814 actionPool()->action(UIActionIndexST_M_Machine_S_Clone)->setEnabled(false); 820 815 821 816 /* Use the "safe way" to open stack of Mac OS X Sheets: */ 822 817 QWidget *pWizardParent = windowManager().realParentWindow(this); 823 824 818 const QStringList &machineGroupNames = pItem->groups(); 825 QString strGroup = !machineGroupNames.isEmpty() ? machineGroupNames.at(0) : QString();819 const QString strGroup = !machineGroupNames.isEmpty() ? machineGroupNames.at(0) : QString(); 826 820 UISafePointerWizard pWizard = new UIWizardCloneVM(pWizardParent, pItem->machine(), strGroup); 827 821 windowManager().registerNewParent(pWizard, pWizardParent); … … 835 829 } 836 830 837 void UIVirtualBoxManager::sltPerformMoveMachine() 838 { 831 void UIVirtualBoxManager::sltPerformMachineMove() 832 { 833 /* Get current item: */ 839 834 UIVirtualMachineItem *pItem = currentItem(); 840 835 AssertMsgReturnVoid(pItem, ("Current item should be selected!\n")); … … 913 908 QList<UIVirtualMachineItem*> itemsToDiscard; 914 909 foreach (UIVirtualMachineItem *pItem, items) 910 { 915 911 if (isActionEnabled(UIActionIndexST_M_Group_S_Discard, QList<UIVirtualMachineItem*>() << pItem)) 916 912 { … … 918 914 itemsToDiscard << pItem; 919 915 } 916 } 920 917 AssertMsg(!machineNames.isEmpty(), ("This action should not be allowed!")); 921 918 … … 928 925 { 929 926 /* Open a session to modify VM: */ 930 CSession session = vboxGlobal().openSession(pItem->id());931 if ( session.isNull())927 CSession comSession = vboxGlobal().openSession(pItem->id()); 928 if (comSession.isNull()) 932 929 return; 933 930 934 931 /* Get session machine: */ 935 CMachine machine = session.GetMachine();936 machine.DiscardSavedState(true);937 if (! machine.isOk())938 msgCenter().cannotDiscardSavedState( machine);932 CMachine comMachine = comSession.GetMachine(); 933 comMachine.DiscardSavedState(true); 934 if (!comMachine.isOk()) 935 msgCenter().cannotDiscardSavedState(comMachine); 939 936 940 937 /* Unlock machine finally: */ 941 session.UnlockMachine();938 comSession.UnlockMachine(); 942 939 } 943 940 } … … 953 950 { 954 951 /* Get item state: */ 955 KMachineState state = pItem->machineState();952 const KMachineState enmState = pItem->machineState(); 956 953 957 954 /* Check if current item could be paused/resumed: */ … … 961 958 /* Check if current item already paused: */ 962 959 if (fPause && 963 ( state == KMachineState_Paused ||964 state == KMachineState_TeleportingPausedVM))960 (enmState == KMachineState_Paused || 961 enmState == KMachineState_TeleportingPausedVM)) 965 962 continue; 966 963 967 964 /* Check if current item already resumed: */ 968 965 if (!fPause && 969 ( state == KMachineState_Running ||970 state == KMachineState_Teleporting ||971 state == KMachineState_LiveSnapshotting))966 (enmState == KMachineState_Running || 967 enmState == KMachineState_Teleporting || 968 enmState == KMachineState_LiveSnapshotting)) 972 969 continue; 973 970 974 971 /* Open a session to modify VM state: */ 975 CSession session = vboxGlobal().openExistingSession(pItem->id());976 if ( session.isNull())972 CSession comSession = vboxGlobal().openExistingSession(pItem->id()); 973 if (comSession.isNull()) 977 974 return; 978 975 979 976 /* Get session console: */ 980 CConsole co nsole = session.GetConsole();977 CConsole comConsole = comSession.GetConsole(); 981 978 /* Pause/resume VM: */ 982 979 if (fPause) 983 co nsole.Pause();980 comConsole.Pause(); 984 981 else 985 console.Resume(); 986 bool ok = console.isOk(); 987 if (!ok) 982 comConsole.Resume(); 983 if (!comConsole.isOk()) 988 984 { 989 985 if (fPause) 990 msgCenter().cannotPauseMachine(co nsole);986 msgCenter().cannotPauseMachine(comConsole); 991 987 else 992 msgCenter().cannotResumeMachine(co nsole);988 msgCenter().cannotResumeMachine(comConsole); 993 989 } 994 990 995 991 /* Unlock machine finally: */ 996 session.UnlockMachine();992 comSession.UnlockMachine(); 997 993 } 998 994 } … … 1008 1004 QList<UIVirtualMachineItem*> itemsToReset; 1009 1005 foreach (UIVirtualMachineItem *pItem, items) 1006 { 1010 1007 if (isActionEnabled(UIActionIndexST_M_Group_S_Reset, QList<UIVirtualMachineItem*>() << pItem)) 1011 1008 { … … 1013 1010 itemsToReset << pItem; 1014 1011 } 1012 } 1015 1013 AssertMsg(!machineNames.isEmpty(), ("This action should not be allowed!")); 1016 1014 … … 1023 1021 { 1024 1022 /* Open a session to modify VM state: */ 1025 CSession session = vboxGlobal().openExistingSession(pItem->id());1026 if ( session.isNull())1023 CSession comSession = vboxGlobal().openExistingSession(pItem->id()); 1024 if (comSession.isNull()) 1027 1025 return; 1028 1026 1029 1027 /* Get session console: */ 1030 CConsole co nsole = session.GetConsole();1028 CConsole comConsole = comSession.GetConsole(); 1031 1029 /* Reset VM: */ 1032 co nsole.Reset();1030 comConsole.Reset(); 1033 1031 1034 1032 /* Unlock machine finally: */ 1035 session.UnlockMachine();1033 comSession.UnlockMachine(); 1036 1034 } 1037 1035 } … … 1069 1067 1070 1068 /* Open a session to modify VM state: */ 1071 CSession session = vboxGlobal().openExistingSession(pItem->id());1072 if ( session.isNull())1069 CSession comSession = vboxGlobal().openExistingSession(pItem->id()); 1070 if (comSession.isNull()) 1073 1071 return; 1074 1072 1075 1073 /* Get session console: */ 1076 CConsole co nsole = session.GetConsole();1074 CConsole comConsole = comSession.GetConsole(); 1077 1075 /* Get session machine: */ 1078 CMachine machine = session.GetMachine();1076 CMachine comMachine = comSession.GetMachine(); 1079 1077 /* Pause VM first if necessary: */ 1080 1078 if (pItem->machineState() != KMachineState_Paused) 1081 co nsole.Pause();1082 if (co nsole.isOk())1079 comConsole.Pause(); 1080 if (comConsole.isOk()) 1083 1081 { 1084 1082 /* Prepare machine state saving progress: */ 1085 CProgress progress = machine.SaveState();1086 if ( machine.isOk())1083 CProgress comProgress = comMachine.SaveState(); 1084 if (comMachine.isOk()) 1087 1085 { 1088 1086 /* Show machine state saving progress: */ 1089 msgCenter().showModalProgressDialog( progress, machine.GetName(), ":/progress_state_save_90px.png");1090 if (! progress.isOk() || progress.GetResultCode() != 0)1091 msgCenter().cannotSaveMachineState( progress, machine.GetName());1087 msgCenter().showModalProgressDialog(comProgress, comMachine.GetName(), ":/progress_state_save_90px.png"); 1088 if (!comProgress.isOk() || comProgress.GetResultCode() != 0) 1089 msgCenter().cannotSaveMachineState(comProgress, comMachine.GetName()); 1092 1090 } 1093 1091 else 1094 msgCenter().cannotSaveMachineState( machine);1092 msgCenter().cannotSaveMachineState(comMachine); 1095 1093 } 1096 1094 else 1097 msgCenter().cannotPauseMachine(co nsole);1095 msgCenter().cannotPauseMachine(comConsole); 1098 1096 1099 1097 /* Unlock machine finally: */ 1100 session.UnlockMachine();1098 comSession.UnlockMachine(); 1101 1099 } 1102 1100 } … … 1112 1110 QList<UIVirtualMachineItem*> itemsToShutdown; 1113 1111 foreach (UIVirtualMachineItem *pItem, items) 1112 { 1114 1113 if (isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_Shutdown, QList<UIVirtualMachineItem*>() << pItem)) 1115 1114 { … … 1117 1116 itemsToShutdown << pItem; 1118 1117 } 1118 } 1119 1119 AssertMsg(!machineNames.isEmpty(), ("This action should not be allowed!")); 1120 1120 … … 1127 1127 { 1128 1128 /* Open a session to modify VM state: */ 1129 CSession session = vboxGlobal().openExistingSession(pItem->id());1130 if ( session.isNull())1129 CSession comSession = vboxGlobal().openExistingSession(pItem->id()); 1130 if (comSession.isNull()) 1131 1131 return; 1132 1132 1133 1133 /* Get session console: */ 1134 CConsole co nsole = session.GetConsole();1134 CConsole comConsole = comSession.GetConsole(); 1135 1135 /* ACPI Shutdown: */ 1136 co nsole.PowerButton();1137 if (!co nsole.isOk())1138 msgCenter().cannotACPIShutdownMachine(co nsole);1136 comConsole.PowerButton(); 1137 if (!comConsole.isOk()) 1138 msgCenter().cannotACPIShutdownMachine(comConsole); 1139 1139 1140 1140 /* Unlock machine finally: */ 1141 session.UnlockMachine();1141 comSession.UnlockMachine(); 1142 1142 } 1143 1143 } … … 1153 1153 QList<UIVirtualMachineItem*> itemsToPowerOff; 1154 1154 foreach (UIVirtualMachineItem *pItem, items) 1155 { 1155 1156 if (isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_PowerOff, QList<UIVirtualMachineItem*>() << pItem)) 1156 1157 { … … 1158 1159 itemsToPowerOff << pItem; 1159 1160 } 1161 } 1160 1162 AssertMsg(!machineNames.isEmpty(), ("This action should not be allowed!")); 1161 1163 … … 1168 1170 { 1169 1171 /* Open a session to modify VM state: */ 1170 CSession session = vboxGlobal().openExistingSession(pItem->id());1171 if ( session.isNull())1172 CSession comSession = vboxGlobal().openExistingSession(pItem->id()); 1173 if (comSession.isNull()) 1172 1174 return; 1173 1175 1174 1176 /* Get session console: */ 1175 CConsole co nsole = session.GetConsole();1177 CConsole comConsole = comSession.GetConsole(); 1176 1178 /* Prepare machine power down: */ 1177 CProgress progress = console.PowerDown();1178 if (co nsole.isOk())1179 CProgress comProgress = comConsole.PowerDown(); 1180 if (comConsole.isOk()) 1179 1181 { 1180 1182 /* Show machine power down progress: */ 1181 CMachine machine = session.GetMachine();1182 msgCenter().showModalProgressDialog( progress, machine.GetName(), ":/progress_poweroff_90px.png");1183 if (! progress.isOk() || progress.GetResultCode() != 0)1184 msgCenter().cannotPowerDownMachine( progress, machine.GetName());1183 CMachine machine = comSession.GetMachine(); 1184 msgCenter().showModalProgressDialog(comProgress, machine.GetName(), ":/progress_poweroff_90px.png"); 1185 if (!comProgress.isOk() || comProgress.GetResultCode() != 0) 1186 msgCenter().cannotPowerDownMachine(comProgress, machine.GetName()); 1185 1187 } 1186 1188 else 1187 msgCenter().cannotPowerDownMachine(co nsole);1189 msgCenter().cannotPowerDownMachine(comConsole); 1188 1190 1189 1191 /* Unlock machine finally: */ 1190 session.UnlockMachine();1192 comSession.UnlockMachine(); 1191 1193 } 1192 1194 } … … 1241 1243 void UIVirtualBoxManager::sltCloseLogViewerWindow() 1242 1244 { 1245 /* Search for the sender of the signal within the m_logViewers map: */ 1243 1246 QMap<QString, QIManagerDialog*>::iterator sendersIterator = m_logViewers.begin(); 1244 1245 /* Search for the sender of the signal within the m_logViewers map: */1246 1247 while (sendersIterator != m_logViewers.end() && sendersIterator.value() != sender()) 1247 1248 ++sendersIterator; … … 1250 1251 return; 1251 1252 1252 QIManagerDialog* pDialog = qobject_cast<QIManagerDialog*>(sendersIterator.value()); 1253 /* Check whether we have found the proper dialog: */ 1254 QIManagerDialog *pDialog = qobject_cast<QIManagerDialog*>(sendersIterator.value()); 1253 1255 if (!pDialog) 1254 1256 return; 1255 1257 1256 /* First remove this log viewer dialog from the map. This should be1257 done before closing the dialog which will incur a second call to1258 1258 /* First remove this log-viewer dialog from the map. 1259 * This should be done before closing the dialog which will incur 1260 * a second call to this function and result in double delete!!!: */ 1259 1261 m_logViewers.erase(sendersIterator); 1260 1262 UIVMLogViewerDialogFactory(CMachine()).cleanup(pDialog); … … 1293 1295 1294 1296 /* Create shortcut for this VM: */ 1295 const CMachine & machine = pItem->machine();1296 UIDesktopServices::createMachineShortcut( machine.GetSettingsFilePath(),1297 const CMachine &comMachine = pItem->machine(); 1298 UIDesktopServices::createMachineShortcut(comMachine.GetSettingsFilePath(), 1297 1299 QStandardPaths::writableLocation(QStandardPaths::DesktopLocation), 1298 machine.GetName(), machine.GetId());1300 comMachine.GetName(), comMachine.GetId()); 1299 1301 } 1300 1302 } … … 1413 1415 /* We have to make sure that we are getting the front most process: */ 1414 1416 ::darwinSetFrontMostProcess(); 1415 #endif /* VBOX_WS_MAC */1417 #endif 1416 1418 1417 1419 /* Cache medium data early if necessary: */ … … 1458 1460 * On Mac OS X the icon referenced in info.plist is used. 1459 1461 * On X11 we will provide as much icons as we can. */ 1460 #if ! (defined (VBOX_WS_WIN) || defined (VBOX_WS_MAC))1462 #if !defined(VBOX_WS_WIN) && !defined(VBOX_WS_MAC) 1461 1463 QIcon icon(":/VirtualBox.svg"); 1462 1464 icon.addFile(":/VirtualBox_48px.png"); … … 1505 1507 menuBar()->addMenu(gpWindowMenuManager->createMenu(this)); 1506 1508 gpWindowMenuManager->addWindow(this); 1507 #endif /* VBOX_WS_MAC */1509 #endif 1508 1510 1509 1511 /* Prepare Help-menu: */ … … 1523 1525 1524 1526 #ifdef VBOX_WS_MAC 1527 1525 1528 /* 'About' action goes to Application menu: */ 1526 1529 pMenu->addAction(actionPool()->action(UIActionIndex_M_Application_S_About)); … … 1607 1610 /* 'Close' action goes to 'File' menu: */ 1608 1611 pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_Close)); 1612 1609 1613 #endif /* !VBOX_WS_MAC */ 1610 1614 } … … 2090 2094 connect(actionPool()->action(UIActionIndexST_M_Machine_S_Settings), SIGNAL(triggered()), this, SLOT(sltOpenMachineSettingsDialog())); 2091 2095 connect(actionPool()->action(UIActionIndexST_M_Machine_S_Clone), SIGNAL(triggered()), this, SLOT(sltOpenCloneMachineWizard())); 2092 connect(actionPool()->action(UIActionIndexST_M_Machine_S_Move), SIGNAL(triggered()), this, SLOT(sltPerformM oveMachine()));2096 connect(actionPool()->action(UIActionIndexST_M_Machine_S_Move), SIGNAL(triggered()), this, SLOT(sltPerformMachineMove())); 2093 2097 connect(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow), SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowMachine())); 2094 2098 connect(actionPool()->action(UIActionIndexST_M_Machine_T_Pause), SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseOrResumeMachine(bool))); … … 2268 2272 /* Cleanup 'Window' menu: */ 2269 2273 UIWindowMenuManager::destroy(); 2270 #endif /* VBOX_WS_MAC */2274 #endif 2271 2275 2272 2276 /* Destroy action-pool: */ … … 2298 2302 QList<UIVirtualMachineItem*> startableItems; 2299 2303 foreach (UIVirtualMachineItem *pItem, items) 2304 { 2300 2305 if (isAtLeastOneItemCanBeStarted(QList<UIVirtualMachineItem*>() << pItem)) 2301 2306 { … … 2303 2308 startableMachineNames << pItem->name(); 2304 2309 } 2310 } 2305 2311 2306 2312 /* Initially we have start auto-confirmed: */ … … 2313 2319 /* For every item => check if it could be launched: */ 2314 2320 foreach (UIVirtualMachineItem *pItem, items) 2321 { 2315 2322 if ( isAtLeastOneItemCanBeShown(QList<UIVirtualMachineItem*>() << pItem) 2316 2323 || ( isAtLeastOneItemCanBeStarted(QList<UIVirtualMachineItem*>() << pItem) … … 2328 2335 vboxGlobal().launchMachine(machine, enmItemLaunchMode); 2329 2336 } 2337 } 2330 2338 } 2331 2339 … … 2441 2449 UIVirtualMachineItem *pFirstStartedAction = 0; 2442 2450 foreach (UIVirtualMachineItem *pSelectedItem, items) 2451 { 2443 2452 if (UIVirtualMachineItem::isItemStarted(pSelectedItem)) 2444 2453 { … … 2446 2455 break; 2447 2456 } 2457 } 2448 2458 /* Update the group Pause/Resume action appearance: */ 2449 2459 actionPool()->action(UIActionIndexST_M_Group_T_Pause)->blockSignals(true); … … 2650 2660 { 2651 2661 foreach (UIVirtualMachineItem *pItem, items) 2652 if (pItem->accessible() 2662 { 2663 if ( pItem->accessible() 2653 2664 #ifdef VBOX_WS_MAC 2654 2665 /* On Mac OS X this are real alias files, which don't work with the old legacy xml files. */ 2655 2666 && pItem->settingsFile().endsWith(".vbox", Qt::CaseInsensitive) 2656 #endif /* VBOX_WS_MAC */2667 #endif 2657 2668 ) 2658 2669 return true; 2670 } 2659 2671 return false; 2660 2672 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h
r73451 r73457 181 181 * @param strControl can bring the widget of the page to focus. 182 182 * @param strID can bring the ID of machine to manage. */ 183 void sltOpenMachineSettingsDialog( const QString &strCategory = QString(),184 const QString &strControl = QString(),183 void sltOpenMachineSettingsDialog(QString strCategory = QString(), 184 QString strControl = QString(), 185 185 const QString &strID = QString()); 186 186 … … 189 189 190 190 /** Handles the Move Machine action. */ 191 void sltPerformM oveMachine();191 void sltPerformMachineMove(); 192 192 193 193 /** Handles call to start or show machine. */
Note:
See TracChangeset
for help on using the changeset viewer.