VirtualBox

Ignore:
Timestamp:
Feb 11, 2019 2:29:48 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128772
Message:

FE/Qt: bugref:9340. some refactoring in viso creation dialog

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

Legend:

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

    r77263 r77264  
    26882688
    26892689
    2690 QUuid VBoxGlobal::createVisoMediumWithVisoCreator(QWidget *pParent, const QString &strMachineName, const QString &strFolder)
     2690QUuid VBoxGlobal::createVisoMediumWithVisoCreator(QWidget *pParent, const QString &strFolder, const QString &strMachineName /* = QString */)
    26912691{
    26922692    QWidget *pDialogParent = windowManager().realParentWindow(pParent);
     
    30493049                    uMediumID = openMediumWithFileOpenDialog(target.mediumType, windowManager().mainWindowShown(), strMachineFolder);
    30503050                else if(target.type == UIMediumTarget::UIMediumTargetType_CreateAdHocVISO)
    3051                     uMediumID = createVisoMediumWithVisoCreator(windowManager().mainWindowShown(), comConstMachine.GetName(), strMachineFolder);
     3051                    uMediumID = createVisoMediumWithVisoCreator(windowManager().mainWindowShown(), strMachineFolder, comConstMachine.GetName());
    30523052
    30533053                else if(target.type == UIMediumTarget::UIMediumTargetType_CreateFloppyDisk)
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h

    r77238 r77264  
    504504        /** Creates a VISO by using the VISO creator dialog.
    505505          * @param  pParent    Brings the dialog parent.
    506           * @param  strMachineName    Passes the name of the machine,
    507           * @param  strFolder  Brings the folder to save the VISO file. */
    508         QUuid createVisoMediumWithVisoCreator(QWidget *pParent, const QString &strMachineName, const QString &strFolder);
     506          * @param  strFolder  Brings the folder to save the VISO file.
     507          * @param  strMachineName    Passes the name of the machine, */
     508        QUuid createVisoMediumWithVisoCreator(QWidget *pParent, const QString &strFolder, const QString &strMachineName = QString());
    509509
    510510        /** Creates and shows a dialog thru which user can create a new floppy disk a VISO using the file-open dialog.
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.cpp

    r77255 r77264  
    455455            break;
    456456        case UIMediumDeviceType_DVD:
    457             uMediumId = vboxGlobal().createVisoMediumWithVisoCreator(this, m_strMachineName, m_strMachineFolder);
     457            uMediumId = vboxGlobal().createVisoMediumWithVisoCreator(this, m_strMachineFolder, m_strMachineName);
    458458            break;
    459459        default:
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp

    r77166 r77264  
    5252    , m_pConfigurationPanel(0)
    5353{
    54     m_visoOptions.m_strVisoName = strMachineName;
     54    m_visoOptions.m_strVisoName = !strMachineName.isEmpty() ? strMachineName : "ad-hoc";
    5555    prepareActions();
    5656    prepareObjects();
     
    9696void UIVisoCreator::retranslateUi()
    9797{
    98     setWindowTitle(QString("%1 - %2").arg(m_strMachineName).arg(tr("VISO Creator")));
     98    if (!m_strMachineName.isEmpty())
     99        setWindowTitle(QString("%1 - %2").arg(m_strMachineName).arg(tr("VISO Creator")));
     100    else
     101        setWindowTitle(QString("%1").arg(tr("VISO Creator")));
    99102    if (m_pActionConfiguration)
    100103    {
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