Changeset 99199 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 28, 2023 2:22:37 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r99195 r99199 1039 1039 m_wizards[enmType] = new UIWizardNewCloudVM(this, m_pWidget->fullGroupName()); 1040 1040 break; 1041 case WizardType_AddCloudVM: 1042 m_wizards[enmType] = new UIWizardAddCloudVM(this, m_pWidget->fullGroupName()); 1043 break; 1041 1044 default: 1042 1045 break; … … 1075 1078 void UIVirtualBoxManager::sltOpenAddMachineDialog() 1076 1079 { 1077 /* Lock the actions preventing cascade calls: */1078 UIQObjectPropertySetter guardBlock(QList<QObject*>() << actionPool()->action(UIActionIndexMN_M_Welcome_S_Add)1079 << actionPool()->action(UIActionIndexMN_M_Machine_S_Add)1080 << actionPool()->action(UIActionIndexMN_M_Group_S_Add),1081 "opened", true);1082 connect(&guardBlock, &UIQObjectPropertySetter::sigAboutToBeDestroyed,1083 this, &UIVirtualBoxManager::sltHandleUpdateActionAppearanceRequest);1084 updateActionsAppearance();1085 1086 1080 /* Get first selected item: */ 1087 1081 UIVirtualMachineItem *pItem = currentItem(); … … 1090 1084 if ( !pItem 1091 1085 || pItem->itemType() == UIVirtualMachineItemType_Local) 1092 {1093 /* Open add machine dialog: */1094 1086 openAddMachineDialog(); 1095 }1096 1087 /* For cloud machine: */ 1097 1088 else 1098 { 1099 /* Use the "safe way" to open stack of Mac OS X Sheets: */ 1100 QWidget *pWizardParent = windowManager().realParentWindow(this); 1101 UISafePointerWizardAddCloudVM pWizard = new UIWizardAddCloudVM(pWizardParent, m_pWidget->fullGroupName()); 1102 windowManager().registerNewParent(pWizard, pWizardParent); 1103 1104 /* Execute wizard: */ 1105 pWizard->exec(); 1106 delete pWizard; 1107 } 1089 sltOpenWizard(WizardType_AddCloudVM); 1108 1090 } 1109 1091 … … 2581 2563 void UIVirtualBoxManager::openAddMachineDialog(const QString &strFileName /* = QString() */) 2582 2564 { 2565 /* Lock the actions preventing cascade calls: */ 2566 UIQObjectPropertySetter guardBlock(QList<QObject*>() << actionPool()->action(UIActionIndexMN_M_Welcome_S_Add) 2567 << actionPool()->action(UIActionIndexMN_M_Machine_S_Add) 2568 << actionPool()->action(UIActionIndexMN_M_Group_S_Add), 2569 "opened", true); 2570 connect(&guardBlock, &UIQObjectPropertySetter::sigAboutToBeDestroyed, 2571 this, &UIVirtualBoxManager::sltHandleUpdateActionAppearanceRequest); 2572 updateActionsAppearance(); 2573 2583 2574 /* Initialize variables: */ 2584 2575 #ifdef VBOX_WS_MAC
Note:
See TracChangeset
for help on using the changeset viewer.