Changeset 54459 in vbox
- Timestamp:
- Feb 24, 2015 4:48:57 PM (10 years ago)
- 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 586 586 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar: strResult = "MenuBar"; break; 587 587 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBarSettings: strResult = "MenuBarSettings"; break; 588 #ifndef Q_WS_MAC 588 589 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleMenuBar: strResult = "ToggleMenuBar"; break; 590 #endif /* !Q_WS_MAC */ 589 591 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBar: strResult = "StatusBar"; break; 590 592 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBarSettings: strResult = "StatusBarSettings"; break; … … 621 623 keys << "MenuBar"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar; 622 624 keys << "MenuBarSettings"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBarSettings; 625 #ifndef Q_WS_MAC 623 626 keys << "ToggleMenuBar"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleMenuBar; 627 #endif /* !Q_WS_MAC */ 624 628 keys << "StatusBar"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBar; 625 629 keys << "StatusBarSettings"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBarSettings; -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
r54272 r54459 88 88 const char* UIExtraDataDefs::GUI_LastScaleWindowPosition = "GUI/LastScaleWindowPosition"; 89 89 const char* UIExtraDataDefs::GUI_Geometry_State_Max = "max"; 90 #ifndef Q_WS_MAC 90 91 const char* UIExtraDataDefs::GUI_MenuBar_Enabled = "GUI/MenuBar/Enabled"; 92 #endif /* !Q_WS_MAC */ 91 93 const char* UIExtraDataDefs::GUI_RestrictedRuntimeMenus = "GUI/RestrictedRuntimeMenus"; 92 94 #ifdef Q_WS_MAC -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r54348 r54459 148 148 /** Holds machine-window geometry maximized state flag. */ 149 149 extern const char* GUI_Geometry_State_Max; 150 #ifndef Q_WS_MAC 150 151 /** Holds Runtime UI menu-bar availability status. */ 151 152 extern const char* GUI_MenuBar_Enabled; 153 #endif /* !Q_WS_MAC */ 152 154 /** Holds restricted Runtime UI menu types. */ 153 155 extern const char* GUI_RestrictedRuntimeMenus; … … 394 396 RuntimeMenuViewActionType_MenuBar = RT_BIT(10), 395 397 RuntimeMenuViewActionType_MenuBarSettings = RT_BIT(11), 398 #ifndef RT_OS_DARWIN 396 399 RuntimeMenuViewActionType_ToggleMenuBar = RT_BIT(12), 400 #endif /* !RT_OS_DARWIN */ 397 401 RuntimeMenuViewActionType_StatusBar = RT_BIT(13), 398 402 RuntimeMenuViewActionType_StatusBarSettings = RT_BIT(14), -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r54272 r54459 2511 2511 } 2512 2512 2513 #ifndef Q_WS_MAC 2513 2514 bool UIExtraDataManager::menuBarEnabled(const QString &strID) 2514 2515 { … … 2522 2523 setExtraDataString(GUI_MenuBar_Enabled, toFeatureRestricted(!fEnabled), strID); 2523 2524 } 2525 #endif /* !Q_WS_MAC */ 2524 2526 2525 2527 UIExtraDataMetaDefs::MenuType UIExtraDataManager::restrictedRuntimeMenuTypes(const QString &strID) … … 3626 3628 3627 3629 /* 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 */ 3629 3634 strKey == GUI_RestrictedRuntimeMenus || 3630 3635 #ifdef Q_WS_MAC -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r54272 r54459 300 300 void setMachineWindowGeometry(UIVisualStateType visualStateType, ulong uScreenIndex, const QRect &geometry, bool fMaximized, const QString &strID); 301 301 302 #ifndef Q_WS_MAC 302 303 /** Returns whether Runtime UI menu-bar is enabled. */ 303 304 bool menuBarEnabled(const QString &strID); 304 305 /** Defines whether Runtime UI menu-bar is @a fEnabled. */ 305 306 void setMenuBarEnabled(bool fEnabled, const QString &strID); 307 #endif /* !Q_WS_MAC */ 306 308 307 309 /** Returns restricted Runtime UI menu types. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp
r54349 r54459 816 816 }; 817 817 818 #ifndef RT_OS_DARWIN 818 819 class UIActionToggleMenuBar : public UIActionToggle 819 820 { … … 846 847 } 847 848 }; 849 #endif /* !RT_OS_DARWIN */ 848 850 849 851 class UIActionMenuStatusBar : public UIActionMenu … … 2080 2082 m_pool[UIActionIndexRT_M_View_M_MenuBar] = new UIActionMenuMenuBar(this); 2081 2083 m_pool[UIActionIndexRT_M_View_M_MenuBar_S_Settings] = new UIActionSimpleShowMenuBarSettingsWindow(this); 2084 #ifndef RT_OS_DARWIN 2082 2085 m_pool[UIActionIndexRT_M_View_M_MenuBar_T_Visibility] = new UIActionToggleMenuBar(this); 2086 #endif /* !RT_OS_DARWIN */ 2083 2087 m_pool[UIActionIndexRT_M_View_M_StatusBar] = new UIActionMenuStatusBar(this); 2084 2088 m_pool[UIActionIndexRT_M_View_M_StatusBar_S_Settings] = new UIActionSimpleShowStatusBarSettingsWindow(this); … … 2565 2569 /* 'Menu Bar Settings' action: */ 2566 2570 addAction(pMenu, action(UIActionIndexRT_M_View_M_MenuBar_S_Settings)); 2571 #ifndef Q_WS_MAC 2567 2572 /* 'Toggle Menu Bar' action: */ 2568 2573 addAction(pMenu, action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility)); 2574 #endif /* !Q_WS_MAC */ 2569 2575 2570 2576 /* Mark menu as valid: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h
r54348 r54459 68 68 UIActionIndexRT_M_View_M_MenuBar, 69 69 UIActionIndexRT_M_View_M_MenuBar_S_Settings, 70 #ifndef RT_OS_DARWIN 70 71 UIActionIndexRT_M_View_M_MenuBar_T_Visibility, 72 #endif /* !RT_OS_DARWIN */ 71 73 UIActionIndexRT_M_View_M_StatusBar, 72 74 UIActionIndexRT_M_View_M_StatusBar_S_Settings, -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r54349 r54459 935 935 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar)); 936 936 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings)); 937 #ifndef Q_WS_MAC 937 938 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility)); 939 #endif /* !Q_WS_MAC */ 938 940 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar)); 939 941 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r54349 r54459 1343 1343 pGuestAutoresizeSwitch->setChecked(gEDataManager->guestScreenAutoResizeEnabled(strMachineID)); 1344 1344 1345 #ifndef Q_WS_MAC 1345 1346 /* Menu-bar options: */ 1346 1347 { … … 1355 1356 pActionMenuBarSwitch->blockSignals(false); 1356 1357 } 1358 #endif /* !Q_WS_MAC */ 1357 1359 1358 1360 /* Status-bar options: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
r54160 r54459 113 113 AssertReturnVoid(isMachineWindowsCreated()); 114 114 115 #ifndef Q_WS_MAC 115 116 /* Make sure menu-bar is enabled: */ 116 117 const bool fEnabled = actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility)->isChecked(); 117 118 AssertReturnVoid(fEnabled); 119 #endif /* !Q_WS_MAC */ 118 120 119 121 /* Prevent user from opening another one editor or toggle menu-bar: */ 120 122 actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings)->setEnabled(false); 123 #ifndef Q_WS_MAC 121 124 actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility)->setEnabled(false); 125 #endif /* !Q_WS_MAC */ 122 126 /* Create menu-bar editor: */ 123 127 UIMenuBarEditorWindow *pMenuBarEditor = new UIMenuBarEditorWindow(activeMachineWindow(), actionPool()); … … 138 142 void UIMachineLogicNormal::sltMenuBarSettingsClosed() 139 143 { 144 #ifndef Q_WS_MAC 140 145 /* Make sure menu-bar is enabled: */ 141 146 const bool fEnabled = actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility)->isChecked(); 142 147 AssertReturnVoid(fEnabled); 148 #endif /* !Q_WS_MAC */ 143 149 144 150 /* Allow user to open editor and toggle menu-bar again: */ 145 151 actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings)->setEnabled(true); 152 #ifndef Q_WS_MAC 146 153 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 149 158 void UIMachineLogicNormal::sltToggleMenuBar() 150 159 { … … 156 165 gEDataManager->setMenuBarEnabled(!fEnabled, vboxGlobal().managedVMUuid()); 157 166 } 167 #endif /* !RT_OS_DARWIN */ 158 168 159 169 void UIMachineLogicNormal::sltOpenStatusBarSettings() … … 247 257 connect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings), SIGNAL(triggered(bool)), 248 258 this, SLOT(sltOpenMenuBarSettings())); 259 #ifndef Q_WS_MAC 249 260 connect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility), SIGNAL(triggered(bool)), 250 261 this, SLOT(sltToggleMenuBar())); 262 #endif /* !Q_WS_MAC */ 251 263 connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)), 252 264 this, SLOT(sltOpenStatusBarSettings())); … … 338 350 disconnect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings), SIGNAL(triggered(bool)), 339 351 this, SLOT(sltOpenMenuBarSettings())); 352 #ifndef Q_WS_MAC 340 353 disconnect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility), SIGNAL(triggered(bool)), 341 354 this, SLOT(sltToggleMenuBar())); 355 #endif /* !Q_WS_MAC */ 342 356 disconnect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)), 343 357 this, SLOT(sltOpenStatusBarSettings())); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h
r52694 r54459 51 51 /** Handles menu-bar editor closing.*/ 52 52 void sltMenuBarSettingsClosed(); 53 #ifndef RT_OS_DARWIN 53 54 /** Toggles menu-bar presence.*/ 54 55 void sltToggleMenuBar(); 56 #endif /* !RT_OS_DARWIN */ 55 57 56 58 /** Opens status-bar editor.*/
Note:
See TracChangeset
for help on using the changeset viewer.