VirtualBox

Changeset 75358 in vbox


Ignore:
Timestamp:
Nov 9, 2018 12:38:17 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9254: View / Screen menu actions and corresponding extra-data flags refactoring, unification.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.cpp

    r75357 r75358  
    32303230    AssertPtrReturnVoid(pMenu);
    32313231
    3232     /* Do we have to show resize, multiscreen or scale factor actions? */
     3232    /* Do we have to show resize, remap or rescale actions? */
    32333233    const bool fAllowToShowActionResize = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Resize);
    3234     const bool fAllowToShowActionMultiscreen = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Multiscreen);
    3235     const bool fAllowToShowActionScaleFactor = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ScaleFactor);
     3234    const bool fAllowToShowActionRemap = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Remap);
     3235    const bool fAllowToShowActionRescale = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Rescale);
    32363236
    32373237    /* Clear contents: */
     
    32553255    }
    32563256
    3257     /* Multiscreen actions: */
    3258     if (fAllowToShowActionMultiscreen && (m_cHostScreens > 1 || m_cGuestScreens > 1))
     3257    /* Remap actions: */
     3258    if (fAllowToShowActionRemap && (m_cHostScreens > 1 || m_cGuestScreens > 1))
    32593259    {
    32603260        updateMenuViewMultiscreen(pMenu);
     
    32693269    }
    32703270
    3271     /* Scale factor actions: */
    3272     if (fAllowToShowActionScaleFactor)
     3271    /* Rescale actions: */
     3272    if (fAllowToShowActionRescale)
    32733273    {
    32743274        updateMenuViewScaleFactor(pMenu);
     
    37203720    }
    37213721
    3722     /* Do we have to show resize, multiscreen or scale factor actions? */
     3722    /* Do we have to show resize, remap or rescale actions? */
    37233723    const bool fAllowToShowActionResize = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Resize);
    3724     const bool fAllowToShowActionMultiscreen = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Multiscreen);
    3725     const bool fAllowToShowActionScaleFactor = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ScaleFactor);
    3726 
    3727     if (fAllowToShowActionResize || fAllowToShowActionMultiscreen || fAllowToShowActionScaleFactor)
     3724    const bool fAllowToShowActionRemap = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Remap);
     3725    const bool fAllowToShowActionRescale = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Rescale);
     3726    if (fAllowToShowActionResize || fAllowToShowActionRemap || fAllowToShowActionRescale)
    37283727    {
    37293728        for (int iGuestScreenIndex = 0; iGuestScreenIndex < m_cGuestScreens; ++iGuestScreenIndex)
     
    37653764    }
    37663765
    3767     /* Do we have to show resize menu? */
     3766    /* Do we have to show resize or rescale actions? */
    37683767    const bool fAllowToShowActionResize = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Resize);
    3769     const bool fAllowToShowActionScaleFactor = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ScaleFactor);
    3770     if (fAllowToShowActionResize || fAllowToShowActionScaleFactor)
     3768    const bool fAllowToShowActionRescale = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Rescale);
     3769    if (fAllowToShowActionResize || fAllowToShowActionRescale)
    37713770    {
    37723771        for (int iGuestScreenIndex = 0; iGuestScreenIndex < m_cGuestScreens; ++iGuestScreenIndex)
     
    37803779        }
    37813780    }
     3781
    37823782    /* Mark menu as valid: */
    37833783    m_invalidations.remove(UIActionIndexRT_M_ViewPopup);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp

    r75357 r75358  
    274274    UIMachineLogic::prepareActionGroups();
    275275
    276     /* Restrict 'Multiscreen' actions for 'View' menu: */
     276    /* Restrict 'Remap' actions for 'View' menu: */
    277277    actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic,
    278278                                                         (UIExtraDataMetaDefs::RuntimeMenuViewActionType)
    279                                                          (UIExtraDataMetaDefs::RuntimeMenuViewActionType_Multiscreen));
     279                                                         (UIExtraDataMetaDefs::RuntimeMenuViewActionType_Remap));
    280280}
    281281
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp

    r69500 r75358  
    9797    UIMachineLogic::prepareActionGroups();
    9898
    99     /* Restrict 'Adjust Window', 'Guest Autoresize', 'Status Bar' and 'Resize' actions for 'View' menu: */
     99    /* Restrict 'Adjust Window', 'Guest Autoresize', 'Status Bar', 'Resize' and 'Rescale' actions for 'View' menu: */
    100100    actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic,
    101101                                                         (UIExtraDataMetaDefs::RuntimeMenuViewActionType)
     
    105105                                                          UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBar |
    106106                                                          UIExtraDataMetaDefs::RuntimeMenuViewActionType_Resize |
    107                                                           UIExtraDataMetaDefs::RuntimeMenuViewActionType_ScaleFactor));
     107                                                          UIExtraDataMetaDefs::RuntimeMenuViewActionType_Rescale));
    108108
    109109    /* Take care of view-action toggle state: */
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuBarEditorWindow.cpp

    r75291 r75358  
    13131313                           UIExtraDataMetaDefs::RuntimeMenuViewActionType_Resize,
    13141314                           gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Resize));
    1315         prepareNamedAction(pMenu, tr("Virtual Screen Mapping"),
    1316                            UIExtraDataMetaDefs::RuntimeMenuViewActionType_Multiscreen,
    1317                            gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Multiscreen));
     1315        prepareNamedAction(pMenu, tr("Virtual Screen Remap"),
     1316                           UIExtraDataMetaDefs::RuntimeMenuViewActionType_Remap,
     1317                           gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Remap));
     1318        prepareNamedAction(pMenu, tr("Virtual Screen Rescale"),
     1319                           UIExtraDataMetaDefs::RuntimeMenuViewActionType_Rescale,
     1320                           gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Rescale));
    13181321    }
    13191322}
Note: See TracChangeset for help on using the changeset viewer.

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