VirtualBox

Ignore:
Timestamp:
Aug 6, 2020 1:11:52 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: A fix for Start/Show action, it has menu only in one of states (which is Start); This menu is reflected in tool-bar which needs to be updated accordingly on state-change else menu behavior there will be broken.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r85620 r85636  
    30423042        actionPool()->action(UIActionIndexMN_M_Group_M_StartOrShow)->setState(pItem->isItemPoweredOff() ? 0 : 1);
    30433043        actionPool()->action(UIActionIndexMN_M_Machine_M_StartOrShow)->setState(pItem->isItemPoweredOff() ? 0 : 1);
    3044         /// @todo Hmm, fix it?
    3045 //        QToolButton *pButton = qobject_cast<QToolButton*>(m_pToolBar->widgetForAction(actionPool()->action(UIActionIndexMN_M_Machine_M_StartOrShow)));
    3046 //        if (pButton)
    3047 //            pButton->setPopupMode(pItem->isItemPoweredOff() ? QToolButton::MenuButtonPopup : QToolButton::DelayedPopup);
     3044        m_pWidget->updateToolBarMenuButtons(pItem->isItemPoweredOff());
    30483045    }
    30493046    else
     
    30513048        actionPool()->action(UIActionIndexMN_M_Group_M_StartOrShow)->setState(0);
    30523049        actionPool()->action(UIActionIndexMN_M_Machine_M_StartOrShow)->setState(0);
    3053         /// @todo Hmm, fix it?
    3054 //        QToolButton *pButton = qobject_cast<QToolButton*>(m_pToolBar->widgetForAction(actionPool()->action(UIActionIndexMN_M_Machine_M_StartOrShow)));
    3055 //        if (pButton)
    3056 //            pButton->setPopupMode(pItem->isItemPoweredOff() ? QToolButton::MenuButtonPopup : QToolButton::DelayedPopup);
     3050        m_pWidget->updateToolBarMenuButtons(true /* separate menu section? */);
    30573051    }
    30583052
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