VirtualBox

Changeset 77341 in vbox


Ignore:
Timestamp:
Feb 18, 2019 8:49:25 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128874
Message:

FE/Qt: bugref:9340. Replace the file selector dialog in the storage menu with the medium selector dialog.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r77335 r77341  
    30743074                QUuid uMediumID;
    30753075                if (target.type == UIMediumTarget::UIMediumTargetType_WithID)
    3076                     uMediumID = openMediumWithFileOpenDialog(target.mediumType, windowManager().mainWindowShown(), strMachineFolder);
     3076                {
     3077                    int iDialogReturn = openMediumSelectorDialog(windowManager().mainWindowShown(), target.mediumType, uMediumID,
     3078                                                                 strMachineFolder, "" /*strMachineName*/,
     3079                                                                 "" /*strMachineGuestOSTypeId*/, true /*fEnableCreate */);
     3080                    if (iDialogReturn == UIMediumSelector::ReturnCode_LeftEmpty &&
     3081                        (target.mediumType == UIMediumDeviceType_DVD || target.mediumType == UIMediumDeviceType_Floppy))
     3082                        fMount = false;
     3083                }
    30773084                else if(target.type == UIMediumTarget::UIMediumTargetType_CreateAdHocVISO)
    30783085                    uMediumID = createVisoMediumWithVisoCreator(windowManager().mainWindowShown(), strMachineFolder, comConstMachine.GetName());
     
    30873094                if (!uMediumID.isNull())
    30883095                    uNewID = uMediumID;
    3089                 /* Else just exit: */
    3090                 else return;
     3096                else
     3097                    /* Else just exit in case left empty is not chosen in medium selector dialog: */
     3098                    if (fMount)
     3099                        return;
    30913100            }
    30923101            /* Use medium ID which was passed: */
     
    31033112            break;
    31043113        }
    3105         /* Do we have a resent location? */
     3114        /* Do we have a recent location? */
    31063115        case UIMediumTarget::UIMediumTargetType_WithLocation:
    31073116        {
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp

    r77326 r77341  
    31013101    int iResult = vboxGlobal().openMediumSelectorDialog(this, m_pMediumIdHolder->type(), uMediumId,
    31023102                                                        strMachineFolder, m_strMachineName,
    3103                                                         m_strMachineGuestOSTypeId, true /* enable create action: */);
     3103                                                        m_strMachineGuestOSTypeId,
     3104                                                        true /* enable create action: */);
    31043105
    31053106    if (iResult == UIMediumSelector::ReturnCode_Rejected ||
     
    38133814    int iResult = vboxGlobal().openMediumSelectorDialog(this, UIMediumDefs::mediumTypeToLocal(enmDeviceType), uMediumId,
    38143815                                                        strMachineFolder, m_strMachineName,
    3815                                                         m_strMachineGuestOSTypeId, true /* enable cr1eate action: */);
     3816                                                        m_strMachineGuestOSTypeId,
     3817                                                        true /* enable cr1eate action: */);
    38163818
    38173819    /* Continue only if iResult is either UIMediumSelector::ReturnCode_Accepted or UIMediumSelector::ReturnCode_LeftEmpty: */
Note: See TracChangeset for help on using the changeset viewer.

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