summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2019-02-18 10:58:26 +0000
committervboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2019-02-18 10:58:26 +0000
commit54b46812cbbfdc5458a763236e30f1d75d34e040 (patch)
tree8956ed2d76e4693a354d6089a9a5ba40bf8ed9a8
parent33022c38b421f761d63aedf98c13dc52d510d63c (diff)
downloadVirtualBox-svn-54b46812cbbfdc5458a763236e30f1d75d34e040.tar.gz
FE/Qt: bugref:9340. Fixes to r128874.
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@77344 cfe28804-0f27-0410-a406-dd0f0b0b656f
-rw-r--r--src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp56
-rw-r--r--src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.cpp2
2 files changed, 29 insertions, 29 deletions
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp b/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
index effc8333476..4a91ba0bf8d 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
@@ -2834,9 +2834,9 @@ int VBoxGlobal::openMediumSelectorDialog(QWidget *pParent, UIMediumDeviceType e
return static_cast<int>(returnCode);
}
-QUuid VBoxGlobal::createHDWithNewHDWizard(QWidget *pParent, const QString &strMachineGuestOSTypeId /* = QString() */,
- const QString &strMachineFolder /* = QString() */,
- const QString &strMachineName /* = QString() */)
+QUuid VBoxGlobal::createHDWithNewHDWizard(QWidget *pParent, const QString &strMachineFolder /* = QString() */,
+ const QString &strMachineName /* = QString() */,
+ const QString &strMachineGuestOSTypeId /* = QString() */)
{
/* Initialize variables: */
QString strDefaultFolder(strMachineFolder);
@@ -2886,31 +2886,31 @@ void VBoxGlobal::prepareStorageMenu(QMenu &menu,
QString(), pListener, pszSlotName);
pActionOpenExistingMedium->setData(QVariant::fromValue(UIMediumTarget(strControllerName, comCurrentAttachment.GetPort(),
comCurrentAttachment.GetDevice(), enmMediumType)));
- pActionOpenExistingMedium->setText(QApplication::translate("UIMachineSettingsStorage", "Choose disk image...",
+ pActionOpenExistingMedium->setText(QApplication::translate("UIMachineSettingsStorage", "Choose/Create a disk image...",
"This is used for hard disks, optical media and floppies"));
- /* Prepare create floppy disk action: */
- if (enmMediumType == UIMediumDeviceType_Floppy)
- {
- QAction *pActionCreateFloppy = menu.addAction(UIIconPool::iconSet(":/fd_add_16px.png"),
- QString(), pListener, pszSlotName);
- pActionCreateFloppy->setData(QVariant::fromValue(UIMediumTarget(strControllerName, comCurrentAttachment.GetPort(),
- comCurrentAttachment.GetDevice(), enmMediumType,
- UIMediumTarget::UIMediumTargetType_CreateFloppyDisk)));
- pActionCreateFloppy->setText(QApplication::translate("UIMachineSettingsStorage", "Create a new floppy disk...",
- "This is used to create a new floppy disk"));
- }
- /* Prepare ad-hoc-viso action for DVD-ROMs: */
- if (enmMediumType == UIMediumDeviceType_DVD)
- {
- QAction *pActionAdHocViso = menu.addAction(UIIconPool::iconSet(":/select_file_16px.png"),
- QString(), pListener, pszSlotName);
- pActionAdHocViso->setData(QVariant::fromValue(UIMediumTarget(strControllerName, comCurrentAttachment.GetPort(),
- comCurrentAttachment.GetDevice(), enmMediumType,
- UIMediumTarget::UIMediumTargetType_CreateAdHocVISO)));
- pActionAdHocViso->setText(QApplication::translate("UIMachineSettingsStorage", "Create ad hoc VISO...",
- "This is used for optical media"));
- }
+ // /* Prepare create floppy disk action: */
+ // if (enmMediumType == UIMediumDeviceType_Floppy)
+ // {
+ // QAction *pActionCreateFloppy = menu.addAction(UIIconPool::iconSet(":/fd_add_16px.png"),
+ // QString(), pListener, pszSlotName);
+ // pActionCreateFloppy->setData(QVariant::fromValue(UIMediumTarget(strControllerName, comCurrentAttachment.GetPort(),
+ // comCurrentAttachment.GetDevice(), enmMediumType,
+ // UIMediumTarget::UIMediumTargetType_CreateFloppyDisk)));
+ // pActionCreateFloppy->setText(QApplication::translate("UIMachineSettingsStorage", "Create a new floppy disk...",
+ // "This is used to create a new floppy disk"));
+ // }
+ // /* Prepare ad-hoc-viso action for DVD-ROMs: */
+ // if (enmMediumType == UIMediumDeviceType_DVD)
+ // {
+ // QAction *pActionAdHocViso = menu.addAction(UIIconPool::iconSet(":/select_file_16px.png"),
+ // QString(), pListener, pszSlotName);
+ // pActionAdHocViso->setData(QVariant::fromValue(UIMediumTarget(strControllerName, comCurrentAttachment.GetPort(),
+ // comCurrentAttachment.GetDevice(), enmMediumType,
+ // UIMediumTarget::UIMediumTargetType_CreateAdHocVISO)));
+ // pActionAdHocViso->setText(QApplication::translate("UIMachineSettingsStorage", "Create ad hoc VISO...",
+ // "This is used for optical media"));
+ // }
/* Insert separator: */
@@ -3075,8 +3075,8 @@ void VBoxGlobal::updateMachineStorage(const CMachine &comConstMachine, const UIM
if (target.type == UIMediumTarget::UIMediumTargetType_WithID)
{
int iDialogReturn = openMediumSelectorDialog(windowManager().mainWindowShown(), target.mediumType, uMediumID,
- strMachineFolder, "" /*strMachineName*/,
- "" /*strMachineGuestOSTypeId*/, true /*fEnableCreate */);
+ strMachineFolder, comConstMachine.GetName(),
+ comConstMachine.GetOSTypeId(), true /*fEnableCreate */);
if (iDialogReturn == UIMediumSelector::ReturnCode_LeftEmpty &&
(target.mediumType == UIMediumDeviceType_DVD || target.mediumType == UIMediumDeviceType_Floppy))
fMount = false;
diff --git a/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.cpp b/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.cpp
index 1fa6a81180e..eb11c580c8e 100644
--- a/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.cpp
@@ -166,7 +166,7 @@ QString UIFDCreationDialog::getDefaultFolder() const
return strInitialPath;
QString strDiskname = !(m_strMachineName.isEmpty()) ? m_strMachineName : "NewFloppyDisk";
- strDiskname = VBoxGlobal::findUniqueFileName(m_strDefaultFolder, m_strMachineName);
+ strDiskname = VBoxGlobal::findUniqueFileName(m_strDefaultFolder, strDiskname);
strInitialPath = QDir(strInitialPath).absoluteFilePath(strDiskname + "." + strPreferredExtension);
return strInitialPath;