Changeset 52472 in vbox
- Timestamp:
- Aug 22, 2014 12:45:51 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 95687
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r52459 r52472 663 663 } 664 664 665 #ifdef RT_OS_DARWIN 666 void UISession::sltHandleMenuBarConfigurationChange() 667 { 668 /* Update Mac OS X menu-bar: */ 669 updateMenu(); 670 } 671 #endif /* RT_OS_DARWIN */ 672 665 673 void UISession::sltMousePointerShapeChange(bool fVisible, bool fAlpha, QPoint hotCorner, QSize size, QVector<uint8_t> shape) 666 674 { … … 1070 1078 AssertPtrReturnVoid(m_pMenuBar); 1071 1079 { 1072 /* Prepare menu-bar: */ 1073 foreach (QMenu *pMenu, actionPool()->menus()) 1074 m_pMenuBar->addMenu(pMenu); 1080 /* Configure Mac OS X menu-bar: */ 1081 connect(gEDataManager, SIGNAL(sigMenuBarConfigurationChange()), 1082 this, SLOT(sltHandleMenuBarConfigurationChange())); 1083 /* Update Mac OS X menu-bar: */ 1084 updateMenu(); 1075 1085 } 1076 1086 #endif /* Q_WS_MAC */ … … 1263 1273 UIActionPool::destroy(m_pActionPool); 1264 1274 } 1275 1276 #ifdef Q_WS_MAC 1277 void UISession::updateMenu() 1278 { 1279 /* Rebuild Mac OS X menu-bar: */ 1280 m_pMenuBar->clear(); 1281 foreach (QMenu *pMenu, actionPool()->menus()) 1282 m_pMenuBar->addMenu(pMenu); 1283 } 1284 #endif /* Q_WS_MAC */ 1265 1285 1266 1286 WId UISession::winId() const -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r52275 r52472 279 279 void sltCloseRuntimeUI(); 280 280 281 #ifdef RT_OS_DARWIN 282 /** Mac OS X: Handles menu-bar configuration-change. */ 283 void sltHandleMenuBarConfigurationChange(); 284 #endif /* RT_OS_DARWIN */ 285 281 286 /* Console events slots */ 282 287 void sltMousePointerShapeChange(bool fVisible, bool fAlpha, QPoint hotCorner, QSize size, QVector<uint8_t> shape); … … 322 327 void cleanupConnections(); 323 328 void cleanupActions(); 329 330 #ifdef Q_WS_MAC 331 /** Mac OS X: Updates menu-bar content. */ 332 void updateMenu(); 333 #endif /* Q_WS_MAC */ 324 334 325 335 /* Common helpers: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r52471 r52472 115 115 } 116 116 117 #ifndef RT_OS_DARWIN 117 118 void UIMachineWindowNormal::sltHandleMenuBarConfigurationChange() 118 119 { … … 120 121 updateMenu(); 121 122 } 123 #endif /* !RT_OS_DARWIN */ 122 124 123 125 void UIMachineWindowNormal::sltHandleStatusBarConfigurationChange() … … 508 510 } 509 511 512 #ifndef Q_WS_MAC 510 513 void UIMachineWindowNormal::updateMenu() 511 514 { … … 515 518 menuBar()->addMenu(pMenu); 516 519 } 520 #endif /* !Q_WS_MAC */ 517 521 518 522 bool UIMachineWindowNormal::isMaximizedChecked() -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h
r52471 r52472 59 59 void sltCPUExecutionCapChange(); 60 60 61 #ifndef RT_OS_DARWIN 61 62 /** Handles menu-bar configuration-change. */ 62 63 void sltHandleMenuBarConfigurationChange(); 64 #endif /* !RT_OS_DARWIN */ 63 65 64 66 /** Handles status-bar configuration-change. */ … … 98 100 void updateAppearanceOf(int aElement); 99 101 102 #ifndef Q_WS_MAC 100 103 /** Updates menu-bar content. */ 101 104 void updateMenu(); 105 #endif /* !Q_WS_MAC */ 102 106 103 107 /* Event handler: */
Note:
See TracChangeset
for help on using the changeset viewer.