VirtualBox

Changeset 75357 in vbox for trunk/src


Ignore:
Timestamp:
Nov 9, 2018 12:17:37 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126490
Message:

FE/Qt: bugref:9254: View / Screen menu actions reordering, adding separator between different groups; Some logic code reordering.

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  
    32303230    AssertPtrReturnVoid(pMenu);
    32313231
     3232    /* Do we have to show resize, multiscreen or scale factor actions? */
    32323233    const bool fAllowToShowActionResize = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Resize);
     3234    const bool fAllowToShowActionMultiscreen = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Multiscreen);
    32333235    const bool fAllowToShowActionScaleFactor = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ScaleFactor);
    3234     const bool fAllowToShowActionMultiscreen = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Multiscreen);
    32353236
    32363237    /* Clear contents: */
    32373238    pMenu->clear();
    32383239
    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: */
    32403244    if (fAllowToShowActionResize)
     3245    {
    32413246        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: */
    32423272    if (fAllowToShowActionScaleFactor)
     3273    {
    32433274        updateMenuViewScaleFactor(pMenu);
    3244     if (fAllowToShowActionMultiscreen && m_cHostScreens > 1)
    3245         updateMenuViewMultiscreen(pMenu);
     3275        fSeparator = true;
     3276    }
    32463277}
    32473278
     
    36893720    }
    36903721
    3691     /* Do we have to show resize, scale factor, or multiscreen menu? */
     3722    /* Do we have to show resize, multiscreen or scale factor actions? */
    36923723    const bool fAllowToShowActionResize = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Resize);
     3724    const bool fAllowToShowActionMultiscreen = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Multiscreen);
    36933725    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)
    36973728    {
    36983729        for (int iGuestScreenIndex = 0; iGuestScreenIndex < m_cGuestScreens; ++iGuestScreenIndex)
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp

    r75339 r75357  
    269269}
    270270
     271void 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
    271282void UIMachineLogicNormal::prepareActionConnections()
    272283{
     
    351362#endif /* !VBOX_WS_MAC */
    352363
    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 
    364364void UIMachineLogicNormal::cleanupMachineWindows()
    365365{
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette