Changeset 99202 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 28, 2023 3:55:12 PM (22 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r99201 r99202 471 471 , m_iGeometrySaveTimerId(-1) 472 472 , m_fImportFromOCI(false) 473 , m_fExportToOCI(false) 473 474 { 474 475 s_pInstance = this; … … 927 928 void UIVirtualBoxManager::sltOpenExportApplianceWizard() 928 929 { 929 /* Get selected items: */930 QList<UIVirtualMachineItem*> items = currentItems();931 932 /* Populate the list of VM names: */933 QStringList names;934 for (int i = 0; i < items.size(); ++i)935 names << items.at(i)->name();936 937 /* Lock the actions preventing cascade calls: */938 UIQObjectPropertySetter guardBlock(QList<QObject*>() << actionPool()->action(UIActionIndexMN_M_File_S_ExportAppliance)939 << actionPool()->action(UIActionIndexMN_M_Machine_S_ExportToOCI),940 "opened", true);941 connect(&guardBlock, &UIQObjectPropertySetter::sigAboutToBeDestroyed,942 this, &UIVirtualBoxManager::sltHandleUpdateActionAppearanceRequest);943 updateActionsAppearance();944 945 930 /* Check what was the action invoked us: */ 946 931 UIAction *pAction = qobject_cast<UIAction*>(sender()); 947 932 948 /* Use the "safe way" to open stack of Mac OS X Sheets: */ 949 QWidget *pWizardParent = windowManager().realParentWindow(this); 950 UINativeWizardPointer pWizard = new UIWizardExportApp(pWizardParent, 951 names, 952 pAction && 953 pAction == actionPool()->action(UIActionIndexMN_M_Machine_S_ExportToOCI)); 954 windowManager().registerNewParent(pWizard, pWizardParent); 955 pWizard->exec(); 956 delete pWizard; 933 /* Export to OCI action invokes wizard directly in OCI mode: */ 934 m_fExportToOCI = pAction 935 && pAction == actionPool()->action(UIActionIndexMN_M_Machine_S_ExportToOCI); 936 /* Populate the list of VM names: */ 937 m_names.clear(); 938 foreach (UIVirtualMachineItem *pItem, currentItems()) 939 m_names << pItem->name(); 940 941 /* Open Export Appliance Wizard: */ 942 sltOpenWizard(WizardType_ExportAppliance); 957 943 } 958 944 … … 1001 987 switch (enmType) 1002 988 { 989 case WizardType_ExportAppliance: 990 m_wizards[enmType] = new UIWizardExportApp(this, m_names, m_fExportToOCI); 991 break; 1003 992 case WizardType_ImportAppliance: 1004 993 m_wizards[enmType] = new UIWizardImportApp(this, m_fImportFromOCI, m_strFileName); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h
r99201 r99202 520 520 521 521 /** Holds the geometry save timer ID. */ 522 int m_iGeometrySaveTimerId; 522 int m_iGeometrySaveTimerId; 523 523 524 /** Holds whether OCI importing should be started by default. */ 524 525 bool m_fImportFromOCI; 525 526 /** Holds the file-name used by import wizard. */ 526 527 QString m_strFileName; 528 529 /** Holds whether OCI exporting should be started by default. */ 530 bool m_fExportToOCI; 531 /** Holds the list of VMs used by export wizard. */ 532 QStringList m_names; 527 533 }; 528 534
Note:
See TracChangeset
for help on using the changeset viewer.