Changeset 77344 in vbox
- Timestamp:
- Feb 18, 2019 10:58:26 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128881
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r77341 r77344 2835 2835 } 2836 2836 2837 QUuid VBoxGlobal::createHDWithNewHDWizard(QWidget *pParent, const QString &strMachineGuestOSTypeId/* = QString() */,2838 const QString &strMachine Folder/* = QString() */,2839 const QString &strMachine Name/* = QString() */)2837 QUuid VBoxGlobal::createHDWithNewHDWizard(QWidget *pParent, const QString &strMachineFolder /* = QString() */, 2838 const QString &strMachineName /* = QString() */, 2839 const QString &strMachineGuestOSTypeId /* = QString() */) 2840 2840 { 2841 2841 /* Initialize variables: */ … … 2887 2887 pActionOpenExistingMedium->setData(QVariant::fromValue(UIMediumTarget(strControllerName, comCurrentAttachment.GetPort(), 2888 2888 comCurrentAttachment.GetDevice(), enmMediumType))); 2889 pActionOpenExistingMedium->setText(QApplication::translate("UIMachineSettingsStorage", "Choose disk image...",2889 pActionOpenExistingMedium->setText(QApplication::translate("UIMachineSettingsStorage", "Choose/Create a disk image...", 2890 2890 "This is used for hard disks, optical media and floppies")); 2891 2891 2892 / * Prepare create floppy disk action: */2893 if (enmMediumType == UIMediumDeviceType_Floppy)2894 {2895 QAction *pActionCreateFloppy = menu.addAction(UIIconPool::iconSet(":/fd_add_16px.png"),2896 QString(), pListener, pszSlotName);2897 pActionCreateFloppy->setData(QVariant::fromValue(UIMediumTarget(strControllerName, comCurrentAttachment.GetPort(),2898 comCurrentAttachment.GetDevice(), enmMediumType,2899 UIMediumTarget::UIMediumTargetType_CreateFloppyDisk)));2900 pActionCreateFloppy->setText(QApplication::translate("UIMachineSettingsStorage", "Create a new floppy disk...",2901 "This is used to create a new floppy disk"));2902 }2903 / * Prepare ad-hoc-viso action for DVD-ROMs: */2904 if (enmMediumType == UIMediumDeviceType_DVD)2905 {2906 QAction *pActionAdHocViso = menu.addAction(UIIconPool::iconSet(":/select_file_16px.png"),2907 QString(), pListener, pszSlotName);2908 pActionAdHocViso->setData(QVariant::fromValue(UIMediumTarget(strControllerName, comCurrentAttachment.GetPort(),2909 comCurrentAttachment.GetDevice(), enmMediumType,2910 UIMediumTarget::UIMediumTargetType_CreateAdHocVISO)));2911 pActionAdHocViso->setText(QApplication::translate("UIMachineSettingsStorage", "Create ad hoc VISO...",2912 "This is used for optical media"));2913 }2892 // /* Prepare create floppy disk action: */ 2893 // if (enmMediumType == UIMediumDeviceType_Floppy) 2894 // { 2895 // QAction *pActionCreateFloppy = menu.addAction(UIIconPool::iconSet(":/fd_add_16px.png"), 2896 // QString(), pListener, pszSlotName); 2897 // pActionCreateFloppy->setData(QVariant::fromValue(UIMediumTarget(strControllerName, comCurrentAttachment.GetPort(), 2898 // comCurrentAttachment.GetDevice(), enmMediumType, 2899 // UIMediumTarget::UIMediumTargetType_CreateFloppyDisk))); 2900 // pActionCreateFloppy->setText(QApplication::translate("UIMachineSettingsStorage", "Create a new floppy disk...", 2901 // "This is used to create a new floppy disk")); 2902 // } 2903 // /* Prepare ad-hoc-viso action for DVD-ROMs: */ 2904 // if (enmMediumType == UIMediumDeviceType_DVD) 2905 // { 2906 // QAction *pActionAdHocViso = menu.addAction(UIIconPool::iconSet(":/select_file_16px.png"), 2907 // QString(), pListener, pszSlotName); 2908 // pActionAdHocViso->setData(QVariant::fromValue(UIMediumTarget(strControllerName, comCurrentAttachment.GetPort(), 2909 // comCurrentAttachment.GetDevice(), enmMediumType, 2910 // UIMediumTarget::UIMediumTargetType_CreateAdHocVISO))); 2911 // pActionAdHocViso->setText(QApplication::translate("UIMachineSettingsStorage", "Create ad hoc VISO...", 2912 // "This is used for optical media")); 2913 // } 2914 2914 2915 2915 … … 3076 3076 { 3077 3077 int iDialogReturn = openMediumSelectorDialog(windowManager().mainWindowShown(), target.mediumType, uMediumID, 3078 strMachineFolder, "" /*strMachineName*/,3079 "" /*strMachineGuestOSTypeId*/, true /*fEnableCreate */);3078 strMachineFolder, comConstMachine.GetName(), 3079 comConstMachine.GetOSTypeId(), true /*fEnableCreate */); 3080 3080 if (iDialogReturn == UIMediumSelector::ReturnCode_LeftEmpty && 3081 3081 (target.mediumType == UIMediumDeviceType_DVD || target.mediumType == UIMediumDeviceType_Floppy)) -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.cpp
r77263 r77344 167 167 168 168 QString strDiskname = !(m_strMachineName.isEmpty()) ? m_strMachineName : "NewFloppyDisk"; 169 strDiskname = VBoxGlobal::findUniqueFileName(m_strDefaultFolder, m_strMachineName);169 strDiskname = VBoxGlobal::findUniqueFileName(m_strDefaultFolder, strDiskname); 170 170 171 171 strInitialPath = QDir(strInitialPath).absoluteFilePath(strDiskname + "." + strPreferredExtension);
Note:
See TracChangeset
for help on using the changeset viewer.