VirtualBox

Ignore:
Timestamp:
Jul 25, 2014 8:34:38 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
95262
Message:

FE/Qt: 7462: Action-pool interface cleanup/rework (part 02).

File:
1 edited

Legend:

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

    r52184 r52202  
    7575     * the linked key without the 'Host+' part we are adding it here. */
    7676    QString hotKey = QString("Host+%1")
    77         .arg(VBoxGlobal::extractKeyFromActionText(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen)->text()));
     77        .arg(VBoxGlobal::extractKeyFromActionText(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen)->text()));
    7878    Assert(!hotKey.isEmpty());
    7979
     
    446446
    447447    /* Restrict 'Adjust Window', 'Status Bar' and 'Resize' actions for 'View' menu: */
    448     gpActionPool->toRuntime()->setRestrictionForMenuView(UIActionPool::UIActionRestrictionLevel_Logic,
     448    actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic,
    449449                                                         (RuntimeMenuViewActionType)
    450450                                                         (RuntimeMenuViewActionType_AdjustWindow |
     
    453453
    454454    /* Take care of view-action toggle state: */
    455     UIAction *pActionFullscreen = gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen);
     455    UIAction *pActionFullscreen = actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen);
    456456    if (!pActionFullscreen->isChecked())
    457457    {
     
    468468
    469469    /* "View" actions connections: */
    470     connect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     470    connect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    471471            this, SLOT(sltChangeVisualStateToNormal()));
    472     connect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     472    connect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    473473            this, SLOT(sltChangeVisualStateToSeamless()));
    474     connect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     474    connect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    475475            this, SLOT(sltChangeVisualStateToScale()));
    476476}
     
    509509
    510510    // TODO: Make this through action-pool.
    511     m_pScreenLayout->setViewMenu(gpActionPool->action(UIActionIndexRT_M_View)->menu());
     511    m_pScreenLayout->setViewMenu(actionPool()->action(UIActionIndexRT_M_View)->menu());
    512512
    513513    /* Create machine-window(s): */
     
    576576    {
    577577        /* Prepare popup-menu: */
    578         foreach (QMenu *pMenu, gpActionPool->menus())
     578        foreach (QMenu *pMenu, actionPool()->menus())
    579579            m_pPopupMenu->addMenu(pMenu);
    580580    }
     
    619619{
    620620    /* "View" actions disconnections: */
    621     disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     621    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    622622               this, SLOT(sltChangeVisualStateToNormal()));
    623     disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     623    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    624624               this, SLOT(sltChangeVisualStateToSeamless()));
    625     disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     625    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    626626               this, SLOT(sltChangeVisualStateToScale()));
    627627
     
    633633{
    634634    /* Take care of view-action toggle state: */
    635     UIAction *pActionFullscreen = gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen);
     635    UIAction *pActionFullscreen = actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen);
    636636    if (pActionFullscreen->isChecked())
    637637    {
     
    642642
    643643    /* Allow 'Adjust Window', 'Status Bar' and 'Resize' actions for 'View' menu: */
    644     gpActionPool->toRuntime()->setRestrictionForMenuView(UIActionPool::UIActionRestrictionLevel_Logic,
     644    actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic,
    645645                                                         RuntimeMenuViewActionType_Invalid);
    646646
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