VirtualBox

Ignore:
Timestamp:
Sep 25, 2015 2:00:38 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: Mac OS X: Window menu Manager cleanup/rework (step 6): Translation fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIWindowMenuManager.cpp

    r57894 r57895  
    115115    {
    116116        /* Translate menu: */
    117         m_pWindowMenu->setTitle(tr("&Window"));
     117        m_pWindowMenu->setTitle(QApplication::translate("UIActionPool", "&Window"));
    118118
    119119        /* Translate menu 'Minimize' action: */
    120         m_pMinimizeAction->setText(tr("Minimize"));
     120        m_pMinimizeAction->setText(QApplication::translate("UIActionPool", "&Minimize"));
    121121        m_pMinimizeAction->setShortcut(QKeySequence("Ctrl+M"));
     122
     123        /* Translate other menu-actions: */
     124        foreach (QAction *pAction, m_windows.values())
     125        {
     126            /* Get corresponding window from action's data: */
     127            QWidget *pWindow = pAction->data().value<QWidget*>();
     128            /* Use the window's title as the action's text: */
     129            pAction->setText(pWindow->windowTitle());
     130        }
    122131    }
    123132
     
    313322    }
    314323
     324    /* Besides our own retranslation, we should also retranslate
     325     * everything on any registered widget title change event: */
     326    if (pObject && type == QEvent::WindowTitleChange)
     327    {
     328        QWidget *pWidget = qobject_cast<QWidget*>(pObject);
     329        if (pWidget && m_helpers.contains(pWidget))
     330            retranslateUi();
     331    }
     332
    315333    /* Call to base-class: */
    316334    return QIWithRetranslateUI3<QObject>::eventFilter(pObject, pEvent);
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