Changeset 44954 in vbox
- Timestamp:
- Mar 7, 2013 1:34:21 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 84164
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r44865 r44954 25 25 #include <QPainter> 26 26 #include <QTimer> 27 #ifdef Q_WS_MAC 28 # include <QMenuBar> 29 #endif /* Q_WS_MAC */ 27 30 28 31 /* GUI includes: */ … … 173 176 174 177 #ifdef Q_WS_MAC 178 /* Prepare menu-bar: */ 179 prepareMenuBar(); 175 180 /* Prepare dock: */ 176 181 prepareDock(); … … 204 209 /* Cleanup dock: */ 205 210 cleanupDock(); 211 /* Cleanup menu-bar: */ 212 cleanupMenuBar(); 206 213 #endif /* Q_WS_MAC */ 207 214 … … 467 474 #endif /* VBOX_WITH_DEBUGGER_GUI */ 468 475 #ifdef Q_WS_MAC 476 , m_pMenuBar(0) 469 477 , m_fIsDockIconEnabled(true) 470 478 , m_pDockIconPreview(0) … … 721 729 722 730 #ifdef Q_WS_MAC 731 void UIMachineLogic::prepareMenuBar() 732 { 733 m_pMenuBar = uisession()->newMenuBar(); 734 } 735 723 736 void UIMachineLogic::prepareDock() 724 737 { … … 833 846 m_pDockIconPreview = 0; 834 847 } 848 } 849 850 void UIMachineLogic::cleanupMenuBar() 851 { 852 delete m_pMenuBar; 853 m_pMenuBar = 0; 835 854 } 836 855 #endif /* Q_WS_MAC */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r44865 r44954 44 44 class CUSBDevice; 45 45 class CVirtualBoxErrorInfo; 46 #ifdef Q_WS_MAC 47 class QMenuBar; 48 #endif /* Q_WS_MAC */ 46 49 47 50 /* Machine logic interface: */ … … 130 133 virtual void prepareMachineWindows() = 0; 131 134 #ifdef Q_WS_MAC 135 virtual void prepareMenuBar(); 132 136 virtual void prepareDock(); 133 137 #endif /* Q_WS_MAC */ … … 142 146 #ifdef Q_WS_MAC 143 147 virtual void cleanupDock(); 148 virtual void cleanupMenuBar(); 144 149 #endif /* Q_WS_MAC */ 145 150 virtual void cleanupMachineWindows() = 0; … … 235 240 236 241 #ifdef Q_WS_MAC 242 QMenuBar *m_pMenuBar; 237 243 bool m_fIsDockIconEnabled; 238 244 UIDockIconPreview *m_pDockIconPreview; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r44859 r44954 70 70 71 71 /* Prepare menu: */ 72 #ifdef Q_WS_MAC73 setMenuBar(uisession()->newMenuBar());74 #endif /* Q_WS_MAC */75 72 m_pMainMenu = uisession()->newMenu(); 76 73 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r44561 r44954 198 198 UIMachineWindow::prepareMenu(); 199 199 200 #ifndef Q_WS_MAC 200 201 /* Prepare menu-bar: */ 201 202 setMenuBar(uisession()->newMenuBar()); 203 #endif /* !Q_WS_MAC */ 202 204 } 203 205 … … 425 427 { 426 428 VBoxGlobalSettings settings = vboxGlobal().settings(); 429 #ifndef Q_WS_MAC 427 430 menuBar()->setHidden(settings.isFeatureActive("noMenuBar")); 431 #endif /* !Q_WS_MAC */ 428 432 statusBar()->setHidden(settings.isFeatureActive("noStatusBar")); 429 433 if (statusBar()->isHidden()) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp
r41689 r44954 78 78 UIMachineWindow::prepareMenu(); 79 79 80 #ifdef Q_WS_MAC 81 setMenuBar(uisession()->newMenuBar()); 82 #endif /* Q_WS_MAC */ 80 /* Prepare menu: */ 83 81 m_pMainMenu = uisession()->newMenu(); 84 82 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r44909 r44954 87 87 88 88 /* Prepare menu: */ 89 #ifdef Q_WS_MAC90 setMenuBar(uisession()->newMenuBar());91 #endif /* Q_WS_MAC */92 89 m_pMainMenu = uisession()->newMenu(); 93 90 } … … 155 152 } 156 153 #endif /* !Q_WS_MAC */ 157 158 #ifdef Q_WS_MAC159 void UIMachineWindowSeamless::loadSettings()160 {161 /* Call to base-class: */162 UIMachineWindow::loadSettings();163 164 /* Load global settings: */165 {166 VBoxGlobalSettings settings = vboxGlobal().settings();167 menuBar()->setHidden(settings.isFeatureActive("noMenuBar"));168 }169 }170 #endif /* Q_WS_MAC */171 154 172 155 #ifndef Q_WS_MAC -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
r44859 r44954 64 64 void prepareMiniToolbar(); 65 65 #endif /* !Q_WS_MAC */ 66 #ifdef Q_WS_MAC67 void loadSettings();68 #endif /* Q_WS_MAC */69 66 70 67 /* Cleanup helpers: */ 71 #ifdef Q_WS_MAC72 //void saveSettings() {}73 #endif /* Q_WS_MAC */74 68 #ifndef Q_WS_MAC 75 69 void cleanupMiniToolbar();
Note:
See TracChangeset
for help on using the changeset viewer.