Changeset 73721 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 16, 2018 6:09:07 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.cpp
r73717 r73721 111 111 { 112 112 /* Create Virtual Media Manager: */ 113 m_pPaneMedia = new UIMediumManagerWidget(EmbedTo_Stack, m_pActionPool );113 m_pPaneMedia = new UIMediumManagerWidget(EmbedTo_Stack, m_pActionPool, false /* show toolbar */); 114 114 AssertPtrReturnVoid(m_pPaneMedia); 115 115 { -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r73717 r73721 114 114 , m_pSnapshotMenuAction(0) 115 115 , m_pLogViewerMenuAction(0) 116 , m_pVirtualMediaManagerMenuAction(0) 116 117 , m_pManagerVirtualMedia(0) 117 118 , m_pManagerHostNetwork(0) … … 1237 1238 m_pLogViewerMenuAction = menuBar()->addMenu(actionPool()->action(UIActionIndex_M_LogViewer)->menu()); 1238 1239 1240 /* Prepare 'Medium' menu: */ 1241 prepareMenuMedium(actionPool()->action(UIActionIndexST_M_Medium)->menu()); 1242 m_pVirtualMediaManagerMenuAction = menuBar()->addMenu(actionPool()->action(UIActionIndexST_M_Medium)->menu()); 1243 1239 1244 #ifdef VBOX_WS_MAC 1240 1245 /* Prepare 'Window' menu: */ … … 1655 1660 /* Remember action list: */ 1656 1661 m_logViewerActions << actionPool()->action(UIActionIndex_M_LogViewer_T_Find) 1657 << actionPool()->action(UIActionIndex_M_LogViewer_T_Filter) 1658 << actionPool()->action(UIActionIndex_M_LogViewer_T_Bookmark) 1659 << actionPool()->action(UIActionIndex_M_LogViewer_T_Settings) 1660 << actionPool()->action(UIActionIndex_M_LogViewer_S_Refresh) 1661 << actionPool()->action(UIActionIndex_M_LogViewer_S_Save); 1662 << actionPool()->action(UIActionIndex_M_LogViewer_T_Filter) 1663 << actionPool()->action(UIActionIndex_M_LogViewer_T_Bookmark) 1664 << actionPool()->action(UIActionIndex_M_LogViewer_T_Settings) 1665 << actionPool()->action(UIActionIndex_M_LogViewer_S_Refresh) 1666 << actionPool()->action(UIActionIndex_M_LogViewer_S_Save); 1667 } 1668 1669 void UIVirtualBoxManager::prepareMenuMedium(QMenu *pMenu) 1670 { 1671 /* We are doing it inside the UIActionPoolSelector. */ 1672 Q_UNUSED(pMenu); 1673 1674 /* Do not touch if filled already: */ 1675 if (!m_virtualMediaManagerActions.isEmpty()) 1676 return; 1677 1678 /* Remember action list: */ 1679 m_virtualMediaManagerActions << actionPool()->action(UIActionIndexST_M_Medium_S_Add) 1680 << actionPool()->action(UIActionIndexST_M_Medium_S_Copy) 1681 << actionPool()->action(UIActionIndexST_M_Medium_S_Move) 1682 << actionPool()->action(UIActionIndexST_M_Medium_S_Remove) 1683 << actionPool()->action(UIActionIndexST_M_Medium_S_Release) 1684 << actionPool()->action(UIActionIndexST_M_Medium_T_Details) 1685 << actionPool()->action(UIActionIndexST_M_Medium_S_Refresh); 1662 1686 } 1663 1687 … … 1946 1970 { 1947 1971 /* Determine whether Machine or Group menu should be shown at all: */ 1972 const bool fGlobalMenuShown = m_pWidget->isGlobalItemSelected(); 1948 1973 const bool fMachineOrGroupMenuShown = m_pWidget->isMachineItemSelected() || m_pWidget->isGroupItemSelected(); 1949 1974 const bool fMachineMenuShown = !isSingleGroupSelected(); … … 1958 1983 const bool fLogViewerMenuShown = fMachineOrGroupMenuShown && m_pWidget->currentMachineTool() == ToolTypeMachine_LogViewer; 1959 1984 m_pLogViewerMenuAction->setVisible(fLogViewerMenuShown); 1985 1986 /* Determine whether VirtualMediaManager actions should be visible: */ 1987 const bool fMediumMenuShown = fGlobalMenuShown && m_pWidget->currentGlobalTool() == ToolTypeGlobal_VirtualMedia; 1988 m_pVirtualMediaManagerMenuAction->setVisible(fMediumMenuShown); 1960 1989 1961 1990 /* Hide action shortcuts: */ … … 1976 2005 foreach (UIAction *pAction, m_logViewerActions) 1977 2006 pAction->setVisible(fLogViewerMenuShown); 2007 foreach (UIAction *pAction, m_virtualMediaManagerActions) 2008 pAction->setVisible(fMediumMenuShown); 1978 2009 1979 2010 /* Show action shortcuts: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h
r73697 r73721 252 252 /** Prepares @a pMenu Log Viewer. */ 253 253 void prepareMenuLogViewer(QMenu *pMenu); 254 /** Prepares @a pMenu Medium. */ 255 void prepareMenuMedium(QMenu *pMenu); 254 256 /** Prepares status-bar. */ 255 257 void prepareStatusBar(); … … 359 361 /** Holds the list of Log Viewer menu actions. */ 360 362 QList<UIAction*> m_logViewerActions; 361 /** Holds the Log menu parent action. */363 /** Holds the Log Viewer menu parent action. */ 362 364 QAction *m_pLogViewerMenuAction; 365 366 /** Holds the list of Virtual Media Manager menu actions. */ 367 QList<UIAction*> m_virtualMediaManagerActions; 368 /** Holds the Virtual Media Manager menu parent action. */ 369 QAction *m_pVirtualMediaManagerMenuAction; 363 370 364 371 /** Holds the Virtual Media Manager window instance. */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r73697 r73721 422 422 m_pToolBar->addAction(actionPool()->action(UIActionIndex_M_LogViewer_S_Refresh)); 423 423 424 /* Add 'Medium' actions block: */ 425 m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Medium_S_Add)); 426 m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Medium_S_Copy)); 427 m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Medium_S_Move)); 428 m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Medium_S_Remove)); 429 m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Medium_S_Release)); 430 m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Medium_T_Details)); 431 m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Medium_S_Refresh)); 432 424 433 #ifdef VBOX_WS_MAC 425 434 // WORKAROUND: -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r73717 r73721 149 149 *********************************************************************************************************************************/ 150 150 151 UIMediumManagerWidget::UIMediumManagerWidget(EmbedTo enmEmbedding, UIActionPool *pActionPool, QWidget *pParent /* = 0 */) 151 UIMediumManagerWidget::UIMediumManagerWidget(EmbedTo enmEmbedding, UIActionPool *pActionPool, 152 bool fShowToolbar /* = true */, QWidget *pParent /* = 0 */) 152 153 : QIWithRetranslateUI<QWidget>(pParent) 153 154 , m_enmEmbedding(enmEmbedding) 154 155 , m_pActionPool(pActionPool) 156 , m_fShowToolbar(fShowToolbar) 155 157 , m_fPreventChangeCurrentItem(false) 156 158 , m_pTabWidget(0) … … 769 771 770 772 /* Prepare toolbar: */ 771 prepareToolBar(); 773 if (m_fShowToolbar) 774 prepareToolBar(); 772 775 /* Prepare tab-widget: */ 773 776 prepareTabWidget(); -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.h
r73717 r73721 105 105 public: 106 106 107 /** Constructs Virtual Media Manager widget. */ 108 UIMediumManagerWidget(EmbedTo enmEmbedding, UIActionPool *pActionPool, QWidget *pParent = 0); 107 /** Constructs Virtual Media Manager widget. 108 * @param enmEmbedding Brings the type of widget embedding. 109 * @param pActionPool Brings the action-pool reference. 110 * @param fShowToolbar Brings whether we should create/show toolbar. */ 111 UIMediumManagerWidget(EmbedTo enmEmbedding, UIActionPool *pActionPool, bool fShowToolbar = true, QWidget *pParent = 0); 109 112 110 113 /** Returns the menu. */ … … 298 301 /** Holds the widget embedding type. */ 299 302 const EmbedTo m_enmEmbedding; 300 301 303 /** Holds the action-pool reference. */ 302 304 UIActionPool *m_pActionPool; 305 /** Holds whether we should create/show toolbar. */ 306 const bool m_fShowToolbar; 303 307 304 308 /** Holds whether Virtual Media Manager should preserve current item change. */
Note:
See TracChangeset
for help on using the changeset viewer.