VirtualBox

Ignore:
Timestamp:
Feb 4, 2021 2:20:49 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
142642
Message:

FE/Qt: bugref:9515. Saving and loading recent ISO path in the new vm wizard

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp

    r87575 r87607  
    449449        m_pISOFilePathSelector->setFileDialogFilters("*.iso *.ISO");
    450450        m_pISOFilePathSelector->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
     451        m_pISOFilePathSelector->setHomeDir(uiCommon().defaultFolderPathForType(UIMediumDeviceType_DVD));
    451452        pISOSelectorLayout->addWidget(m_pISOFilePathSelector);
    452453    }
     
    567568    determineOSType(strPath);
    568569    setTypeByISODetectedOSType(m_strDetectedOSTypeId);
     570    /* Update the global recent ISO path: */
     571    QFileInfo fileInfo(strPath);
     572    if (fileInfo.exists() && fileInfo.isReadable())
     573        uiCommon().updateRecentlyUsedMediumListAndFolder(UIMediumDeviceType_DVD, strPath);
    569574
    570575    emit completeChanged();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp

    r87592 r87607  
    165165    setTypeByISODetectedOSType(m_strDetectedOSTypeId);
    166166    disableEnableUnattendedRelatedWidgets(isUnattendedEnabled());
     167
     168    /* Update the global recent ISO path: */
     169    QFileInfo fileInfo(strPath);
     170    if (fileInfo.exists() && fileInfo.isReadable())
     171        uiCommon().updateRecentlyUsedMediumListAndFolder(UIMediumDeviceType_DVD, strPath);
     172
    167173    emit completeChanged();
    168174}
     
    324330            m_pISOFilePathSelector->setMode(UIFilePathSelector::Mode_File_Open);
    325331            m_pISOFilePathSelector->setFileDialogFilters("*.iso *.ISO");
     332            m_pISOFilePathSelector->setHomeDir(uiCommon().defaultFolderPathForType(UIMediumDeviceType_DVD));
    326333            pInstallationISOContainerLayout->addWidget(m_pISOFilePathSelector);
    327334        }
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