Changeset 85636 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 6, 2020 1:11:52 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r85620 r85636 3042 3042 actionPool()->action(UIActionIndexMN_M_Group_M_StartOrShow)->setState(pItem->isItemPoweredOff() ? 0 : 1); 3043 3043 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()); 3048 3045 } 3049 3046 else … … 3051 3048 actionPool()->action(UIActionIndexMN_M_Group_M_StartOrShow)->setState(0); 3052 3049 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? */); 3057 3051 } 3058 3052 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r85597 r85636 229 229 { 230 230 return m_pPaneToolsMachine->isCurrentStateItemSelected(); 231 } 232 233 void UIVirtualBoxManagerWidget::updateToolBarMenuButtons(bool fSeparateMenuSection) 234 { 235 QToolButton *pButton = qobject_cast<QToolButton*>(m_pToolBar->widgetForAction(actionPool()->action(UIActionIndexMN_M_Machine_M_StartOrShow))); 236 if (pButton) 237 pButton->setPopupMode(fSeparateMenuSection ? QToolButton::MenuButtonPopup : QToolButton::DelayedPopup); 231 238 } 232 239 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h
r85508 r85636 197 197 /** @} */ 198 198 199 /** @name Tool-bar stuff. 200 * @{ */ 201 /** Updates tool-bar menu buttons. */ 202 void updateToolBarMenuButtons(bool fSeparateMenuSection); 203 /** @} */ 204 199 205 public slots: 200 206
Note:
See TracChangeset
for help on using the changeset viewer.