VirtualBox

Changeset 77344 in vbox


Ignore:
Timestamp:
Feb 18, 2019 10:58:26 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128881
Message:

FE/Qt: bugref:9340. Fixes to r128874.

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  
    28352835}
    28362836
    2837 QUuid VBoxGlobal::createHDWithNewHDWizard(QWidget *pParent, const QString &strMachineGuestOSTypeId /* = QString() */,
    2838                                           const QString &strMachineFolder /* = QString() */,
    2839                                           const QString &strMachineName /* = QString() */)
     2837QUuid VBoxGlobal::createHDWithNewHDWizard(QWidget *pParent,  const QString &strMachineFolder /* = QString() */,
     2838                                          const QString &strMachineName /* = QString() */,
     2839                                          const QString &strMachineGuestOSTypeId /* = QString() */)
    28402840{
    28412841    /* Initialize variables: */
     
    28872887    pActionOpenExistingMedium->setData(QVariant::fromValue(UIMediumTarget(strControllerName, comCurrentAttachment.GetPort(),
    28882888                                                                          comCurrentAttachment.GetDevice(), enmMediumType)));
    2889     pActionOpenExistingMedium->setText(QApplication::translate("UIMachineSettingsStorage", "Choose disk image...",
     2889    pActionOpenExistingMedium->setText(QApplication::translate("UIMachineSettingsStorage", "Choose/Create a disk image...",
    28902890                                                               "This is used for hard disks, optical media and floppies"));
    28912891
    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    // }
    29142914
    29152915
     
    30763076                {
    30773077                    int iDialogReturn = openMediumSelectorDialog(windowManager().mainWindowShown(), target.mediumType, uMediumID,
    3078                                                                  strMachineFolder, "" /*strMachineName*/,
    3079                                                                  "" /*strMachineGuestOSTypeId*/, true /*fEnableCreate */);
     3078                                                                 strMachineFolder, comConstMachine.GetName(),
     3079                                                                 comConstMachine.GetOSTypeId(), true /*fEnableCreate */);
    30803080                    if (iDialogReturn == UIMediumSelector::ReturnCode_LeftEmpty &&
    30813081                        (target.mediumType == UIMediumDeviceType_DVD || target.mediumType == UIMediumDeviceType_Floppy))
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.cpp

    r77263 r77344  
    167167
    168168    QString strDiskname = !(m_strMachineName.isEmpty()) ? m_strMachineName : "NewFloppyDisk";
    169     strDiskname = VBoxGlobal::findUniqueFileName(m_strDefaultFolder, m_strMachineName);
     169    strDiskname = VBoxGlobal::findUniqueFileName(m_strDefaultFolder, strDiskname);
    170170
    171171    strInitialPath = QDir(strInitialPath).absoluteFilePath(strDiskname + "." + strPreferredExtension);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette