VirtualBox

Changeset 56870 in vbox


Ignore:
Timestamp:
Jul 8, 2015 3:12:32 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: 5978: Runtime UI: Mini-toolbar: Unify minimize window functionality with corresponding action; Also on x11 adjust it to minimize mini-toolbar as well.

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

Legend:

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

    r56869 r56870  
    10531053#ifndef Q_WS_MAC
    10541054    connect(actionPool()->action(UIActionIndexRT_M_View_S_MinimizeWindow), SIGNAL(triggered()),
    1055             this, SLOT(sltMinimizeActiveMachineWindow()));
     1055            this, SLOT(sltMinimizeActiveMachineWindow()), Qt::QueuedConnection);
    10561056#endif /* !Q_WS_MAC */
    10571057    connect(actionPool()->action(UIActionIndexRT_M_View_S_AdjustWindow), SIGNAL(triggered()),
     
    11121112    /* 'Window' action connections: */
    11131113    connect(actionPool()->action(UIActionIndex_M_Window_S_Minimize), SIGNAL(triggered()),
    1114             this, SLOT(sltMinimizeActiveMachineWindow()));
     1114            this, SLOT(sltMinimizeActiveMachineWindow()), Qt::QueuedConnection);
    11151115#endif /* Q_WS_MAC */
    11161116}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h

    r56869 r56870  
    9898    virtual void sltMachineStateChanged();
    9999
     100    /** Shows window minimized. */
     101    virtual void showMinimized() { QMainWindow::showMinimized(); }
     102
    100103protected:
    101104
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp

    r56869 r56870  
    187187    activateWindow();
    188188#endif /* Q_WS_MAC || Q_WS_X11 */
     189}
     190
     191void UIMachineWindowFullscreen::showMinimized()
     192{
     193#ifdef Q_WS_X11
     194    /* If there is mini-toolbar: */
     195    if (m_pMiniToolBar)
     196    {
     197        /* Minimize it first: */
     198        m_pMiniToolBar->showMinimized();
     199    }
     200#endif /* Q_WS_X11 */
     201
     202    /* Call to base-class: */
     203    UIMachineWindow::showMinimized();
    189204}
    190205
     
    247262                                              gEDataManager->autoHideMiniToolbar(vboxGlobal().managedVMUuid()));
    248263    m_pMiniToolBar->addMenus(actionPool()->menus());
    249     connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()), this, SLOT(showMinimized()));
     264    connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()), this, SLOT(showMinimized()), Qt::QueuedConnection);
    250265    connect(m_pMiniToolBar, SIGNAL(sigExitAction()),
    251266            actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SLOT(trigger()));
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h

    r56869 r56870  
    7575    void sltRevokeFocus();
    7676
     77    /** Shows window minimized. */
     78    void showMinimized();
     79
    7780private:
    7881
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp

    r56869 r56870  
    7878    activateWindow();
    7979#endif /* Q_WS_MAC || Q_WS_X11 */
     80}
     81
     82void UIMachineWindowSeamless::showMinimized()
     83{
     84#ifdef Q_WS_X11
     85    /* If there is mini-toolbar: */
     86    if (m_pMiniToolBar)
     87    {
     88        /* Minimize it first: */
     89        m_pMiniToolBar->showMinimized();
     90    }
     91#endif /* Q_WS_X11 */
     92
     93    /* Call to base-class: */
     94    UIMachineWindow::showMinimized();
    8095}
    8196
     
    131146    m_pMiniToolBar->show();
    132147    m_pMiniToolBar->addMenus(actionPool()->menus());
    133     connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()), this, SLOT(showMinimized()));
     148    connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()), this, SLOT(showMinimized()), Qt::QueuedConnection);
    134149    connect(m_pMiniToolBar, SIGNAL(sigExitAction()),
    135150            actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SLOT(trigger()));
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h

    r56869 r56870  
    4646    /** Revokes keyboard-focus. */
    4747    void sltRevokeFocus();
     48
     49    /** Shows window minimized. */
     50    void showMinimized();
    4851
    4952private:
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