VirtualBox

Changeset 54459 in vbox


Ignore:
Timestamp:
Feb 24, 2015 4:48:57 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 7462: No 'Show Menu Bar' action for Mac OS X.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp

    r54348 r54459  
    586586        case UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar:              strResult = "MenuBar"; break;
    587587        case UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBarSettings:      strResult = "MenuBarSettings"; break;
     588#ifndef Q_WS_MAC
    588589        case UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleMenuBar:        strResult = "ToggleMenuBar"; break;
     590#endif /* !Q_WS_MAC */
    589591        case UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBar:            strResult = "StatusBar"; break;
    590592        case UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBarSettings:    strResult = "StatusBarSettings"; break;
     
    621623    keys << "MenuBar";              values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar;
    622624    keys << "MenuBarSettings";      values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBarSettings;
     625#ifndef Q_WS_MAC
    623626    keys << "ToggleMenuBar";        values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleMenuBar;
     627#endif /* !Q_WS_MAC */
    624628    keys << "StatusBar";            values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBar;
    625629    keys << "StatusBarSettings";    values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBarSettings;
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp

    r54272 r54459  
    8888const char* UIExtraDataDefs::GUI_LastScaleWindowPosition = "GUI/LastScaleWindowPosition";
    8989const char* UIExtraDataDefs::GUI_Geometry_State_Max = "max";
     90#ifndef Q_WS_MAC
    9091const char* UIExtraDataDefs::GUI_MenuBar_Enabled = "GUI/MenuBar/Enabled";
     92#endif /* !Q_WS_MAC */
    9193const char* UIExtraDataDefs::GUI_RestrictedRuntimeMenus = "GUI/RestrictedRuntimeMenus";
    9294#ifdef Q_WS_MAC
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h

    r54348 r54459  
    148148        /** Holds machine-window geometry maximized state flag. */
    149149        extern const char* GUI_Geometry_State_Max;
     150#ifndef Q_WS_MAC
    150151        /** Holds Runtime UI menu-bar availability status. */
    151152        extern const char* GUI_MenuBar_Enabled;
     153#endif /* !Q_WS_MAC */
    152154        /** Holds restricted Runtime UI menu types. */
    153155        extern const char* GUI_RestrictedRuntimeMenus;
     
    394396        RuntimeMenuViewActionType_MenuBar              = RT_BIT(10),
    395397        RuntimeMenuViewActionType_MenuBarSettings      = RT_BIT(11),
     398#ifndef RT_OS_DARWIN
    396399        RuntimeMenuViewActionType_ToggleMenuBar        = RT_BIT(12),
     400#endif /* !RT_OS_DARWIN */
    397401        RuntimeMenuViewActionType_StatusBar            = RT_BIT(13),
    398402        RuntimeMenuViewActionType_StatusBarSettings    = RT_BIT(14),
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r54272 r54459  
    25112511}
    25122512
     2513#ifndef Q_WS_MAC
    25132514bool UIExtraDataManager::menuBarEnabled(const QString &strID)
    25142515{
     
    25222523    setExtraDataString(GUI_MenuBar_Enabled, toFeatureRestricted(!fEnabled), strID);
    25232524}
     2525#endif /* !Q_WS_MAC */
    25242526
    25252527UIExtraDataMetaDefs::MenuType UIExtraDataManager::restrictedRuntimeMenuTypes(const QString &strID)
     
    36263628
    36273629        /* Menu-bar configuration change: */
    3628         if (strKey == GUI_MenuBar_Enabled ||
     3630        if (
     3631#ifndef Q_WS_MAC
     3632            strKey == GUI_MenuBar_Enabled ||
     3633#endif /* !Q_WS_MAC */
    36293634            strKey == GUI_RestrictedRuntimeMenus ||
    36303635#ifdef Q_WS_MAC
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h

    r54272 r54459  
    300300        void setMachineWindowGeometry(UIVisualStateType visualStateType, ulong uScreenIndex, const QRect &geometry, bool fMaximized, const QString &strID);
    301301
     302#ifndef Q_WS_MAC
    302303        /** Returns whether Runtime UI menu-bar is enabled. */
    303304        bool menuBarEnabled(const QString &strID);
    304305        /** Defines whether Runtime UI menu-bar is @a fEnabled. */
    305306        void setMenuBarEnabled(bool fEnabled, const QString &strID);
     307#endif /* !Q_WS_MAC */
    306308
    307309        /** Returns restricted Runtime UI menu types. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp

    r54349 r54459  
    816816};
    817817
     818#ifndef RT_OS_DARWIN
    818819class UIActionToggleMenuBar : public UIActionToggle
    819820{
     
    846847    }
    847848};
     849#endif /* !RT_OS_DARWIN */
    848850
    849851class UIActionMenuStatusBar : public UIActionMenu
     
    20802082    m_pool[UIActionIndexRT_M_View_M_MenuBar] = new UIActionMenuMenuBar(this);
    20812083    m_pool[UIActionIndexRT_M_View_M_MenuBar_S_Settings] = new UIActionSimpleShowMenuBarSettingsWindow(this);
     2084#ifndef RT_OS_DARWIN
    20822085    m_pool[UIActionIndexRT_M_View_M_MenuBar_T_Visibility] = new UIActionToggleMenuBar(this);
     2086#endif /* !RT_OS_DARWIN */
    20832087    m_pool[UIActionIndexRT_M_View_M_StatusBar] = new UIActionMenuStatusBar(this);
    20842088    m_pool[UIActionIndexRT_M_View_M_StatusBar_S_Settings] = new UIActionSimpleShowStatusBarSettingsWindow(this);
     
    25652569    /* 'Menu Bar Settings' action: */
    25662570    addAction(pMenu, action(UIActionIndexRT_M_View_M_MenuBar_S_Settings));
     2571#ifndef Q_WS_MAC
    25672572    /* 'Toggle Menu Bar' action: */
    25682573    addAction(pMenu, action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility));
     2574#endif /* !Q_WS_MAC */
    25692575
    25702576    /* Mark menu as valid: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h

    r54348 r54459  
    6868    UIActionIndexRT_M_View_M_MenuBar,
    6969    UIActionIndexRT_M_View_M_MenuBar_S_Settings,
     70#ifndef RT_OS_DARWIN
    7071    UIActionIndexRT_M_View_M_MenuBar_T_Visibility,
     72#endif /* !RT_OS_DARWIN */
    7173    UIActionIndexRT_M_View_M_StatusBar,
    7274    UIActionIndexRT_M_View_M_StatusBar_S_Settings,
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r54349 r54459  
    935935    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar));
    936936    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings));
     937#ifndef Q_WS_MAC
    937938    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility));
     939#endif /* !Q_WS_MAC */
    938940    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar));
    939941    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings));
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r54349 r54459  
    13431343        pGuestAutoresizeSwitch->setChecked(gEDataManager->guestScreenAutoResizeEnabled(strMachineID));
    13441344
     1345#ifndef Q_WS_MAC
    13451346        /* Menu-bar options: */
    13461347        {
     
    13551356            pActionMenuBarSwitch->blockSignals(false);
    13561357        }
     1358#endif /* !Q_WS_MAC */
    13571359
    13581360        /* Status-bar options: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp

    r54160 r54459  
    113113    AssertReturnVoid(isMachineWindowsCreated());
    114114
     115#ifndef Q_WS_MAC
    115116    /* Make sure menu-bar is enabled: */
    116117    const bool fEnabled = actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility)->isChecked();
    117118    AssertReturnVoid(fEnabled);
     119#endif /* !Q_WS_MAC */
    118120
    119121    /* Prevent user from opening another one editor or toggle menu-bar: */
    120122    actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings)->setEnabled(false);
     123#ifndef Q_WS_MAC
    121124    actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility)->setEnabled(false);
     125#endif /* !Q_WS_MAC */
    122126    /* Create menu-bar editor: */
    123127    UIMenuBarEditorWindow *pMenuBarEditor = new UIMenuBarEditorWindow(activeMachineWindow(), actionPool());
     
    138142void UIMachineLogicNormal::sltMenuBarSettingsClosed()
    139143{
     144#ifndef Q_WS_MAC
    140145    /* Make sure menu-bar is enabled: */
    141146    const bool fEnabled = actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility)->isChecked();
    142147    AssertReturnVoid(fEnabled);
     148#endif /* !Q_WS_MAC */
    143149
    144150    /* Allow user to open editor and toggle menu-bar again: */
    145151    actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings)->setEnabled(true);
     152#ifndef Q_WS_MAC
    146153    actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility)->setEnabled(true);
    147 }
    148 
     154#endif /* !Q_WS_MAC */
     155}
     156
     157#ifndef RT_OS_DARWIN
    149158void UIMachineLogicNormal::sltToggleMenuBar()
    150159{
     
    156165    gEDataManager->setMenuBarEnabled(!fEnabled, vboxGlobal().managedVMUuid());
    157166}
     167#endif /* !RT_OS_DARWIN */
    158168
    159169void UIMachineLogicNormal::sltOpenStatusBarSettings()
     
    247257    connect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings), SIGNAL(triggered(bool)),
    248258            this, SLOT(sltOpenMenuBarSettings()));
     259#ifndef Q_WS_MAC
    249260    connect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility), SIGNAL(triggered(bool)),
    250261            this, SLOT(sltToggleMenuBar()));
     262#endif /* !Q_WS_MAC */
    251263    connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),
    252264            this, SLOT(sltOpenStatusBarSettings()));
     
    338350    disconnect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings), SIGNAL(triggered(bool)),
    339351               this, SLOT(sltOpenMenuBarSettings()));
     352#ifndef Q_WS_MAC
    340353    disconnect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility), SIGNAL(triggered(bool)),
    341354               this, SLOT(sltToggleMenuBar()));
     355#endif /* !Q_WS_MAC */
    342356    disconnect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),
    343357               this, SLOT(sltOpenStatusBarSettings()));
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h

    r52694 r54459  
    5151    /** Handles menu-bar editor closing.*/
    5252    void sltMenuBarSettingsClosed();
     53#ifndef RT_OS_DARWIN
    5354    /** Toggles menu-bar presence.*/
    5455    void sltToggleMenuBar();
     56#endif /* !RT_OS_DARWIN */
    5557
    5658    /** Opens status-bar editor.*/
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