~ubuntu-branches/ubuntu/precise/virtualbox/precise-updates

« back to all changes in this revision

Viewing changes to src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-07-04 13:02:31 UTC
  • mfrom: (3.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20110704130231-l843es6wqhx614n7
Tags: 4.0.10-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Add the Modaliases control field manually for maximum backportability.

Show diffs side-by-side

added added

removed removed

Lines of Context:
433
433
 
434
434
void UIGLSettingsDlg::retranslateUi()
435
435
{
 
436
    /* Base-class UI translation: */
 
437
    UISettingsDialog::retranslateUi();
 
438
 
436
439
    /* Set dialog's name: */
437
440
    setWindowTitle(title());
438
441
 
459
462
 
460
463
    /* Translate the selector: */
461
464
    m_pSelector->polish();
462
 
 
463
 
    /* Base-class UI translation: */
464
 
    UISettingsDialog::retranslateUi();
465
465
}
466
466
 
467
467
QString UIGLSettingsDlg::title() const
771
771
 
772
772
void UIVMSettingsDlg::retranslateUi()
773
773
{
774
 
    /* Set dialog's name: */
775
 
    setWindowTitle(title());
776
 
 
777
 
    /* We have to make sure that the Serial & Network subpages are retranslated
 
774
    /* We have to make sure that the Network, Serial & Parallel pages are retranslated
778
775
     * before they are revalidated. Cause: They do string comparing within
779
 
     * vboxGlobal which is retranslated at that point already. */
 
776
     * vboxGlobal which is retranslated at that point already: */
780
777
    QEvent event(QEvent::LanguageChange);
 
778
    if (QWidget *pPage = m_pSelector->idToPage(VMSettingsPage_Network))
 
779
        qApp->sendEvent(pPage, &event);
 
780
    if (QWidget *pPage = m_pSelector->idToPage(VMSettingsPage_Serial))
 
781
        qApp->sendEvent(pPage, &event);
 
782
    if (QWidget *pPage = m_pSelector->idToPage(VMSettingsPage_Parallel))
 
783
        qApp->sendEvent(pPage, &event);
 
784
 
 
785
    /* Base-class UI translation: */
 
786
    UISettingsDialog::retranslateUi();
 
787
 
 
788
    /* Set dialog's name: */
 
789
    setWindowTitle(title());
781
790
 
782
791
    /* General page: */
783
792
    m_pSelector->setItemText(VMSettingsPage_General, tr("General"));
796
805
 
797
806
    /* Network page: */
798
807
    m_pSelector->setItemText(VMSettingsPage_Network, tr("Network"));
799
 
    if (QWidget *pPage = m_pSelector->idToPage(VMSettingsPage_Network))
800
 
        qApp->sendEvent(pPage, &event);
801
808
 
802
809
    /* Ports page: */
803
810
    m_pSelector->setItemText(VMSettingsPage_Ports, tr("Ports"));
804
811
 
805
812
    /* Serial page: */
806
813
    m_pSelector->setItemText(VMSettingsPage_Serial, tr("Serial Ports"));
807
 
    if (QWidget *pPage = m_pSelector->idToPage(VMSettingsPage_Serial))
808
 
        qApp->sendEvent(pPage, &event);
809
814
 
810
815
    /* Parallel page: */
811
816
    m_pSelector->setItemText(VMSettingsPage_Parallel, tr("Parallel Ports"));
812
 
    if (QWidget *pPage = m_pSelector->idToPage(VMSettingsPage_Parallel))
813
 
        qApp->sendEvent(pPage, &event);
814
817
 
815
818
    /* USB page: */
816
819
    m_pSelector->setItemText(VMSettingsPage_USB, tr("USB"));
820
823
 
821
824
    /* Translate the selector: */
822
825
    m_pSelector->polish();
823
 
 
824
 
    /* Base-class UI translation: */
825
 
    UISettingsDialog::retranslateUi();
826
 
 
827
 
    /* Revalidate all pages to retranslate the warning messages also: */
828
 
    QList<QIWidgetValidator*> validators = findChildren<QIWidgetValidator*>();
829
 
    for (int i = 0; i < validators.size(); ++i)
830
 
    {
831
 
        QIWidgetValidator *pValidator = validators[i];
832
 
        if (!pValidator->isValid())
833
 
            sltRevalidate(pValidator);
834
 
    }
835
826
}
836
827
 
837
828
QString UIVMSettingsDlg::title() const