Changeset 77217 in vbox for trunk/src/VBox
- Timestamp:
- Feb 8, 2019 1:32:34 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r77212 r77217 2759 2759 int VBoxGlobal::openMediumSelectorDialog(QWidget *pParent, UIMediumDeviceType enmMediumType, QUuid &outUuid, 2760 2760 const QString &strMachineName, const QString &strMachineFolder, 2761 const QString &strMachineGuestOSTypeId /* = QString() */)2761 const QString &strMachineGuestOSTypeId, bool fEnableCreate) 2762 2762 { 2763 2763 QWidget *pDialogParent = windowManager().realParentWindow(pParent); … … 2767 2767 if (!pSelector) 2768 2768 return static_cast<int>(UIMediumSelector::ReturnCode_Rejected); 2769 2769 pSelector->setEnableCreateAction(fEnableCreate); 2770 2770 windowManager().registerNewParent(pSelector, pDialogParent); 2771 2771 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r77186 r77217 518 518 * @param strMachineFolder Passes the machine folder, 519 519 * @param strMachineGuestOSTypeId Passes the type ID of machine's guest os, 520 * @param fEnableCreate Passes whether to show/enable create action in the medium selector dialog, 520 521 * returns the return code of the UIMediumSelector::ReturnCode as int. In case of a medium selection 521 522 * UUID of the selected medium is stored in @param outUuid.*/ 522 523 int openMediumSelectorDialog(QWidget *pParent, UIMediumDeviceType enmMediumType, QUuid &outUuid, 523 524 const QString &strMachineGuestOSTypeId = QString());524 const QString &strMachineName, const QString &strMachineFolder, 525 const QString &strMachineGuestOSTypeId, bool fEnableCreate); 525 526 526 527 /** Creates and shows a UIWizardNewVD wizard. -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.cpp
r77216 r77217 84 84 } 85 85 86 void UIMediumSelector::setEnableCreateAction(bool fEnable) 87 { 88 if (!m_pActionCreate) 89 return; 90 m_pActionCreate->setEnabled(fEnable); 91 m_pActionCreate->setVisible(fEnable); 92 } 93 86 94 QList<QUuid> UIMediumSelector::selectedMediumIds() const 87 95 { -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.h
r77216 r77217 54 54 const QString &machineSettingsFilePath = QString(), const QString &strMachineGuestOSTypeId = QString(), 55 55 QWidget *pParent = 0); 56 56 /** Disables/enables the create action and controls its visibility. */ 57 void setEnableCreateAction(bool fEnable); 57 58 QList<QUuid> selectedMediumIds() const; 58 59 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r77195 r77217 3100 3100 int iResult = vboxGlobal().openMediumSelectorDialog(this, m_pMediumIdHolder->type(), uMediumId, 3101 3101 m_strMachineName, strMachineFolder, 3102 m_strMachineGuestOSTypeId );3102 m_strMachineGuestOSTypeId, true /* enable create action: */); 3103 3103 3104 3104 if (iResult == UIMediumSelector::ReturnCode_Rejected || … … 3812 3812 int iResult = vboxGlobal().openMediumSelectorDialog(this, UIMediumDefs::mediumTypeToLocal(enmDevice), uMediumId, 3813 3813 m_strMachineName, strMachineFolder, 3814 m_strMachineGuestOSTypeId );3814 m_strMachineGuestOSTypeId, true /* enable cr1eate action: */); 3815 3815 3816 3816 /* Continue only if iResult is either UIMediumSelector::ReturnCode_Accepted or UIMediumSelector::ReturnCode_LeftEmpty: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp
r77212 r77217 69 69 fieldImp("machineBaseName").toString(), 70 70 fieldImp("machineFolder").toString(), 71 fieldImp("type").value<CGuestOSType>().GetId()); 71 fieldImp("type").value<CGuestOSType>().GetId(), 72 false /* don't show/enable the create action: */); 72 73 73 74 if (returnCode == static_cast<int>(UIMediumSelector::ReturnCode_Accepted) && !uMediumId.isNull())
Note:
See TracChangeset
for help on using the changeset viewer.