Index: /trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk	(revision 9256)
+++ /trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk	(revision 9257)
@@ -441,5 +441,4 @@
 	include/QIRichLabel.h \
 	include/QIAbstractWizard.h \
-	include/QIAbstractDialog.h \
 	include/QIListView.h \
 	include/QITreeWidget.h \
@@ -524,5 +523,4 @@
 	src/QIRichLabel.cpp \
 	src/QIAbstractWizard.cpp \
-	src/QIAbstractDialog.cpp \
 	src/QIDialog.cpp \
 	src/QIDialogButtonBox.cpp \
Index: unk/src/VBox/Frontends/VirtualBox4/include/QIAbstractDialog.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/include/QIAbstractDialog.h	(revision 9256)
+++ 	(revision )
@@ -1,60 +1,0 @@
-/** @file
- *
- * VBox frontends: Qt4 GUI ("VirtualBox"):
- * QIAbstractDialog class declaration
- */
-
-/*
- * Copyright (C) 2006-2008 Sun Microsystems, Inc.
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
- * Clara, CA 95054 USA or visit http://www.sun.com if you need
- * additional information or have any questions.
- */
-
-#ifndef __QIAbstractDialog_h__
-#define __QIAbstractDialog_h__
-
-/* Qt includes */
-#include <QMainWindow>
-
-class QSizeGrip;
-class QPushButton;
-
-/**
- *  QMainWindow reimplementation used as abstract interface in different dialog
- *  based on QMainWindow widget allows supporting main-menu & status-bar.
- */
-class QIAbstractDialog : public QMainWindow
-{
-    Q_OBJECT;
-
-public:
-
-    QIAbstractDialog (QWidget *aParent = 0, Qt::WindowFlags aFlags = 0);
-
-protected:
-
-    void initializeDialog();
-
-    virtual bool eventFilter (QObject *aObject, QEvent *aEvent);
-    virtual void resizeEvent (QResizeEvent *aEvent);
-
-private:
-
-    QPushButton* searchDefaultButton();
-
-    QSizeGrip   *mSizeGrip;
-    QPushButton *mDefaultButton;
-};
-
-#endif // __QIAbstractDialog_h__
-
Index: /trunk/src/VBox/Frontends/VirtualBox4/include/QIMainDialog.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/include/QIMainDialog.h	(revision 9256)
+++ /trunk/src/VBox/Frontends/VirtualBox4/include/QIMainDialog.h	(revision 9257)
@@ -30,4 +30,5 @@
 
 class QEventLoop;
+class QSizeGrip;
 
 class QIMainDialog: public QMainWindow
@@ -45,4 +46,7 @@
     QString fileForProxyIcon () const;
 
+    void setSizeGripEnabled (bool aEnabled);
+    bool isSizeGripEnabled () const;
+
 public slots:
 
@@ -52,4 +56,6 @@
 
     virtual bool event (QEvent *aEvent);
+    virtual void resizeEvent (QResizeEvent *aEvent);
+    virtual void keyPressEvent (QKeyEvent *aEvent);
 
 protected slots:
@@ -70,4 +76,6 @@
 
     QString mFileForProxyIcon;
+
+    QPointer<QSizeGrip> mSizeGrip;
 };
 
Index: /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDiskImageManagerDlg.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDiskImageManagerDlg.h	(revision 9256)
+++ /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDiskImageManagerDlg.h	(revision 9257)
@@ -67,5 +67,4 @@
     void retranslateUi();
     virtual void closeEvent (QCloseEvent *aEvent);
-    virtual void keyPressEvent (QKeyEvent *aEvent);
     virtual bool eventFilter (QObject *aObject, QEvent *aEvent);
     /* @todo: Currently not used (Ported from Qt3): */
Index: /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMInformationDlg.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMInformationDlg.h	(revision 9256)
+++ /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMInformationDlg.h	(revision 9257)
@@ -25,5 +25,5 @@
 
 #include "VBoxVMInformationDlg.gen.h"
-#include "QIAbstractDialog.h"
+#include "QIMainDialog.h"
 #include "COMDefs.h"
 #include "QIWithRetranslateUI.h"
@@ -32,5 +32,5 @@
 class QTimer;
 
-class VBoxVMInformationDlg : public QIWithRetranslateUI2<QIAbstractDialog>,
+class VBoxVMInformationDlg : public QIWithRetranslateUI2<QIMainDialog>,
                              public Ui::VBoxVMInformationDlg
 {
Index: unk/src/VBox/Frontends/VirtualBox4/src/QIAbstractDialog.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/src/QIAbstractDialog.cpp	(revision 9256)
+++ 	(revision )
@@ -1,149 +1,0 @@
-/** @file
- *
- * VBox frontends: Qt4 GUI ("VirtualBox"):
- * QIAbstractDialog class implementation
- */
-
-/*
- * Copyright (C) 2006-2008 Sun Microsystems, Inc.
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
- * Clara, CA 95054 USA or visit http://www.sun.com if you need
- * additional information or have any questions.
- */
-
-#include "QIAbstractDialog.h"
-
-/* Qt includes */
-#include <QApplication>
-#include <QSizeGrip>
-#include <QPushButton>
-#include <QStatusBar>
-#include <QKeyEvent>
-
-QIAbstractDialog::QIAbstractDialog (QWidget *aParent,
-                                    Qt::WindowFlags aFlags)
-    : QMainWindow (aParent, aFlags)
-{
-}
-
-void QIAbstractDialog::initializeDialog()
-{
-    /* Search the default button */
-    mDefaultButton = searchDefaultButton();
-
-    /* Statusbar initially disabled */
-    setStatusBar (NULL);
-
-    /* Setup size grip */
-    mSizeGrip = new QSizeGrip (centralWidget());
-    mSizeGrip->resize (mSizeGrip->sizeHint());
-
-    qApp->installEventFilter (this);
-}
-
-bool QIAbstractDialog::eventFilter (QObject *aObject, QEvent *aEvent)
-{
-    if (!isActiveWindow())
-        return QMainWindow::eventFilter (aObject, aEvent);
-
-    switch (aEvent->type())
-    {
-        /* Auto-default button focus-in processor used to move the "default"
-         * button property into the currently focused button */
-        case QEvent::FocusIn:
-        {
-            if (aObject->inherits ("QPushButton") &&
-                qobject_cast<QPushButton*> (aObject)->autoDefault())
-            {
-                qobject_cast<QPushButton*> (aObject)->
-                    setDefault (aObject != mDefaultButton);
-                if (mDefaultButton)
-                    mDefaultButton->setDefault (aObject == mDefaultButton);
-            }
-            break;
-        }
-        /* Auto-default button focus-out processor used to remove the "default"
-         * button property from the previously focused button */
-        case QEvent::FocusOut:
-        {
-            if (aObject->inherits ("QPushButton") &&
-                qobject_cast<QPushButton*> (aObject)->autoDefault())
-            {
-                if (mDefaultButton)
-                    mDefaultButton->setDefault (aObject != mDefaultButton);
-                qobject_cast<QPushButton*> (aObject)->
-                    setDefault (aObject == mDefaultButton);
-            }
-            break;
-        }
-        /* Processing Enter&Escape keys as it done for QDialog */
-        case QEvent::KeyPress:
-        {
-            QKeyEvent *e = static_cast<QKeyEvent*> (aEvent);
-            if (!aObject->inherits ("QPushButton") &&
-                (e->QInputEvent::modifiers() == 0 ||
-                 (e->QInputEvent::modifiers() & Qt::KeypadModifier &&
-                  e->key() == Qt::Key_Enter)))
-            {
-                switch (e->key())
-                {
-                    /* Processing the return keypress for the auto-default button */
-                    case Qt::Key_Enter:
-                    case Qt::Key_Return:
-                    {
-                        QPushButton *currentDefault = searchDefaultButton();
-                        if (currentDefault)
-                            currentDefault->animateClick();
-                        break;
-                    }
-                    /* Processing the escape keypress as the close dialog action */
-                    case Qt::Key_Escape:
-                    {
-                        close();
-                        break;
-                    }
-                    default:
-                        break;
-                }
-            }
-        }
-        default:
-            break;
-    }
-    return QMainWindow::eventFilter (aObject, aEvent);
-}
-
-void QIAbstractDialog::resizeEvent (QResizeEvent *aEvent)
-{
-    QMainWindow::resizeEvent (aEvent);
-
-    /* Adjust the size-grip location for the current resize event */
-    mSizeGrip->move (centralWidget()->rect().bottomRight() -
-                     QPoint (mSizeGrip->rect().width() - 1,
-                     mSizeGrip->rect().height() - 1));
-}
-
-QPushButton* QIAbstractDialog::searchDefaultButton()
-{
-    /* This mechanism is used for searching the default dialog button
-     * and similar the same mechanism in Qt::QDialog inner source */
-    QPushButton *button = 0;
-    QList<QPushButton*> list = findChildren<QPushButton*>();
-    foreach (QObject *aObj, list)
-    {
-        button = qobject_cast<QPushButton*> (aObj);
-        if (button->isDefault())
-            break;
-    }
-    return button;
-}
-
Index: /trunk/src/VBox/Frontends/VirtualBox4/src/QIMainDialog.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/src/QIMainDialog.cpp	(revision 9256)
+++ /trunk/src/VBox/Frontends/VirtualBox4/src/QIMainDialog.cpp	(revision 9257)
@@ -34,4 +34,6 @@
 #include <QUrl>
 #include <QMenu>
+#include <QSizeGrip>
+#include <QPushButton>
 
 QIMainDialog::QIMainDialog (QWidget *aParent /* = NULL */, Qt::WindowFlags aFlags /* = Qt::Dialog */)
@@ -82,4 +84,21 @@
 {
     return mFileForProxyIcon;
+}
+
+void QIMainDialog::setSizeGripEnabled (bool aEnabled)
+{
+    if (!mSizeGrip && aEnabled)
+    {
+        mSizeGrip = new QSizeGrip (this);
+        mSizeGrip->resize (mSizeGrip->sizeHint());
+        mSizeGrip->show();
+    }
+    else if (mSizeGrip && !aEnabled)
+        delete mSizeGrip;
+}
+
+bool QIMainDialog::isSizeGripEnabled () const
+{
+    return mSizeGrip;
 }
 
@@ -167,4 +186,59 @@
 }
 
+void QIMainDialog::resizeEvent (QResizeEvent *aEvent)
+{
+    QMainWindow::resizeEvent (aEvent);
+
+    /* Adjust the size-grip location for the current resize event */
+    if (mSizeGrip) 
+    {
+        if (isRightToLeft())
+            mSizeGrip->move (rect().bottomLeft() - mSizeGrip->rect().bottomLeft());
+        else
+            mSizeGrip->move (rect().bottomRight() - mSizeGrip->rect().bottomRight());
+        aEvent->accept();
+    }
+}
+
+void QIMainDialog::keyPressEvent (QKeyEvent *aEvent)
+{
+#ifdef Q_WS_MAC
+    if (aEvent->modifiers() == Qt::ControlModifier && 
+        aEvent->key() == Qt::Key_Period) 
+        reject();
+    else
+#endif
+    if (aEvent->modifiers() == Qt::NoModifier ||
+        (aEvent->modifiers() & Qt::KeypadModifier && aEvent->key() == Qt::Key_Enter))
+    {
+        switch (aEvent->key())
+        {
+            case Qt::Key_Enter:
+            case Qt::Key_Return:
+                {
+                    QList<QPushButton*> list = qFindChildren<QPushButton*> (this);
+                    for (int i=0; i < list.size(); ++i)
+                    {
+                        QPushButton *pb = list.at (i);
+                        if (pb->isDefault() && pb->isVisible()) 
+                        {
+                            if (pb->isEnabled())
+                                pb->click();
+                            return;
+                        }
+                    }
+                    break;
+                }
+            case Qt::Key_Escape:
+                {
+                    reject();
+                    break;
+                }
+        }
+    }
+    else
+        aEvent->ignore();
+}
+
 void QIMainDialog::accept() 
 { 
Index: /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxDiskImageManagerDlg.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxDiskImageManagerDlg.cpp	(revision 9256)
+++ /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxDiskImageManagerDlg.cpp	(revision 9257)
@@ -817,28 +817,4 @@
     mModelessDialog = NULL;
     aEvent->accept();
-}
-
-void VBoxDiskImageManagerDlg::keyPressEvent (QKeyEvent *aEvent)
-{
-    if (aEvent->modifiers() == Qt::NoModifier ||
-        (aEvent->modifiers() != Qt::NoModifier && aEvent->key() == Qt::Key_Enter))
-    {
-        switch (aEvent->key())
-        {
-            case Qt::Key_Enter:
-            case Qt::Key_Return:
-                {
-                    accept();
-                    break;
-                }
-            case Qt::Key_Escape:
-                {
-                    reject();
-                    break;
-                }
-        }
-    }
-    else
-        aEvent->ignore();
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMInformationDlg.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMInformationDlg.cpp	(revision 9256)
+++ /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMInformationDlg.cpp	(revision 9257)
@@ -52,5 +52,5 @@
                                             const CSession &aSession,
                                             Qt::WindowFlags aFlags)
-    : QIWithRetranslateUI2<QIAbstractDialog> (aConsole, aFlags)
+    : QIWithRetranslateUI2<QIMainDialog> (aConsole, aFlags)
     , mIsPolished (false)
     , mConsole (aConsole)
@@ -61,6 +61,12 @@
     Ui::VBoxVMInformationDlg::setupUi (this);
 
-    /* Initialize parent defaults */
-    initializeDialog();
+#ifdef Q_WS_MAC
+    /* No icon for this window on the mac, cause this would act as proxy icon
+     * which isn't necessary here. */
+    setWindowIcon (QIcon());
+#endif
+
+    /* Enable size grip without using a status bar. */
+    setSizeGripEnabled (true);
 
     /* Setup focus-proxy for pages */
@@ -250,5 +256,5 @@
 bool VBoxVMInformationDlg::event (QEvent *aEvent)
 {
-    bool result = QIAbstractDialog::event (aEvent);
+    bool result = QIMainDialog::event (aEvent);
     switch (aEvent->type())
     {
@@ -269,5 +275,5 @@
 void VBoxVMInformationDlg::resizeEvent (QResizeEvent *aEvent)
 {
-    QIAbstractDialog::resizeEvent (aEvent);
+    QIMainDialog::resizeEvent (aEvent);
 
     /* Store dialog size for this vm */
@@ -281,5 +287,5 @@
 void VBoxVMInformationDlg::showEvent (QShowEvent *aEvent)
 {
-    QIAbstractDialog::showEvent (aEvent);
+    QIMainDialog::showEvent (aEvent);
 
     /* One may think that QWidget::polish() is the right place to do things
Index: /trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMInformationDlg.ui
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMInformationDlg.ui	(revision 9256)
+++ /trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMInformationDlg.ui	(revision 9257)
@@ -1,4 +1,3 @@
 <ui version="4.0" >
- <class>VBoxVMInformationDlg</class>
  <comment>
  VBox frontends: Qt4 GUI ("VirtualBox"):
@@ -18,4 +17,5 @@
  additional information or have any questions.
  </comment>
+ <class>VBoxVMInformationDlg</class>
  <widget class="QMainWindow" name="VBoxVMInformationDlg" >
   <property name="geometry" >
@@ -121,5 +121,4 @@
    </layout>
   </widget>
-  <widget class="QStatusBar" name="statusbar" />
  </widget>
  <customwidgets>
Index: /trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMLogViewer.ui
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMLogViewer.ui	(revision 9256)
+++ /trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMLogViewer.ui	(revision 9257)
@@ -54,5 +54,4 @@
    </layout>
   </widget>
-  <widget class="QStatusBar" name="statusbar" />
  </widget>
  <customwidgets>
