Index: /trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro	(revision 51309)
+++ /trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro	(revision 51310)
@@ -22,5 +22,4 @@
 
 FORMS = \
-    src/UIVMInfoDialog.ui \
     src/VBoxSnapshotDetailsDlg.ui \
     src/VBoxTakeSnapshotDlg.ui \
Index: /trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ja.ts
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ja.ts	(revision 51309)
+++ /trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ja.ts	(revision 51310)
@@ -17967,15 +17967,12 @@
     </message>
     <message>
-        <location filename="../src/UIVMInfoDialog.ui" line="26"/>
         <source>UIVMInfoDialog</source>
         <translation>UIVMInfoDialog</translation>
     </message>
     <message>
-        <location filename="../src/UIVMInfoDialog.ui" line="37"/>
         <source>Configuration &amp;Details</source>
         <translation>設定の詳細(&amp;D)</translation>
     </message>
     <message>
-        <location filename="../src/UIVMInfoDialog.ui" line="72"/>
         <source>&amp;Runtime Information</source>
         <translation>ランタイム情報(&amp;R)</translation>
Index: /trunk/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.cpp	(revision 51309)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.cpp	(revision 51310)
@@ -26,12 +26,12 @@
 
 /* GUI includes: */
+#include "UIVMInfoDialog.h"
+#include "UISession.h"
+#include "UIMachineLogic.h"
+#include "UIMachineWindow.h"
+#include "UIMachineView.h"
+#include "UIConverter.h"
 #include "UIIconPool.h"
-#include "UIMachineLogic.h"
-#include "UIMachineView.h"
-#include "UIMachineWindow.h"
-#include "UISession.h"
 #include "VBoxGlobal.h"
-#include "UIVMInfoDialog.h"
-#include "UIConverter.h"
 
 /* COM includes: */
@@ -48,4 +48,5 @@
 #include "CVRDEServerInfo.h"
 
+/* Other VBox includes: */
 #include <iprt/time.h>
 
@@ -79,4 +80,5 @@
     , m_fIsPolished(false)
     , m_iWidth(0), m_iHeight(0), m_fMax(false)
+    , m_pTabWidget(0)
     , m_session(pMachineWindow->session())
     , m_pTimer(new QTimer(this))
@@ -100,7 +102,4 @@
 void UIVMInfoDialog::retranslateUi()
 {
-    /* Translate uic generated strings: */
-    Ui::UIVMInfoDialog::retranslateUi(this);
-
     sltUpdateDetails();
 
@@ -109,6 +108,10 @@
     AssertReturnVoid(!machine.isNull());
 
-    /* Setup a dialog caption: */
+    /* Setup dialog title: */
     setWindowTitle(tr("%1 - Session Information").arg(machine.GetName()));
+
+    /* Translate tabs: */
+    m_pTabWidget->setTabText(0, tr("Configuration &Details"));
+    m_pTabWidget->setTabText(1, tr("&Runtime Information"));
 
     /* Clear counter names initially: */
@@ -270,11 +273,9 @@
     switch (pEvent->type())
     {
-        /* Window state-change event: */
+        /* Store window state for this VM: */
         case QEvent::WindowStateChange:
         {
             if (m_fIsPolished)
                 m_fMax = isMaximized();
-            else if (m_fMax == isMaximized())
-                m_fIsPolished = true;
             break;
         }
@@ -309,4 +310,7 @@
     if (!m_fIsPolished)
     {
+        /* Mark as polished: */
+        m_fIsPolished = true;
+
         /* Load window size, adjust position and load window state finally: */
         resize(m_iWidth, m_iHeight);
@@ -314,6 +318,4 @@
         if (m_fMax)
             QTimer::singleShot(0, this, SLOT(showMaximized()));
-        else
-            m_fIsPolished = true;
     }
 
@@ -325,5 +327,5 @@
 {
     /* Details page update: */
-    mDetailsText->setText(vboxGlobal().detailsReport(m_session.GetMachine(), false /* with links */));
+    m_browsers[0]->setText(vboxGlobal().detailsReport(m_session.GetMachine(), false /* with links */));
 }
 
@@ -348,5 +350,5 @@
 {
     /* Focus the browser on shown page: */
-    mInfoStack->widget(iIndex)->setFocus();
+    m_pTabWidget->widget(iIndex)->setFocus();
 }
 
@@ -367,43 +369,24 @@
 
 #ifdef Q_WS_MAC
-    /* No icon for this window on the mac, cause this would act as proxy icon which isn't necessary here. */
+    /* No window-icon on Mac OX X, because it acts as proxy icon which isn't necessary here. */
     setWindowIcon(QIcon());
 #else /* !Q_WS_MAC */
-    /* Apply window icons */
+    /* Assign window-icon(s: */
     setWindowIcon(UIIconPool::iconSetFull(":/session_info_32px.png", ":/session_info_16px.png"));
 #endif /* !Q_WS_MAC */
 
-    /* Apply UI decorations */
-    Ui::UIVMInfoDialog::setupUi(this);
-
-    /* Setup tab icons: */
-    mInfoStack->setTabIcon(0, UIIconPool::iconSet(":/session_info_details_16px.png"));
-    mInfoStack->setTabIcon(1, UIIconPool::iconSet(":/session_info_runtime_16px.png"));
-
-    /* Setup focus-proxy for pages: */
-    mPage1->setFocusProxy(mDetailsText);
-    mPage2->setFocusProxy(mStatisticText);
-
-    /* Setup browsers: */
-    mDetailsText->viewport()->setAutoFillBackground(false);
-    mStatisticText->viewport()->setAutoFillBackground(false);
-
-    /* Setup margins: */
-    mDetailsText->setViewportMargins(5, 5, 5, 5);
-    mStatisticText->setViewportMargins(5, 5, 5, 5);
-
-    /* Configure dialog button-box: */
-    mButtonBox->button(QDialogButtonBox::Close)->setShortcut(Qt::Key_Escape);
-
-    /* Setup handlers: */
+    /* Prepare central-widget: */
+    prepareCentralWidget();
+
+    /* Configure handlers: */
     connect(m_pMachineWindow->uisession(), SIGNAL(sigMediumChange(const CMediumAttachment&)), this, SLOT(sltUpdateDetails()));
     connect(m_pMachineWindow->uisession(), SIGNAL(sigSharedFolderChange()), this, SLOT(sltUpdateDetails()));
     /* TODO_NEW_CORE: this is ofc not really right in the mm sense. There are more than one screens. */
     connect(m_pMachineWindow->machineView(), SIGNAL(resizeHintDone()), this, SLOT(sltProcessStatistics()));
-    connect(mInfoStack, SIGNAL(currentChanged(int)), this, SLOT(sltHandlePageChanged(int)));
+    connect(m_pTabWidget, SIGNAL(currentChanged(int)), this, SLOT(sltHandlePageChanged(int)));
     connect(&vboxGlobal(), SIGNAL(sigMediumEnumerationFinished()), this, SLOT(sltUpdateDetails()));
     connect(m_pTimer, SIGNAL(timeout()), this, SLOT(sltProcessStatistics()));
 
-    /* Loading language constants: */
+    /* Retranslate: */
     retranslateUi();
 
@@ -414,7 +397,86 @@
     sltProcessStatistics();
     m_pTimer->start(5000);
-
-    /* Make statistics page the default one: */
-    mInfoStack->setCurrentIndex(1);
+}
+
+void UIVMInfoDialog::prepareCentralWidget()
+{
+    /* Create central-widget: */
+    setCentralWidget(new QWidget);
+    AssertPtrReturnVoid(centralWidget());
+    {
+        /* Create main-layout: */
+        new QVBoxLayout(centralWidget());
+        AssertPtrReturnVoid(centralWidget()->layout());
+        {
+            /* Create tab-widget: */
+            prepareTabWidget();
+            /* Create button-box: */
+            prepareButtonBox();
+        }
+    }
+}
+
+void UIVMInfoDialog::prepareTabWidget()
+{
+    /* Create tab-widget: */
+    m_pTabWidget = new QITabWidget;
+    AssertPtrReturnVoid(m_pTabWidget);
+    {
+        /* Create tabs: */
+        for (int iTabIndex = 0; iTabIndex < 2; ++iTabIndex)
+            prepareTab(iTabIndex);
+        /* Configure tab-widget: */
+        m_pTabWidget->setTabIcon(0, UIIconPool::iconSet(":/session_info_details_16px.png"));
+        m_pTabWidget->setTabIcon(1, UIIconPool::iconSet(":/session_info_runtime_16px.png"));
+        m_pTabWidget->setCurrentIndex(1);
+        /* Add tab-widget into main-layout: */
+        centralWidget()->layout()->addWidget(m_pTabWidget);
+    }
+}
+
+void UIVMInfoDialog::prepareTab(int iTabIndex)
+{
+    /* Create tab: */
+    m_tabs.insert(iTabIndex, new QWidget);
+    AssertPtrReturnVoid(m_tabs.value(iTabIndex));
+    {
+        /* Create tab-layout: */
+        QVBoxLayout *pLayout = new QVBoxLayout(m_tabs.value(iTabIndex));
+        {
+            /* Configure tab-layout: */
+            pLayout->setContentsMargins(0, 0, 0, 0);
+            /* Create browser: */
+            m_browsers.insert(iTabIndex, new QRichTextEdit);
+            AssertPtrReturnVoid(m_browsers.value(iTabIndex));
+            {
+                /* Configure browser: */
+                m_browsers[iTabIndex]->setReadOnly(true);
+                m_browsers[iTabIndex]->setFrameShadow(QFrame::Plain);
+                m_browsers[iTabIndex]->setFrameShape(QFrame::NoFrame);
+                m_browsers[iTabIndex]->setViewportMargins(5, 5, 5, 5);
+                m_browsers[iTabIndex]->viewport()->setAutoFillBackground(false);
+                m_tabs[iTabIndex]->setFocusProxy(m_browsers.value(iTabIndex));
+                /* Add browser into tab-layout: */
+                pLayout->addWidget(m_browsers.value(iTabIndex));
+            }
+        }
+        /* Add tab into tab-widget: */
+        m_pTabWidget->addTab(m_tabs.value(iTabIndex), QString());
+    }
+}
+
+void UIVMInfoDialog::prepareButtonBox()
+{
+    /* Create button-box: */
+    m_pButtonBox = new QIDialogButtonBox;
+    AssertPtrReturnVoid(m_pButtonBox);
+    {
+        /* Configure button-box: */
+        m_pButtonBox->setStandardButtons(QDialogButtonBox::Close);
+        m_pButtonBox->button(QDialogButtonBox::Close)->setShortcut(Qt::Key_Escape);
+        connect(m_pButtonBox, SIGNAL(rejected()), this, SLOT(close()));
+        /* Add button-box into main-layout: */
+        centralWidget()->layout()->addWidget(m_pButtonBox);
+    }
 }
 
@@ -722,7 +784,7 @@
 
     /* Show full composed page & save/restore scroll-bar position: */
-    int iScrollBarValue = mStatisticText->verticalScrollBar()->value();
-    mStatisticText->setText(strTable.arg(strResult));
-    mStatisticText->verticalScrollBar()->setValue(iScrollBarValue);
+    int iScrollBarValue = m_browsers[1]->verticalScrollBar()->value();
+    m_browsers[1]->setText(strTable.arg(strResult));
+    m_browsers[1]->verticalScrollBar()->setValue(iScrollBarValue);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.h	(revision 51309)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.h	(revision 51310)
@@ -30,9 +30,11 @@
 
 /* Forward declarations: */
+class QITabWidget;
+class QIDialogButtonBox;
 class UIMachineWindow;
 class QTimer;
 
 /** QMainWindow based dialog providing user with VM details and statistics. */
-class UIVMInfoDialog : public QIWithRetranslateUI<QMainWindow>, public Ui::UIVMInfoDialog
+class UIVMInfoDialog : public QIWithRetranslateUI<QMainWindow>
 {
     Q_OBJECT;
@@ -62,9 +64,9 @@
 
     /** Common event-handler. */
-    virtual bool event(QEvent *pEvent);
+    bool event(QEvent *pEvent);
     /** Resize event-handler. */
-    virtual void resizeEvent(QResizeEvent *pEvent);
+    void resizeEvent(QResizeEvent *pEvent);
     /** Show event-handler. */
-    virtual void showEvent(QShowEvent *pEvent);
+    void showEvent(QShowEvent *pEvent);
 
 private slots:
@@ -83,6 +85,14 @@
     /** General prepare helper. */
     void prepare();
-    /** Dialog prepare helper. */
+    /** Prepare helper for dialog itself. */
     void prepareThis();
+    /** Prepare helper for central-widget. */
+    void prepareCentralWidget();
+    /** Prepare helper for tab-widget. */
+    void prepareTabWidget();
+    /** Prepare helper for @a iTabIndex. */
+    void prepareTab(int iTabIndex);
+    /** Prepare helper for button-box. */
+    void prepareButtonBox();
     /** Load settings helper. */
     void loadSettings();
@@ -90,6 +100,4 @@
     /** Save settings helper. */
     void saveSettings();
-    // /** Dialog cleanup helper. */
-    // void cleanupThis() {}
     /** General cleanup helper. */
     void cleanup();
@@ -130,4 +138,16 @@
     /** @} */
 
+    /** @name Widget variables.
+     * @{ */
+    /** Dialog tab-widget. */
+    QITabWidget               *m_pTabWidget;
+    /** Dialog tabs map. */
+    QMap<int, QWidget*>        m_tabs;
+    /** Dialog browsers map. */
+    QMap<int, QRichTextEdit*>  m_browsers;
+    /** Dialog button-box. */
+    QIDialogButtonBox         *m_pButtonBox;
+    /** @} */
+
     /** @name VM details/statistics variables.
      * @{ */
Index: unk/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.ui
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.ui	(revision 51309)
+++ 	(revision )
@@ -1,149 +1,0 @@
-<ui version="4.0" >
- <comment>
- VBox frontends: Qt4 GUI ("VirtualBox"):
-
- Copyright (C) 2008-2012 Oracle Corporation
-
- 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.
- </comment>
- <class>UIVMInfoDialog</class>
- <widget class="QMainWindow" name="UIVMInfoDialog" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>487</width>
-    <height>391</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>UIVMInfoDialog</string>
-  </property>
-  <widget class="QWidget" name="centralwidget" >
-   <layout class="QVBoxLayout" >
-    <item>
-     <widget class="QITabWidget" name="mInfoStack" >
-      <property name="currentIndex" >
-       <number>0</number>
-      </property>
-      <widget class="QWidget" name="mPage1" >
-       <attribute name="title" >
-        <string>Configuration &amp;Details</string>
-       </attribute>
-       <layout class="QVBoxLayout" >
-        <property name="leftMargin" >
-         <number>0</number>
-        </property>
-        <property name="topMargin" >
-         <number>0</number>
-        </property>
-        <property name="rightMargin" >
-         <number>0</number>
-        </property>
-        <property name="bottomMargin" >
-         <number>0</number>
-        </property>
-        <item>
-         <widget class="QRichTextEdit" name="mDetailsText" >
-          <property name="frameShape" >
-           <enum>QFrame::NoFrame</enum>
-          </property>
-          <property name="frameShadow" >
-           <enum>QFrame::Plain</enum>
-          </property>
-          <property name="readOnly" >
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="mPage2" >
-       <attribute name="title" >
-        <string>&amp;Runtime Information</string>
-       </attribute>
-       <layout class="QVBoxLayout" >
-        <property name="leftMargin" >
-         <number>0</number>
-        </property>
-        <property name="topMargin" >
-         <number>0</number>
-        </property>
-        <property name="rightMargin" >
-         <number>0</number>
-        </property>
-        <property name="bottomMargin" >
-         <number>0</number>
-        </property>
-        <item>
-         <widget class="QRichTextEdit" name="mStatisticText" >
-          <property name="frameShape" >
-           <enum>QFrame::NoFrame</enum>
-          </property>
-          <property name="frameShadow" >
-           <enum>QFrame::Plain</enum>
-          </property>
-          <property name="readOnly" >
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-     </widget>
-    </item>
-    <item>
-     <widget class="QIDialogButtonBox" name="mButtonBox" >
-      <property name="standardButtons" >
-       <set>QDialogButtonBox::Close</set>
-      </property>
-     </widget>
-    </item>
-   </layout>
-  </widget>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>QIDialogButtonBox</class>
-   <extends>QDialogButtonBox</extends>
-   <header>QIDialogButtonBox.h</header>
-  </customwidget>
-  <customwidget>
-   <class>QRichTextEdit</class>
-   <extends>QTextEdit</extends>
-   <header>VBoxUtils.h</header>
-  </customwidget>
-  <customwidget>
-   <class>QITabWidget</class>
-   <extends>QTabWidget</extends>
-   <header>QITabWidget.h</header>
-  </customwidget>
- </customwidgets>
- <resources>
-  <include location="../VirtualBox1.qrc" />
- </resources>
- <connections>
-  <connection>
-   <sender>mButtonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>UIVMInfoDialog</receiver>
-   <slot>close()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>246</x>
-     <y>348</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>246</x>
-     <y>195</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxUtils.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxUtils.h	(revision 51309)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxUtils.h	(revision 51310)
@@ -98,5 +98,5 @@
 public:
 
-    QRichTextEdit (QWidget *aParent) : QTextEdit (aParent) {}
+    QRichTextEdit (QWidget *aParent = 0) : QTextEdit (aParent) {}
 
     void setViewportMargins (int aLeft, int aTop, int aRight, int aBottom)
