Changeset 26919 in vbox for trunk/src/VBox
- Timestamp:
- Mar 1, 2010 3:07:03 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.cpp
r26820 r26919 966 966 967 967 /* "Machine" menu actions: */ 968 m_actionsPool[UIActionIndex_Menu_Machine] = new MenuMachineAction(this);969 968 m_actionsPool[UIActionIndex_Toggle_Fullscreen] = new ToggleFullscreenModeAction(this); 970 969 m_actionsPool[UIActionIndex_Toggle_Seamless] = new ToggleSeamlessModeAction(this); 971 970 m_actionsPool[UIActionIndex_Toggle_GuestAutoresize] = new ToggleGuestAutoresizeAction(this); 972 971 m_actionsPool[UIActionIndex_Simple_AdjustWindow] = new PerformWindowAdjustAction(this); 973 m_actionsPool[UIActionIndex_Menu_MouseIntegration] = new MenuMouseIntegrationAction(this);974 972 m_actionsPool[UIActionIndex_Toggle_MouseIntegration] = new ToggleMouseIntegrationAction(this); 975 973 m_actionsPool[UIActionIndex_Simple_TypeCAD] = new PerformTypeCADAction(this); … … 985 983 986 984 /* "Devices" menu actions: */ 987 m_actionsPool[UIActionIndex_Menu_Devices] = new MenuDevicesAction(this);988 m_actionsPool[UIActionIndex_Menu_OpticalDevices] = new MenuOpticalDevicesAction(this);989 m_actionsPool[UIActionIndex_Menu_FloppyDevices] = new MenuFloppyDevicesAction(this);990 m_actionsPool[UIActionIndex_Menu_USBDevices] = new MenuUSBDevicesAction(this);991 m_actionsPool[UIActionIndex_Menu_NetworkAdapters] = new MenuNetworkAdaptersAction(this);992 985 m_actionsPool[UIActionIndex_Simple_NetworkAdaptersDialog] = new ShowNetworkAdaptersDialogAction(this); 993 m_actionsPool[UIActionIndex_Menu_SharedFolders] = new MenuSharedFoldersAction(this);994 986 m_actionsPool[UIActionIndex_Simple_SharedFoldersDialog] = new ShowSharedFoldersDialogAction(this); 995 987 m_actionsPool[UIActionIndex_Toggle_VRDP] = new ToggleVRDPAction(this); … … 998 990 #ifdef VBOX_WITH_DEBUGGER_GUI 999 991 /* "Debugger" menu actions: */ 1000 m_actionsPool[UIActionIndex_Menu_Debug] = new MenuDebugAction(this);1001 992 m_actionsPool[UIActionIndex_Simple_Statistics] = new ShowStatisticsAction(this); 1002 993 m_actionsPool[UIActionIndex_Simple_CommandLine] = new ShowCommandLineAction(this); … … 1005 996 1006 997 /* "Help" menu actions: */ 1007 m_actionsPool[UIActionIndex_Menu_Help] = new MenuHelpAction(this);1008 998 m_actionsPool[UIActionIndex_Simple_Help] = new ShowHelpAction(this); 1009 999 m_actionsPool[UIActionIndex_Simple_Web] = new ShowWebAction(this); … … 1013 1003 m_actionsPool[UIActionIndex_Simple_About] = new ShowAboutAction(this); 1014 1004 1005 /* Create all menus */ 1006 createMenus(); 1007 1015 1008 /* Test all actions were initialized */ 1016 1009 for (int i = 0; i < m_actionsPool.size(); ++i) … … 1029 1022 { 1030 1023 return m_actionsPool.at(index); 1024 } 1025 1026 void UIActionsPool::createMenus() 1027 { 1028 /* On Mac OS X, all QMenu's are consumed by Qt after they are added to 1029 * another QMenu or a QMenuBar. This means we have to recreate all QMenus 1030 * when creating a new QMenuBar. For simplicity we doing this on all 1031 * platforms right now. */ 1032 if (m_actionsPool[UIActionIndex_Menu_Machine]) 1033 delete m_actionsPool[UIActionIndex_Menu_Machine]; 1034 m_actionsPool[UIActionIndex_Menu_Machine] = new MenuMachineAction(this); 1035 if (m_actionsPool[UIActionIndex_Menu_MouseIntegration]) 1036 delete m_actionsPool[UIActionIndex_Menu_MouseIntegration]; 1037 m_actionsPool[UIActionIndex_Menu_MouseIntegration] = new MenuMouseIntegrationAction(this); 1038 1039 if (m_actionsPool[UIActionIndex_Menu_Devices]) 1040 delete m_actionsPool[UIActionIndex_Menu_Devices]; 1041 m_actionsPool[UIActionIndex_Menu_Devices] = new MenuDevicesAction(this); 1042 if (m_actionsPool[UIActionIndex_Menu_OpticalDevices]) 1043 delete m_actionsPool[UIActionIndex_Menu_OpticalDevices]; 1044 m_actionsPool[UIActionIndex_Menu_OpticalDevices] = new MenuOpticalDevicesAction(this); 1045 if (m_actionsPool[UIActionIndex_Menu_FloppyDevices]) 1046 delete m_actionsPool[UIActionIndex_Menu_FloppyDevices]; 1047 m_actionsPool[UIActionIndex_Menu_FloppyDevices] = new MenuFloppyDevicesAction(this); 1048 if (m_actionsPool[UIActionIndex_Menu_USBDevices]) 1049 delete m_actionsPool[UIActionIndex_Menu_USBDevices]; 1050 m_actionsPool[UIActionIndex_Menu_USBDevices] = new MenuUSBDevicesAction(this); 1051 if (m_actionsPool[UIActionIndex_Menu_NetworkAdapters]) 1052 delete m_actionsPool[UIActionIndex_Menu_NetworkAdapters]; 1053 m_actionsPool[UIActionIndex_Menu_NetworkAdapters] = new MenuNetworkAdaptersAction(this); 1054 1055 if (m_actionsPool[UIActionIndex_Menu_SharedFolders]) 1056 delete m_actionsPool[UIActionIndex_Menu_SharedFolders]; 1057 m_actionsPool[UIActionIndex_Menu_SharedFolders] = new MenuSharedFoldersAction(this); 1058 1059 if (m_actionsPool[UIActionIndex_Menu_Debug]) 1060 delete m_actionsPool[UIActionIndex_Menu_Debug]; 1061 m_actionsPool[UIActionIndex_Menu_Debug] = new MenuDebugAction(this); 1062 1063 if (m_actionsPool[UIActionIndex_Menu_Help]) 1064 delete m_actionsPool[UIActionIndex_Menu_Help]; 1065 m_actionsPool[UIActionIndex_Menu_Help] = new MenuHelpAction(this); 1031 1066 } 1032 1067 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.h
r26820 r26919 120 120 UIAction* action(UIActionIndex index) const; 121 121 122 void createMenus(); 122 123 bool processHotKey(const QKeySequence &key); 124 123 125 124 126 protected: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r26898 r26919 414 414 void UIMachineLogic::prepareActionGroups() 415 415 { 416 #ifdef Q_WS_MAC 417 /* On Mac OS X, all QMenu's are consumed by Qt after they are added to 418 * another QMenu or a QMenuBar. This means we have to recreate all QMenus 419 * when creating a new QMenuBar. */ 420 uisession()->actionsPool()->createMenus(); 421 #endif /* Q_WS_MAC */ 422 416 423 /* Create group for all actions that are enabled only when the VM is running. 417 424 * Note that only actions whose enabled state depends exclusively on the … … 516 523 this, SLOT(sltLoggingToggled(bool))); 517 524 #endif 518 519 /* "Help" actions connections: */520 connect(actionsPool()->action(UIActionIndex_Simple_Help), SIGNAL(triggered()),521 &vboxProblem(), SLOT(showHelpHelpDialog()));522 connect(actionsPool()->action(UIActionIndex_Simple_Web), SIGNAL(triggered()),523 &vboxProblem(), SLOT(showHelpWebDialog()));524 connect(actionsPool()->action(UIActionIndex_Simple_ResetWarnings), SIGNAL(triggered()),525 &vboxProblem(), SLOT(resetSuppressedMessages()));526 connect(actionsPool()->action(UIActionIndex_Simple_Register), SIGNAL(triggered()),527 &vboxGlobal(), SLOT(showRegistrationDialog()));528 connect(actionsPool()->action(UIActionIndex_Simple_Update), SIGNAL(triggered()),529 &vboxGlobal(), SLOT(showUpdateDialog()));530 connect(actionsPool()->action(UIActionIndex_Simple_About), SIGNAL(triggered()),531 &vboxProblem(), SLOT(showHelpAboutDialog()));532 533 connect(&vboxGlobal(), SIGNAL (canShowRegDlg (bool)),534 actionsPool()->action(UIActionIndex_Simple_Register), SLOT(setEnabled(bool)));535 connect(&vboxGlobal(), SIGNAL (canShowUpdDlg (bool)),536 actionsPool()->action(UIActionIndex_Simple_Update), SLOT(setEnabled(bool)));537 525 } 538 526 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r26898 r26919 359 359 } 360 360 361 void UIMachineWindow::prepareMenuMachine()362 {363 QMenu *menu = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Machine)->menu();364 365 menu->clear();366 367 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Toggle_Fullscreen));368 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Toggle_Seamless));369 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Toggle_GuestAutoresize));370 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_AdjustWindow));371 menu->addSeparator();372 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Toggle_MouseIntegration));373 menu->addSeparator();374 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_TypeCAD));375 #ifdef Q_WS_X11376 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_TypeCABS));377 #endif378 menu->addSeparator();379 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_TakeSnapshot));380 menu->addSeparator();381 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_InformationDialog));382 menu->addSeparator();383 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Toggle_Pause));384 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_Reset));385 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_Shutdown));386 #ifndef Q_WS_MAC387 menu->addSeparator();388 #endif /* Q_WS_MAC */389 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_Close));390 }391 392 void UIMachineWindow::prepareMenuDevices()393 {394 QMenu *menu = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Devices)->menu();395 396 menu->clear();397 398 /* Devices submenu */399 menu->addMenu(machineLogic()->actionsPool()->action(UIActionIndex_Menu_OpticalDevices)->menu());400 menu->addMenu(machineLogic()->actionsPool()->action(UIActionIndex_Menu_FloppyDevices)->menu());401 menu->addMenu(machineLogic()->actionsPool()->action(UIActionIndex_Menu_USBDevices)->menu());402 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_NetworkAdaptersDialog));403 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_SharedFoldersDialog));404 menu->addSeparator();405 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Toggle_VRDP));406 menu->addSeparator();407 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_InstallGuestTools));408 }409 410 #ifdef VBOX_WITH_DEBUGGER_GUI411 void UIMachineWindow::prepareMenuDebug()412 {413 QMenu *menu = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Debug)->menu();414 415 menu->clear();416 417 /* Debug submenu */418 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_Statistics));419 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_CommandLine));420 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Toggle_Logging));421 }422 #endif /* VBOX_WITH_DEBUGGER_GUI */423 424 void UIMachineWindow::prepareMenuHelp()425 {426 QMenu *menu = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Help)->menu();427 428 menu->clear();429 430 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_Help));431 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_Web));432 menu->addSeparator();433 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_ResetWarnings));434 menu->addSeparator();435 436 #ifdef VBOX_WITH_REGISTRATION437 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_Register));438 #endif439 440 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_Update));441 442 #ifndef Q_WS_MAC443 menu->addSeparator();444 #endif /* Q_WS_MAC */445 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_About));446 }447 448 361 void UIMachineWindow::prepareMachineViewContainer() 449 362 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
r26878 r26919 77 77 virtual void prepareWindowIcon(); 78 78 virtual void prepareConsoleConnections(); 79 virtual void prepareMenuMachine();80 virtual void prepareMenuDevices();81 #ifdef VBOX_WITH_DEBUGGER_GUI82 virtual void prepareMenuDebug();83 #endif84 virtual void prepareMenuHelp();85 79 virtual void prepareMachineViewContainer(); 86 80 //virtual void loadWindowSettings() {} … … 89 83 //virtual void saveWindowSettings() {} 90 84 //virtual void cleanupMachineViewContainer() {} 91 //virtual void cleanupMenuHelp() {}92 #ifdef VBOX_WITH_DEBUGGER_GUI93 //virtual void prepareMenuDebug() {}94 #endif95 //virtual void prepareMenuDevices() {}96 //virtual void prepareMenuMachine() {}97 85 //virtual void cleanupConsoleConnections() {} 98 86 //virtual void cleanupWindowIcon() {} -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r26890 r26919 32 32 #include "UIMachineLogic.h" 33 33 #include "UIMachineWindow.h" 34 #include "UIMachineMenuBar.h" 34 35 #include "VBoxProblemReporter.h" 35 36 … … 527 528 , m_session(sessionReference) 528 529 , m_callback(CConsoleCallback(new UIConsoleCallback(this))) 529 /* Common varibles: */ 530 /* Common variables: */ 531 , m_pMenuBar(0) 530 532 , m_machineState(KMachineState_Null) 531 533 #if defined(Q_WS_WIN) … … 570 572 } 571 573 574 UIActionsPool* UISession::actionsPool() const 575 { 576 return m_pMachine->actionsPool(); 577 } 578 579 QMenuBar* UISession::newMenuBar() 580 { 581 /* */ 582 QMenuBar *pMenuBar = m_pMenuBar->createMenuBar(this); 583 584 /* Get uisession machine: */ 585 CMachine machine = session().GetConsole().GetMachine(); 586 587 /* Availability settings: */ 588 { 589 /* USB Stuff: */ 590 CUSBController usbController = machine.GetUSBController(); 591 if (usbController.isNull()) 592 { 593 /* Hide USB menu if controller is NULL: */ 594 uimachine()->actionsPool()->action(UIActionIndex_Menu_USBDevices)->setVisible(false); 595 } 596 else 597 { 598 /* Enable/Disable USB menu depending on USB controller: */ 599 uimachine()->actionsPool()->action(UIActionIndex_Menu_USBDevices)->setEnabled(usbController.GetEnabled()); 600 } 601 } 602 603 /* Prepare some initial settings: */ 604 { 605 /* Initialize CD/FD menus: */ 606 int iDevicesCountCD = 0; 607 int iDevicesCountFD = 0; 608 const CMediumAttachmentVector &attachments = machine.GetMediumAttachments(); 609 foreach (const CMediumAttachment &attachment, attachments) 610 { 611 if (attachment.GetType() == KDeviceType_DVD) 612 ++ iDevicesCountCD; 613 if (attachment.GetType() == KDeviceType_Floppy) 614 ++ iDevicesCountFD; 615 } 616 QAction *pOpticalDevicesMenu = uimachine()->actionsPool()->action(UIActionIndex_Menu_OpticalDevices); 617 QAction *pFloppyDevicesMenu = uimachine()->actionsPool()->action(UIActionIndex_Menu_FloppyDevices); 618 pOpticalDevicesMenu->setData(iDevicesCountCD); 619 pOpticalDevicesMenu->setVisible(iDevicesCountCD); 620 pFloppyDevicesMenu->setData(iDevicesCountFD); 621 pFloppyDevicesMenu->setVisible(iDevicesCountFD); 622 } 623 624 return pMenuBar; 625 } 626 572 627 bool UISession::setPause(bool fOn) 573 628 { … … 844 899 void UISession::loadSessionSettings() 845 900 { 901 m_pMenuBar = new UIMachineMenuBar; 902 846 903 /* Get uisession machine: */ 847 904 CMachine machine = session().GetConsole().GetMachine(); … … 849 906 /* Availability settings: */ 850 907 { 851 /* USB Stuff: */852 CUSBController usbController = machine.GetUSBController();853 if (usbController.isNull())854 {855 /* Hide USB menu if controller is NULL: */856 uimachine()->actionsPool()->action(UIActionIndex_Menu_USBDevices)->setVisible(false);857 }858 else859 {860 /* Enable/Disable USB menu depending on USB controller: */861 uimachine()->actionsPool()->action(UIActionIndex_Menu_USBDevices)->setEnabled(usbController.GetEnabled());862 }863 864 908 /* VRDP Stuff: */ 865 909 CVRDPServer vrdpServer = machine.GetVRDPServer(); … … 871 915 } 872 916 873 /* Prepare some initial settings: */874 {875 /* Initialize CD/FD menus: */876 int iDevicesCountCD = 0;877 int iDevicesCountFD = 0;878 const CMediumAttachmentVector &attachments = machine.GetMediumAttachments();879 foreach (const CMediumAttachment &attachment, attachments)880 {881 if (attachment.GetType() == KDeviceType_DVD)882 ++ iDevicesCountCD;883 if (attachment.GetType() == KDeviceType_Floppy)884 ++ iDevicesCountFD;885 }886 QAction *pOpticalDevicesMenu = uimachine()->actionsPool()->action(UIActionIndex_Menu_OpticalDevices);887 QAction *pFloppyDevicesMenu = uimachine()->actionsPool()->action(UIActionIndex_Menu_FloppyDevices);888 pOpticalDevicesMenu->setData(iDevicesCountCD);889 pOpticalDevicesMenu->setVisible(iDevicesCountCD);890 pFloppyDevicesMenu->setData(iDevicesCountFD);891 pFloppyDevicesMenu->setVisible(iDevicesCountFD);892 }893 917 894 918 /* Load extra-data settings: */ … … 934 958 //machine.SetExtraData(VBoxDefs::GUI_MiniToolBarAutoHide, mMiniToolBar->isAutoHide() ? "on" : "off"); 935 959 } 960 961 delete m_pMenuBar; 962 m_pMenuBar = 0; 936 963 } 937 964 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r26890 r26919 33 33 /* Local forwards */ 34 34 class UIMachine; 35 class UIActionsPool; 35 36 class UIConsoleCallback; 37 class UIMachineMenuBar; 38 39 class QMenuBar; 36 40 37 41 /* CConsole callback event types: */ … … 73 77 CSession& session() { return m_session; } 74 78 KMachineState machineState() const { return m_machineState; } 79 UIActionsPool* actionsPool() const; 80 QMenuBar* newMenuBar(); 81 75 82 bool isSaved() const { return machineState() == KMachineState_Saved; } 76 83 bool isTurnedOff() const { return machineState() == KMachineState_PoweredOff || … … 171 178 const CConsoleCallback m_callback; 172 179 180 UIMachineMenuBar *m_pMenuBar; 181 173 182 /* Common variables: */ 174 183 KMachineState m_machineState; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r26891 r26919 184 184 break; 185 185 } 186 #ifdef Q_WS_MAC 187 case QEvent::Polish: 188 { 189 /* Fade back to the normal gamma */ 190 // CGDisplayFade (mFadeToken, 0.5, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0.0, 0.0, 0.0, false); 191 // CGReleaseDisplayFadeReservation (mFadeToken); 192 break; 193 } 194 #endif /* Q_WS_MAC */ 186 195 default: 187 196 break; … … 245 254 void UIMachineWindowFullscreen::prepareMenu() 246 255 { 247 /* Machine submenu: */ 248 QMenu *pMenuMachine = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Machine)->menu(); 249 prepareMenuMachine(); 250 menuBar()->addMenu(pMenuMachine); 251 252 /* Devices submenu: */ 253 QMenu *pMenuDevices = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Devices)->menu(); 254 prepareMenuDevices(); 255 menuBar()->addMenu(pMenuDevices); 256 257 #ifdef VBOX_WITH_DEBUGGER_GUI 258 if (vboxGlobal().isDebuggerEnabled()) 259 { 260 QMenu *pMenuDebug = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Debug)->menu(); 261 prepareMenuDebug(); 262 menuBar()->addMenu(pMenuDebug); 263 } 264 #endif 265 266 /* Help submenu: */ 267 QMenu *pMenuHelp = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Help)->menu(); 268 prepareMenuHelp(); 269 menuBar()->addMenu(pMenuHelp); 256 setMenuBar(uisession()->newMenuBar()); 257 menuBar()->hide(); 270 258 } 271 259 … … 279 267 void UIMachineWindowFullscreen::prepareMachineView() 280 268 { 281 CMachine machine = session().GetMachine();282 283 269 #ifdef VBOX_WITH_VIDEOHWACCEL 284 270 /* Need to force the QGL framebuffer in case 2D Video Acceleration is supported & enabled: */ 285 bool bAccelerate2DVideo = machine.GetAccelerate2DVideoEnabled() && VBoxGlobal::isAcceleration2DVideoAvailable();271 bool bAccelerate2DVideo = session().GetMachine().GetAccelerate2DVideoEnabled() && VBoxGlobal::isAcceleration2DVideoAvailable(); 286 272 #endif 287 273 … … 318 304 centralWidget()->setAutoFillBackground (true); 319 305 setAutoFillBackground (true); 306 307 #ifdef Q_WS_MAC 308 /* Fade to black */ 309 // CGAcquireDisplayFadeReservation (kCGMaxDisplayReservationInterval, &mFadeToken); 310 // CGDisplayFade (mFadeToken, 0.3, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0.0, 0.0, 0.0, true); 311 #endif 312 320 313 321 314 /* We have to show the window early, or the position will be wrong on the -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
r26889 r26919 35 35 # include <X11/Xlib.h> 36 36 #endif 37 38 #ifdef Q_WS_MAC 39 # include <ApplicationServices/ApplicationServices.h> 40 #endif /* Q_WS_MAC */ 37 41 38 42 /* Local forwards */ … … 98 102 void setPresentationModeEnabled(bool fEnabled); 99 103 # endif /* QT_MAC_USE_COCOA */ 104 CGDisplayFadeReservationToken mFadeToken; 100 105 #endif /* Q_WS_MAC */ 101 106 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r26890 r26919 345 345 void UIMachineWindowNormal::prepareMenu() 346 346 { 347 /* Machine submenu: */ 348 QMenu *pMenuMachine = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Machine)->menu(); 349 prepareMenuMachine(); 350 menuBar()->addMenu(pMenuMachine); 351 352 /* Devices submenu: */ 353 QMenu *pMenuDevices = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Devices)->menu(); 354 prepareMenuDevices(); 355 menuBar()->addMenu(pMenuDevices); 356 357 #ifdef VBOX_WITH_DEBUGGER_GUI 358 if (vboxGlobal().isDebuggerEnabled()) 359 { 360 QMenu *pMenuDebug = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Debug)->menu(); 361 prepareMenuDebug(); 362 menuBar()->addMenu(pMenuDebug); 363 } 364 #endif 365 366 /* Help submenu: */ 367 QMenu *pMenuHelp = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Help)->menu(); 368 prepareMenuHelp(); 369 menuBar()->addMenu(pMenuHelp); 347 setMenuBar(uisession()->newMenuBar()); 370 348 } 371 349
Note:
See TracChangeset
for help on using the changeset viewer.