VirtualBox

Changeset 2319 in vbox


Ignore:
Timestamp:
Apr 23, 2007 12:01:26 PM (18 years ago)
Author:
vboxsync
Message:

VBoxGlobal event filter to process all of the LanguageChange events passed to QDesktopWidget implemented. Removed local VBoxSelectorWnd & VBoxConsoleWnd VBoxGlobal::languageChange() launchers.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h

    r2185 r2319  
    470470
    471471    bool event (QEvent *e);
     472    bool eventFilter (QObject *, QEvent *);
    472473
    473474private:
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r2315 r2319  
    11351135#endif
    11361136
    1137     vboxGlobal().languageChange();
    1138 
    11391137    /*
    11401138     *  Note: All action shortcuts should be added to the menu text in the
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r2185 r2319  
    28032803}
    28042804
     2805bool VBoxGlobal::eventFilter (QObject *aObject, QEvent *aEvent)
     2806{
     2807    if (aObject == QApplication::desktop() &&
     2808        aEvent->type() == QEvent::LanguageChange)
     2809        languageChange();
     2810    return QObject::eventFilter (aObject, aEvent);
     2811}
     2812
    28052813// Private members
    28062814////////////////////////////////////////////////////////////////////////////////
     
    29182926    vm_state_color.insert (CEnums::Discarding,          &Qt::green);
    29192927
    2920     languageChange();
     2928    QApplication::desktop()->installEventFilter (this);
    29212929
    29222930    // create default non-null global settings
     
    29352943    if (!languageId.isNull())
    29362944        loadLanguage (languageId);
     2945
     2946    languageChange();
    29372947
    29382948    // process command line
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp

    r2311 r2319  
    487487#ifdef Q_WS_MAC
    488488    vmTools->setMacStyle();
    489 #endif 
     489#endif
    490490
    491491    /* add actions to menubar */
     
    10101010#endif
    10111011
    1012     vboxGlobal().languageChange();
    1013 
    10141012    vmTabWidget->changeTab (vmDetailsView, tr ("&Details"));
    10151013    /* note: Snapshots and Details tabs are changed dynamically by
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