VirtualBox

Changeset 107915 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jan 23, 2025 3:16:27 PM (3 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167146
Message:

FE/Qt. bugref:10839. When edition selector is enabled disable other OS type selectors.

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

Legend:

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

    r107889 r107915  
    180180    /* Populate the editions selector: */
    181181    if (m_pNameAndSystemEditor)
     182    {
    182183        m_pNameAndSystemEditor->setEditionNameAndIndices(pWizard->detectedWindowsImageNames(),
    183184                                                         pWizard->detectedWindowsImageIndices());
     185    }
    184186    setSkipCheckBoxEnable();
    185     disableEnableUnattendedRelatedWidgets(isUnattendedEnabled());
     187    disableEnableUnattendedRelatedWidgets();
    186188
    187189    /* Redetect the OS type using the name if detection or the step above failed: */
     
    454456    setOSTypeDependedValues();
    455457    setSkipCheckBoxEnable();
    456     disableEnableUnattendedRelatedWidgets(isUnattendedEnabled());
     458    disableEnableUnattendedRelatedWidgets();
    457459    updateDiskWidgetsAfterMediumFormatChange();
    458460    sltRetranslateUI();
     
    711713}
    712714
    713 void UIWizardNewVMExpertPage::disableEnableUnattendedRelatedWidgets(bool fEnabled)
    714 {
     715void UIWizardNewVMExpertPage::disableEnableUnattendedRelatedWidgets()
     716{
     717    bool fUnattendedEnabled = isUnattendedEnabled();
    715718    if (m_pUserNamePasswordGroupBox)
    716         m_pUserNamePasswordGroupBox->setEnabled(fEnabled);
     719        m_pUserNamePasswordGroupBox->setEnabled(fUnattendedEnabled);
    717720    if (m_pAdditionalOptionsContainer)
    718         m_pAdditionalOptionsContainer->setEnabled(fEnabled);
     721        m_pAdditionalOptionsContainer->setEnabled(fUnattendedEnabled);
    719722    if (m_pGAInstallationISOContainer)
    720         m_pGAInstallationISOContainer->setEnabled(fEnabled);
     723        m_pGAInstallationISOContainer->setEnabled(fUnattendedEnabled);
    721724    if (m_pNameAndSystemEditor)
    722         m_pNameAndSystemEditor->setEditionSelectorEnabled(fEnabled && !m_pNameAndSystemEditor->isEditionsSelectorEmpty());
     725        m_pNameAndSystemEditor->setEditionSelectorEnabled(fUnattendedEnabled && !m_pNameAndSystemEditor->isEditionsSelectorEmpty());
    723726    m_pAdditionalOptionsContainer->disableEnableProductKeyWidgets(isProductKeyWidgetEnabled());
     727    m_pNameAndSystemEditor->setOSTypeStuffEnabled(!fUnattendedEnabled || m_pNameAndSystemEditor->isEditionsSelectorEmpty());
    724728}
    725729
     
    729733    m_userModifiedParameters << "UnattendedInstall";
    730734    wizardWindow<UIWizardNewVM>()->setSkipUnattendedInstall(!fSkip);
    731     disableEnableUnattendedRelatedWidgets(isUnattendedEnabled());
     735    disableEnableUnattendedRelatedWidgets();
    732736    emit completeChanged();
    733737}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.h

    r107889 r107915  
    122122
    123123    bool isProductKeyWidgetEnabled() const;
    124     void disableEnableUnattendedRelatedWidgets(bool fEnabled);
     124    void disableEnableUnattendedRelatedWidgets();
    125125    void markWidgets() const;
    126126    QWidget *createUnattendedWidgets();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.cpp

    r107890 r107915  
    625625                                           .arg(UIWizardNewVM::tr("This OS type can be installed unattendedly. "
    626626                                                                  "The install will start after this wizard is closed."));
     627
     628
     629
    627630    }
    628631
     
    646649        {
    647650            m_pNameAndSystemEditor->setFocus();
    648             setEditionSelectorEnabled();
     651            setEditionAndOSTypeSelectorsEnabled();
    649652        }
    650653        setSkipCheckBoxEnable();
     
    693696
    694697    setSkipCheckBoxEnable();
    695     setEditionSelectorEnabled();
     698    setEditionAndOSTypeSelectorsEnabled();
    696699    updateInfoLabel();
    697700
     
    699702    if (m_pNameAndSystemEditor)
    700703    {
    701         m_pNameAndSystemEditor->setOSTypeStuffEnabled(!fOsTypeFixed);
     704
    702705
    703706        /* Redetect the OS type using the name if detection or the step above failed: */
     
    729732    m_userModifiedParameters << "SkipUnattendedInstall";
    730733    wizardWindow<UIWizardNewVM>()->setSkipUnattendedInstall(!fSkip);
    731     setEditionSelectorEnabled();
     734    setEditionAndOSTypeSelectorsEnabled();
    732735    updateInfoLabel();
    733736}
     
    819822
    820823
    821 void  UIWizardNewVMNameOSTypePage::setEditionSelectorEnabled()
    822 {
     824void  UIWizardNewVMNameOSTypePage::setEditionAndOSTypeSelectorsEnabled()
     825{
     826    UIWizardNewVM *pWizard = wizardWindow<UIWizardNewVM>();
     827    AssertReturnVoid(pWizard);
    823828    if (!m_pNameAndSystemEditor || !m_pUnattendedCheckBox)
    824829        return;
    825830    m_pNameAndSystemEditor->setEditionSelectorEnabled(   !m_pNameAndSystemEditor->isEditionsSelectorEmpty()
    826831                                                      && m_pUnattendedCheckBox->isChecked());
    827 }
     832    /* Disable OS type, version, subtype selectors if unattended is enabled and edition list is not empty: */
     833    if (pWizard->isUnattendedEnabled() && !m_pNameAndSystemEditor->isEditionsSelectorEmpty())
     834        m_pNameAndSystemEditor->setOSTypeStuffEnabled(false);
     835    else
     836        m_pNameAndSystemEditor->setOSTypeStuffEnabled(true);
     837
     838}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.h

    r107889 r107915  
    100100    bool isUnattendedEnabled() const;
    101101    bool isUnattendedInstallSupported() const;
    102     void setEditionSelectorEnabled();
     102    void setEditionAndOSTypeSelectorsEnabled();
    103103    void updateInfoLabel();
    104104
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