- Timestamp:
- Sep 6, 2023 11:21:36 AM (13 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/logviewer
- Files:
-
- 4 edited
-
UIVMLogViewerDialog.cpp (modified) (2 diffs)
-
UIVMLogViewerDialog.h (modified) (1 diff)
-
UIVMLogViewerWidget.cpp (modified) (5 diffs)
-
UIVMLogViewerWidget.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.cpp
r100896 r101027 179 179 /* Apply language settings: */ 180 180 retranslateUi(); 181 manageEscapeShortCut();182 181 loadDialogGeometry(); 183 182 } … … 225 224 button(ButtonType_Close)->setShortcut(shortcut); 226 225 } 227 228 void UIVMLogViewerDialog::manageEscapeShortCut()229 {230 UIVMLogViewerWidget *pWidget = qobject_cast<UIVMLogViewerWidget*>(widget());231 if (!pWidget)232 return;233 pWidget->manageEscapeShortCut();234 } -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.h
r98845 r101027 124 124 private: 125 125 126 void manageEscapeShortCut();127 126 /** Holds the action-pool reference. */ 128 127 UIActionPool *m_pActionPool; -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
r101019 r101027 224 224 /* Prepare VM Log-Viewer: */ 225 225 prepare(); 226 restorePanelVisibility();227 226 if (!uMachineId.isNull()) 228 227 setMachines(QVector<QUuid>() << uMachineId); … … 392 391 } 393 392 394 void UIVMLogViewerWidget::savePanelVisibility()395 {396 // if (m_fCommitDataSignalReceived)397 // return;398 // /* Save a list of currently visible panels: */399 // QStringList strNameList;400 // foreach(UIDialogPanel* pPanel, m_visiblePanelsList)401 // strNameList.append(pPanel->panelName());402 // gEDataManager->setLogViewerVisiblePanels(strNameList);403 }404 405 393 void UIVMLogViewerWidget::sltRefresh() 406 394 { … … 756 744 retranslateUi(); 757 745 758 /* Setup escape shortcut: */759 manageEscapeShortCut();760 746 uiCommon().setHelpKeyword(this, "log-viewer"); 761 747 } … … 908 894 } 909 895 910 void UIVMLogViewerWidget::restorePanelVisibility()911 {912 }913 914 896 void UIVMLogViewerWidget::retranslateUi() 915 897 { … … 1164 1146 } 1165 1147 1166 void UIVMLogViewerWidget::manageEscapeShortCut()1167 {1168 // /* if there is no visible panels give the escape shortcut to parent dialog: */1169 // if (m_visiblePanelsList.isEmpty())1170 // {1171 // emit sigSetCloseButtonShortCut(QKeySequence(Qt::Key_Escape));1172 // return;1173 // }1174 // /* Take the escape shortcut from the dialog: */1175 // emit sigSetCloseButtonShortCut(QKeySequence());1176 // /* Just loop thru the visible panel list and set the esc key to the1177 // panel which made visible latest */1178 // for (int i = 0; i < m_visiblePanelsList.size() - 1; ++i)1179 // {1180 // m_visiblePanelsList[i]->setCloseButtonShortCut(QKeySequence());1181 // }1182 // m_visiblePanelsList.back()->setCloseButtonShortCut(QKeySequence(Qt::Key_Escape));1183 }1184 1185 1148 bool UIVMLogViewerWidget::labelTabHandler() 1186 1149 { -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h
r101019 r101027 163 163 /** Loads options. */ 164 164 void loadOptions(); 165 void savePanelVisibility();166 /** Shows the panels that have been visible the last time logviewer is closed. */167 void restorePanelVisibility();168 165 /** @} */ 169 166 … … 201 198 /** Resets document (of the current tab) and scrollbar highligthing */ 202 199 void resetHighlighthing(); 203 /** Make sure escape key is assigned to only a single widget. This is done by checking204 several things in the following order:205 - when there are no more panels visible assign it to the parent dialog206 - grab it from the dialog as soon as a panel becomes visible again207 - assigned it to the most recently "unhidden" panel */208 void manageEscapeShortCut();209 200 void setMachines(const QVector<QUuid> &machineIDs); 210 201 /** Returns the content of the ith log file of @comMachine or possibly an empty string */
Note:
See TracChangeset
for help on using the changeset viewer.

