Index: /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMSettingsDlg.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMSettingsDlg.h	(revision 9888)
+++ /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMSettingsDlg.h	(revision 9889)
@@ -72,4 +72,6 @@
     QString dialogTitle() const;
 
+    void updateAvailability();
+
     /* Common */
     CMachine mMachine;
Index: /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMSettingsUSB.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMSettingsUSB.h	(revision 9888)
+++ /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMSettingsUSB.h	(revision 9889)
@@ -63,4 +63,6 @@
                        const QString &aPath);
 
+   ~VBoxVMSettingsUSB();
+
     void getFromHost();
     void putBackToHost();
Index: /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobalSettingsDlg.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobalSettingsDlg.cpp	(revision 9888)
+++ /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobalSettingsDlg.cpp	(revision 9889)
@@ -418,7 +418,5 @@
         /* Disable the USB controller category if the USB controller is
          * not available (i.e. in VirtualBox OSE) */
-        QList<QTreeWidgetItem*> items = mTwSelector->findItems (
-            "#usb", Qt::MatchExactly, listView_Link);
-        QTreeWidgetItem *usbItem = items.count() ? items [0] : 0;
+        QTreeWidgetItem *usbItem = findItem (mTwSelector, "#usb", listView_Link);
         Assert (usbItem);
         if (usbItem)
Index: /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsDlg.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsDlg.cpp	(revision 9888)
+++ /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsDlg.cpp	(revision 9889)
@@ -120,9 +120,4 @@
     connect (&vboxGlobal(), SIGNAL (mediaEnumFinished (const VBoxMediaList &)),
              this, SLOT (onMediaEnumerationDone()));
-
-    /* Parallel Port Page (currently disabled) */
-    //QTreeWidgetItem *item = findItem (mTwSelector, "#parallelPorts", listView_Link);
-    //Assert (item);
-    //if (item) item->setHidden (true);
 
     /* Hide unnecessary columns and header */
@@ -181,4 +176,6 @@
     mMachine = aMachine;
 
+    updateAvailability();
+
     setWindowTitle (dialogTitle());
 
@@ -213,10 +210,12 @@
 
     /* Parallel Ports */
-    VBoxVMSettingsParallel::getFromMachine (aMachine, mPageParallel,
-                                            this, pagePath (mPageParallel));
+    if (mPageParallel->isEnabled())
+        VBoxVMSettingsParallel::getFromMachine (aMachine, mPageParallel,
+                                                this, pagePath (mPageParallel));
 
     /* USB */
-    VBoxVMSettingsUSB::getFrom (aMachine, mPageUSB,
-                                this, pagePath (mPageUSB));
+    if (mPageUSB->isEnabled())
+        VBoxVMSettingsUSB::getFrom (aMachine, mPageUSB,
+                                    this, pagePath (mPageUSB));
 
     /* Shared Folders */
@@ -224,6 +223,7 @@
 
     /* Vrdp */
-    VBoxVMSettingsVRDP::getFromMachine (aMachine, mPageVrdp,
-                                        this, pagePath (mPageVrdp));
+    if (mPageVrdp->isEnabled())
+        VBoxVMSettingsVRDP::getFromMachine (aMachine, mPageVrdp,
+                                            this, pagePath (mPageVrdp));
 
     /* Finally set the reset First Run Wizard flag to "false" to make sure
@@ -288,4 +288,7 @@
     /* Set the old index */
     mTwSelector->setCurrentItem (mTwSelector->topLevelItem (ci));
+
+    /* Update QTreeWidget with available items */
+    updateAvailability();
 
     /* Adjust selector list */
@@ -550,2 +553,51 @@
 }
 
+void VBoxVMSettingsDlg::updateAvailability()
+{
+    if (mMachine.isNull())
+        return;
+
+    /* Parallel Port Page (currently disabled) */
+    QTreeWidgetItem *parallelItem =
+        findItem (mTwSelector, "#parallelPorts", listView_Link);
+    Assert (parallelItem);
+    if (parallelItem)
+        parallelItem->setHidden (true);
+    mPageParallel->setEnabled (false);
+
+    /* USB Stuff */
+    CUSBController ctl = mMachine.GetUSBController();
+    /* Show an error message (if there is any).
+     * Note that we don't use the generic cannotLoadMachineSettings()
+     * call here because we want this message to be suppressable. */
+    if (!mMachine.isReallyOk())
+        vboxProblem().cannotAccessUSB (mMachine);
+    if (ctl.isNull())
+    {
+        /* Disable the USB controller category if the USB controller is
+         * not available (i.e. in VirtualBox OSE) */
+        QTreeWidgetItem *usbItem =
+            findItem (mTwSelector, "#usb", listView_Link);
+        Assert (usbItem);
+        if (usbItem)
+            usbItem->setHidden (true);
+        mPageUSB->setEnabled (false);
+    }
+
+    /* VRDP Stuff */
+    CVRDPServer vrdp = mMachine.GetVRDPServer();
+    if (vrdp.isNull())
+    {
+        /* Disable the VRDP category if VRDP is
+         * not available (i.e. in VirtualBox OSE) */
+        QTreeWidgetItem *vrdpItem =
+            findItem (mTwSelector, "#vrdp", listView_Link);
+        Assert (vrdpItem);
+        if (vrdpItem)
+            vrdpItem->setHidden (true);
+        mPageVrdp->setEnabled (false);
+        /* If mMachine has something to say, show the message */
+        vboxProblem().cannotLoadMachineSettings (mMachine, false /* strict */);
+    }
+}
+
Index: /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsParallel.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsParallel.cpp	(revision 9888)
+++ /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsParallel.cpp	(revision 9889)
@@ -108,11 +108,12 @@
 void VBoxVMSettingsParallel::putBackToMachine()
 {
-    for (int index = 0; index < mTabWidget->count(); ++ index)
-    {
-        VBoxVMSettingsParallel *page =
-            (VBoxVMSettingsParallel*) mTabWidget->widget (index);
-        Assert (page);
-        page->putBackToPort();
-    }
+    if (mTabWidget)
+        for (int index = 0; index < mTabWidget->count(); ++ index)
+        {
+            VBoxVMSettingsParallel *page =
+                (VBoxVMSettingsParallel*) mTabWidget->widget (index);
+            Assert (page);
+            page->putBackToPort();
+        }
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsUSB.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsUSB.cpp	(revision 9888)
+++ /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsUSB.cpp	(revision 9889)
@@ -66,25 +66,4 @@
                                  const QString &aPath)
 {
-    CUSBController ctl = aMachine.GetUSBController();
-
-    /* Show an error message (if there is any).
-     * Note that we don't use the generic cannotLoadMachineSettings()
-     * call here because we want this message to be suppressable. */
-    if (!aMachine.isReallyOk())
-        vboxProblem().cannotAccessUSB (aMachine);
-
-    if (ctl.isNull())
-    {
-        /* Disable the USB controller category if the USB controller is
-         * not available (i.e. in VirtualBox OSE) */
-        QList<QTreeWidgetItem*> items = aDlg->mTwSelector->findItems (
-            "#usb", Qt::MatchExactly, listView_Link);
-        QTreeWidgetItem *usbItem = items.count() ? items [0] : 0;
-        Assert (usbItem);
-        if (usbItem)
-            usbItem->setHidden (true);
-        return;
-    }
-
     mSettings = new VBoxVMSettingsUSB (aPage, MachineType, aDlg, aPath);
     QVBoxLayout *layout = new QVBoxLayout (aPage);
@@ -238,4 +217,9 @@
     /* Applying language settings */
     retranslateUi();
+}
+
+VBoxVMSettingsUSB::~VBoxVMSettingsUSB()
+{
+    mSettings = 0;
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsVRDP.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsVRDP.cpp	(revision 9888)
+++ /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsVRDP.cpp	(revision 9889)
@@ -70,22 +70,4 @@
                                          const QString &aPath)
 {
-    CVRDPServer vrdp = aMachine.GetVRDPServer();
-
-    if (vrdp.isNull())
-    {
-        /* Disable the VRDP category if VRDP is
-         * not available (i.e. in VirtualBox OSE) */
-        QList<QTreeWidgetItem*> items = aDlg->mTwSelector->findItems (
-            "#vrdp", Qt::MatchExactly, listView_Link);
-        QTreeWidgetItem *vrdpItem = items.count() ? items [0] : 0;
-        Assert (vrdpItem);
-        if (vrdpItem)
-            vrdpItem->setHidden (true);
-        return;
-
-        /* If aMachine has something to say, show the message */
-        vboxProblem().cannotLoadMachineSettings (aMachine, false /* strict */);
-    }
-
     mSettings = new VBoxVMSettingsVRDP (aPage, aDlg, aPath);
     QVBoxLayout *layout = new QVBoxLayout (aPage);
@@ -104,5 +86,6 @@
 void VBoxVMSettingsVRDP::putBackToMachine()
 {
-    mSettings->putBackTo();
+    if (mSettings)
+        mSettings->putBackTo();
 }
 
