VirtualBox

Ignore:
Timestamp:
May 21, 2010 11:50:41 AM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: retranslate all pages before making any size related calculations

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIWizard.cpp

    r28800 r29722  
    161161}
    162162
     163void QIWizard::retranslateAllPages()
     164{
     165    QList<int> idList = pageIds();
     166    for(int i=0; i < idList.size(); ++i)
     167        static_cast<QIWizardPage*>(page(idList.at(i)))->retranslateUi();
     168}
     169
    163170QIWizardPage::QIWizardPage()
    164171{
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIWizard.h

    r28800 r29722  
    4343    void assignBackground(const QString &strBg);
    4444
     45    void retranslateAllPages();
     46
    4547private:
    4648
     
    5153{
    5254    Q_OBJECT;
     55
     56    friend class QIWizard;
    5357
    5458public:
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIExportApplianceWzd.cpp

    r28800 r29722  
    5353    setField("selectedVMName", strSelectName);
    5454
    55     /* Translate */
     55    /* Initial translate */
    5656    retranslateUi();
     57
     58    /* Initial translate all pages */
     59    retranslateAllPages();
    5760
    5861    /* Resize to 'golden ratio' */
     
    129132void UIExportApplianceWzdPage1::initializePage()
    130133{
    131     /* Translate */
    132     retranslateUi();
    133 
    134134    /* Choose initially selected item (if passed) */
    135135    QList<QListWidgetItem*> list = m_pVMSelector->findItems(m_strSelectedVMName, Qt::MatchExactly);
     
    221221void UIExportApplianceWzdPage2::initializePage()
    222222{
    223     /* Translate */
    224     retranslateUi();
    225 
    226223    /* We propose a filename the first time the second page is displayed */
    227224    prepareSettingsWidget();
     
    338335void UIExportApplianceWzdPage3::initializePage()
    339336{
    340     /* Translate */
    341     retranslateUi();
    342 
    343337    /* Revert to initial choice */
    344338    m_pTypeLocalFilesystem->click();
     
    404398void UIExportApplianceWzdPage4::initializePage()
    405399{
    406     /* Translate */
    407     retranslateUi();
    408 
    409400    /* Setup components for chosen storage-type */
    410401    StorageType storageType = field("storageType").value<StorageType>();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIFirstRunWzd.cpp

    r28933 r29722  
    4444    pPage3->init();
    4545
    46     /* Translate */
     46    /* Initial translate */
    4747    retranslateUi();
     48
     49    /* Initial translate all pages */
     50    retranslateAllPages();
    4851
    4952    /* Resize to 'golden ratio' */
     
    129132void UIFirstRunWzdPage1::initializePage()
    130133{
    131     /* Translate */
    132     retranslateUi();
    133134}
    134135
     
    178179void UIFirstRunWzdPage2::initializePage()
    179180{
    180     /* Translate */
    181     retranslateUi();
    182 
    183181    /* Initial choice */
    184182    m_pMediaSelector->setCurrentIndex(0);
     
    271269void UIFirstRunWzdPage3::initializePage()
    272270{
    273     /* Translate */
    274     retranslateUi();
    275 
    276271    /* Summary should initially have focus */
    277272    m_pSummaryText->setFocus();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIImportApplianceWzd.cpp

    r28800 r29722  
    108108    addPage(new UIImportApplianceWzdPage2);
    109109
    110     /* Translate */
     110    /* Initial translate */
    111111    retranslateUi();
     112
     113    /* Initial translate all pages */
     114    retranslateAllPages();
    112115
    113116    /* Resize to 'golden ratio' */
     
    176179void UIImportApplianceWzdPage1::initializePage()
    177180{
    178     /* Translate */
    179     retranslateUi();
    180181}
    181182
     
    213214    registerField("applianceWidget", this, "applianceWidget");
    214215    m_pApplianceWidget = m_pSettingsCnt;
    215 
    216     /* Translate */
    217     retranslateUi();
    218216}
    219217
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWzd.cpp

    r29437 r29722  
    3636    addPage(new UINewHDWzdPage4);
    3737
    38     /* Translate */
     38    /* Initial translate */
    3939    retranslateUi();
     40
     41    /* Initial translate all pages */
     42    retranslateAllPages();
    4043
    4144    /* Resize to 'golden ratio' */
     
    118121void UINewHDWzdPage1::initializePage()
    119122{
    120     /* Translate */
    121     retranslateUi();
    122123}
    123124
     
    149150void UINewHDWzdPage2::initializePage()
    150151{
    151     /* Translate */
    152     retranslateUi();
    153 
    154152    /* Prepare initial choice */
    155153    m_pTypeDynamic->click();
     
    252250void UINewHDWzdPage3::initializePage()
    253251{
    254     /* Translate */
    255     retranslateUi();
    256 
    257252    /* Initialise location */
    258253    m_pLocationEditor->setText(m_strInitialName);
     
    465460void UINewHDWzdPage4::initializePage()
    466461{
    467     /* Translate */
    468     retranslateUi();
    469 
    470462    /* Summary should have focus initially */
    471463    m_pSummaryText->setFocus();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp

    r29437 r29722  
    135135    addPage(new UINewVMWzdPage5);
    136136
    137     /* Translate */
     137    /* Initial translate */
    138138    retranslateUi();
     139
     140    /* Initial translate all pages */
     141    retranslateAllPages();
    139142
    140143    /* Resize to 'golden ratio' */
     
    183186void UINewVMWzdPage1::initializePage()
    184187{
    185     /* Translate */
    186     retranslateUi();
    187188}
    188189
     
    216217void UINewVMWzdPage2::initializePage()
    217218{
    218     /* Translate */
    219     retranslateUi();
    220 
    221219    /* 'Name' field should have focus initially */
    222220    m_pNameEditor->setFocus();
     
    286284void UINewVMWzdPage3::initializePage()
    287285{
    288     /* Translate */
    289     retranslateUi();
    290 
    291286    /* Assign recommended 'ram' field value */
    292287    CGuestOSType type = field("type").value<CGuestOSType>();
     
    375370void UINewVMWzdPage4::initializePage()
    376371{
    377     /* Translate */
    378     retranslateUi();
    379 
    380372    /* Prepare initial choice */
    381373    m_pBootHDCnt->setChecked(true);
     
    608600void UINewVMWzdPage5::initializePage()
    609601{
    610     /* Translate */
    611     retranslateUi();
    612 
    613602    /* Summary should have focus initially */
    614603    m_pSummaryText->setFocus();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/registration/UIRegistrationWzd.cpp

    r29526 r29722  
    404404    addPage(new UIRegistrationWzdPage1);
    405405
    406     /* Translate */
     406    /* Initial translate */
    407407    retranslateUi();
     408
     409    /* Initial translate all pages */
     410    retranslateAllPages();
    408411
    409412    /* Resize to 'golden ratio' */
     
    523526    m_pLeOldEmail->setText(data.account());
    524527    m_pLeOldEmail->setFocus();
    525 
    526     /* Translate */
    527     retranslateUi();
    528528}
    529529
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