VirtualBox

Changeset 53057 in vbox


Ignore:
Timestamp:
Oct 14, 2014 3:29:38 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
96555
Message:

FE/Qt: Runtime UI: Status-bar indicators: Make sure they are auto-updated for shown machine-windows which were initially hidden.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r53050 r53057  
    266266#endif /* Q_WS_X11 */
    267267
    268 void UIMachineWindow::closeEvent(QCloseEvent *pEvent)
     268void UIMachineWindow::showEvent(QShowEvent *pShowEvent)
     269{
     270    /* Call to base class: */
     271    QMainWindow::showEvent(pShowEvent);
     272
     273    /* Update appearance for indicator-pool: */
     274    updateAppearanceOf(UIVisualElement_IndicatorPoolStuff);
     275}
     276
     277void UIMachineWindow::closeEvent(QCloseEvent *pCloseEvent)
    269278{
    270279    /* Always ignore close-event first: */
    271     pEvent->ignore();
     280    pCloseEvent->ignore();
    272281
    273282    /* Make sure machine is in one of the allowed states: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h

    r52819 r53057  
    9999    /* Event handlers: */
    100100#ifdef Q_WS_X11
     101    /** X11: Native event handler. */
    101102    bool x11Event(XEvent *pEvent);
    102103#endif /* Q_WS_X11 */
    103     void closeEvent(QCloseEvent *pEvent);
     104
     105    /** Show event handler. */
     106    void showEvent(QShowEvent *pShowEvent);
     107
     108    /** Close event handler. */
     109    void closeEvent(QCloseEvent *pCloseEvent);
    104110
    105111#ifdef Q_WS_MAC
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r53050 r53057  
    166166    statusBar()->setVisible(pActionStatusBarSwitch->isChecked());
    167167    /* Update status-bar indicators-pool: */
    168     m_pIndicatorsPool->setAutoUpdateIndicatorStates(statusBar()->isVisible());
     168    m_pIndicatorsPool->setAutoUpdateIndicatorStates(statusBar()->isVisible() && uisession()->isRunning());
    169169
    170170    /* Normalize geometry without moving: */
     
    328328        /* Update status-bar visibility: */
    329329        statusBar()->setVisible(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked());
    330         m_pIndicatorsPool->setAutoUpdateIndicatorStates(statusBar()->isVisible());
     330        m_pIndicatorsPool->setAutoUpdateIndicatorStates(statusBar()->isVisible() && uisession()->isRunning());
    331331    }
    332332
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp

    r52891 r53057  
    286286
    287287#if defined(VBOX_WITH_TRANSLUCENT_SEAMLESS) && defined(Q_WS_WIN)
    288 void UIMachineWindowSeamless::showEvent(QShowEvent*)
    289 {
     288void UIMachineWindowSeamless::showEvent(QShowEvent *pShowEvent)
     289{
     290    /* Call to base class: */
     291    UIMachineWindow::showEvent(pShowEvent);
     292
    290293    /* Following workaround allows to fix the next Qt BUG:
    291294     * https://bugreports.qt-project.org/browse/QTBUG-17548
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