Changeset 29794 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 25, 2010 4:06:59 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 14 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r29654 r29794 44 44 VBOX_WITH_UPDATE_REQUEST := 1 45 45 endif 46 47 # Build new VirtualBox FE/Qt4 GUI runtime core.48 # Currently its not used, you can build it for developing purposes.49 VBOX_WITH_NEW_RUNTIME_CORE := 150 # Force the usage of the new runtime core for the single monitor case also.51 VBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS := 152 46 53 47 # … … 121 115 ifdef VBOX_WITH_ICHAT_THEATER 122 116 VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER 123 endif124 ifdef VBOX_WITH_NEW_RUNTIME_CORE125 VirtualBox_DEFS += VBOX_WITH_NEW_RUNTIME_CORE126 ifdef VBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS127 VirtualBox_DEFS += VBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS128 endif129 117 endif 130 118 ifneq ($(KBUILD_TYPE),release) … … 159 147 160 148 ifdef VBOX_BLEEDING_EDGE 161 VirtualBox_src/VBox ConsoleWnd.cpp_DEFS += \149 VirtualBox_src/VBoxSelectorWnd.cpp_DEFS += \ 162 150 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\" 163 VirtualBox_src/ VBoxSelectorWnd.cpp_DEFS += \151 VirtualBox_src/runtime/UIMachineWindow.cpp_DEFS += \ 164 152 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\" 165 153 VirtualBox_src/VBoxAboutDlg.cpp_DEFS += \ … … 184 172 ./src/widgets \ 185 173 ./src/X11 \ 186 ./src/darwin 187 ifdef VBOX_WITH_NEW_RUNTIME_CORE 188 VBOX_GUI_INC_DIRS += \ 174 ./src/darwin \ 189 175 ./src/runtime \ 190 176 ./src/runtime/normal \ 191 177 ./src/runtime/fullscreen \ 192 178 ./src/runtime/seamless 193 endif194 179 195 180 ifdef VBOX_WITH_REGISTRATION … … 258 243 src/VBoxAboutDlg.h \ 259 244 src/VBoxCloseVMDlg.h \ 260 src/VBoxConsoleView.h \261 src/VBoxConsoleWnd.h \262 245 src/VBoxGlobalSettings.h \ 263 246 src/VBoxMediaManagerDlg.h \ … … 337 320 src/widgets/VBoxProgressDialog.h \ 338 321 src/widgets/VBoxSpecialControls.h \ 339 src/widgets/VBoxWarningPane.h 340 ifdef VBOX_WITH_NEW_RUNTIME_CORE 341 VirtualBox_QT_MOCHDRS += \ 322 src/widgets/VBoxWarningPane.h \ 342 323 src/runtime/UISession.h \ 343 324 src/runtime/UIActionsPool.h \ … … 356 337 src/runtime/seamless/UIMachineWindowSeamless.h \ 357 338 src/runtime/seamless/UIMachineViewSeamless.h 358 endif359 339 360 340 ifdef VBOX_WITH_REGISTRATION … … 366 346 VirtualBox_QT_MOCSRCS = \ 367 347 src/VBoxSelectorWnd.cpp \ 368 src/VBoxMediaManagerDlg.cpp 369 ifdef VBOX_WITH_NEW_RUNTIME_CORE 370 VirtualBox_QT_MOCSRCS += \ 348 src/VBoxMediaManagerDlg.cpp \ 371 349 src/runtime/UIActionsPool.cpp \ 372 350 src/runtime/UIMachineMenuBar.cpp \ … … 374 352 src/runtime/UIMachine.cpp \ 375 353 src/runtime/UIMachineLogic.cpp 376 endif377 354 ifdef VBOX_WITH_XPCOM 378 355 VirtualBox_QT_MOCSRCS += \ … … 393 370 src/VBoxAboutDlg.cpp \ 394 371 src/VBoxCloseVMDlg.cpp \ 395 src/VBoxConsoleView.cpp \396 src/VBoxConsoleWnd.cpp \397 src/VBoxFrameBuffer.cpp \398 372 src/VBoxGlobalSettings.cpp \ 399 373 src/VBoxHelpActions.cpp \ … … 476 450 src/widgets/VBoxProgressDialog.cpp \ 477 451 src/widgets/VBoxSpecialControls.cpp \ 478 src/widgets/VBoxWarningPane.cpp 479 ifdef VBOX_WITH_NEW_RUNTIME_CORE 480 VirtualBox_SOURCES += \ 452 src/widgets/VBoxWarningPane.cpp \ 481 453 src/runtime/UISession.cpp \ 482 454 src/runtime/UIActionsPool.cpp \ … … 507 479 src/darwin/UIAbstractDockIconPreview.cpp \ 508 480 src/darwin/UICocoaDockIconPreview.mm 509 endif510 481 511 482 ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11 … … 540 511 VirtualBox_SOURCES.darwin += \ 541 512 src/darwin/DarwinKeyboard.cpp \ 542 src/darwin/VBoxUtils-darwin.cpp \ 543 src/darwin/AbstractDockIconPreview.cpp \ 544 src/VBoxFBQuartz2D.cpp 513 src/darwin/VBoxUtils-darwin.cpp 545 514 546 515 ifdef VBOX_WITH_ICHAT_THEATER … … 554 523 src/darwin/VBoxCocoaApplication.m \ 555 524 src/darwin/VBoxUtils-darwin-cocoa.mm \ 556 src/darwin/VBoxCocoaSpecialControls.mm \ 557 src/darwin/CocoaDockIconPreview.mm 525 src/darwin/VBoxCocoaSpecialControls.mm 558 526 VirtualBox_QT_MOCHDRS.darwin = \ 559 527 src/darwin/VBoxCocoaSpecialControls.h 560 528 else 561 529 VirtualBox_SOURCES.darwin += \ 562 src/darwin/VBoxUtils-darwin-carbon.cpp \ 563 src/darwin/CarbonDockIconPreview.cpp 530 src/darwin/VBoxUtils-darwin-carbon.cpp 564 531 endif 565 532 … … 916 883 # lupdate call 917 884 # 885 #VirtualBox_QT_TRANSLATIONS = nls/VirtualBox_de.ts 918 886 updatenls:: makeallnls nls/VirtualBox_en.ts 919 887 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxCloseVMDlg.cpp
r28934 r29794 23 23 #include "VBoxCloseVMDlg.h" 24 24 #include "VBoxProblemReporter.h" 25 #ifdef Q_WS_MAC 26 # include "VBoxConsoleWnd.h" 27 #endif /* Q_WS_MAC */ 25 #include "UIMachineWindowNormal.h" 28 26 29 27 /* Qt includes */ … … 31 29 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ 32 30 33 #ifdef VBOX_WITH_NEW_RUNTIME_CORE34 # include "UIMachineWindowNormal.h"35 #endif /* !VBOX_WITH_NEW_RUNTIME_CORE */36 37 31 VBoxCloseVMDlg::VBoxCloseVMDlg (QWidget *aParent) 38 32 : QIWithRetranslateUI<QIDialog> (aParent) 39 33 { 40 34 #ifdef Q_WS_MAC 41 # ifdef VBOX_WITH_NEW_RUNTIME_CORE42 35 /* No sheets in another mode than normal for now. Firstly it looks ugly and 43 36 * secondly in some cases it is broken. */ … … 45 38 if (pWnd) 46 39 setWindowFlags (Qt::Sheet); 47 # endif /* !VBOX_WITH_NEW_RUNTIME_CORE */48 # ifndef VBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS49 /* Sheets are broken if the window is in fullscreen mode. So make it a50 * normal window in that case. */51 VBoxConsoleWnd *cwnd = qobject_cast<VBoxConsoleWnd*> (aParent);52 if (cwnd == NULL ||53 (!cwnd->isTrueFullscreen() &&54 !cwnd->isTrueSeamless()))55 setWindowFlags (Qt::Sheet);56 # endif /* VBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS */57 40 #endif /* Q_WS_MAC */ 58 41 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
r28800 r29794 23 23 24 24 #include "VBoxFBOverlay.h" 25 #include "VBoxFrameBuffer.h" 26 27 #include "VBoxConsoleView.h" 25 28 26 #include "VBoxProblemReporter.h" 29 27 #include "VBoxGlobal.h" -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBQGL.cpp
r28800 r29794 24 24 #include "VBoxFrameBuffer.h" 25 25 26 #include "VBoxConsoleView.h"27 //#include "VBoxProblemReporter.h"28 //#include "VBoxGlobal.h"29 30 26 /* Qt includes */ 31 27 #include <QGLWidget> 32 28 33 //#include <iprt/asm.h>34 //35 29 #ifdef VBOX_WITH_VIDEOHWACCEL 36 30 #include <VBox/VBoxVideo.h> 37 //#include <VBox/types.h>38 //#include <VBox/ssm.h>39 31 #endif 40 //#include <iprt/semaphore.h>41 //42 //#include <QFile>43 //#include <QTextStream>44 32 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ 45 33 … … 51 39 * is then converted to QPixmap and blitted to the console view widget. 52 40 */ 53 54 VBoxQGLFrameBuffer::VBoxQGLFrameBuffer (VBoxConsoleView *aView) :55 VBoxFrameBuffer (aView),56 mCmdPipe(aView)57 {58 // mWidget = new GLWidget(aView->viewport());59 #ifndef VBOXQGL_PROF_BASE60 resizeEvent (new VBoxResizeEvent (FramebufferPixelFormat_Opaque,61 NULL, 0, 0, 640, 480));62 #else63 resizeEvent (new VBoxResizeEvent (FramebufferPixelFormat_Opaque,64 NULL, 0, 0, VBOXQGL_PROF_WIDTH, VBOXQGL_PROF_HEIGHT));65 #endif66 }67 41 68 42 /** @note This method is called on EMT from under this object's lock */ -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
r29791 r29794 23 23 #include "VBoxSelectorWnd.h" 24 24 #include "VBoxVMListView.h" 25 #include "VBoxConsoleWnd.h"26 25 #include "VBoxToolBar.h" 27 26 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.cpp
r28935 r29794 28 28 #include "VBoxProblemReporter.h" 29 29 #include "VBoxUtils.h" 30 # ifdef Q_WS_MAC 31 # ifdef VBOX_WITH_NEW_RUNTIME_CORE 32 # include "UIMachineWindowNormal.h" 33 # include "VBoxSnapshotsWgt.h" 34 # endif /* !VBOX_WITH_NEW_RUNTIME_CORE */ 35 # endif /* !VBOX_WITH_NEW_RUNTIME_CORE */ 30 #ifdef Q_WS_MAC 31 # include "UIMachineWindowNormal.h" 32 # include "VBoxSnapshotsWgt.h" 33 #endif /* Q_WS_MAC */ 36 34 37 35 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ … … 41 39 { 42 40 #ifdef Q_WS_MAC 43 # ifdef VBOX_WITH_NEW_RUNTIME_CORE44 41 /* No sheets in another mode than normal for now. Firstly it looks ugly and 45 42 * secondly in some cases it is broken. */ … … 47 44 || qobject_cast<VBoxSnapshotsWgt*>(pParent)) 48 45 setWindowFlags (Qt::Sheet); 49 # endif /* !VBOX_WITH_NEW_RUNTIME_CORE */50 # ifndef VBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS51 /* Sheets are broken if the window is in fullscreen mode. So make it a52 * normal window in that case. */53 VBoxConsoleWnd *cwnd = qobject_cast<VBoxConsoleWnd*> (pParent);54 if (cwnd == NULL ||55 (!cwnd->isTrueFullscreen() &&56 !cwnd->isTrueSeamless()))57 setWindowFlags (Qt::Sheet);58 # endif /* VBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS */59 46 #endif /* Q_WS_MAC */ 60 47 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp
r29526 r29794 23 23 /* Global Includes */ 24 24 #include <QTimer> 25 #include <QScrollBar> 25 26 26 27 /* Local Includes */ 27 28 #include <VBoxVMInformationDlg.h> 28 29 #include <VBoxGlobal.h> 29 #include <VBoxConsoleView.h>30 30 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ 31 31 32 #ifdef VBOX_WITH_NEW_RUNTIME_CORE33 32 #include "UIMachineLogic.h" 34 33 #include "UIMachineWindow.h" 35 34 #include "UIMachineView.h" 36 35 #include "UISession.h" 37 #endif /* VBOX_WITH_NEW_RUNTIME_CORE */38 36 39 37 VBoxVMInformationDlg::InfoDlgMap VBoxVMInformationDlg::mSelfArray = InfoDlgMap(); 40 38 41 #ifdef VBOX_WITH_NEW_RUNTIME_CORE42 39 void VBoxVMInformationDlg::createInformationDlg(UIMachineWindow *pMachineWindow) 43 40 { … … 103 100 * more than one screens. */ 104 101 connect (pMachineWindow->machineView(), SIGNAL (resizeHintDone()), this, SLOT (processStatistics())); 105 connect (mInfoStack, SIGNAL (currentChanged (int)), this, SLOT (onPageChanged (int)));106 connect (&vboxGlobal(), SIGNAL (mediumEnumFinished (const VBoxMediaList &)), this, SLOT (updateDetails()));107 connect (mStatTimer, SIGNAL (timeout()), this, SLOT (processStatistics()));108 109 /* Loading language constants */110 retranslateUi();111 112 /* Details page update */113 updateDetails();114 115 /* Statistics page update */116 processStatistics();117 mStatTimer->start (5000);118 119 /* Preload dialog attributes for this vm */120 QString dlgsize = mSession.GetMachine().GetExtraData (VBoxDefs::GUI_InfoDlgState);121 if (dlgsize.isEmpty())122 {123 mWidth = 400;124 mHeight = 450;125 mMax = false;126 }127 else128 {129 QStringList list = dlgsize.split (',');130 mWidth = list [0].toInt(), mHeight = list [1].toInt();131 mMax = list [2] == "max";132 }133 134 /* Make statistics page the default one */135 mInfoStack->setCurrentIndex (1);136 }137 #endif /* VBOX_WITH_NEW_RUNTIME_CORE */138 139 void VBoxVMInformationDlg::createInformationDlg (const CSession &aSession, VBoxConsoleView *aConsole)140 {141 CMachine machine = aSession.GetMachine();142 if (mSelfArray.find (machine.GetName()) == mSelfArray.end())143 {144 /* Creating new information dialog if there is no one existing */145 VBoxVMInformationDlg *id = new VBoxVMInformationDlg (aConsole, aSession, Qt::Window);146 id->centerAccording (aConsole);147 id->setAttribute (Qt::WA_DeleteOnClose);148 mSelfArray [machine.GetName()] = id;149 }150 151 VBoxVMInformationDlg *info = mSelfArray [machine.GetName()];152 info->show();153 info->raise();154 info->setWindowState (info->windowState() & ~Qt::WindowMinimized);155 info->activateWindow();156 }157 158 VBoxVMInformationDlg::VBoxVMInformationDlg (VBoxConsoleView *aConsole, const CSession &aSession, Qt::WindowFlags aFlags)159 # ifdef Q_WS_MAC160 : QIWithRetranslateUI2 <QIMainDialog> (aConsole, aFlags)161 # else /* Q_WS_MAC */162 : QIWithRetranslateUI2 <QIMainDialog> (0, aFlags)163 # endif /* Q_WS_MAC */164 , mConsole (aConsole)165 , mSession (aSession)166 , mIsPolished (false)167 , mStatTimer (new QTimer (this))168 {169 /* Apply UI decorations */170 Ui::VBoxVMInformationDlg::setupUi (this);171 172 #ifdef Q_WS_MAC173 /* No icon for this window on the mac, cause this would act as proxy icon which isn't necessary here. */174 setWindowIcon (QIcon());175 #else176 /* Apply window icons */177 setWindowIcon (vboxGlobal().iconSetFull (QSize (32, 32), QSize (16, 16),178 ":/session_info_32px.png", ":/session_info_16px.png"));179 #endif180 181 /* Enable size grip without using a status bar. */182 setSizeGripEnabled (true);183 184 /* Setup focus-proxy for pages */185 mPage1->setFocusProxy (mDetailsText);186 mPage2->setFocusProxy (mStatisticText);187 188 /* Setup browsers */189 mDetailsText->viewport()->setAutoFillBackground (false);190 mStatisticText->viewport()->setAutoFillBackground (false);191 192 /* Setup margins */193 mDetailsText->setViewportMargins (5, 5, 5, 5);194 mStatisticText->setViewportMargins (5, 5, 5, 5);195 196 /* Setup handlers */197 /* Setup handlers */198 connect (mConsole, SIGNAL (mediaDriveChanged (VBoxDefs::MediumType)), this, SLOT (updateDetails()));199 connect (mConsole, SIGNAL (sharedFoldersChanged()), this, SLOT (updateDetails()));200 connect (mConsole, SIGNAL (resizeHintDone()), this, SLOT (processStatistics()));201 102 connect (mInfoStack, SIGNAL (currentChanged (int)), this, SLOT (onPageChanged (int))); 202 103 connect (&vboxGlobal(), SIGNAL (mediumEnumFinished (const VBoxMediaList &)), this, SLOT (updateDetails())); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.h
r28800 r29794 25 25 #include "QIWithRetranslateUI.h" 26 26 27 class VBoxConsoleView;28 27 class UIMachineWindow; 29 28 class QTimer; … … 40 39 typedef QMap <QString, VBoxVMInformationDlg*> InfoDlgMap; 41 40 42 #ifdef VBOX_WITH_NEW_RUNTIME_CORE43 41 static void createInformationDlg(UIMachineWindow *pMachineWindow); 44 #endif /* VBOX_WITH_NEW_RUNTIME_CORE */45 static void createInformationDlg (const CSession &aSession, VBoxConsoleView *aConsole);46 42 47 43 protected: 48 44 49 #ifdef VBOX_WITH_NEW_RUNTIME_CORE50 45 VBoxVMInformationDlg (UIMachineWindow *pMachineWindow, Qt::WindowFlags aFlags); 51 #endif /* VBOX_WITH_NEW_RUNTIME_CORE */52 VBoxVMInformationDlg (VBoxConsoleView *aConsole, const CSession &aSession, Qt::WindowFlags aFlags);53 46 ~VBoxVMInformationDlg(); 54 47 … … 78 71 static InfoDlgMap mSelfArray; 79 72 80 VBoxConsoleView *mConsole;81 73 CSession mSession; 82 74 bool mIsPolished; -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/DockIconPreview.h
r28800 r29794 23 23 #ifdef QT_MAC_USE_COCOA 24 24 25 #include "CocoaDockIconPreview.h"26 class VBoxDockIconPreview: public CocoaDockIconPreview27 {28 public:29 VBoxDockIconPreview (VBoxConsoleWnd *aMainWnd, const QPixmap& aOverlayImage)30 : CocoaDockIconPreview (aMainWnd, aOverlayImage) {}31 };32 33 25 #include "UICocoaDockIconPreview.h" 34 26 class UIDockIconPreview: public UICocoaDockIconPreview … … 39 31 }; 40 32 41 #else /* QT_MAC_USE_COCOA */42 43 #include "CarbonDockIconPreview.h"44 class VBoxDockIconPreview: public CarbonDockIconPreview45 {46 public:47 VBoxDockIconPreview (VBoxConsoleWnd *aMainWnd, const QPixmap& aOverlayImage)48 : CarbonDockIconPreview (aMainWnd, aOverlayImage) {}49 };50 51 33 #endif /* QT_MAC_USE_COCOA */ 52 34 -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin-carbon.cpp
r28800 r29794 158 158 * 159 159 ********************************************************************************/ 160 #include "VBoxConsoleView.h"161 160 162 161 bool darwinIsMenuOpen (void) … … 265 264 } 266 265 267 OSStatus darwinOverlayWindowHandler (EventHandlerCallRef aInHandlerCallRef, EventRef aInEvent, void *aInUserData)268 {269 if (!aInUserData)270 return ::CallNextEventHandler (aInHandlerCallRef, aInEvent);271 272 UInt32 eventClass = ::GetEventClass (aInEvent);273 UInt32 eventKind = ::GetEventKind (aInEvent);274 /* For debugging events */275 /*276 if (!(eventClass == 'cute'))277 ::darwinDebugPrintEvent ("view: ", aInEvent);278 */279 VBoxConsoleView *view = static_cast<VBoxConsoleView *> (aInUserData);280 281 if (eventClass == kEventClassVBox)282 {283 if (eventKind == kEventVBoxShowWindow)284 {285 //printf ("ShowWindow requested\n");286 WindowRef w;287 if (GetEventParameter (aInEvent, kEventParamWindowRef, typeWindowRef, NULL, sizeof (w), NULL, &w) != noErr)288 return noErr;289 void *wp;290 if (GetEventParameter (aInEvent, kEventParamUserData, typeVoidPtr, NULL, sizeof (wp), NULL, &wp) != noErr)291 return noErr;292 ShowWindow (w);293 /* We have to make sure that newly created windows are on top of294 all other windows. This fixes issues with compiz & additional295 created OpenGL windows. */296 ChangeWindowGroupAttributes (GetWindowGroup (w), 0, kWindowGroupAttrMoveTogether | kWindowGroupAttrLayerTogether);297 BringToFront (w);298 ChangeWindowGroupAttributes (GetWindowGroup (w), kWindowGroupAttrMoveTogether | kWindowGroupAttrLayerTogether, 0);299 PostUpdateContext(w, wp);300 return noErr;301 }302 if (eventKind == kEventVBoxHideWindow)303 {304 //printf ("HideWindow requested\n");305 WindowPtr w;306 if (GetEventParameter (aInEvent, kEventParamWindowRef, typeWindowRef, NULL, sizeof (w), NULL, &w) != noErr)307 return noErr;308 HideWindow (w);309 return noErr;310 }311 if (eventKind == kEventVBoxMoveWindow)312 {313 //printf ("MoveWindow requested\n");314 WindowPtr w;315 if (GetEventParameter (aInEvent, kEventParamWindowRef, typeWindowRef, NULL, sizeof (w), NULL, &w) != noErr)316 return noErr;317 HIPoint p;318 if (GetEventParameter (aInEvent, kEventParamOrigin, typeHIPoint, NULL, sizeof (p), NULL, &p) != noErr)319 return noErr;320 void *wp;321 if (GetEventParameter (aInEvent, kEventParamUserData, typeVoidPtr, NULL, sizeof (wp), NULL, &wp) != noErr)322 return noErr;323 ChangeWindowGroupAttributes (GetWindowGroup (w), 0, kWindowGroupAttrMoveTogether);324 QPoint p1 = view->mapToGlobal (QPoint (p.x, p.y));325 //printf ("Pos: %d %d\n", p1.x(), p1.y());326 MoveWindow (w, p1.x(), p1.y(), true);327 ChangeWindowGroupAttributes (GetWindowGroup (w), kWindowGroupAttrMoveTogether, 0);328 PostUpdateContext(w, wp);329 return noErr;330 }331 if (eventKind == kEventVBoxResizeWindow)332 {333 //printf ("ResizeWindow requested\n");334 WindowPtr w;335 if (GetEventParameter (aInEvent, kEventParamWindowRef, typeWindowRef, NULL, sizeof (w), NULL, &w) != noErr)336 return noErr;337 HISize s;338 if (GetEventParameter (aInEvent, kEventParamDimensions, typeHISize, NULL, sizeof (s), NULL, &s) != noErr)339 return noErr;340 void *wp;341 if (GetEventParameter (aInEvent, kEventParamUserData, typeVoidPtr, NULL, sizeof (wp), NULL, &wp) != noErr)342 return noErr;343 ChangeWindowGroupAttributes (GetWindowGroup (w), 0, kWindowGroupAttrMoveTogether);344 //printf ("Size: %f %f\n", s.width, s.height);345 SizeWindow (w, s.width, s.height, true);346 ChangeWindowGroupAttributes (GetWindowGroup (w), kWindowGroupAttrMoveTogether, 0);347 PostUpdateContext(w, wp);348 return noErr;349 }350 if (eventKind == kEventVBoxDisposeWindow)351 {352 //printf ("DisposeWindow requested\n");353 WindowPtr w;354 if (GetEventParameter (aInEvent, kEventParamWindowRef, typeWindowRef, NULL, sizeof (w), NULL, &w) != noErr)355 return noErr;356 DisposeWindow (w);357 return noErr;358 }359 if (eventKind == kEventVBoxUpdateDock)360 {361 //printf ("UpdateDock requested\n");362 view->updateDockIcon();363 return noErr;364 }365 }366 367 return ::CallNextEventHandler (aInHandlerCallRef, aInEvent);368 }369 -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
r28800 r29794 26 26 #include "QIDialogButtonBox.h" 27 27 #ifdef Q_WS_MAC 28 # include "VBoxConsoleWnd.h"29 28 # include "VBoxSelectorWnd.h" 30 29 #endif /* Q_WS_MAC */ … … 39 38 #include <QKeyEvent> 40 39 41 #if defined(VBOX_WITH_NEW_RUNTIME_CORE) && defined(Q_WS_MAC)40 #ifdef Q_WS_MAC 42 41 # include "UIMachineWindowFullscreen.h" 43 42 # include "UIMachineWindowSeamless.h" 44 #endif /* defined(VBOX_WITH_NEW_RUNTIME_CORE) && defined(Q_WS_MAC)*/43 #endif /* Q_WS_MAC */ 45 44 46 45 /** @class QIMessageBox … … 64 63 { 65 64 #ifdef Q_WS_MAC 66 VBoxConsoleWnd *cwnd = qobject_cast<VBoxConsoleWnd*> (aParent);67 # ifdef VBOX_WITH_NEW_RUNTIME_CORE68 65 /* No sheets in another mode than normal for now. Firstly it looks ugly and 69 66 * secondly in some cases it is broken. */ 70 if ( !( qobject_cast<UIMachineWindowFullscreen*>(aParent) 71 || qobject_cast<UIMachineWindowSeamless*>(aParent)) 72 && !cwnd) 73 setWindowFlags (Qt::Sheet); 74 else 75 # endif /* VBOX_WITH_NEW_RUNTIME_CORE */ 76 /* Sheets are broken if the window is in fullscreen mode. So make it a 77 * normal window in that case. */ 78 if (cwnd == NULL || 79 (!cwnd->isTrueFullscreen() && 80 !cwnd->isTrueSeamless())) 67 if (!( qobject_cast<UIMachineWindowFullscreen*>(aParent) 68 || qobject_cast<UIMachineWindowSeamless*>(aParent))) 81 69 setWindowFlags (Qt::Sheet); 82 70 #endif /* Q_WS_MAC */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r29736 r29794 24 24 #include "VBoxDefs.h" 25 25 #include "VBoxSelectorWnd.h" 26 #include "VBoxConsoleWnd.h"27 26 #include "VBoxProblemReporter.h" 28 27 #include "QIHotKeyEdit.h" … … 30 29 #include "QIDialogButtonBox.h" 31 30 32 #ifdef VBOX_WITH_NEW_RUNTIME_CORE 33 # include "UIMachine.h" 34 # include "UISession.h" 35 #endif 31 #include "UIMachine.h" 32 #include "UISession.h" 36 33 #ifdef VBOX_WITH_REGISTRATION 37 34 # include "UIRegistrationWzd.h" 38 35 #endif 39 36 #include "VBoxUpdateDlg.h" 40 41 37 #ifdef VBOX_WITH_VIDEOHWACCEL 42 # include "VBoxFrameBuffer.h"43 #endif 38 # include "VBoxFBOverlay.h" 39 #endif /* VBOX_WITH_VIDEOHWACCEL */ 44 40 45 41 /* Qt includes */ … … 597 593 VBoxGlobal::VBoxGlobal() 598 594 : mValid (false) 599 , mSelectorWnd (NULL), mConsoleWnd (NULL) 600 #ifdef VBOX_WITH_NEW_RUNTIME_CORE 595 , mSelectorWnd (NULL) 601 596 , m_pVirtualMachine(0) 602 #endif603 597 , mMainWindow (NULL) 604 598 #ifdef VBOX_WITH_REGISTRATION … … 761 755 if (isVMConsoleProcess()) 762 756 { 763 #ifdef VBOX_WITH_NEW_RUNTIME_CORE764 757 if (m_pVirtualMachine) 765 758 return m_pVirtualMachine->mainWindow(); 766 else767 #endif /* VBOX_WITH_NEW_RUNTIME_CORE */768 return &consoleWnd();769 759 } 770 760 return NULL; 771 761 } 772 762 773 /**774 * Returns a reference to the main VBox VM Console window.775 * The reference is valid until application termination.776 *777 * There is only one such a window per VirtualBox application.778 */779 VBoxConsoleWnd &VBoxGlobal::consoleWnd()780 {781 #if defined (VBOX_GUI_SEPARATE_VM_PROCESS)782 AssertMsg (vboxGlobal().isVMConsoleProcess(),783 ("Must be a VM console process"));784 #endif785 786 Assert (mValid);787 788 if (!mConsoleWnd)789 {790 /*791 * We pass the address of mConsoleWnd to the constructor to let it be792 * initialized right after the constructor is called. It is necessary793 * to avoid recursion, since this method may be (and will be) called794 * from the below constructor or from constructors/methods it calls.795 */796 VBoxConsoleWnd *w = new VBoxConsoleWnd (&mConsoleWnd, 0);797 Assert (w == mConsoleWnd);798 NOREF(w);799 }800 801 return *mConsoleWnd;802 }803 804 #ifdef VBOX_WITH_NEW_RUNTIME_CORE805 763 bool VBoxGlobal::createVirtualMachine(const CSession &session) 806 764 { … … 819 777 return m_pVirtualMachine; 820 778 } 821 #endif822 779 823 780 bool VBoxGlobal::brandingIsActive (bool aForce /* = false*/) … … 2596 2553 return false; 2597 2554 2598 #ifdef VBOX_WITH_NEW_RUNTIME_CORE 2599 # ifndef VBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS 2600 if (session.GetMachine().GetMonitorCount() > 1) 2601 # endif /* VBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS */ 2602 return createVirtualMachine(session); 2603 # ifndef VBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS 2604 else 2605 # endif /* VBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS */ 2606 #endif /* VBOX_WITH_NEW_RUNTIME_CORE */ 2607 return consoleWnd().openView(session); 2555 return createVirtualMachine(session); 2608 2556 } 2609 2557 … … 5420 5368 #endif 5421 5369 5422 if (mConsoleWnd)5423 delete mConsoleWnd;5424 5370 if (mSelectorWnd) 5425 5371 delete mSelectorWnd; 5426 #ifdef VBOX_WITH_NEW_RUNTIME_CORE5427 5372 if (m_pVirtualMachine) 5428 5373 delete m_pVirtualMachine; 5429 #endif5430 5374 5431 5375 /* ensure CGuestOSType objects are no longer used */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r29010 r29794 41 41 class QLabel; 42 42 class QToolButton; 43 #ifdef VBOX_WITH_NEW_RUNTIME_CORE44 43 class UIMachine; 45 #endif46 44 47 45 // VirtualBox callback events … … 278 276 279 277 class VBoxSelectorWnd; 280 class VBoxConsoleWnd;281 278 class UIRegistrationWzd; 282 279 class VBoxUpdateDlg; … … 311 308 QWidget *vmWindow(); 312 309 313 VBoxConsoleWnd &consoleWnd();314 #ifdef VBOX_WITH_NEW_RUNTIME_CORE315 310 bool createVirtualMachine(const CSession &session); 316 311 UIMachine* virtualMachine(); 317 #endif318 312 319 313 /* main window handle storage */ … … 913 907 914 908 VBoxSelectorWnd *mSelectorWnd; 915 VBoxConsoleWnd *mConsoleWnd;916 #ifdef VBOX_WITH_NEW_RUNTIME_CORE917 909 UIMachine *m_pVirtualMachine; 918 #endif919 910 QWidget* mMainWindow; 920 911 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxProblemReporter.cpp
r28846 r29794 22 22 #include "VBoxGlobal.h" 23 23 #include "VBoxSelectorWnd.h" 24 #include "VBoxConsoleWnd.h"25 24 #include "VBoxProgressDialog.h" 26 25 #include "UIDownloaderUserManual.h" 27 #ifdef VBOX_WITH_NEW_RUNTIME_CORE 28 # include "UIMachine.h" 29 #endif 26 #include "UIMachine.h" 30 27 31 28 #include "VBoxAboutDlg.h" … … 2228 2225 void VBoxProblemReporter::cannotImportAppliance (const CProgress &aProgress, CAppliance* aAppliance, QWidget *aParent /* = NULL */) const 2229 2226 { 2230 AssertWrapperOk (aProgress);2227 // AssertWrapperOk (aProgress); 2231 2228 2232 2229 message (aParent ? aParent : mainWindowShown(), -
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r29067 r29794 27 27 #include "VBoxProblemReporter.h" 28 28 #include "VBoxSelectorWnd.h" 29 #include "VBoxConsoleWnd.h"30 29 #include "VBoxUtils.h" 31 30 #ifdef QT_MAC_USE_COCOA
Note:
See TracChangeset
for help on using the changeset viewer.