VirtualBox

Ignore:
Timestamp:
May 25, 2010 4:06:59 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: remove old core

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
14 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r29654 r29794  
    4444VBOX_WITH_UPDATE_REQUEST := 1
    4545endif
    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 := 1
    50 # Force the usage of the new runtime core for the single monitor case also.
    51 VBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS := 1
    5246
    5347#
     
    121115ifdef VBOX_WITH_ICHAT_THEATER
    122116 VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
    123 endif
    124 ifdef VBOX_WITH_NEW_RUNTIME_CORE
    125  VirtualBox_DEFS += VBOX_WITH_NEW_RUNTIME_CORE
    126  ifdef VBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS
    127   VirtualBox_DEFS += VBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS
    128  endif
    129117endif
    130118ifneq ($(KBUILD_TYPE),release)
     
    159147
    160148ifdef VBOX_BLEEDING_EDGE
    161 VirtualBox_src/VBoxConsoleWnd.cpp_DEFS += \
     149VirtualBox_src/VBoxSelectorWnd.cpp_DEFS += \
    162150    VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
    163 VirtualBox_src/VBoxSelectorWnd.cpp_DEFS += \
     151VirtualBox_src/runtime/UIMachineWindow.cpp_DEFS += \
    164152    VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
    165153VirtualBox_src/VBoxAboutDlg.cpp_DEFS += \
     
    184172        ./src/widgets \
    185173        ./src/X11 \
    186         ./src/darwin
    187 ifdef VBOX_WITH_NEW_RUNTIME_CORE
    188 VBOX_GUI_INC_DIRS += \
     174        ./src/darwin \
    189175    ./src/runtime \
    190176        ./src/runtime/normal \
    191177        ./src/runtime/fullscreen \
    192178        ./src/runtime/seamless
    193 endif
    194179
    195180ifdef VBOX_WITH_REGISTRATION
     
    258243        src/VBoxAboutDlg.h \
    259244        src/VBoxCloseVMDlg.h \
    260         src/VBoxConsoleView.h \
    261         src/VBoxConsoleWnd.h \
    262245        src/VBoxGlobalSettings.h \
    263246        src/VBoxMediaManagerDlg.h \
     
    337320        src/widgets/VBoxProgressDialog.h \
    338321        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 \
    342323        src/runtime/UISession.h \
    343324        src/runtime/UIActionsPool.h \
     
    356337        src/runtime/seamless/UIMachineWindowSeamless.h \
    357338        src/runtime/seamless/UIMachineViewSeamless.h
    358 endif
    359339
    360340ifdef VBOX_WITH_REGISTRATION
     
    366346VirtualBox_QT_MOCSRCS = \
    367347        src/VBoxSelectorWnd.cpp \
    368         src/VBoxMediaManagerDlg.cpp
    369 ifdef VBOX_WITH_NEW_RUNTIME_CORE
    370 VirtualBox_QT_MOCSRCS += \
     348        src/VBoxMediaManagerDlg.cpp \
    371349        src/runtime/UIActionsPool.cpp \
    372350        src/runtime/UIMachineMenuBar.cpp \
     
    374352        src/runtime/UIMachine.cpp \
    375353        src/runtime/UIMachineLogic.cpp
    376 endif
    377354ifdef VBOX_WITH_XPCOM
    378355 VirtualBox_QT_MOCSRCS += \
     
    393370        src/VBoxAboutDlg.cpp \
    394371        src/VBoxCloseVMDlg.cpp \
    395         src/VBoxConsoleView.cpp \
    396         src/VBoxConsoleWnd.cpp \
    397         src/VBoxFrameBuffer.cpp \
    398372        src/VBoxGlobalSettings.cpp \
    399373        src/VBoxHelpActions.cpp \
     
    476450        src/widgets/VBoxProgressDialog.cpp \
    477451        src/widgets/VBoxSpecialControls.cpp \
    478         src/widgets/VBoxWarningPane.cpp
    479 ifdef VBOX_WITH_NEW_RUNTIME_CORE
    480 VirtualBox_SOURCES += \
     452        src/widgets/VBoxWarningPane.cpp \
    481453        src/runtime/UISession.cpp \
    482454        src/runtime/UIActionsPool.cpp \
     
    507479        src/darwin/UIAbstractDockIconPreview.cpp \
    508480        src/darwin/UICocoaDockIconPreview.mm
    509 endif
    510481
    511482ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
     
    540511VirtualBox_SOURCES.darwin += \
    541512        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
    545514
    546515ifdef VBOX_WITH_ICHAT_THEATER
     
    554523        src/darwin/VBoxCocoaApplication.m \
    555524        src/darwin/VBoxUtils-darwin-cocoa.mm \
    556         src/darwin/VBoxCocoaSpecialControls.mm \
    557         src/darwin/CocoaDockIconPreview.mm
     525        src/darwin/VBoxCocoaSpecialControls.mm
    558526 VirtualBox_QT_MOCHDRS.darwin = \
    559527        src/darwin/VBoxCocoaSpecialControls.h
    560528else
    561529 VirtualBox_SOURCES.darwin += \
    562         src/darwin/VBoxUtils-darwin-carbon.cpp \
    563         src/darwin/CarbonDockIconPreview.cpp
     530        src/darwin/VBoxUtils-darwin-carbon.cpp
    564531endif
    565532
     
    916883# lupdate call
    917884#
     885#VirtualBox_QT_TRANSLATIONS = nls/VirtualBox_de.ts
    918886updatenls:: makeallnls nls/VirtualBox_en.ts
    919887
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxCloseVMDlg.cpp

    r28934 r29794  
    2323#include "VBoxCloseVMDlg.h"
    2424#include "VBoxProblemReporter.h"
    25 #ifdef Q_WS_MAC
    26 # include "VBoxConsoleWnd.h"
    27 #endif /* Q_WS_MAC */
     25#include "UIMachineWindowNormal.h"
    2826
    2927/* Qt includes */
     
    3129#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    3230
    33 #ifdef VBOX_WITH_NEW_RUNTIME_CORE
    34 # include "UIMachineWindowNormal.h"
    35 #endif /* !VBOX_WITH_NEW_RUNTIME_CORE */
    36 
    3731VBoxCloseVMDlg::VBoxCloseVMDlg (QWidget *aParent)
    3832    : QIWithRetranslateUI<QIDialog> (aParent)
    3933{
    4034#ifdef Q_WS_MAC
    41 # ifdef VBOX_WITH_NEW_RUNTIME_CORE
    4235    /* No sheets in another mode than normal for now. Firstly it looks ugly and
    4336     * secondly in some cases it is broken. */
     
    4538    if (pWnd)
    4639        setWindowFlags (Qt::Sheet);
    47 # endif /* !VBOX_WITH_NEW_RUNTIME_CORE */
    48 # ifndef VBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS
    49     /* Sheets are broken if the window is in fullscreen mode. So make it a
    50      * 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 */
    5740#endif /* Q_WS_MAC */
    5841
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp

    r28800 r29794  
    2323
    2424#include "VBoxFBOverlay.h"
    25 #include "VBoxFrameBuffer.h"
    26 
    27 #include "VBoxConsoleView.h"
     25
    2826#include "VBoxProblemReporter.h"
    2927#include "VBoxGlobal.h"
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBQGL.cpp

    r28800 r29794  
    2424#include "VBoxFrameBuffer.h"
    2525
    26 #include "VBoxConsoleView.h"
    27 //#include "VBoxProblemReporter.h"
    28 //#include "VBoxGlobal.h"
    29 
    3026/* Qt includes */
    3127#include <QGLWidget>
    3228
    33 //#include <iprt/asm.h>
    34 //
    3529#ifdef VBOX_WITH_VIDEOHWACCEL
    3630#include <VBox/VBoxVideo.h>
    37 //#include <VBox/types.h>
    38 //#include <VBox/ssm.h>
    3931#endif
    40 //#include <iprt/semaphore.h>
    41 //
    42 //#include <QFile>
    43 //#include <QTextStream>
    4432#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    4533
     
    5139 *  is then converted to QPixmap and blitted to the console view widget.
    5240 */
    53 
    54 VBoxQGLFrameBuffer::VBoxQGLFrameBuffer (VBoxConsoleView *aView) :
    55     VBoxFrameBuffer (aView),
    56     mCmdPipe(aView)
    57 {
    58 //    mWidget = new GLWidget(aView->viewport());
    59 #ifndef VBOXQGL_PROF_BASE
    60     resizeEvent (new VBoxResizeEvent (FramebufferPixelFormat_Opaque,
    61                                       NULL, 0, 0, 640, 480));
    62 #else
    63     resizeEvent (new VBoxResizeEvent (FramebufferPixelFormat_Opaque,
    64                                       NULL, 0, 0, VBOXQGL_PROF_WIDTH, VBOXQGL_PROF_HEIGHT));
    65 #endif
    66 }
    6741
    6842/** @note This method is called on EMT from under this object's lock */
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp

    r29791 r29794  
    2323#include "VBoxSelectorWnd.h"
    2424#include "VBoxVMListView.h"
    25 #include "VBoxConsoleWnd.h"
    2625#include "VBoxToolBar.h"
    2726
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.cpp

    r28935 r29794  
    2828#include "VBoxProblemReporter.h"
    2929#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 */
    3634
    3735#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
     
    4139{
    4240#ifdef Q_WS_MAC
    43 # ifdef VBOX_WITH_NEW_RUNTIME_CORE
    4441    /* No sheets in another mode than normal for now. Firstly it looks ugly and
    4542     * secondly in some cases it is broken. */
     
    4744        || qobject_cast<VBoxSnapshotsWgt*>(pParent))
    4845        setWindowFlags (Qt::Sheet);
    49 # endif /* !VBOX_WITH_NEW_RUNTIME_CORE */
    50 # ifndef VBOX_FORCE_NEW_RUNTIME_CORE_ALWAYS
    51     /* Sheets are broken if the window is in fullscreen mode. So make it a
    52      * 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 */
    5946#endif /* Q_WS_MAC */
    6047
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp

    r29526 r29794  
    2323/* Global Includes */
    2424#include <QTimer>
     25#include <QScrollBar>
    2526
    2627/* Local Includes */
    2728#include <VBoxVMInformationDlg.h>
    2829#include <VBoxGlobal.h>
    29 #include <VBoxConsoleView.h>
    3030#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    3131
    32 #ifdef VBOX_WITH_NEW_RUNTIME_CORE
    3332#include "UIMachineLogic.h"
    3433#include "UIMachineWindow.h"
    3534#include "UIMachineView.h"
    3635#include "UISession.h"
    37 #endif /* VBOX_WITH_NEW_RUNTIME_CORE */
    3836
    3937VBoxVMInformationDlg::InfoDlgMap VBoxVMInformationDlg::mSelfArray = InfoDlgMap();
    4038
    41 #ifdef VBOX_WITH_NEW_RUNTIME_CORE
    4239void VBoxVMInformationDlg::createInformationDlg(UIMachineWindow *pMachineWindow)
    4340{
     
    103100     * more than one screens. */
    104101    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     else
    128     {
    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_MAC
    160     : 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_MAC
    173     /* No icon for this window on the mac, cause this would act as proxy icon which isn't necessary here. */
    174     setWindowIcon (QIcon());
    175 #else
    176     /* Apply window icons */
    177     setWindowIcon (vboxGlobal().iconSetFull (QSize (32, 32), QSize (16, 16),
    178                                              ":/session_info_32px.png", ":/session_info_16px.png"));
    179 #endif
    180 
    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()));
    201102    connect (mInfoStack, SIGNAL (currentChanged (int)), this, SLOT (onPageChanged (int)));
    202103    connect (&vboxGlobal(), SIGNAL (mediumEnumFinished (const VBoxMediaList &)), this, SLOT (updateDetails()));
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.h

    r28800 r29794  
    2525#include "QIWithRetranslateUI.h"
    2626
    27 class VBoxConsoleView;
    2827class UIMachineWindow;
    2928class QTimer;
     
    4039    typedef QMap <QString, VBoxVMInformationDlg*> InfoDlgMap;
    4140
    42 #ifdef VBOX_WITH_NEW_RUNTIME_CORE
    4341    static void createInformationDlg(UIMachineWindow *pMachineWindow);
    44 #endif /* VBOX_WITH_NEW_RUNTIME_CORE */
    45     static void createInformationDlg (const CSession &aSession, VBoxConsoleView *aConsole);
    4642
    4743protected:
    4844
    49 #ifdef VBOX_WITH_NEW_RUNTIME_CORE
    5045    VBoxVMInformationDlg (UIMachineWindow *pMachineWindow, Qt::WindowFlags aFlags);
    51 #endif /* VBOX_WITH_NEW_RUNTIME_CORE */
    52     VBoxVMInformationDlg (VBoxConsoleView *aConsole, const CSession &aSession, Qt::WindowFlags aFlags);
    5346   ~VBoxVMInformationDlg();
    5447
     
    7871    static InfoDlgMap  mSelfArray;
    7972
    80     VBoxConsoleView   *mConsole;
    8173    CSession           mSession;
    8274    bool               mIsPolished;
  • trunk/src/VBox/Frontends/VirtualBox/src/darwin/DockIconPreview.h

    r28800 r29794  
    2323#ifdef QT_MAC_USE_COCOA
    2424
    25 #include "CocoaDockIconPreview.h"
    26 class VBoxDockIconPreview: public CocoaDockIconPreview
    27 {
    28 public:
    29     VBoxDockIconPreview (VBoxConsoleWnd *aMainWnd, const QPixmap& aOverlayImage)
    30       : CocoaDockIconPreview (aMainWnd, aOverlayImage) {}
    31 };
    32 
    3325#include "UICocoaDockIconPreview.h"
    3426class UIDockIconPreview: public UICocoaDockIconPreview
     
    3931};
    4032
    41 #else /* QT_MAC_USE_COCOA */
    42 
    43 #include "CarbonDockIconPreview.h"
    44 class VBoxDockIconPreview: public CarbonDockIconPreview
    45 {
    46 public:
    47     VBoxDockIconPreview (VBoxConsoleWnd *aMainWnd, const QPixmap& aOverlayImage)
    48       : CarbonDockIconPreview (aMainWnd, aOverlayImage) {}
    49 };
    50 
    5133#endif /* QT_MAC_USE_COCOA */
    5234
  • trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin-carbon.cpp

    r28800 r29794  
    158158 *
    159159 ********************************************************************************/
    160 #include "VBoxConsoleView.h"
    161160
    162161bool darwinIsMenuOpen (void)
     
    265264}
    266265
    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 of
    294                all other windows. This fixes issues with compiz & additional
    295                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  
    2626#include "QIDialogButtonBox.h"
    2727#ifdef Q_WS_MAC
    28 # include "VBoxConsoleWnd.h"
    2928# include "VBoxSelectorWnd.h"
    3029#endif /* Q_WS_MAC */
     
    3938#include <QKeyEvent>
    4039
    41 #if defined(VBOX_WITH_NEW_RUNTIME_CORE) && defined(Q_WS_MAC)
     40#ifdef Q_WS_MAC
    4241# include "UIMachineWindowFullscreen.h"
    4342# include "UIMachineWindowSeamless.h"
    44 #endif /* defined(VBOX_WITH_NEW_RUNTIME_CORE) && defined(Q_WS_MAC) */
     43#endif /* Q_WS_MAC */
    4544
    4645/** @class QIMessageBox
     
    6463{
    6564#ifdef Q_WS_MAC
    66     VBoxConsoleWnd *cwnd = qobject_cast<VBoxConsoleWnd*> (aParent);
    67 # ifdef VBOX_WITH_NEW_RUNTIME_CORE
    6865    /* No sheets in another mode than normal for now. Firstly it looks ugly and
    6966     * 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)))
    8169        setWindowFlags (Qt::Sheet);
    8270#endif /* Q_WS_MAC */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r29736 r29794  
    2424#include "VBoxDefs.h"
    2525#include "VBoxSelectorWnd.h"
    26 #include "VBoxConsoleWnd.h"
    2726#include "VBoxProblemReporter.h"
    2827#include "QIHotKeyEdit.h"
     
    3029#include "QIDialogButtonBox.h"
    3130
    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"
    3633#ifdef VBOX_WITH_REGISTRATION
    3734# include "UIRegistrationWzd.h"
    3835#endif
    3936#include "VBoxUpdateDlg.h"
    40 
    4137#ifdef VBOX_WITH_VIDEOHWACCEL
    42 #include "VBoxFrameBuffer.h"
    43 #endif
     38# include "VBoxFBOverlay.h"
     39#endif /* VBOX_WITH_VIDEOHWACCEL */
    4440
    4541/* Qt includes */
     
    597593VBoxGlobal::VBoxGlobal()
    598594    : mValid (false)
    599     , mSelectorWnd (NULL), mConsoleWnd (NULL)
    600 #ifdef VBOX_WITH_NEW_RUNTIME_CORE
     595    , mSelectorWnd (NULL)
    601596    , m_pVirtualMachine(0)
    602 #endif
    603597    , mMainWindow (NULL)
    604598#ifdef VBOX_WITH_REGISTRATION
     
    761755    if (isVMConsoleProcess())
    762756    {
    763 #ifdef VBOX_WITH_NEW_RUNTIME_CORE
    764757        if (m_pVirtualMachine)
    765758            return m_pVirtualMachine->mainWindow();
    766         else
    767 #endif /* VBOX_WITH_NEW_RUNTIME_CORE */
    768             return &consoleWnd();
    769759    }
    770760    return NULL;
    771761}
    772762
    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 #endif
    785 
    786     Assert (mValid);
    787 
    788     if (!mConsoleWnd)
    789     {
    790         /*
    791          *  We pass the address of mConsoleWnd to the constructor to let it be
    792          *  initialized right after the constructor is called. It is necessary
    793          *  to avoid recursion, since this method may be (and will be) called
    794          *  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_CORE
    805763bool VBoxGlobal::createVirtualMachine(const CSession &session)
    806764{
     
    819777    return m_pVirtualMachine;
    820778}
    821 #endif
    822779
    823780bool VBoxGlobal::brandingIsActive (bool aForce /* = false*/)
     
    25962553        return false;
    25972554
    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);
    26082556}
    26092557
     
    54205368#endif
    54215369
    5422     if (mConsoleWnd)
    5423         delete mConsoleWnd;
    54245370    if (mSelectorWnd)
    54255371        delete mSelectorWnd;
    5426 #ifdef VBOX_WITH_NEW_RUNTIME_CORE
    54275372    if (m_pVirtualMachine)
    54285373        delete m_pVirtualMachine;
    5429 #endif
    54305374
    54315375    /* ensure CGuestOSType objects are no longer used */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h

    r29010 r29794  
    4141class QLabel;
    4242class QToolButton;
    43 #ifdef VBOX_WITH_NEW_RUNTIME_CORE
    4443class UIMachine;
    45 #endif
    4644
    4745// VirtualBox callback events
     
    278276
    279277class VBoxSelectorWnd;
    280 class VBoxConsoleWnd;
    281278class UIRegistrationWzd;
    282279class VBoxUpdateDlg;
     
    311308    QWidget *vmWindow();
    312309
    313     VBoxConsoleWnd &consoleWnd();
    314 #ifdef VBOX_WITH_NEW_RUNTIME_CORE
    315310    bool createVirtualMachine(const CSession &session);
    316311    UIMachine* virtualMachine();
    317 #endif
    318312
    319313    /* main window handle storage */
     
    913907
    914908    VBoxSelectorWnd *mSelectorWnd;
    915     VBoxConsoleWnd *mConsoleWnd;
    916 #ifdef VBOX_WITH_NEW_RUNTIME_CORE
    917909    UIMachine *m_pVirtualMachine;
    918 #endif
    919910    QWidget* mMainWindow;
    920911
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxProblemReporter.cpp

    r28846 r29794  
    2222#include "VBoxGlobal.h"
    2323#include "VBoxSelectorWnd.h"
    24 #include "VBoxConsoleWnd.h"
    2524#include "VBoxProgressDialog.h"
    2625#include "UIDownloaderUserManual.h"
    27 #ifdef VBOX_WITH_NEW_RUNTIME_CORE
    28 # include "UIMachine.h"
    29 #endif
     26#include "UIMachine.h"
    3027
    3128#include "VBoxAboutDlg.h"
     
    22282225void VBoxProblemReporter::cannotImportAppliance (const CProgress &aProgress, CAppliance* aAppliance, QWidget *aParent /* = NULL */) const
    22292226{
    2230     AssertWrapperOk (aProgress);
     2227//    AssertWrapperOk (aProgress);
    22312228
    22322229    message (aParent ? aParent : mainWindowShown(),
  • trunk/src/VBox/Frontends/VirtualBox/src/main.cpp

    r29067 r29794  
    2727#include "VBoxProblemReporter.h"
    2828#include "VBoxSelectorWnd.h"
    29 #include "VBoxConsoleWnd.h"
    3029#include "VBoxUtils.h"
    3130#ifdef QT_MAC_USE_COCOA
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette