Changeset 108550 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 13, 2025 5:22:50 PM (5 weeks ago)
- svn:sync-xref-src-repo-rev:
- 167947
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsWidget.cpp
r108532 r108550 5 5 6 6 /* 7 * Copyright (C) 2006-202 4Oracle and/or its affiliates.7 * Copyright (C) 2006-2025 Oracle and/or its affiliates. 8 8 * 9 9 * This file is part of VirtualBox base platform packages, as … … 71 71 } 72 72 73 UIToolType UIGlobalToolsWidget::menuToolType( ) const73 UIToolType UIGlobalToolsWidget::menuToolType(UIToolClass enmClass) const 74 74 { 75 75 AssertPtrReturn(toolMenu(), UIToolType_Invalid); 76 return toolMenu()->toolsType( UIToolClass_Global);76 return toolMenu()->toolsType(enmClass); 77 77 } 78 78 … … 114 114 toolPane()->openTool(enmType); 115 115 116 /* Special handling for Machines global tool, 117 * notify Machine tool-pane it's active: */ 118 if (enmType == UIToolType_Machines) 119 { 120 toolPane()->setActive(false); 121 toolPaneMachine()->setActive(true); 122 } 123 /* Otherwise, notify Global tool-pane it's active: */ 124 else 125 { 126 toolPaneMachine()->setActive(false); 127 toolPane()->setActive(true); 128 } 116 /* Notify corresponding tool-pane it's active: */ 117 toolPane()->setActive(enmType != UIToolType_Machines && enmType != UIToolType_Managers); 118 toolPaneMachine()->setActive(enmType == UIToolType_Machines); 129 119 130 120 /* Special handling for Activities Global tool, … … 226 216 toolMenu()->setRestrictedToolTypes(UIToolClass_Global, restrictions); 227 217 228 /* Close all restricted tools (besides the Machines ): */218 /* Close all restricted tools (besides the Machines and Management): */ 229 219 foreach (const UIToolType &enmRestrictedType, restrictedTypes) 230 if (enmRestrictedType != UIToolType_Machines) 220 if ( enmRestrictedType != UIToolType_Machines 221 && enmRestrictedType != UIToolType_Managers) 231 222 toolPane()->closeTool(enmRestrictedType); 232 223 } … … 256 247 toolMenu()->setRestrictedToolTypes(UIToolClass_Machine, restrictions); 257 248 249 /// @todo finish that 258 250 // /* Disable even unrestricted tools for inacccessible VMs: */ 259 251 // const bool fCurrentItemIsOk = isItemAccessible(pItem); 260 252 // toolMenu()->setItemsEnabled(fCurrentItemIsOk); 253 254 /* Close all restricted tools: */ 255 foreach (const UIToolType &enmRestrictedType, restrictedTypes) 256 toolPaneMachine()->closeTool(enmRestrictedType); 261 257 } 262 258 … … 364 360 { 365 361 /* Acquire & select tools currently chosen in the menu: */ 366 const UIToolType enmTypeGlobal = toolMenu()->toolsType(UIToolClass_Global); 367 const UIToolType enmTypeMachine = toolMenu()->toolsType(UIToolClass_Machine); 368 sltHandleToolsMenuIndexChange(enmTypeGlobal); 369 sltHandleToolsMenuIndexChange(enmTypeMachine); 362 sltHandleToolsMenuIndexChange(toolMenu()->toolsType(UIToolClass_Global)); 363 sltHandleToolsMenuIndexChange(toolMenu()->toolsType(UIToolClass_Machine)); 370 364 371 365 /* Update tools restrictions: */ … … 376 370 { 377 371 /* Global COM event handlers: */ 372 disconnect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineRegistered, 373 this, &UIGlobalToolsWidget::sltHandleMachineRegistrationChanged); 378 374 disconnect(gEDataManager, &UIExtraDataManager::sigSettingsExpertModeChange, 379 375 this, &UIGlobalToolsWidget::sltHandleSettingsExpertModeChange); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsWidget.h
r108532 r108550 5 5 6 6 /* 7 * Copyright (C) 2006-202 4Oracle and/or its affiliates.7 * Copyright (C) 2006-2025 Oracle and/or its affiliates. 8 8 * 9 9 * This file is part of VirtualBox base platform packages, as … … 70 70 UIGlobalToolsWidget(QWidget *pParent, UIActionPool *pActionPool); 71 71 72 /** @name Common stuff.73 * @{ */74 /** Returns the action-pool reference. */75 UIActionPool *actionPool() const { return m_pActionPool; }76 /** @} */77 78 72 /** @name Tool-bar stuff. 79 73 * @{ */ … … 89 83 UIMachineToolsWidget *machineToolsWidget() const; 90 84 91 /** Returns menu tool type . */92 UIToolType menuToolType( ) const;85 /** Returns menu tool type for the @a enmClass specified. */ 86 UIToolType menuToolType(UIToolClass enmClass) const; 93 87 /** Defines menu tool @a enmType. */ 94 88 void setMenuToolType(UIToolType enmType); … … 171 165 /** @} */ 172 166 167 /** @name Common stuff. 168 * @{ */ 169 /** Returns the action-pool reference. */ 170 UIActionPool *actionPool() const { return m_pActionPool; } 171 /** @} */ 172 173 173 /** @name Tools stuff. 174 174 * @{ */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIMachineToolsWidget.cpp
r108506 r108550 5 5 6 6 /* 7 * Copyright (C) 2006-202 4Oracle and/or its affiliates.7 * Copyright (C) 2006-2025 Oracle and/or its affiliates. 8 8 * 9 9 * This file is part of VirtualBox base platform packages, as … … 528 528 } 529 529 530 /* Open tool last chosen in tools-menu: */531 s witchToolTo(toolMenu()->toolsType(UIToolClass_Machine));530 /* Acquire & select tool currently chosen in the menu: */ 531 sltHandleToolsMenuIndexChange(toolMenu()->toolsType(UIToolClass_Machine)); 532 532 } 533 533 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIMachineToolsWidget.h
r108506 r108550 5 5 6 6 /* 7 * Copyright (C) 2006-202 4Oracle and/or its affiliates.7 * Copyright (C) 2006-2025 Oracle and/or its affiliates. 8 8 * 9 9 * This file is part of VirtualBox base platform packages, as … … 91 91 UIMachineToolsWidget(UIToolPane *pParent, UIActionPool *pActionPool); 92 92 93 /** @name Common stuff.94 * @{ */95 /** Returns the action-pool reference. */96 UIActionPool *actionPool() const { return m_pActionPool; }97 /** @} */98 99 93 /** @name Chooser pane stuff. 100 94 * @{ */ … … 232 226 /** @} */ 233 227 228 /** @name Common stuff. 229 * @{ */ 230 /** Returns the action-pool reference. */ 231 UIActionPool *actionPool() const { return m_pActionPool; } 232 /** @} */ 233 234 234 /** @name Tools pane stuff. 235 235 * @{ */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxWidget.cpp
r108532 r108550 225 225 { 226 226 AssertPtrReturn(globalToolsWidget(), UIToolType_Invalid); 227 return globalToolsWidget()->menuToolType( );227 return globalToolsWidget()->menuToolType(UIToolClass_Global); 228 228 } 229 229
Note:
See TracChangeset
for help on using the changeset viewer.