Changeset 108177 in vbox
- Timestamp:
- Feb 12, 2025 12:15:35 PM (3 months ago)
- svn:sync-xref-src-repo-rev:
- 167492
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsManagerWidget.cpp
r108175 r108177 181 181 } 182 182 183 void UIGlobalToolsManagerWidget::sltHandleChooserPaneSelectionChange() 184 { 185 updateToolsMenu(); 186 } 187 183 188 void UIGlobalToolsManagerWidget::sltHandleCloudProfileStateChange(const QString &, const QString &) 184 189 { … … 254 259 255 260 /* Chooser-pane connections: */ 261 connect(chooser(), &UIChooser::sigSelectionChanged, 262 this, &UIGlobalToolsManagerWidget::sltHandleChooserPaneSelectionChange); 256 263 connect(chooser(), &UIChooser::sigCloudProfileStateChange, 257 264 this, &UIGlobalToolsManagerWidget::sltHandleCloudProfileStateChange); … … 282 289 283 290 /* Chooser-pane connections: */ 291 disconnect(chooser(), &UIChooser::sigSelectionChanged, 292 this, &UIGlobalToolsManagerWidget::sltHandleChooserPaneSelectionChange); 284 293 disconnect(chooser(), &UIChooser::sigCloudProfileStateChange, 285 294 this, &UIGlobalToolsManagerWidget::sltHandleCloudProfileStateChange); … … 311 320 void UIGlobalToolsManagerWidget::updateToolsMenu() 312 321 { 313 /* Update global toolsrestrictions: */322 /* Prepare tool restrictions: */ 314 323 QSet<UIToolType> restrictedTypes; 324 315 325 /* Restrict some types for Basic mode: */ 316 326 const bool fExpertMode = gEDataManager->isSettingsInExpertMode(); … … 318 328 restrictedTypes << UIToolType_Media 319 329 << UIToolType_Network; 330 331 /* Make sure Machines tool is hidden for empty Chooser-pane: */ 332 if (!chooser()->currentItem()) 333 restrictedTypes << UIToolType_Machines; 334 335 /* Make sure no restricted tool is selected: */ 320 336 if (restrictedTypes.contains(toolMenu()->toolsType())) 321 337 setMenuToolType(UIToolType_Home); 338 339 /* Hide restricted tools in the menu: */ 322 340 const QList restrictions(restrictedTypes.begin(), restrictedTypes.end()); 323 341 toolMenu()->setRestrictedToolTypes(restrictions); 324 342 325 /* Take restrictions into account, closing all restricted tools: */343 /* Close all restricted tools (besides the Machines): */ 326 344 foreach (const UIToolType &enmRestrictedType, restrictedTypes) 327 toolPane()->closeTool(enmRestrictedType); 328 } 345 if (enmRestrictedType != UIToolType_Machines) 346 toolPane()->closeTool(enmRestrictedType); 347 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsManagerWidget.h
r108173 r108177 124 124 /** @name Chooser pane stuff. 125 125 * @{ */ 126 /** Handles Chooser-pane selection change. */ 127 void sltHandleChooserPaneSelectionChange(); 128 126 129 /** Handles state change for cloud profile with certain @a strProviderShortName and @a strProfileName. */ 127 130 void sltHandleCloudProfileStateChange(const QString &strProviderShortName,
Note:
See TracChangeset
for help on using the changeset viewer.