- Timestamp:
- Jun 27, 2013 2:35:17 PM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineMenuBar.cpp
r46795 r46847 102 102 /* On the Mac we add some items only the first time, cause otherwise they 103 103 * will be merged more than once to the application menu by Qt. */ 104 : m_fIsFirstTime(true) 105 , m_machine(machine) 104 : m_machine(machine) 106 105 { 107 106 } … … 283 282 pMenu->addAction(gActionPool->action(UIActionIndex_Simple_ResetWarnings)); 284 283 pMenu->addSeparator(); 285 286 284 pMenu->addAction(gActionPool->action(UIActionIndex_Simple_NetworkAccessManager)); 287 288 285 #ifndef Q_WS_MAC 289 286 pMenu->addSeparator(); 290 287 #endif /* !Q_WS_MAC */ 291 #if defined(Q_WS_MAC) && (QT_VERSION < 0x040700) 292 if (m_fIsFirstTime) 293 # endif 294 pMenu->addAction(gActionPool->action(UIActionIndex_Simple_About)); 295 296 #if defined(Q_WS_MAC) && (QT_VERSION < 0x040700) 297 /* Because this connections are done to VBoxGlobal, they are needed once only. 298 * Otherwise we will get the slots called more than once. */ 299 if (m_fIsFirstTime) 300 { 301 #endif 302 VBoxGlobal::connect(gActionPool->action(UIActionIndex_Simple_About), SIGNAL(triggered()), 303 &msgCenter(), SLOT(sltShowHelpAboutDialog())); 304 #if defined(Q_WS_MAC) && (QT_VERSION < 0x040700) 305 } 306 #endif 307 288 pMenu->addAction(gActionPool->action(UIActionIndex_Simple_About)); 289 290 /* Prepare connections: */ 308 291 VBoxGlobal::connect(gActionPool->action(UIActionIndex_Simple_Contents), SIGNAL(triggered()), 309 292 &msgCenter(), SLOT(sltShowHelpHelpDialog())); … … 314 297 VBoxGlobal::connect(gActionPool->action(UIActionIndex_Simple_NetworkAccessManager), SIGNAL(triggered()), 315 298 gNetworkManager, SLOT(show())); 316 317 m_fIsFirstTime = false;299 VBoxGlobal::connect(gActionPool->action(UIActionIndex_Simple_About), SIGNAL(triggered()), 300 &msgCenter(), SLOT(sltShowHelpAboutDialog())); 318 301 } 319 302 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineMenuBar.h
r46795 r46847 54 54 void prepareMenuHelp(QMenu *pMenu); 55 55 56 bool m_fIsFirstTime;57 56 CMachine m_machine; 58 57 };
Note:
See TracChangeset
for help on using the changeset viewer.