Changeset 107279 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Dec 10, 2024 2:59:20 PM (5 weeks 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
r107277 r107279 1180 1180 AssertReturnVoid(enmType != UIToolType_Invalid); 1181 1181 1182 /* Make sure global item is selected: */1183 m_pWidget->switchToGlobalItem();1184 1185 1182 /* Open the tool finally: */ 1186 m_pWidget->setToolsTypeGlobal(enmType );1183 m_pWidget->setToolsTypeGlobal(enmType, true /* make sure it's visible */); 1187 1184 } 1188 1185 … … 1300 1297 UIVirtualMachineItem *pItem = currentItem(); 1301 1298 1302 /* For global item or local machine: */ 1303 if ( !pItem 1304 || pItem->itemType() == UIVirtualMachineItemType_Local) 1299 /* If there is no items at all or first selected item is a local machine: */ 1300 if (!pItem || pItem->itemType() == UIVirtualMachineItemType_Local) 1305 1301 openNewMachineWizard(); 1306 /* For cloud machine: */1302 /* Otherwise we guess it's cloud related item selected: */ 1307 1303 else 1308 1304 sltOpenWizard(WizardType_NewCloudVM); … … 1314 1310 UIVirtualMachineItem *pItem = currentItem(); 1315 1311 1316 /* For global item or local machine: */ 1317 if ( !pItem 1318 || pItem->itemType() == UIVirtualMachineItemType_Local) 1312 /* If there is no items at all or first selected item is a local machine: */ 1313 if (!pItem || pItem->itemType() == UIVirtualMachineItemType_Local) 1319 1314 openAddMachineDialog(); 1320 /* For cloud machine: */1315 /* Otherwise we guess it's cloud related item selected: */ 1321 1316 else 1322 1317 sltOpenWizard(WizardType_AddCloudVM); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r107275 r107279 199 199 } 200 200 201 void UIVirtualBoxManagerWidget::switchToGlobalItem()202 {203 AssertPtrReturnVoid(m_pPaneChooser);204 m_pPaneChooser->setCurrentGlobal();205 }206 207 201 void UIVirtualBoxManagerWidget::openGroupNameEditor() 208 202 { … … 250 244 } 251 245 252 void UIVirtualBoxManagerWidget::setToolsTypeGlobal(UIToolType enmType) 253 { 246 void UIVirtualBoxManagerWidget::setToolsTypeGlobal(UIToolType enmType, bool fMakeSureItsVisible /* = false */) 247 { 248 /* Make sure global item is selected if requested: */ 249 if (fMakeSureItsVisible) 250 { 251 AssertPtrReturnVoid(m_pPaneChooser); 252 m_pPaneChooser->setCurrentGlobal(); 253 } 254 255 /* Change the tool to requested type: */ 256 AssertPtrReturnVoid(m_pMenuToolsGlobal); 254 257 m_pMenuToolsGlobal->setToolsType(enmType); 255 258 } … … 262 265 void UIVirtualBoxManagerWidget::setToolsTypeMachine(UIToolType enmType) 263 266 { 267 /* Change the tool to requested type: */ 268 AssertPtrReturnVoid(m_pMenuToolsMachine); 264 269 m_pMenuToolsMachine->setToolsType(enmType); 265 270 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h
r107275 r107279 191 191 bool isCloudProfileUpdateInProgress() const; 192 192 193 /** Switches to global item. */194 void switchToGlobalItem();195 193 /** Opens group name editor. */ 196 194 void openGroupNameEditor(); … … 215 213 /** @name Tools pane stuff. 216 214 * @{ */ 217 /** Defines Global tools @a enmType . */218 void setToolsTypeGlobal(UIToolType enmType );215 /** Defines Global tools @a enmType and @a fMakeSureItsVisible if requested. */ 216 void setToolsTypeGlobal(UIToolType enmType, bool fMakeSureItsVisible = false); 219 217 /** Returns Global tools type. */ 220 218 UIToolType toolsTypeGlobal() const;
Note:
See TracChangeset
for help on using the changeset viewer.