Index: /trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp	(revision 90008)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp	(revision 90009)
@@ -957,5 +957,4 @@
 void UIVirtualBoxManager::sltOpenNewMachineWizard()
 {
-#if 0
     /* Lock the actions preventing cascade calls: */
     UIQObjectPropertySetter guardBlock(QList<QObject*>() << actionPool()->action(UIActionIndexMN_M_Welcome_S_New)
@@ -1014,5 +1013,4 @@
         delete pWizard;
     }
-#endif
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp	(revision 90008)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp	(revision 90009)
@@ -51,8 +51,8 @@
 }
 
-UIWizardNewVM::UIWizardNewVM(QWidget *pParent, const QString &strGroup /* = QString() */,
+UIWizardNewVM::UIWizardNewVM(QWidget *pParent, const QString &strMachineGroup /* = QString() */,
                              WizardMode enmMode /* = WizardMode_Auto */)
     : UINativeWizard(pParent, WizardType_NewCloudVM, enmMode)
-    , m_strGroup(strGroup)
+    , m_strMachineGroup(strMachineGroup)
     , m_iIDECount(0)
     , m_iSATACount(0)
@@ -83,5 +83,5 @@
     //     case WizardMode_Basic:
     //     {
-    //         // setPage(Page1, new UIWizardNewVMPageNameOSType(m_strGroup));
+    //         // setPage(Page1, new UIWizardNewVMPageNameOSType(m_strMachineGroup));
     //         // setPage(Page2, new UIWizardNewVMPageUnattended);
     //         // setPage(Page3, new UIWizardNewVMPageHardware);
@@ -93,5 +93,5 @@
     //     case WizardMode_Expert:
     //     {
-    //         setPage(PageExpert, new UIWizardNewVMPageExpert(m_strGroup));
+    //         setPage(PageExpert, new UIWizardNewVMPageExpert(m_strMachineGroup));
     //         break;
     //     }
@@ -112,5 +112,5 @@
         case WizardMode_Basic:
         {
-            addPage(new UIWizardNewVMNameOSTypePageBasic(m_strGroup));
+            addPage(new UIWizardNewVMNameOSTypePageBasic);
             addPage(new UIWizardNewVMUnattendedPageBasic);
             addPage(new UIWizardNewVMHardwarePageBasic);
@@ -144,6 +144,6 @@
 //     {
 //         QVector<QString> groups;
-//         if (!m_strGroup.isEmpty())
-//             groups << m_strGroup;
+//         if (!m_strMachineGroup.isEmpty())
+//             groups << m_strMachineGroup;
 //         m_machine = vbox.CreateMachine(field("machineFilePath").toString(),
 //                                        field("name").toString(),
@@ -697,4 +697,49 @@
 }
 
+const QString &UIWizardNewVM::machineGroup() const
+{
+    return m_strMachineGroup;
+}
+
+const QString &UIWizardNewVM::machineFilePath() const
+{
+    return m_strMachineFilePath;
+}
+
+void UIWizardNewVM::setMachineFilePath(const QString &strMachineFilePath)
+{
+    m_strMachineFilePath = strMachineFilePath;
+}
+
+const QString &UIWizardNewVM::machineFolder() const
+{
+    return m_strMachineFolder;
+}
+
+void UIWizardNewVM::setMachineFolder(const QString &strMachineFolder)
+{
+    m_strMachineFolder = strMachineFolder;
+}
+
+const QString &UIWizardNewVM::machineBaseName() const
+{
+    return m_strMachineBaseName;
+}
+
+void UIWizardNewVM::setMachineBaseName(const QString &strMachineBaseName)
+{
+    m_strMachineBaseName = strMachineBaseName;
+}
+
+const QString &UIWizardNewVM::detectedOSTypeId() const
+{
+    return m_strDetectedOSTypeId;
+}
+
+void UIWizardNewVM::setDetectedOSTypeId(const QString &strDetectedOSTypeId)
+{
+    m_strDetectedOSTypeId = strDetectedOSTypeId;
+}
+
 const UIUnattendedInstallData &UIWizardNewVM::unattendedInstallData() const
 {
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h	(revision 90008)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h	(revision 90009)
@@ -51,4 +51,7 @@
 };
 
+
+
+
 enum SelectedDiskSource
 {
@@ -68,22 +71,7 @@
 public:
 
-    /* Page IDs: */
-    enum
-    {
-        Page1,
-        Page2,
-        Page3,
-        Page4,
-        PageMax
-    };
-
-    /* Page IDs: */
-    enum
-    {
-        PageExpert
-    };
 
     /** Constructor: */
-    UIWizardNewVM(QWidget *pParent, const QString &strGroup = QString(), WizardMode enmMode = WizardMode_Auto);
+    UIWizardNewVM(QWidget *pParent, const QString &strMachineGroup = QString(), WizardMode enmMode = WizardMode_Auto);
 
     /** Prepare routine. */
@@ -99,4 +87,18 @@
     void setVirtualDisk(const CMedium &medium);
     void setVirtualDisk(const QUuid &mediumId);
+
+    const QString &machineGroup() const;
+
+    const QString &machineFilePath() const;
+    void setMachineFilePath(const QString &strMachineFilePath);
+
+    const QString &machineFolder() const;
+    void setMachineFolder(const QString &strMachineFolder);
+
+    const QString &machineBaseName() const;
+    void setMachineBaseName(const QString &strMachineBaseName);
+
+    const QString &detectedOSTypeId() const;
+    void setDetectedOSTypeId(const QString &strDetectedOSTypeId);
 
 protected:
@@ -140,5 +142,5 @@
        CMedium m_virtualDisk;
        CMachine m_machine;
-       QString m_strGroup;
+       QString m_strMachineGroup;
        int m_iIDECount;
        int m_iSATACount;
@@ -149,4 +151,18 @@
        mutable UIUnattendedInstallData m_unattendedInstallData;
     /** @} */
+
+    /** Path of the folder created by this wizard page. Used to remove previously created
+     *  folder. see cleanupMachineFolder();*/
+    QString m_strCreatedFolder;
+
+    /** Full path (including the file name) of the machine's configuration file. */
+    QString m_strMachineFilePath;
+    /** Path of the folder hosting the machine's configuration file. Generated from m_strMachineFilePath. */
+    QString m_strMachineFolder;
+    /** Base name of the machine is generated from the m_strMachineFilePath. */
+    QString m_strMachineBaseName;
+
+    /** Type Id od the OS detected from the ISO file by IUnattended. */
+    QString m_strDetectedOSTypeId;
 };
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.cpp	(revision 90008)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.cpp	(revision 90009)
@@ -178,115 +178,104 @@
 };
 
-// UIWizardNewVMNameOSTypePage::UIWizardNewVMNameOSTypePage(const QString &strGroup)
-//     : m_pNameAndSystemEditor(0)
-//     , m_pSkipUnattendedCheckBox(0)
-//     , m_strGroup(strGroup)
-// {
-//     CHost host = uiCommon().host();
-//     m_fSupportsHWVirtEx = host.GetProcessorFeature(KProcessorFeature_HWVirtEx);
-//     m_fSupportsLongMode = host.GetProcessorFeature(KProcessorFeature_LongMode);
-// }
-
-// void UIWizardNewVMNameOSTypePage::onNameChanged(QString strNewName)
-// {
-//     /* Do not forget about achitecture bits, if not yet specified: */
-//     if (!strNewName.contains("32") && !strNewName.contains("64"))
-//         strNewName += ARCH_BITS == 64 && m_fSupportsHWVirtEx && m_fSupportsLongMode ? "64" : "32";
-
-//     /* Search for a matching OS type based on the string the user typed already. */
-//     for (size_t i = 0; i < RT_ELEMENTS(gs_OSTypePattern); ++i)
-//         if (strNewName.contains(gs_OSTypePattern[i].pattern))
-//         {
-//             if (m_pNameAndSystemEditor)
-//                 m_pNameAndSystemEditor->setType(uiCommon().vmGuestOSType(gs_OSTypePattern[i].pcstId));
-//             break;
-//         }
-// }
-
-// void UIWizardNewVMNameOSTypePage::onOsTypeChanged()
-// {
-//     /* If the user manually edited the OS type, we didn't want our automatic OS type guessing anymore.
-//      * So simply disconnect the text-edit signal. */
-//     if (m_pNameAndSystemEditor)
-//         m_pNameAndSystemEditor->disconnect(SIGNAL(sigNameChanged(const QString &)), thisImp(), SLOT(sltNameChanged(const QString &)));
-// }
-
-// void UIWizardNewVMNameOSTypePage::composeMachineFilePath()
-// {
-//     if (!m_pNameAndSystemEditor)
-//         return;
-//     if (m_pNameAndSystemEditor->name().isEmpty() || m_pNameAndSystemEditor->path().isEmpty())
-//         return;
-//     /* Get VBox: */
-//     CVirtualBox vbox = uiCommon().virtualBox();
-
-//     /* Compose machine filename: */
-//     m_strMachineFilePath = vbox.ComposeMachineFilename(m_pNameAndSystemEditor->name(),
-//                                                        m_strGroup,
-//                                                        QString(),
-//                                                        m_pNameAndSystemEditor->path());
-//     /* Compose machine folder/basename: */
-//     const QFileInfo fileInfo(m_strMachineFilePath);
-//     m_strMachineFolder = fileInfo.absolutePath();
-//     m_strMachineBaseName = fileInfo.completeBaseName();
-// }
-
-
-// bool UIWizardNewVMNameOSTypePage::createMachineFolder()
-// {
-//     if (!m_pNameAndSystemEditor)
-//         return false;
-//     /* Cleanup previosly created folder if any: */
-//     if (!cleanupMachineFolder())
-//     {
-//         msgCenter().cannotRemoveMachineFolder(m_strMachineFolder, thisImp());
-//         return false;
-//     }
-
-//     composeMachineFilePath();
-
-//     /* Check if the folder already exists and check if it has been created by this wizard */
-//     if (QDir(m_strMachineFolder).exists())
-//     {
-//         /* Looks like we have already created this folder for this run of the wizard. Just return */
-//         if (m_strCreatedFolder == m_strMachineFolder)
-//             return true;
-//         /* The folder is there but not because of this wizard. Avoid overwriting a existing machine's folder */
-//         else
-//         {
-//             msgCenter().cannotRewriteMachineFolder(m_strMachineFolder, thisImp());
-//             return false;
-//         }
-//     }
-
-//     /* Try to create new folder (and it's predecessors): */
-//     bool fMachineFolderCreated = QDir().mkpath(m_strMachineFolder);
-//     if (!fMachineFolderCreated)
-//     {
-//         msgCenter().cannotCreateMachineFolder(m_strMachineFolder, thisImp());
-//         return false;
-//     }
-//     m_strCreatedFolder = m_strMachineFolder;
-//     return true;
-// }
-
-// bool UIWizardNewVMNameOSTypePage::cleanupMachineFolder(bool fWizardCancel /* = false */)
-// {
-//     /* Make sure folder was previosly created: */
-//     if (m_strCreatedFolder.isEmpty())
-//         return true;
-//     /* Clean this folder if the machine folder has been changed by the user or we are cancelling the wizard: */
-//     if (m_strCreatedFolder != m_strMachineFolder || fWizardCancel)
-//     {
-//         /* Try to cleanup folder (and it's predecessors): */
-//         bool fMachineFolderRemoved = QDir().rmpath(m_strCreatedFolder);
-//         /* Reset machine folder value: */
-//         if (fMachineFolderRemoved)
-//             m_strCreatedFolder = QString();
-//         /* Return cleanup result: */
-//         return fMachineFolderRemoved;
-//     }
-//     return true;
-// }
+void UIWizardNewVMNameOSTypePage::onNameChanged(UINameAndSystemEditor *pNameAndSystemEditor, QString strNewName)
+{
+    CHost host = uiCommon().host();
+    bool fSupportsHWVirtEx = host.GetProcessorFeature(KProcessorFeature_HWVirtEx);
+    bool fSupportsLongMode = host.GetProcessorFeature(KProcessorFeature_LongMode);
+
+    /* Do not forget about achitecture bits, if not yet specified: */
+    if (!strNewName.contains("32") && !strNewName.contains("64"))
+        strNewName += ARCH_BITS == 64 && fSupportsHWVirtEx && fSupportsLongMode ? "64" : "32";
+
+    /* Search for a matching OS type based on the string the user typed already. */
+    for (size_t i = 0; i < RT_ELEMENTS(gs_OSTypePattern); ++i)
+        if (strNewName.contains(gs_OSTypePattern[i].pattern))
+        {
+            if (pNameAndSystemEditor)
+                pNameAndSystemEditor->setType(uiCommon().vmGuestOSType(gs_OSTypePattern[i].pcstId));
+            break;
+        }
+}
+
+void UIWizardNewVMNameOSTypePage::composeMachineFilePath(UINameAndSystemEditor *pNameAndSystemEditor,
+                                                         UINativeWizard *pWizard)
+{
+    UIWizardNewVM *pNewVMWizard = qobject_cast<UIWizardNewVM*>(pWizard);
+    if (!pNameAndSystemEditor || !pNewVMWizard)
+        return;
+    if (pNameAndSystemEditor->name().isEmpty() || pNameAndSystemEditor->path().isEmpty())
+        return;
+     /* Get VBox: */
+    CVirtualBox vbox = uiCommon().virtualBox();
+
+    /* Compose machine filename: */
+    pNewVMWizard->setMachineFilePath(vbox.ComposeMachineFilename(pNameAndSystemEditor->name(),
+                                                                 pNewVMWizard->machineGroup(),
+                                                                 QString(),
+                                                                 pNameAndSystemEditor->path()));
+    /* Compose machine folder/basename: */
+    const QFileInfo fileInfo(pNewVMWizard->machineFilePath());
+    pNewVMWizard->setMachineFolder(fileInfo.absolutePath());
+    pNewVMWizard->setMachineBaseName(fileInfo.completeBaseName());
+}
+
+bool UIWizardNewVMNameOSTypePage::createMachineFolder(UINameAndSystemEditor *pNameAndSystemEditor,
+                                                      UINativeWizardPage *pCaller,
+                                                      const QString &strMachineFolder,
+                                                      QString &strCreatedFolder)
+{
+    if (!pNameAndSystemEditor)
+        return false;
+    /* Cleanup previosly created folder if any: */
+    if (!cleanupMachineFolder(strMachineFolder, strCreatedFolder))
+    {
+        msgCenter().cannotRemoveMachineFolder(strMachineFolder, pCaller);
+        return false;
+    }
+
+    /* Check if the folder already exists and check if it has been created by this wizard */
+    if (QDir(strMachineFolder).exists())
+    {
+        /* Looks like we have already created this folder for this run of the wizard. Just return */
+        if (strCreatedFolder == strMachineFolder)
+            return true;
+        /* The folder is there but not because of this wizard. Avoid overwriting a existing machine's folder */
+        else
+        {
+            msgCenter().cannotRewriteMachineFolder(strMachineFolder, pCaller);
+            return false;
+        }
+    }
+
+    /* Try to create new folder (and it's predecessors): */
+    bool fMachineFolderCreated = QDir().mkpath(strMachineFolder);
+    if (!fMachineFolderCreated)
+    {
+        msgCenter().cannotCreateMachineFolder(strMachineFolder, pCaller);
+        return false;
+    }
+    strCreatedFolder = strMachineFolder;
+    return true;
+}
+
+bool UIWizardNewVMNameOSTypePage::cleanupMachineFolder(const QString &strMachineFolder,
+                                                       QString &strCreatedFolder, bool fWizardCancel /* = false */)
+{
+    /* Make sure folder was previosly created: */
+    if (strCreatedFolder.isEmpty())
+        return true;
+    /* Clean this folder if the machine folder has been changed by the user or we are cancelling the wizard: */
+    if (strCreatedFolder != strMachineFolder || fWizardCancel)
+    {
+        /* Try to cleanup folder (and it's predecessors): */
+        bool fMachineFolderRemoved = QDir().rmpath(strCreatedFolder);
+        /* Reset machine folder value: */
+        if (fMachineFolderRemoved)
+            strCreatedFolder = QString();
+        /* Return cleanup result: */
+        return fMachineFolderRemoved;
+    }
+    return true;
+}
 
 // QString UIWizardNewVMNameOSTypePage::machineFilePath() const
@@ -361,20 +350,22 @@
 // }
 
-// bool UIWizardNewVMNameOSTypePage::determineOSType(const QString &strISOPath)
-// {
-//     QFileInfo isoFileInfo(strISOPath);
-//     if (!isoFileInfo.exists())
-//     {
-//         m_strDetectedOSTypeId.clear();
-//         return false;
-//     }
-
-//     CUnattended comUnatteded = uiCommon().virtualBox().CreateUnattendedInstaller();
-//     comUnatteded.SetIsoPath(strISOPath);
-//     comUnatteded.DetectIsoOS();
-
-//     m_strDetectedOSTypeId = comUnatteded.GetDetectedOSTypeId();
-//     return true;
-// }
+void UIWizardNewVMNameOSTypePage::determineOSType(const QString &strISOPath, UINativeWizard *pWizard)
+{
+    UIWizardNewVM *pNewVMWizard = qobject_cast<UIWizardNewVM*>(pWizard);
+    if (!pNewVMWizard)
+        return;
+
+    QFileInfo isoFileInfo(strISOPath);
+    if (!isoFileInfo.exists())
+    {
+        pNewVMWizard->setDetectedOSTypeId(QString());
+        return;
+    }
+
+    CUnattended comUnatteded = uiCommon().virtualBox().CreateUnattendedInstaller();
+    comUnatteded.SetIsoPath(strISOPath);
+    comUnatteded.DetectIsoOS();
+    pNewVMWizard->setDetectedOSTypeId(comUnatteded.GetDetectedOSTypeId());
+}
 
 // bool UIWizardNewVMNameOSTypePage::skipUnattendedInstall() const
@@ -415,5 +406,5 @@
 
 
-UIWizardNewVMNameOSTypePageBasic::UIWizardNewVMNameOSTypePageBasic(const QString &strGroup)
+UIWizardNewVMNameOSTypePageBasic::UIWizardNewVMNameOSTypePageBasic()
     : m_pNameAndSystemLayout(0)
     , m_pNameAndSystemEditor(0)
@@ -421,5 +412,4 @@
     , m_pNameOSTypeLabel(0)
 {
-    Q_UNUSED(strGroup);
     prepare();
 }
@@ -440,5 +430,5 @@
     }
 
-    // createConnections();
+    createConnections();
     // /* Register fields: */
     // registerField("name*", m_pNameAndSystemEditor, "name", SIGNAL(sigNameChanged(const QString &)));
@@ -456,11 +446,11 @@
 void UIWizardNewVMNameOSTypePageBasic::createConnections()
 {
-    // if (m_pNameAndSystemEditor)
-    // {
-    //     connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigNameChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltNameChanged);
-    //     connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigPathChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltPathChanged);
-    //     connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigOsTypeChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltOsTypeChanged);
-    //     connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigImageChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltISOPathChanged);
-    // }
+    if (m_pNameAndSystemEditor)
+    {
+        connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigNameChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltNameChanged);
+        connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigPathChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltPathChanged);
+        connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigOsTypeChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltOsTypeChanged);
+        connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigImageChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltISOPathChanged);
+    }
 }
 
@@ -474,17 +464,9 @@
 }
 
-int UIWizardNewVMNameOSTypePageBasic::nextId() const
-{
-    // if (isUnattendedEnabled())
-    //     return UIWizardNewVM::Page2;
-    // return UIWizardNewVM::Page3;
-    return 0;
-}
-
 void UIWizardNewVMNameOSTypePageBasic::sltNameChanged(const QString &strNewName)
 {
     Q_UNUSED(strNewName);
-    // onNameChanged(strNewName);
-    // composeMachineFilePath();
+    UIWizardNewVMNameOSTypePage::onNameChanged(m_pNameAndSystemEditor, strNewName);
+    UIWizardNewVMNameOSTypePage::composeMachineFilePath(m_pNameAndSystemEditor, wizard());
 }
 
@@ -492,16 +474,17 @@
 {
     Q_UNUSED(strNewPath);
-    //composeMachineFilePath();
+    UIWizardNewVMNameOSTypePage::composeMachineFilePath(m_pNameAndSystemEditor, wizard());
 }
 
 void UIWizardNewVMNameOSTypePageBasic::sltOsTypeChanged()
 {
-    /* Call to base-class: */
-    //onOsTypeChanged();
+    /* If the user manually edited the OS type, we didn't want our automatic OS type guessing anymore.
+     * So simply disconnect the text-edit signal. */
+    if (m_pNameAndSystemEditor)
+        m_pNameAndSystemEditor->disconnect(SIGNAL(sigNameChanged(const QString &)), this, SLOT(sltNameChanged(const QString &)));
 }
 
 void UIWizardNewVMNameOSTypePageBasic::retranslateUi()
 {
-    // retranslateWidgets();
     setTitle(UIWizardNewVM::tr("Virtual machine Name and Operating System"));
 
@@ -526,8 +509,8 @@
 {
     /* Translate page: */
-    // retranslateUi();
-    // if (m_pNameAndSystemEditor)
-    //     m_pNameAndSystemEditor->setFocus();
-    // setSkipCheckBoxEnable();
+    retranslateUi();
+    if (m_pNameAndSystemEditor)
+        m_pNameAndSystemEditor->setFocus();
+    //setSkipCheckBoxEnable();
 }
 
@@ -543,4 +526,5 @@
 {
     /* Try to create machine folder: */
+    //composeMachineFilePath
     //return createMachineFolder();
     return true;
@@ -549,6 +533,5 @@
 void UIWizardNewVMNameOSTypePageBasic::sltISOPathChanged(const QString &strPath)
 {
-    Q_UNUSED(strPath);
-    // determineOSType(strPath);
+    UIWizardNewVMNameOSTypePage::determineOSType(strPath, wizard());
     // setTypeByISODetectedOSType(m_strDetectedOSTypeId);
     // /* Update the global recent ISO path: */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.h	(revision 90008)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.h	(revision 90009)
@@ -36,22 +36,21 @@
 class UIFilePathSelector;
 class UINameAndSystemEditor;
+class UINativeWizard;
 
-// /** 1st page of the New Virtual Machine wizard (base part): */
-// class UIWizardNewVMNameOSTypePage  : public UIWizardPageBase
-// {
-// protected:
+namespace UIWizardNewVMNameOSTypePage
+{
+    void onNameChanged(UINameAndSystemEditor *pNameAndSystemEditor, QString strNewName);
+    bool createMachineFolder(UINameAndSystemEditor *pNameAndSystemEditor,
+                             UINativeWizardPage *pCaller,
+                             const QString &strMachineFolder,
+                             QString &strCreatedFolder);
 
-//     /** Constructor. */
-//     UIWizardNewVMNameOSTypePage(const QString &strGroup);
-
-//     /** Handlers. */
-//     void onNameChanged(QString strNewName);
-//     void onOsTypeChanged();
-
-//     bool createMachineFolder();
-//     /** Removes a previously created folder (if exists) before creating a new one.
-//      *  used during page cleanup and new folder creation. Called upon page Next/Back and
-//      *  wizard cancel */
-//     bool cleanupMachineFolder(bool fWizardCancel = false);
+    /** Removes a previously created folder (if exists) before creating a new one.
+     *  used during page cleanup and new folder creation. Called upon page Next/Back and
+     *  wizard cancel */
+    bool cleanupMachineFolder(const QString &strMachineFolder,
+                              QString &strCreatedFolder,bool fWizardCancel = false);
+    void composeMachineFilePath(UINameAndSystemEditor *pNameAndSystemEditor, UINativeWizard *pWizard);
+    void determineOSType(const QString &strISOPath, UINativeWizard *pWizard);
 
 //     /** @name Property getters/setters
@@ -74,6 +73,4 @@
 //     /** @} */
 
-//     /** calls CVirtualBox::ComposeMachineFilename(...) and sets related member variables */
-//     void composeMachineFilePath();
 
 //     /** Colors the widgets red if they cause isComplete to fail. */
@@ -81,5 +78,5 @@
 //     void retranslateWidgets();
 //     QString ISOFilePath() const;
-//     bool determineOSType(const QString &strISOPath);
+
 //     void setTypeByISODetectedOSType(const QString &strDetectedOSType);
 //     /** Return false if ISO path is not empty but points to an missing or unreadable file. */
@@ -87,24 +84,11 @@
 //     void setSkipCheckBoxEnable();
 
-//     QString m_strDetectedOSTypeId;
+//
 
 // private:
 
-//     /** Full path (including the file name) of the machine's configuration file. */
-//     QString m_strMachineFilePath;
-//     /** Path of the folder hosting the machine's configuration file. Generated from m_strMachineFilePath. */
-//     QString m_strMachineFolder;
-//     /** Path of the folder created by this wizard page. Used to remove previously created
-//      *  folder. see cleanupMachineFolder();*/
-//     QString m_strCreatedFolder;
-//     /** Base name of the machine is generated from the m_strMachineFilePath. */
-//     QString m_strMachineBaseName;
 
-//     QString m_strGroup;
-//     bool m_fSupportsHWVirtEx;
-//     bool m_fSupportsLongMode;
-
-//     friend class UIWizardNewVM;
 // };
+}
 
 /** 1st page of the New Virtual Machine wizard (basic extension). */
@@ -117,9 +101,12 @@
 
     /** Constructor. */
-    UIWizardNewVMNameOSTypePageBasic(const QString &strGroup);
-    virtual bool isComplete() const; /* override */
-    virtual int nextId() const /* override */;
+    UIWizardNewVMNameOSTypePageBasic();
+
 
 protected:
+
+    virtual bool isComplete() const; /* override final */
+    /** Validation stuff. */
+    virtual bool validatePage() /* override */;
 
 private slots:
@@ -141,9 +128,5 @@
     void initializePage();
     void cleanupPage();
-
     QWidget *createNameOSTypeWidgets();
-
-    /** Validation stuff. */
-    virtual bool validatePage() /* override */;
 
 
