Changeset 73697 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 15, 2018 3:58:48 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.cpp
r73694 r73697 95 95 { 96 96 /* Create widget: */ 97 UIVMLogViewerWidget *pWidget = new UIVMLogViewerWidget(EmbedTo_Dialog, m_pActionPool, m_comMachine, this);97 UIVMLogViewerWidget *pWidget = new UIVMLogViewerWidget(EmbedTo_Dialog, m_pActionPool, true /* show toolbar */, m_comMachine, this); 98 98 if (pWidget) 99 99 { -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
r73694 r73697 60 60 UIVMLogViewerWidget::UIVMLogViewerWidget(EmbedTo enmEmbedding, 61 61 UIActionPool *pActionPool, 62 bool fShowToolbar /* = true */, 62 63 const CMachine &comMachine /* = CMachine() */, 63 64 QWidget *pParent /* = 0 */) … … 65 66 , m_enmEmbedding(enmEmbedding) 66 67 , m_pActionPool(pActionPool) 68 , m_fShowToolbar(fShowToolbar) 67 69 , m_comMachine(comMachine) 68 70 , m_fIsPolished(false) … … 421 423 /* Prepare stuff: */ 422 424 prepareActions(); 423 prepareToolBar(); 425 if (m_fShowToolbar) 426 prepareToolBar(); 424 427 prepareWidgets(); 425 428 /* Load settings: */ -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h
r73694 r73697 62 62 * @param enmEmbedding Brings the type of widget embedding. 63 63 * @param pActionPool Brings the action-pool reference. 64 * @param fShowToolbar Brings whether we should create/show toolbar. 64 65 * @param comMachine Brings the machine for which VM Log-Viewer is requested. */ 65 66 UIVMLogViewerWidget(EmbedTo enmEmbedding, UIActionPool *pActionPool, 66 const CMachine &comMachine = CMachine(), QWidget *pParent = 0);67 bool fShowToolbar = true, const CMachine &comMachine = CMachine(), QWidget *pParent = 0); 67 68 /** Destructs the VM Log-Viewer. */ 68 69 ~UIVMLogViewerWidget(); … … 188 189 /** Hold sthe action-pool reference. */ 189 190 UIActionPool *m_pActionPool; 191 /** Holds whether we should create/show toolbar. */ 192 const bool m_fShowToolbar; 190 193 /** Holds the machine instance. */ 191 194 CMachine m_comMachine; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneMachine.cpp
r73694 r73697 154 154 { 155 155 /* Create the Logviewer pane: */ 156 m_pPaneLogViewer = new UIVMLogViewerWidget(EmbedTo_Stack, m_pActionPool );156 m_pPaneLogViewer = new UIVMLogViewerWidget(EmbedTo_Stack, m_pActionPool, false /* show toolbar */); 157 157 AssertPtrReturnVoid(m_pPaneLogViewer); 158 158 { -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r73694 r73697 113 113 , m_pMachineMenuAction(0) 114 114 , m_pSnapshotMenuAction(0) 115 , m_pLogViewerMenuAction(0) 115 116 , m_pManagerVirtualMedia(0) 116 117 , m_pManagerHostNetwork(0) … … 1220 1221 prepareMenuMachineClose(actionPool()->action(UIActionIndexST_M_Machine_M_Close)->menu()); 1221 1222 1222 /* Prepare Group-menu: */1223 /* Prepare 'Group' menu: */ 1223 1224 prepareMenuGroup(actionPool()->action(UIActionIndexST_M_Group)->menu()); 1224 1225 m_pGroupMenuAction = menuBar()->addMenu(actionPool()->action(UIActionIndexST_M_Group)->menu()); 1225 1226 1226 /* Prepare Machine-menu: */1227 /* Prepare 'Machine' menu: */ 1227 1228 prepareMenuMachine(actionPool()->action(UIActionIndexST_M_Machine)->menu()); 1228 1229 m_pMachineMenuAction = menuBar()->addMenu(actionPool()->action(UIActionIndexST_M_Machine)->menu()); 1229 1230 1230 /* Prepare Snapshot-menu: */1231 /* Prepare 'Snapshot' menu: */ 1231 1232 prepareMenuSnapshot(actionPool()->action(UIActionIndexST_M_Snapshot)->menu()); 1232 1233 m_pSnapshotMenuAction = menuBar()->addMenu(actionPool()->action(UIActionIndexST_M_Snapshot)->menu()); 1234 1235 /* Prepare 'Log Viewer' menu: */ 1236 prepareMenuLogViewer(actionPool()->action(UIActionIndex_M_LogViewer)->menu()); 1237 m_pLogViewerMenuAction = menuBar()->addMenu(actionPool()->action(UIActionIndex_M_LogViewer)->menu()); 1233 1238 1234 1239 #ifdef VBOX_WS_MAC … … 1239 1244 #endif 1240 1245 1241 /* Prepare Help-menu: */1246 /* Prepare 'Help' menu: */ 1242 1247 menuBar()->addMenu(actionPool()->action(UIActionIndex_Menu_Help)->menu()); 1243 1248 … … 1639 1644 } 1640 1645 1646 void UIVirtualBoxManager::prepareMenuLogViewer(QMenu *pMenu) 1647 { 1648 /* We are doing it inside the UIActionPool. */ 1649 Q_UNUSED(pMenu); 1650 1651 /* Do not touch if filled already: */ 1652 if (!m_logViewerActions.isEmpty()) 1653 return; 1654 1655 /* Remember action list: */ 1656 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 } 1663 1641 1664 void UIVirtualBoxManager::prepareStatusBar() 1642 1665 { … … 1932 1955 m_pSnapshotMenuAction->setVisible(fSnapshotMenuShown); 1933 1956 1957 /* Determine whether LogViewer actions should be visible: */ 1958 const bool fLogViewerMenuShown = fMachineOrGroupMenuShown && m_pWidget->currentMachineTool() == ToolTypeMachine_LogViewer; 1959 m_pLogViewerMenuAction->setVisible(fLogViewerMenuShown); 1960 1934 1961 /* Hide action shortcuts: */ 1935 1962 if (!fMachineMenuShown) … … 1947 1974 foreach (UIAction *pAction, m_snapshotActions) 1948 1975 pAction->setVisible(fSnapshotMenuShown); 1976 foreach (UIAction *pAction, m_logViewerActions) 1977 pAction->setVisible(fLogViewerMenuShown); 1949 1978 1950 1979 /* Show action shortcuts: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h
r73676 r73697 250 250 /** Prepares @a pMenu Snapshot. */ 251 251 void prepareMenuSnapshot(QMenu *pMenu); 252 /** Prepares @a pMenu Log Viewer. */ 253 void prepareMenuLogViewer(QMenu *pMenu); 252 254 /** Prepares status-bar. */ 253 255 void prepareStatusBar(); … … 355 357 QAction *m_pSnapshotMenuAction; 356 358 359 /** Holds the list of Log Viewer menu actions. */ 360 QList<UIAction*> m_logViewerActions; 361 /** Holds the Log menu parent action. */ 362 QAction *m_pLogViewerMenuAction; 363 357 364 /** Holds the Virtual Media Manager window instance. */ 358 365 QIManagerDialog *m_pManagerVirtualMedia; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r73676 r73697 404 404 m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow)); 405 405 406 /* Add Snapshot actions block: */406 /* Separator: */ 407 407 m_pToolBar->addSeparator(); 408 409 /* Add 'Snapshot' actions block: */ 408 410 m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Snapshot_S_Take)); 409 411 m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Snapshot_S_Delete)); … … 411 413 m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Snapshot_T_Properties)); 412 414 m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Snapshot_S_Clone)); 415 416 /* Add 'Log Viewer' actions block: */ 417 m_pToolBar->addAction(actionPool()->action(UIActionIndex_M_LogViewer_S_Save)); 418 m_pToolBar->addAction(actionPool()->action(UIActionIndex_M_LogViewer_T_Find)); 419 m_pToolBar->addAction(actionPool()->action(UIActionIndex_M_LogViewer_T_Filter)); 420 m_pToolBar->addAction(actionPool()->action(UIActionIndex_M_LogViewer_T_Bookmark)); 421 m_pToolBar->addAction(actionPool()->action(UIActionIndex_M_LogViewer_T_Settings)); 422 m_pToolBar->addAction(actionPool()->action(UIActionIndex_M_LogViewer_S_Refresh)); 413 423 414 424 #ifdef VBOX_WS_MAC
Note:
See TracChangeset
for help on using the changeset viewer.