Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp	(revision 90366)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp	(revision 90370)
@@ -3158,5 +3158,4 @@
     QWidget *pDialogParent = windowManager().realParentWindow(pParent);
     windowManager().registerNewParent(pWizard, pDialogParent);
-    pWizard->prepare();
     pWizard->exec();
     delete pWizard;
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp	(revision 90366)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp	(revision 90370)
@@ -298,15 +298,15 @@
         uCapabilities |= capabilities[i];
 
-    bool fIsCreateDynamicPossible = uCapabilities & KMediumFormatCapabilities_CreateDynamic;
-    bool fIsCreateFixedPossible = uCapabilities & KMediumFormatCapabilities_CreateFixed;
-    bool fIsCreateSplitPossible = uCapabilities & KMediumFormatCapabilities_CreateSplit2G;
+    bool m_fIsCreateDynamicPossible = uCapabilities & KMediumFormatCapabilities_CreateDynamic;
+    bool m_fIsCreateFixedPossible = uCapabilities & KMediumFormatCapabilities_CreateFixed;
+    bool m_fIsCreateSplitPossible = uCapabilities & KMediumFormatCapabilities_CreateSplit2G;
     if (m_pFixedCheckBox)
     {
-        if (!fIsCreateDynamicPossible)
+        if (!m_fIsCreateDynamicPossible)
         {
             m_pFixedCheckBox->setChecked(true);
             m_pFixedCheckBox->setEnabled(false);
         }
-        if (!fIsCreateFixedPossible)
+        if (!m_fIsCreateFixedPossible)
         {
             m_pFixedCheckBox->setChecked(false);
@@ -315,12 +315,12 @@
     }
     if (m_pFixedCheckBox)
-        m_pFixedCheckBox->setHidden(!fIsCreateFixedPossible);
+        m_pFixedCheckBox->setHidden(!m_fIsCreateFixedPossible);
     if (m_pSplitBox)
-        m_pSplitBox->setHidden(!fIsCreateSplitPossible);
-}
-
-void UIDiskVariantGroupBox::updateMediumVariantWidgetsAfterFormatChange(const CMediumFormat &mediumFormat)
-{
-    /* Enable/disable widgets: */
+        m_pSplitBox->setHidden(!m_fIsCreateSplitPossible);
+}
+
+void UIDiskVariantGroupBox::updateMediumVariantWidgetsAfterFormatChange(const CMediumFormat &mediumFormat,
+                                                                        bool fHideDisabled /* = false */)
+{
     ULONG uCapabilities = 0;
     QVector<KMediumFormatCapabilities> capabilities;
@@ -329,17 +329,23 @@
         uCapabilities |= capabilities[i];
 
-    bool fIsCreateDynamicPossible = uCapabilities & KMediumFormatCapabilities_CreateDynamic;
-    bool fIsCreateFixedPossible = uCapabilities & KMediumFormatCapabilities_CreateFixed;
-    bool fIsCreateSplitPossible = uCapabilities & KMediumFormatCapabilities_CreateSplit2G;
+    m_fIsCreateDynamicPossible = uCapabilities & KMediumFormatCapabilities_CreateDynamic;
+    m_fIsCreateFixedPossible = uCapabilities & KMediumFormatCapabilities_CreateFixed;
+    m_fIsCreateSplitPossible = uCapabilities & KMediumFormatCapabilities_CreateSplit2G;
 
     if (m_pFixedCheckBox)
     {
-        m_pFixedCheckBox->setEnabled(fIsCreateDynamicPossible || fIsCreateFixedPossible);
-        if (!fIsCreateDynamicPossible)
+        m_pFixedCheckBox->setEnabled(m_fIsCreateDynamicPossible || m_fIsCreateFixedPossible);
+        if (!m_fIsCreateDynamicPossible)
             m_pFixedCheckBox->setChecked(true);
-        if (!fIsCreateFixedPossible)
+        if (!m_fIsCreateFixedPossible)
             m_pFixedCheckBox->setChecked(false);
     }
-    m_pSplitBox->setEnabled(fIsCreateSplitPossible);
+    m_pSplitBox->setEnabled(m_fIsCreateSplitPossible);
+
+    if (fHideDisabled)
+    {
+        m_pFixedCheckBox->setHidden(!m_pFixedCheckBox->isEnabled());
+        m_pSplitBox->setHidden(!m_pSplitBox->isEnabled());
+    }
     emit sigMediumVariantChanged(mediumVariant());
 }
@@ -349,4 +355,19 @@
     /* Make sure medium variant is correct: */
     return mediumVariant() != (qulonglong)KMediumVariant_Max;
+}
+
+bool UIDiskVariantGroupBox::isCreateDynamicPossible() const
+{
+    return m_fIsCreateDynamicPossible;
+}
+
+bool UIDiskVariantGroupBox::isCreateFixedPossible() const
+{
+    return m_fIsCreateFixedPossible;
+}
+
+bool UIDiskVariantGroupBox::isCreateSplitPossible() const
+{
+    return m_fIsCreateSplitPossible;
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.h	(revision 90366)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.h	(revision 90370)
@@ -105,9 +105,13 @@
 
     UIDiskVariantGroupBox(bool fExpertMode, QWidget *pParent = 0);
-    void updateMediumVariantWidgetsAfterFormatChange(const CMediumFormat &mediumFormat);
+    void updateMediumVariantWidgetsAfterFormatChange(const CMediumFormat &mediumFormat, bool fHideDisabled = false);
     qulonglong mediumVariant() const;
     void setMediumVariant(qulonglong uMediumVariant);
     void setWidgetVisibility(CMediumFormat &mediumFormat);
     bool isComplete() const;
+
+    bool isCreateDynamicPossible() const;
+    bool isCreateFixedPossible() const;
+    bool isCreateSplitPossible() const;
 
 private slots:
@@ -122,4 +126,7 @@
     QCheckBox *m_pFixedCheckBox;
     QCheckBox *m_pSplitBox;
+    bool m_fIsCreateDynamicPossible;
+    bool m_fIsCreateFixedPossible;
+    bool m_fIsCreateSplitPossible;
 };
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp	(revision 90366)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp	(revision 90370)
@@ -54,4 +54,44 @@
 }
 
+qulonglong UIWizardNewVD::mediumVariant() const
+{
+    return m_uMediumVariant;
+}
+
+void UIWizardNewVD::setMediumVariant(qulonglong uMediumVariant)
+{
+    m_uMediumVariant = uMediumVariant;
+}
+
+const CMediumFormat &UIWizardNewVD::mediumFormat()
+{
+    return m_comMediumFormat;
+}
+
+void UIWizardNewVD::setMediumFormat(const CMediumFormat &mediumFormat)
+{
+    m_comMediumFormat = mediumFormat;
+}
+
+const QString &UIWizardNewVD::mediumPath() const
+{
+    return m_strMediumPath;
+}
+
+void UIWizardNewVD::setMediumPath(const QString &strMediumPath)
+{
+    m_strMediumPath = strMediumPath;
+}
+
+qulonglong UIWizardNewVD::mediumSize() const
+{
+    return m_uMediumSize;
+}
+
+void UIWizardNewVD::setMediumSize(qulonglong uMediumSize)
+{
+    m_uMediumSize = uMediumSize;
+}
+
 void UIWizardNewVD::populatePages()
 {
@@ -68,5 +108,5 @@
 
         // {
-        //     //addPage(new UIWizardNewVMPageExpert);
+        //     //addPage(new UIWizardNewVDPageExpert);
         //     break;
         // }
@@ -127,28 +167,2 @@
     setWindowTitle(tr("Create Virtual Hard Disk"));
 }
-
-void UIWizardNewVD::prepare()
-{
-    // /* Create corresponding pages: */
-    // switch (mode())
-    // {
-    //     case WizardMode_Basic:
-    //     {
-    //         setPage(Page1, new UIWizardNewVDPageFileType);
-    //         setPage(Page2, new UIWizardNewVDPageVariant);
-    //         setPage(Page3, new UIWizardNewVDPageSizeLocation(m_strDefaultName, m_strDefaultPath, m_uDefaultSize));
-    //         break;
-    //     }
-    //     case WizardMode_Expert:
-    //     {
-    //         setPage(PageExpert, new UIWizardNewVDPageExpert(m_strDefaultName, m_strDefaultPath, m_uDefaultSize));
-    //         break;
-    //     }
-    //     default:
-    //     {
-    //         AssertMsgFailed(("Invalid mode: %d", mode()));
-    //         break;
-    //     }
-    // }
-
-}
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.h	(revision 90366)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.h	(revision 90370)
@@ -28,4 +28,14 @@
 #include "COMEnums.h"
 #include "CMedium.h"
+#include "CMediumFormat.h"
+
+#define newVDWizardPropertySet(functionName, value)                      \
+    do                                                                   \
+    {                                                                    \
+        UIWizardNewVD *pWizard = qobject_cast<UIWizardNewVD*>(wizard()); \
+        if (pWizard)                                                     \
+            pWizard->set##functionName(value);                           \
+    }                                                                    \
+    while(0)
 
 /* New Virtual Hard Drive wizard: */
@@ -36,26 +46,20 @@
 public:
 
-    /* Page IDs: */
-    enum
-    {
-        Page1,
-        Page2,
-        Page3
-    };
-
-    /* Page IDs: */
-    enum
-    {
-        PageExpert
-    };
-
-    /* Constructor: */
     UIWizardNewVD(QWidget *pParent,
                   const QString &strDefaultName, const QString &strDefaultPath,
-                  qulonglong uDefaultSize,
-                  WizardMode mode = WizardMode_Auto);
+                  qulonglong uDefaultSize, WizardMode mode = WizardMode_Auto);
 
-    /* Pages related stuff: */
-    void prepare();
+
+    qulonglong mediumVariant() const;
+    void setMediumVariant(qulonglong uMediumVariant);
+
+    const CMediumFormat &mediumFormat();
+    void setMediumFormat(const CMediumFormat &mediumFormat);
+
+    const QString &mediumPath() const;
+    void setMediumPath(const QString &strMediumPath);
+
+    qulonglong mediumSize() const;
+    void setMediumSize(qulonglong mediumSize);
 
 protected:
@@ -71,5 +75,10 @@
     void retranslateUi();
 
-    /* Variables: */
+    qulonglong m_uMediumVariant;
+    CMediumFormat m_comMediumFormat;
+    QString m_strMediumPath;
+    qulonglong m_uMediumSize;
+
+
     QString     m_strDefaultName;
     QString     m_strDefaultPath;
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageFileType.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageFileType.cpp	(revision 90366)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageFileType.cpp	(revision 90370)
@@ -33,54 +33,4 @@
 #include "CSystemProperties.h"
 
-// UIWizardNewVDPageBaseFileType::UIWizardNewVDPageBaseFileType()
-//     : m_pFormatButtonGroup(0)
-// {
-// }
-
-// void UIWizardNewVDPageBaseFileType::addFormatButton(QWidget *pParent, QVBoxLayout *pFormatLayout, CMediumFormat medFormat, bool fPreferred /* = false */)
-// {
-//     /* Check that medium format supports creation: */
-//     ULONG uFormatCapabilities = 0;
-//     QVector<KMediumFormatCapabilities> capabilities;
-//     capabilities = medFormat.GetCapabilities();
-//     for (int i = 0; i < capabilities.size(); i++)
-//         uFormatCapabilities |= capabilities[i];
-
-//     if (!(uFormatCapabilities & KMediumFormatCapabilities_CreateFixed ||
-//           uFormatCapabilities & KMediumFormatCapabilities_CreateDynamic))
-//         return;
-
-//     /* Check that medium format supports creation of virtual hard-disks: */
-//     QVector<QString> fileExtensions;
-//     QVector<KDeviceType> deviceTypes;
-//     medFormat.DescribeFileExtensions(fileExtensions, deviceTypes);
-//     if (!deviceTypes.contains(KDeviceType_HardDisk))
-//         return;
-
-//     /* Create/add corresponding radio-button: */
-//     QRadioButton *pFormatButton = new QRadioButton(pParent);
-//     AssertPtrReturnVoid(pFormatButton);
-//     {
-//         /* Make the preferred button font bold: */
-//         if (fPreferred)
-//         {
-//             QFont font = pFormatButton->font();
-//             font.setBold(true);
-//             pFormatButton->setFont(font);
-//         }
-//         pFormatLayout->addWidget(pFormatButton);
-//         m_formats << medFormat;
-//         m_formatNames << medFormat.GetName();
-//         m_pFormatButtonGroup->addButton(pFormatButton, m_formatNames.size() - 1);
-//         m_formatExtensions << UIWizardNewVDPageBaseSizeLocation::defaultExtension(medFormat);
-//     }
-// }
-
-
-// CMediumFormat UIWizardNewVDPageBaseFileType::mediumFormat() const
-// {
-//     return m_pFormatButtonGroup && m_pFormatButtonGroup->checkedButton() ? m_formats[m_pFormatButtonGroup->checkedId()] : CMediumFormat();
-// }
-
 // void UIWizardNewVDPageBaseFileType::setMediumFormat(const CMediumFormat &mediumFormat)
 // {
@@ -93,17 +43,4 @@
 // }
 
-// void UIWizardNewVDPageBaseFileType::retranslateWidgets()
-// {
-//     if (m_pFormatButtonGroup)
-//     {
-//         QList<QAbstractButton*> buttons = m_pFormatButtonGroup->buttons();
-//         for (int i = 0; i < buttons.size(); ++i)
-//         {
-//             QAbstractButton *pButton = buttons[i];
-//             UIMediumFormat enmFormat = gpConverter->fromInternalString<UIMediumFormat>(m_formatNames[m_pFormatButtonGroup->id(pButton)]);
-//             pButton->setText(gpConverter->toString(enmFormat));
-//         }
-//     }
-// }
 
 UIWizardNewVDPageFileType::UIWizardNewVDPageFileType()
@@ -133,5 +70,13 @@
 
     pMainLayout->addStretch();
+    connect(m_pFormatButtonGroup, &UIDiskFormatsGroupBox::sigMediumFormatChanged,
+            this, &UIWizardNewVDPageFileType::sltMediumFormatChanged);
     retranslateUi();
+}
+
+void UIWizardNewVDPageFileType::sltMediumFormatChanged()
+{
+    AssertReturnVoid(m_pFormatButtonGroup);
+    newVDWizardPropertySet(MediumFormat, m_pFormatButtonGroup->mediumFormat());
 }
 
@@ -147,6 +92,7 @@
 void UIWizardNewVDPageFileType::initializePage()
 {
-    /* Translate page: */
     retranslateUi();
+    if (m_pFormatButtonGroup)
+        newVDWizardPropertySet(MediumFormat, m_pFormatButtonGroup->mediumFormat());
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageFileType.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageFileType.h	(revision 90366)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageFileType.h	(revision 90370)
@@ -38,7 +38,4 @@
 namespace UIWizardNewVDFileType
 {
-//     void addFormatButton(QWidget *pParent, QVBoxLayout *pFormatsLayout, CMediumFormat medFormat, bool fPreferred = false);
-
-   // QWidget *createFormatButtonGroup(QButtonGroup *&pFormatButtonGroup, bool fExperMode);
 
 //     CMediumFormat mediumFormat() const;
@@ -63,4 +60,8 @@
     UIWizardNewVDPageFileType();
 
+private slots:
+
+    void sltMediumFormatChanged();
+
 private:
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageVariant.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageVariant.cpp	(revision 90366)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageVariant.cpp	(revision 90370)
@@ -92,40 +92,4 @@
 
 
-// }
-
-// void UIWizardNewVDPageBaseVariant::setWidgetVisibility(CMediumFormat &mediumFormat)
-// {
-//     ULONG uCapabilities = 0;
-//     QVector<KMediumFormatCapabilities> capabilities;
-//     capabilities = mediumFormat.GetCapabilities();
-//     for (int i = 0; i < capabilities.size(); i++)
-//         uCapabilities |= capabilities[i];
-
-//     bool fIsCreateDynamicPossible = uCapabilities & KMediumFormatCapabilities_CreateDynamic;
-//     bool fIsCreateFixedPossible = uCapabilities & KMediumFormatCapabilities_CreateFixed;
-//     bool fIsCreateSplitPossible = uCapabilities & KMediumFormatCapabilities_CreateSplit2G;
-//     if (m_pFixedCheckBox)
-//     {
-//         if (!fIsCreateDynamicPossible)
-//         {
-//             m_pFixedCheckBox->setChecked(true);
-//             m_pFixedCheckBox->setEnabled(false);
-//         }
-//         if (!fIsCreateFixedPossible)
-//         {
-//             m_pFixedCheckBox->setChecked(false);
-//             m_pFixedCheckBox->setEnabled(false);
-//         }
-//     }
-//     if (m_pDynamicLabel)
-//         m_pDynamicLabel->setHidden(!fIsCreateDynamicPossible);
-//     if (m_pFixedLabel)
-//         m_pFixedLabel->setHidden(!fIsCreateFixedPossible);
-//     if (m_pFixedCheckBox)
-//         m_pFixedCheckBox->setHidden(!fIsCreateFixedPossible);
-//     if (m_pSplitLabel)
-//         m_pSplitLabel->setHidden(!fIsCreateSplitPossible);
-//     if (m_pSplitBox)
-//         m_pSplitBox->setHidden(!fIsCreateSplitPossible);
 // }
 
@@ -225,7 +189,8 @@
 void UIWizardNewVDPageVariant::initializePage()
 {
-    // retranslateUi();
-    // CMediumFormat mediumFormat = field("mediumFormat").value<CMediumFormat>();
-    // setWidgetVisibility(mediumFormat);
+    retranslateUi();
+    UIWizardNewVD *pWizard = qobject_cast<UIWizardNewVD*>(wizard());
+    AssertReturnVoid(pWizard);
+    setWidgetVisibility(pWizard->mediumFormat());
 }
 
@@ -235,2 +200,17 @@
     return true;
 }
+
+
+void UIWizardNewVDPageVariant::setWidgetVisibility(const CMediumFormat &mediumFormat)
+{
+    AssertReturnVoid(m_pVariantGroupBox);
+
+    m_pVariantGroupBox->updateMediumVariantWidgetsAfterFormatChange(mediumFormat, true /* hide disabled widgets*/);
+
+    if (m_pDynamicLabel)
+        m_pDynamicLabel->setHidden(!m_pVariantGroupBox->isCreateDynamicPossible());
+    if (m_pFixedLabel)
+        m_pFixedLabel->setHidden(!m_pVariantGroupBox->isCreateFixedPossible());
+    if (m_pSplitLabel)
+        m_pSplitLabel->setHidden(!m_pVariantGroupBox->isCreateSplitPossible());
+}
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageVariant.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageVariant.h	(revision 90366)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageVariant.h	(revision 90370)
@@ -64,4 +64,5 @@
     bool isComplete() const;
     void prepare();
+    void setWidgetVisibility(const CMediumFormat &mediumFormat);
 
     QIRichTextLabel *m_pDescriptionLabel;
@@ -72,4 +73,3 @@
 };
 
-
 #endif /* !FEQT_INCLUDED_SRC_wizards_newvd_UIWizardNewVDPageVariant_h */
