- Timestamp:
- Nov 9, 2018 12:17:37 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 126490
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.cpp
r75339 r75357 3230 3230 AssertPtrReturnVoid(pMenu); 3231 3231 3232 /* Do we have to show resize, multiscreen or scale factor actions? */ 3232 3233 const bool fAllowToShowActionResize = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Resize); 3234 const bool fAllowToShowActionMultiscreen = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Multiscreen); 3233 3235 const bool fAllowToShowActionScaleFactor = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ScaleFactor); 3234 const bool fAllowToShowActionMultiscreen = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Multiscreen);3235 3236 3236 3237 /* Clear contents: */ 3237 3238 pMenu->clear(); 3238 3239 3239 /* Resize, scale factor, and multiscreen menu items are inserted into the same sub-menu: */ 3240 /* Separator: */ 3241 bool fSeparator = false; 3242 3243 /* Resize actions: */ 3240 3244 if (fAllowToShowActionResize) 3245 { 3241 3246 updateMenuViewScreen(pMenu); 3247 fSeparator = true; 3248 } 3249 3250 /* Separator: */ 3251 if (fSeparator) 3252 { 3253 pMenu->addSeparator(); 3254 fSeparator = false; 3255 } 3256 3257 /* Multiscreen actions: */ 3258 if (fAllowToShowActionMultiscreen && (m_cHostScreens > 1 || m_cGuestScreens > 1)) 3259 { 3260 updateMenuViewMultiscreen(pMenu); 3261 fSeparator = true; 3262 } 3263 3264 /* Separator: */ 3265 if (fSeparator) 3266 { 3267 pMenu->addSeparator(); 3268 fSeparator = false; 3269 } 3270 3271 /* Scale factor actions: */ 3242 3272 if (fAllowToShowActionScaleFactor) 3273 { 3243 3274 updateMenuViewScaleFactor(pMenu); 3244 if (fAllowToShowActionMultiscreen && m_cHostScreens > 1)3245 updateMenuViewMultiscreen(pMenu);3275 fSeparator = true; 3276 } 3246 3277 } 3247 3278 … … 3689 3720 } 3690 3721 3691 /* Do we have to show resize, scale factor, or multiscreen menu? */3722 /* Do we have to show resize, multiscreen or scale factor actions? */ 3692 3723 const bool fAllowToShowActionResize = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Resize); 3724 const bool fAllowToShowActionMultiscreen = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Multiscreen); 3693 3725 const bool fAllowToShowActionScaleFactor = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ScaleFactor); 3694 const bool fAllowToShowActionMultiscreen = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Multiscreen); 3695 3696 if (fAllowToShowActionResize || fAllowToShowActionScaleFactor || fAllowToShowActionMultiscreen) 3726 3727 if (fAllowToShowActionResize || fAllowToShowActionMultiscreen || fAllowToShowActionScaleFactor) 3697 3728 { 3698 3729 for (int iGuestScreenIndex = 0; iGuestScreenIndex < m_cGuestScreens; ++iGuestScreenIndex) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
r75339 r75357 269 269 } 270 270 271 void UIMachineLogicNormal::prepareActionGroups() 272 { 273 /* Call to base-class: */ 274 UIMachineLogic::prepareActionGroups(); 275 276 /* Restrict 'Multiscreen' actions for 'View' menu: */ 277 actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic, 278 (UIExtraDataMetaDefs::RuntimeMenuViewActionType) 279 (UIExtraDataMetaDefs::RuntimeMenuViewActionType_Multiscreen)); 280 } 281 271 282 void UIMachineLogicNormal::prepareActionConnections() 272 283 { … … 351 362 #endif /* !VBOX_WS_MAC */ 352 363 353 void UIMachineLogicNormal::prepareActionGroups()354 {355 /* Call to base-class: */356 UIMachineLogic::prepareActionGroups();357 358 /* Restrict 'Adjust Window', 'Guest Autoresize', 'Status Bar' and 'Resize' actions for 'View' menu: */359 actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic,360 (UIExtraDataMetaDefs::RuntimeMenuViewActionType)361 (UIExtraDataMetaDefs::RuntimeMenuViewActionType_Multiscreen));362 }363 364 364 void UIMachineLogicNormal::cleanupMachineWindows() 365 365 {
Note:
See TracChangeset
for help on using the changeset viewer.