VirtualBox

Ignore:
Timestamp:
Jul 9, 2018 4:00:42 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123566
Message:

FE/Qt: bugref:9152: Export Appliance wizard: Expert page: forgot something in r123559.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.cpp

    r73011 r73014  
    6060void UIWizardExportAppPage3::populateProviders()
    6161{
     62    AssertReturnVoid(m_pProviderComboBox->count() == 0);
     63
    6264    /* Acquire provider list: */
    6365    // Here goes the experiamental list with
     
    391393    m_strDefaultApplianceName = UIWizardExportApp::tr("Appliance");
    392394
    393     /* Translate File selector: */
     395    /* Translate file selector: */
    394396    m_pFileSelectorLabel->setText(UIWizardExportApp::tr("&File:"));
    395397    m_pFileSelector->setChooseButtonToolTip(tr("Choose a file to export the virtual appliance to..."));
     
    421423            m_pProviderComboBox->setItemText(i, UIWizardExportApp::tr("Oracle Cloud Infrastructure"));
    422424            m_pProviderComboBox->setItemData(i, UIWizardExportApp::tr("Write to Oracle Cloud Infrastructure"), Qt::ToolTipRole);
     425        }
     426        else
     427        {
     428            m_pProviderComboBox->setItemData(i, UIWizardExportApp::tr("Write to %1").arg(m_pProviderComboBox->itemText(i)), Qt::ToolTipRole);
    423429        }
    424430    }
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp

    r73007 r73014  
    204204                    pSettingsLayout->addWidget(m_pManifestCheckbox, 6, 1);
    205205                }
     206
     207                /* Create provider combo-box: */
     208                m_pProviderComboBox = new QComboBox;
     209                if (m_pProviderComboBox)
     210                {
     211                    /* Hide it for now: */
     212                    m_pProviderComboBox->hide();
     213
     214                    /* Add into layout: */
     215                    pSettingsLayout->addWidget(m_pProviderComboBox, 7, 1);
     216                }
     217                /* Create provider label: */
     218                m_pProviderComboBoxLabel = new QLabel;
     219                if (m_pProviderComboBoxLabel)
     220                {
     221                    /* Hide it for now: */
     222                    m_pProviderComboBoxLabel->hide();
     223
     224                    m_pProviderComboBoxLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
     225                    m_pProviderComboBoxLabel->setBuddy(m_pProviderComboBox);
     226
     227                    /* Add into layout: */
     228                    pSettingsLayout->addWidget(m_pProviderComboBoxLabel, 7, 0);
     229                }
    206230            }
    207231
     
    215239    /* Choose default storage type: */
    216240    chooseDefaultStorageType();
     241    /* Populate providers: */
     242    populateProviders();
    217243    /* Choose default settings: */
    218244    chooseDefaultSettings();
     
    225251    connect(m_pFormatComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    226252            this, &UIWizardExportAppPageExpert::sltHandleFormatComboChange);
     253    connect(m_pProviderComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
     254            this, &UIWizardExportAppPageExpert::sltHandleProviderComboChange);
    227255
    228256    /* Register classes: */
     
    268296    m_pManifestCheckbox->setText(UIWizardExportApp::tr("Write &Manifest file"));
    269297
     298    /* Translate Provider combo-box: */
     299    m_pProviderComboBoxLabel->setText(UIWizardExportApp::tr("&Cloud Service Provider:"));
     300    for (int i = 0; i < m_pProviderComboBox->count(); ++i)
     301    {
     302        if (m_pProviderComboBox->itemText(i) == "OCI")
     303        {
     304            m_pProviderComboBox->setItemText(i, UIWizardExportApp::tr("Oracle Cloud Infrastructure"));
     305            m_pProviderComboBox->setItemData(i, UIWizardExportApp::tr("Write to Oracle Cloud Infrastructure"), Qt::ToolTipRole);
     306        }
     307        else
     308        {
     309            m_pProviderComboBox->setItemData(i, UIWizardExportApp::tr("Write to %1").arg(m_pProviderComboBox->itemText(i)), Qt::ToolTipRole);
     310        }
     311    }
     312
    270313    /* Refresh current settings: */
    271314    refreshCurrentSettings();
     
    365408    updateFormatComboToolTip();
    366409}
     410
     411void UIWizardExportAppPageExpert::sltHandleProviderComboChange()
     412{
     413    /* Refresh current settings: */
     414    refreshCurrentSettings();
     415    updateProviderComboToolTip();
     416}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h

    r72935 r73014  
    8484    void sltHandleFormatComboChange();
    8585
     86    /** Handles change in provider combo-box. */
     87    void sltHandleProviderComboChange();
     88
    8689private:
    8790
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