Index: /trunk/src/VBox/Frontends/VirtualBox/include/VBoxMediaManagerDlg.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/include/VBoxMediaManagerDlg.h	(revision 23952)
+++ /trunk/src/VBox/Frontends/VirtualBox/include/VBoxMediaManagerDlg.h	(revision 23953)
@@ -6,5 +6,5 @@
 
 /*
- * Copyright (C) 2006-2008 Sun Microsystems, Inc.
+ * Copyright (C) 2006-2009 Sun Microsystems, Inc.
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -24,14 +24,16 @@
 #define __VBoxMediaManagerDlg_h__
 
+/* Local includes */
 #include "VBoxMediaManagerDlg.gen.h"
+#include "COMDefs.h"
 #include "QIMainDialog.h"
 #include "QIWithRetranslateUI.h"
-#include "COMDefs.h"
 #include "VBoxDefs.h"
 #include "VBoxMediaComboBox.h"
 
+/* Local forwards */
 class MediaItem;
+class VBoxProgressBar;
 class VBoxToolBar;
-class VBoxProgressBar;
 
 class VBoxMediaManagerDlg : public QIWithRetranslateUI2<QIMainDialog>,
@@ -153,8 +155,7 @@
     QMenu       *mActionsContextMenu;
     QMenu       *mActionsMenu;
-    VBoxToolBar *mActionsToolBar;
+    VBoxToolBar *mToolBar;
     QAction     *mNewAction;
     QAction     *mAddAction;
-    QAction     *mEditAction;
     QAction     *mRemoveAction;
     QAction     *mReleaseAction;
@@ -168,6 +169,6 @@
     bool mFloppyImagesInaccessible;
     QString mHDSelectedId;
-    QString mDVDSelectedId;
-    QString mFloppySelectedId;
+    QString mCDSelectedId;
+    QString mFDSelectedId;
 };
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp	(revision 23952)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp	(revision 23953)
@@ -6,5 +6,5 @@
 
 /*
- * Copyright (C) 2006-2008 Sun Microsystems, Inc.
+ * Copyright (C) 2006-2009 Sun Microsystems, Inc.
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -21,14 +21,5 @@
  */
 
-/* VBox includes */
-#include "VBoxGlobal.h"
-#include "VBoxMediaManagerDlg.h"
-#include "VBoxNewHDWzd.h"
-#include "VBoxProblemReporter.h"
-#include "VBoxToolBar.h"
-#include "QIFileDialog.h"
-#include "QILabel.h"
-
-/* Qt includes */
+/* Global includes */
 #include <QCloseEvent>
 #include <QDir>
@@ -43,4 +34,13 @@
 #include <QUrl>
 
+/* Local includes */
+#include "VBoxGlobal.h"
+#include "VBoxMediaManagerDlg.h"
+#include "VBoxNewHDWzd.h"
+#include "VBoxProblemReporter.h"
+#include "VBoxToolBar.h"
+#include "QIFileDialog.h"
+#include "QILabel.h"
+
 class AddVDMUrlsEvent: public QEvent
 {
@@ -63,6 +63,5 @@
 public:
 
-    MediaItem (MediaItem *aParent, const VBoxMedium &aMedium,
-               const VBoxMediaManagerDlg *aManager)
+    MediaItem (MediaItem *aParent, const VBoxMedium &aMedium, const VBoxMediaManagerDlg *aManager)
         : QTreeWidgetItem (aParent, QITreeWidget::BasicItemType)
         , mMedium (aMedium)
@@ -70,7 +69,5 @@
     { refresh(); }
 
-
-    MediaItem (QTreeWidget *aParent, const VBoxMedium &aMedium,
-               const VBoxMediaManagerDlg *aManager)
+    MediaItem (QTreeWidget *aParent, const VBoxMedium &aMedium, const VBoxMediaManagerDlg *aManager)
         : QTreeWidgetItem (aParent, QITreeWidget::BasicItemType)
         , mMedium (aMedium)
@@ -78,5 +75,9 @@
     { refresh(); }
 
-    const VBoxMedium &medium() const { return mMedium; }
+    void refreshAll()
+    {
+        mMedium.refresh();
+        refresh();
+    }
 
     void setMedium (const VBoxMedium &aMedium)
@@ -86,5 +87,5 @@
     }
 
-    void refreshAll();
+    const VBoxMedium& medium() const { return mMedium; }
 
     VBoxDefs::MediumType type() const { return mMedium.type(); }
@@ -93,18 +94,13 @@
 
     QString id() const { return mMedium.id(); }
+
     QString location() const { return mMedium.location (!mManager->showDiffs()); }
 
-    QString hardDiskFormat() const
-        { return mMedium.hardDiskFormat (!mManager->showDiffs()); }
-    QString hardDiskType() const
-        { return mMedium.hardDiskType (!mManager->showDiffs()); }
+    QString hardDiskFormat() const { return mMedium.hardDiskFormat (!mManager->showDiffs()); }
+    QString hardDiskType() const { return mMedium.hardDiskType (!mManager->showDiffs()); }
 
     QString usage() const { return mMedium.usage (!mManager->showDiffs()); }
 
-    QString toolTip() const
-    {
-        return mMedium.toolTip (!mManager->showDiffs(),
-                                mManager->inAttachMode());
-    }
+    QString toolTip() const { return mMedium.toolTip (!mManager->showDiffs(), mManager->inAttachMode()); }
 
     bool isUsed() const { return mMedium.isUsed(); }
@@ -116,63 +112,27 @@
         ULONG64 thisValue = vboxGlobal().parseSize (       text (column));
         ULONG64 thatValue = vboxGlobal().parseSize (aOther.text (column));
-        if (thisValue && thatValue)
-            return thisValue < thatValue;
-        else
-            return QTreeWidgetItem::operator< (aOther);
-    }
-
-//    void paintCell (QPainter *aPainter, const QColorGroup &aColorGroup,
-//                    int aColumn, int aWidth, int aSlign)
-//    {
-//        QColorGroup cGroup (aColorGroup);
-//        if (mStatus == KMediumState_NotCreated)
-//            cGroup.setColor (QColorGroup::Text, cGroup.mid());
-//        Q3ListViewItem::paintCell (aPainter, cGroup, aColumn, aWidth, aSlign);
-//    }
-protected:
-
-    void refresh();
+        return thisValue && thatValue ? thisValue < thatValue : QTreeWidgetItem::operator< (aOther);
+    }
 
 private:
 
-    /* Private member vars */
+    void refresh()
+    {
+        /* Fill in columns */
+        setIcon (0, mMedium.icon (!mManager->showDiffs(), mManager->inAttachMode()));
+        /* Set the text */
+        setText (0, mMedium.name (!mManager->showDiffs()));
+        setText (1, mMedium.logicalSize (!mManager->showDiffs()));
+        setText (2, mMedium.size (!mManager->showDiffs()));
+        /* All columns get the same tooltip */
+        QString tt = mMedium.toolTip (!mManager->showDiffs());
+        for (int i = 0; i < treeWidget()->columnCount(); ++ i)
+            setToolTip (i, tt);
+    }
+
     VBoxMedium mMedium;
     const VBoxMediaManagerDlg *mManager;
 };
 
-/**
- * Refreshes the underlying medium (see VBoxMedium::refresh()) and then
- * refreshes this item's columns based on the new values.
- */
-void MediaItem::refreshAll()
-{
-    mMedium.refresh();
-    refresh();
-}
-
-/**
- * Refreshes the item representation according to the associated medium.
- *
- * Note that the underlying medium itself is not refreshed.
- */
-void MediaItem::refresh()
-{
-    /* Fill in columns */
-    setIcon (0, mMedium.icon (!mManager->showDiffs(),
-                              mManager->inAttachMode()));
-    /* Set the text */
-    setText (0, mMedium.name (!mManager->showDiffs()));
-    setText (1, mMedium.logicalSize (!mManager->showDiffs()));
-    setText (2, mMedium.size (!mManager->showDiffs()));
-    /* All columns get the same tooltip */
-    QString tt = mMedium.toolTip (!mManager->showDiffs());
-    for (int i = 0; i < treeWidget()->columnCount(); ++i)
-        setToolTip (i, tt);
-}
-
-
-/**
- * Iterator for MediaItem.
- */
 class MediaItemIterator : public QTreeWidgetItemIterator
 {
@@ -194,5 +154,4 @@
     }
 };
-
 
 class VBoxProgressBar: public QWidget
@@ -223,5 +182,4 @@
 private:
 
-    /* Private member vars */
     QLabel *mText;
     QProgressBar *mProgressBar;
@@ -231,6 +189,5 @@
 VBoxMediaManagerDlg* VBoxMediaManagerDlg::mModelessDialog = 0;
 
-VBoxMediaManagerDlg::VBoxMediaManagerDlg (QWidget *aParent /* = 0 */,
-                                          Qt::WindowFlags aFlags /* = Qt::Dialog */)
+VBoxMediaManagerDlg::VBoxMediaManagerDlg (QWidget *aParent /* = 0 */, Qt::WindowFlags aFlags /* = Qt::Dialog */)
     : QIWithRetranslateUI2 <QIMainDialog> (aParent, aFlags)
     , mType (VBoxDefs::MediumType_Invalid)
@@ -256,66 +213,65 @@
     mFloppyImageIcon = VBoxGlobal::iconSet (":/fd_16px.png", ":/fd_disabled_16px.png");
 
-    /* Setup tab widget icons */
-    mTwImages->setTabIcon (HDTab, mHardDiskIcon);
-    mTwImages->setTabIcon (CDTab, mDVDImageIcon);
-    mTwImages->setTabIcon (FDTab, mFloppyImageIcon);
-
-    connect (mTwImages, SIGNAL (currentChanged (int)),
-             this, SLOT (processCurrentChanged (int)));
-
-    /* Setup the tree view widgets */
-    mHardDiskView->sortItems (0, Qt::AscendingOrder);
-    mHardDiskView->header()->setResizeMode (0, QHeaderView::Fixed);
-    mHardDiskView->header()->setResizeMode (1, QHeaderView::ResizeToContents);
-    mHardDiskView->header()->setResizeMode (2, QHeaderView::ResizeToContents);
-    mHardDiskView->header()->setStretchLastSection (false);
-    mHardDiskView->setSortingEnabled (true);
-    mHardDiskView->setSupportedDropActions (Qt::LinkAction);
-    mHardDiskView->installEventFilter (this);
-    connect (mHardDiskView, SIGNAL (currentItemChanged (QTreeWidgetItem *, QTreeWidgetItem *)),
+    /* Setup tab-widget icons */
+    mTabWidget->setTabIcon (HDTab, mHardDiskIcon);
+    mTabWidget->setTabIcon (CDTab, mDVDImageIcon);
+    mTabWidget->setTabIcon (FDTab, mFloppyImageIcon);
+
+    connect (mTabWidget, SIGNAL (currentChanged (int)), this, SLOT (processCurrentChanged (int)));
+
+    /* Setup the tree-widgets */
+    mTwHD->sortItems (0, Qt::AscendingOrder);
+    mTwHD->header()->setResizeMode (0, QHeaderView::Fixed);
+    mTwHD->header()->setResizeMode (1, QHeaderView::ResizeToContents);
+    mTwHD->header()->setResizeMode (2, QHeaderView::ResizeToContents);
+    mTwHD->header()->setStretchLastSection (false);
+    mTwHD->setSortingEnabled (true);
+    mTwHD->setSupportedDropActions (Qt::LinkAction);
+    mTwHD->installEventFilter (this);
+    connect (mTwHD, SIGNAL (currentItemChanged (QTreeWidgetItem *, QTreeWidgetItem *)),
              this, SLOT (processCurrentChanged (QTreeWidgetItem *, QTreeWidgetItem *)));
-    connect (mHardDiskView, SIGNAL (itemDoubleClicked (QTreeWidgetItem *, int)),
+    connect (mTwHD, SIGNAL (itemDoubleClicked (QTreeWidgetItem *, int)),
              this, SLOT (processDoubleClick (QTreeWidgetItem *, int)));
-    connect (mHardDiskView, SIGNAL (customContextMenuRequested (const QPoint &)),
+    connect (mTwHD, SIGNAL (customContextMenuRequested (const QPoint &)),
              this, SLOT (showContextMenu (const QPoint &)));
-    connect (mHardDiskView, SIGNAL (resized (const QSize&, const QSize&)),
+    connect (mTwHD, SIGNAL (resized (const QSize &, const QSize &)),
              this, SLOT (makeRequestForAdjustTable()));
-    connect (mHardDiskView->header(), SIGNAL (sectionResized (int, int, int)),
+    connect (mTwHD->header(), SIGNAL (sectionResized (int, int, int)),
              this, SLOT (makeRequestForAdjustTable()));
 
-    mDVDView->sortItems (0, Qt::AscendingOrder);
-    mDVDView->header()->setResizeMode (0, QHeaderView::Fixed);
-    mDVDView->header()->setResizeMode (1, QHeaderView::ResizeToContents);
-    mDVDView->header()->setStretchLastSection (false);
-    mDVDView->setSortingEnabled (true);
-    mDVDView->setSupportedDropActions (Qt::LinkAction);
-    mDVDView->installEventFilter (this);
-    connect (mDVDView, SIGNAL (currentItemChanged (QTreeWidgetItem *, QTreeWidgetItem *)),
+    mTwCD->sortItems (0, Qt::AscendingOrder);
+    mTwCD->header()->setResizeMode (0, QHeaderView::Fixed);
+    mTwCD->header()->setResizeMode (1, QHeaderView::ResizeToContents);
+    mTwCD->header()->setStretchLastSection (false);
+    mTwCD->setSortingEnabled (true);
+    mTwCD->setSupportedDropActions (Qt::LinkAction);
+    mTwCD->installEventFilter (this);
+    connect (mTwCD, SIGNAL (currentItemChanged (QTreeWidgetItem *, QTreeWidgetItem *)),
              this, SLOT (processCurrentChanged (QTreeWidgetItem *, QTreeWidgetItem *)));
-    connect (mDVDView, SIGNAL (itemDoubleClicked (QTreeWidgetItem *, int)),
+    connect (mTwCD, SIGNAL (itemDoubleClicked (QTreeWidgetItem *, int)),
              this, SLOT (processDoubleClick (QTreeWidgetItem *, int)));
-    connect (mDVDView, SIGNAL (customContextMenuRequested (const QPoint &)),
+    connect (mTwCD, SIGNAL (customContextMenuRequested (const QPoint &)),
              this, SLOT (showContextMenu (const QPoint &)));
-    connect (mDVDView, SIGNAL (resized (const QSize&, const QSize&)),
+    connect (mTwCD, SIGNAL (resized (const QSize&, const QSize&)),
              this, SLOT (makeRequestForAdjustTable()));
-    connect (mDVDView->header(), SIGNAL (sectionResized (int, int, int)),
+    connect (mTwCD->header(), SIGNAL (sectionResized (int, int, int)),
              this, SLOT (makeRequestForAdjustTable()));
 
-    mFloppyView->sortItems (0, Qt::AscendingOrder);
-    mFloppyView->header()->setResizeMode (0, QHeaderView::Fixed);
-    mFloppyView->header()->setResizeMode (1, QHeaderView::ResizeToContents);
-    mFloppyView->header()->setStretchLastSection (false);
-    mFloppyView->setSortingEnabled (true);
-    mFloppyView->setSupportedDropActions (Qt::LinkAction);
-    mFloppyView->installEventFilter (this);
-    connect (mFloppyView, SIGNAL (currentItemChanged (QTreeWidgetItem *, QTreeWidgetItem *)),
+    mTwFD->sortItems (0, Qt::AscendingOrder);
+    mTwFD->header()->setResizeMode (0, QHeaderView::Fixed);
+    mTwFD->header()->setResizeMode (1, QHeaderView::ResizeToContents);
+    mTwFD->header()->setStretchLastSection (false);
+    mTwFD->setSortingEnabled (true);
+    mTwFD->setSupportedDropActions (Qt::LinkAction);
+    mTwFD->installEventFilter (this);
+    connect (mTwFD, SIGNAL (currentItemChanged (QTreeWidgetItem *, QTreeWidgetItem *)),
              this, SLOT (processCurrentChanged (QTreeWidgetItem *, QTreeWidgetItem *)));
-    connect (mFloppyView, SIGNAL (itemDoubleClicked (QTreeWidgetItem *, int)),
+    connect (mTwFD, SIGNAL (itemDoubleClicked (QTreeWidgetItem *, int)),
              this, SLOT (processDoubleClick (QTreeWidgetItem *, int)));
-    connect (mFloppyView, SIGNAL (customContextMenuRequested (const QPoint &)),
+    connect (mTwFD, SIGNAL (customContextMenuRequested (const QPoint &)),
              this, SLOT (showContextMenu (const QPoint &)));
-    connect (mFloppyView, SIGNAL (resized (const QSize&, const QSize&)),
+    connect (mTwFD, SIGNAL (resized (const QSize&, const QSize&)),
              this, SLOT (makeRequestForAdjustTable()));
-    connect (mFloppyView->header(), SIGNAL (sectionResized (int, int, int)),
+    connect (mTwFD->header(), SIGNAL (sectionResized (int, int, int)),
              this, SLOT (makeRequestForAdjustTable()));
 
@@ -325,21 +281,13 @@
     mNewAction     = new QAction (this);
     mAddAction     = new QAction (this);
-//  mEditAction    = new QAction (this);
     mRemoveAction  = new QAction (this);
     mReleaseAction = new QAction (this);
     mRefreshAction = new QAction (this);
 
-    connect (mNewAction, SIGNAL (triggered()),
-             this, SLOT (doNewMedium()));
-    connect (mAddAction, SIGNAL (triggered()),
-             this, SLOT (doAddMedium()));
-//  connect (mEditAction, SIGNAL (triggered()),
-//           this, SLOT (editImage()));
-    connect (mRemoveAction, SIGNAL (triggered()),
-             this, SLOT (doRemoveMedium()));
-    connect (mReleaseAction, SIGNAL (triggered()),
-             this, SLOT (doReleaseMedium()));
-    connect (mRefreshAction, SIGNAL (triggered()),
-             this, SLOT (refreshAll()));
+    connect (mNewAction, SIGNAL (triggered()), this, SLOT (doNewMedium()));
+    connect (mAddAction, SIGNAL (triggered()), this, SLOT (doAddMedium()));
+    connect (mRemoveAction, SIGNAL (triggered()), this, SLOT (doRemoveMedium()));
+    connect (mReleaseAction, SIGNAL (triggered()), this, SLOT (doReleaseMedium()));
+    connect (mRefreshAction, SIGNAL (triggered()), this, SLOT (refreshAll()));
 
     mNewAction->setIcon (VBoxGlobal::iconSetFull (
@@ -351,5 +299,4 @@
         ":/hd_add_22px.png", ":/hd_add_16px.png",
         ":/hd_add_disabled_22px.png", ":/hd_add_disabled_16px.png"));
-//  mEditAction->setIcon (VBoxGlobal::iconSet (":/guesttools_16px.png", ":/guesttools_disabled_16px.png"));
     mRemoveAction->setIcon (VBoxGlobal::iconSetFull (
         QSize (22, 22), QSize (16, 16),
@@ -365,45 +312,37 @@
         ":/refresh_disabled_22px.png", ":/refresh_disabled_16px.png"));
 
-//  mActionsContextMenu->addAction (mEditAction);
     mActionsContextMenu->addAction (mRemoveAction);
     mActionsContextMenu->addAction (mReleaseAction);
 
     /* Toolbar composing */
-    mActionsToolBar = new VBoxToolBar (this);
-    mActionsToolBar->setIconSize (QSize (22, 22));
-    mActionsToolBar->setToolButtonStyle (Qt::ToolButtonTextUnderIcon);
-    mActionsToolBar->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Preferred);
-
-    /* Really messy what the uic produce here: a vbox layout in an hbox layout */
-    QHBoxLayout *centralLayout = qobject_cast <QHBoxLayout*> (centralWidget()->layout());
-    Assert (VALID_PTR (centralLayout));
-    QVBoxLayout *mainLayout = static_cast <QVBoxLayout*> (centralLayout->itemAt(0));
-    Assert (VALID_PTR (mainLayout));
+    mToolBar = new VBoxToolBar (this);
+    mToolBar->setIconSize (QSize (22, 22));
+    mToolBar->setToolButtonStyle (Qt::ToolButtonTextUnderIcon);
+    mToolBar->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Preferred);
+
+    QVBoxLayout *mainLayout = qobject_cast <QVBoxLayout*> (centralWidget()->layout());
+    Assert (mainLayout);
 #if MAC_LEOPARD_STYLE
     /* Enable unified toolbars on Mac OS X. Available on Qt >= 4.3 */
-    addToolBar (mActionsToolBar);
-    mActionsToolBar->setMacToolbar();
+    addToolBar (mToolBar);
+    mToolBar->setMacToolbar();
     /* No spacing/margin on the mac */
-    VBoxGlobal::setLayoutMargin (centralLayout, 0);
+    VBoxGlobal::setLayoutMargin (mainLayout, 0);
     mainLayout->insertSpacing (0, 10);
-    VBoxGlobal::setLayoutMargin (mainLayout, 0);
 #else /* MAC_LEOPARD_STYLE */
     /* Add the toolbar */
-    mainLayout->insertWidget (0, mActionsToolBar);
+    mainLayout->insertWidget (0, mToolBar);
     /* Set spacing/margin like in the selector window */
-    centralLayout->setSpacing (0);
-    VBoxGlobal::setLayoutMargin (centralLayout, 0);
     mainLayout->setSpacing (5);
     VBoxGlobal::setLayoutMargin (mainLayout, 5);
 #endif /* MAC_LEOPARD_STYLE */
 
-    mActionsToolBar->addAction (mNewAction);
-    mActionsToolBar->addAction (mAddAction);
-    mActionsToolBar->addSeparator();
-//  mActionsToolBar->addAction (mEditAction);
-    mActionsToolBar->addAction (mRemoveAction);
-    mActionsToolBar->addAction (mReleaseAction);
-    mActionsToolBar->addSeparator();
-    mActionsToolBar->addAction (mRefreshAction);
+    mToolBar->addAction (mNewAction);
+    mToolBar->addAction (mAddAction);
+    mToolBar->addSeparator();
+    mToolBar->addAction (mRemoveAction);
+    mToolBar->addAction (mReleaseAction);
+    mToolBar->addSeparator();
+    mToolBar->addAction (mRefreshAction);
 
     /* Menu bar */
@@ -412,5 +351,4 @@
     mActionsMenu->addAction (mAddAction);
     mActionsMenu->addSeparator();
-//  mActionsMenu->addAction (mEditAction);
     mActionsMenu->addAction (mRemoveAction);
     mActionsMenu->addAction (mReleaseAction);
@@ -434,15 +372,12 @@
 
     /* Connects for the button box */
-    connect (mButtonBox, SIGNAL (accepted()),
-             this, SLOT (accept()));
-    connect (mButtonBox, SIGNAL (rejected()),
-             this, SLOT (reject()));
-    connect (mButtonBox, SIGNAL (helpRequested()),
-             &vboxProblem(), SLOT (showHelpHelpDialog()));
+    connect (mButtonBox, SIGNAL (accepted()), this, SLOT (accept()));
+    connect (mButtonBox, SIGNAL (rejected()), this, SLOT (reject()));
+    connect (mButtonBox, SIGNAL (helpRequested()), &vboxProblem(), SLOT (showHelpHelpDialog()));
 }
 
 VBoxMediaManagerDlg::~VBoxMediaManagerDlg()
 {
-    delete mActionsToolBar;
+    delete mToolBar;
 }
 
@@ -480,6 +415,6 @@
     {
         case VBoxDefs::MediumType_HardDisk: mHDSelectedId = aSelectId; break;
-        case VBoxDefs::MediumType_DVD:      mDVDSelectedId = aSelectId; break;
-        case VBoxDefs::MediumType_Floppy:   mFloppySelectedId = aSelectId; break;
+        case VBoxDefs::MediumType_DVD:      mCDSelectedId = aSelectId; break;
+        case VBoxDefs::MediumType_Floppy:   mFDSelectedId = aSelectId; break;
         case VBoxDefs::MediumType_All: break;
         default:
@@ -487,13 +422,13 @@
     }
 
-    mTwImages->setTabEnabled (HDTab,
-                              aType == VBoxDefs::MediumType_All ||
-                              aType == VBoxDefs::MediumType_HardDisk);
-    mTwImages->setTabEnabled (CDTab,
-                              aType == VBoxDefs::MediumType_All ||
-                              aType == VBoxDefs::MediumType_DVD);
-    mTwImages->setTabEnabled (FDTab,
-                              aType == VBoxDefs::MediumType_All ||
-                              aType == VBoxDefs::MediumType_Floppy);
+    mTabWidget->setTabEnabled (HDTab,
+                               aType == VBoxDefs::MediumType_All ||
+                               aType == VBoxDefs::MediumType_HardDisk);
+    mTabWidget->setTabEnabled (CDTab,
+                               aType == VBoxDefs::MediumType_All ||
+                               aType == VBoxDefs::MediumType_DVD);
+    mTabWidget->setTabEnabled (FDTab,
+                               aType == VBoxDefs::MediumType_All ||
+                               aType == VBoxDefs::MediumType_Floppy);
 
     mDoSelect = aDoSelect;
@@ -543,13 +478,13 @@
 
     /* For a newly opened dialog, select the first item */
-    if (mHardDiskView->selectedItems().isEmpty())
-        if (QTreeWidgetItem *item = mHardDiskView->topLevelItem (0))
-            setCurrentItem (mHardDiskView, item);
-    if (mDVDView->selectedItems().isEmpty())
-        if (QTreeWidgetItem *item = mDVDView->topLevelItem (0))
-            setCurrentItem (mDVDView, item);
-    if (mFloppyView->selectedItems().isEmpty())
-        if (QTreeWidgetItem *item = mFloppyView->topLevelItem (0))
-            setCurrentItem (mFloppyView, item);
+    if (mTwHD->selectedItems().isEmpty())
+        if (QTreeWidgetItem *item = mTwHD->topLevelItem (0))
+            setCurrentItem (mTwHD, item);
+    if (mTwCD->selectedItems().isEmpty())
+        if (QTreeWidgetItem *item = mTwCD->topLevelItem (0))
+            setCurrentItem (mTwCD, item);
+    if (mTwFD->selectedItems().isEmpty())
+        if (QTreeWidgetItem *item = mTwFD->topLevelItem (0))
+            setCurrentItem (mTwFD, item);
 
     /* Applying language settings */
@@ -560,6 +495,5 @@
 
 /* static */
-void VBoxMediaManagerDlg::showModeless (QWidget *aCenterWidget /* = 0 */,
-                                        bool aRefresh /* = true */)
+void VBoxMediaManagerDlg::showModeless (QWidget *aCenterWidget /* = 0 */, bool aRefresh /* = true */)
 {
     if (!mModelessDialog)
@@ -569,6 +503,5 @@
         connect (vboxGlobal().mainWindow(), SIGNAL (closing()), mModelessDialog, SLOT (close()));
         mModelessDialog->setAttribute (Qt::WA_DeleteOnClose);
-        mModelessDialog->setup (VBoxDefs::MediumType_All,
-                                false /* aDoSelect */, aRefresh);
+        mModelessDialog->setup (VBoxDefs::MediumType_All, false /* aDoSelect */, aRefresh);
 
         /* listen to events that may change the media status and refresh
@@ -585,6 +518,5 @@
 
     mModelessDialog->show();
-    mModelessDialog->setWindowState (mModelessDialog->windowState() &
-                                     ~Qt::WindowMinimized);
+    mModelessDialog->setWindowState (mModelessDialog->windowState() & ~Qt::WindowMinimized);
     mModelessDialog->activateWindow();
 }
@@ -629,5 +561,4 @@
     mNewAction->setText (tr ("&New..."));
     mAddAction->setText (tr ("&Add..."));
-    // mEditAction->setText (tr ("&Edit..."));
     mRemoveAction->setText (tr ("R&emove"));
     mReleaseAction->setText (tr ("Re&lease"));
@@ -636,5 +567,4 @@
     mNewAction->setShortcut (QKeySequence (QKeySequence::New));
     mAddAction->setShortcut (QKeySequence ("Ins"));
-    // mEditAction->setShortcut (QKeySequence ("Ctrl+E"));
     mRemoveAction->setShortcut (QKeySequence (QKeySequence::Delete));
     mReleaseAction->setShortcut (QKeySequence ("Ctrl+L"));
@@ -643,5 +573,4 @@
     mNewAction->setStatusTip (tr ("Create a new virtual hard disk"));
     mAddAction->setStatusTip (tr ("Add an existing medium"));
-    // mEditAction->setStatusTip (tr ("Edit the properties of the selected medium"));
     mRemoveAction->setStatusTip (tr ("Remove the selected medium"));
     mReleaseAction->setStatusTip (tr ("Release the selected medium by detaching it from the machines"));
@@ -652,6 +581,4 @@
     mAddAction->setToolTip (mAddAction->text().remove ('&') +
         QString (" (%1)").arg (mAddAction->shortcut().toString()));
-    // mEditAction->setToolTip (mEditAction->text().remove ('&') +
-    //     QString (" (%1)").arg (mEditAction->shortcut().toString()));
     mRemoveAction->setToolTip (mRemoveAction->text().remove ('&') +
         QString (" (%1)").arg (mRemoveAction->shortcut().toString()));
@@ -673,6 +600,5 @@
     mProgressBar->setText (tr ("Checking accessibility"));
 #ifdef Q_WS_MAC
-    /* Make sure that the widgets aren't jumping around while the progress bar
-     * get visible. */
+    /* Make sure that the widgets aren't jumping around while the progress bar get visible. */
     mProgressBar->adjustSize();
     int h = mProgressBar->height();
@@ -683,5 +609,5 @@
         mButtonBox->button (QDialogButtonBox::Ok)->setText (tr ("&Select"));
 
-    if (mHardDiskView->model()->rowCount() || mDVDView->model()->rowCount() || mFloppyView->model()->rowCount())
+    if (mTwHD->model()->rowCount() || mTwCD->model()->rowCount() || mTwFD->model()->rowCount())
         refreshAll();
 }
@@ -696,7 +622,5 @@
 {
     /* Check for interesting objects */
-    if (!(aObject == mHardDiskView ||
-          aObject == mDVDView ||
-          aObject == mFloppyView))
+    if (!(aObject == mTwHD || aObject == mTwCD || aObject == mTwFD))
         return QIMainDialog::eventFilter (aObject, aEvent);
 
@@ -763,5 +687,5 @@
         if (aMedium.parent() && !mSessionMachineId.isNull())
         {
-            /* in !mShowDiffs mode, we ignore all diffs except ones that are
+            /* In !mShowDiffs mode, we ignore all diffs except ones that are
              * directly attached to the related VM in the current state */
             if (!aMedium.isAttachedInCurStateTo (mSessionMachineId))
@@ -771,5 +695,5 @@
              * we want to replace it with this diff to avoid duplicates in
              * !mShowDiffs mode. */
-            MediaItem *item = searchItem (mHardDiskView, aMedium.root().id());
+            MediaItem *item = searchItem (mTwHD, aMedium.root().id());
             AssertReturnVoid (item);
 
@@ -779,5 +703,5 @@
             if (item->id() == mHDSelectedId)
             {
-                setCurrentItem (mHardDiskView, item);
+                setCurrentItem (mTwHD, item);
                 mHDSelectedId = QString::null;
             }
@@ -794,5 +718,5 @@
         case VBoxDefs::MediumType_HardDisk:
         {
-            item = createHardDiskItem (mHardDiskView, aMedium);
+            item = createHardDiskItem (mTwHD, aMedium);
             AssertReturnVoid (item);
 
@@ -800,9 +724,9 @@
              * new tree-widget items, so initialize the header adjustment
              * by calling resizeSections() slot... */
-            QTimer::singleShot (0, mHardDiskView->header(), SLOT (resizeSections()));
+            QTimer::singleShot (0, mTwHD->header(), SLOT (resizeSections()));
 
             if (item->id() == mHDSelectedId)
             {
-                setCurrentItem (mHardDiskView, item);
+                setCurrentItem (mTwHD, item);
                 mHDSelectedId = QString::null;
             }
@@ -811,5 +735,5 @@
         case VBoxDefs::MediumType_DVD:
         {
-            item = new MediaItem (mDVDView, aMedium, this);
+            item = new MediaItem (mTwCD, aMedium, this);
             AssertReturnVoid (item);
 
@@ -817,10 +741,10 @@
              * new tree-widget items, so initialize the header adjustment
              * by calling resizeSections() slot... */
-            QTimer::singleShot (0, mDVDView->header(), SLOT (resizeSections()));
-
-            if (item->id() == mDVDSelectedId)
+            QTimer::singleShot (0, mTwCD->header(), SLOT (resizeSections()));
+
+            if (item->id() == mCDSelectedId)
             {
-                setCurrentItem (mDVDView, item);
-                mDVDSelectedId = QString::null;
+                setCurrentItem (mTwCD, item);
+                mCDSelectedId = QString::null;
             }
             break;
@@ -828,5 +752,5 @@
         case VBoxDefs::MediumType_Floppy:
         {
-            item = new MediaItem (mFloppyView, aMedium, this);
+            item = new MediaItem (mTwFD, aMedium, this);
             AssertReturnVoid (item);
 
@@ -834,10 +758,10 @@
              * new tree-widget items, so initialize the header adjustment
              * by calling resizeSections() slot... */
-            QTimer::singleShot (0, mFloppyView->header(), SLOT (resizeSections()));
-
-            if (item->id() == mFloppySelectedId)
+            QTimer::singleShot (0, mTwFD->header(), SLOT (resizeSections()));
+
+            if (item->id() == mFDSelectedId)
             {
-                setCurrentItem (mFloppyView, item);
-                mFloppySelectedId = QString::null;
+                setCurrentItem (mTwFD, item);
+                mFDSelectedId = QString::null;
             }
             break;
@@ -876,15 +800,15 @@
         case VBoxDefs::MediumType_HardDisk:
         {
-            item = searchItem (mHardDiskView, aMedium.id());
+            item = searchItem (mTwHD, aMedium.id());
             break;
         }
         case VBoxDefs::MediumType_DVD:
         {
-            item = searchItem (mDVDView, aMedium.id());
+            item = searchItem (mTwCD, aMedium.id());
             break;
         }
         case VBoxDefs::MediumType_Floppy:
         {
-            item = searchItem (mFloppyView, aMedium.id());
+            item = searchItem (mTwFD, aMedium.id());
             break;
         }
@@ -908,6 +832,5 @@
 }
 
-void VBoxMediaManagerDlg::mediumRemoved (VBoxDefs::MediumType aType,
-                                         const QString &aId)
+void VBoxMediaManagerDlg::mediumRemoved (VBoxDefs::MediumType aType, const QString &aId)
 {
     /* Ignore non-interesting aMedium */
@@ -947,7 +870,7 @@
 
     /* Load default tab icons */
-    mTwImages->setTabIcon (HDTab, mHardDiskIcon);
-    mTwImages->setTabIcon (CDTab, mDVDImageIcon);
-    mTwImages->setTabIcon (FDTab, mFloppyImageIcon);
+    mTabWidget->setTabIcon (HDTab, mHardDiskIcon);
+    mTabWidget->setTabIcon (CDTab, mDVDImageIcon);
+    mTabWidget->setTabIcon (FDTab, mFloppyImageIcon);
 
     /* Load current media list */
@@ -960,13 +883,13 @@
     /* Select the first item to be the current one if the previous saved item
      * was not selected yet. */
-    if (!mHardDiskView->currentItem())
-        if (QTreeWidgetItem *item = mHardDiskView->topLevelItem (0))
-            setCurrentItem (mHardDiskView, item);
-    if (!mDVDView->currentItem())
-        if (QTreeWidgetItem *item = mDVDView->topLevelItem (0))
-            setCurrentItem (mDVDView, item);
-    if (!mFloppyView->currentItem())
-        if (QTreeWidgetItem *item = mFloppyView->topLevelItem (0))
-            setCurrentItem (mFloppyView, item);
+    if (!mTwHD->currentItem())
+        if (QTreeWidgetItem *item = mTwHD->topLevelItem (0))
+            setCurrentItem (mTwHD, item);
+    if (!mTwCD->currentItem())
+        if (QTreeWidgetItem *item = mTwCD->topLevelItem (0))
+            setCurrentItem (mTwCD, item);
+    if (!mTwFD->currentItem())
+        if (QTreeWidgetItem *item = mTwFD->topLevelItem (0))
+            setCurrentItem (mTwFD, item);
 
     processCurrentChanged();
@@ -1000,7 +923,7 @@
         CMedium hd = dlg.hardDisk();
         /* Select the newly created hard disk */
-        MediaItem *item = searchItem (mHardDiskView, hd.GetId());
+        MediaItem *item = searchItem (mTwHD, hd.GetId());
         AssertReturnVoid (item);
-        mHardDiskView->setCurrentItem (item);
+        mTwHD->setCurrentItem (item);
     }
 }
@@ -1031,6 +954,4 @@
         case VBoxDefs::MediumType_HardDisk:
         {
-            /// @todo NEWMEDIA use CSystemProperties::GetHardDIskFormats to detect
-            /// possible hard disk extensions
             QList < QPair <QString, QString> > filterList = vboxGlobal().HDDBackends();
             QStringList backends;
@@ -1054,6 +975,5 @@
         case VBoxDefs::MediumType_DVD:
         {
-            filter = tr ("CD/DVD-ROM images (*.iso);;"
-                         "All files (*)");
+            filter = tr ("CD/DVD-ROM images (*.iso);;All files (*)");
             title = tr ("Select a CD/DVD-ROM disk image file");
             break;
@@ -1061,6 +981,5 @@
         case VBoxDefs::MediumType_Floppy:
         {
-            filter = tr ("Floppy images (*.img);;"
-                         "All files (*)");
+            filter = tr ("Floppy images (*.img);;All files (*)");
             title = tr ("Select a floppy disk image file");
             break;
@@ -1102,7 +1021,4 @@
         {
             bool deleteStorage = false;
-
-            /// @todo NEWMEDIA use CHardDiskFormat to find out if the format
-            /// supports storage deletion
 
             /* We don't want to try to delete inaccessible storage as it will
@@ -1129,6 +1045,5 @@
                 if (hardDisk.isOk())
                 {
-                    vboxProblem().showModalProgressDialog (progress, windowTitle(),
-                                                           parentWidget());
+                    vboxProblem().showModalProgressDialog (progress, windowTitle(), parentWidget());
                     if (progress.isOk() && progress.GetResultCode() == S_OK)
                         success = true;
@@ -1138,6 +1053,5 @@
                     vboxGlobal().removeMedium (VBoxDefs::MediumType_HardDisk, id);
                 else
-                    vboxProblem().cannotDeleteHardDiskStorage (this, hardDisk,
-                                                               progress);
+                    vboxProblem().cannotDeleteHardDiskStorage (this, hardDisk, progress);
 
                 /* We don't want to close the hard disk because it was
@@ -1190,6 +1104,5 @@
 
     const QList <QString> &machineIds = item->medium().curStateMachineIds();
-    for (QList <QString>::const_iterator it = machineIds.begin();
-         it != machineIds.end(); ++ it)
+    for (QList <QString>::const_iterator it = machineIds.begin(); it != machineIds.end(); ++ it)
     {
         CMachine m = mVBox.GetMachine (*it);
@@ -1217,6 +1130,5 @@
         return;
 
-    for (QList <QString>::const_iterator it = machineIds.begin();
-         it != machineIds.end(); ++ it)
+    for (QList <QString>::const_iterator it = machineIds.begin(); it != machineIds.end(); ++ it)
     {
         if (!releaseMediumFrom (item->medium(), *it))
@@ -1231,6 +1143,5 @@
 }
 
-bool VBoxMediaManagerDlg::releaseMediumFrom (const VBoxMedium &aMedium,
-                                             const QString &aMachineId)
+bool VBoxMediaManagerDlg::releaseMediumFrom (const VBoxMedium &aMedium, const QString &aMachineId)
 {
     CSession session;
@@ -1347,11 +1258,11 @@
     {
         case VBoxDefs::MediumType_HardDisk:
-            tree = mHardDiskView;
+            tree = mTwHD;
             break;
         case VBoxDefs::MediumType_DVD:
-            tree = mDVDView;
+            tree = mTwCD;
             break;
         case VBoxDefs::MediumType_Floppy:
-            tree = mFloppyView;
+            tree = mTwFD;
             break;
         default:
@@ -1365,5 +1276,5 @@
 {
     VBoxDefs::MediumType type = VBoxDefs::MediumType_Invalid;
-    switch (mTwImages->currentIndex ())
+    switch (mTabWidget->currentIndex())
     {
         case HDTab:
@@ -1377,5 +1288,5 @@
             break;
         default:
-            AssertMsgFailed (("Page type %d unknown!\n", mTwImages->currentIndex ()));
+            AssertMsgFailed (("Page type %d unknown!\n", mTabWidget->currentIndex()));
             break;
     }
@@ -1406,6 +1317,5 @@
 }
 
-void VBoxMediaManagerDlg::setCurrentItem (QTreeWidget *aTree,
-                                          QTreeWidgetItem *aItem)
+void VBoxMediaManagerDlg::setCurrentItem (QTreeWidget *aTree, QTreeWidgetItem *aItem)
 {
     if (aTree && aItem)
@@ -1418,5 +1328,5 @@
 }
 
-void VBoxMediaManagerDlg::processCurrentChanged (int /* index = -1 */)
+void VBoxMediaManagerDlg::processCurrentChanged (int /* aIndex = -1 */)
 {
     QTreeWidget *tree = currentTreeWidget();
@@ -1451,5 +1361,4 @@
     bool newEnabled     = currentTreeWidgetType() == VBoxDefs::MediumType_HardDisk;
     bool addEnabled     = true;
-//  bool editEnabled    = notInEnum && item && checkMediumFor (item, Action_Edit);
     bool removeEnabled  = notInEnum && item && checkMediumFor (item, Action_Remove);
     bool releaseEnabled = item && checkMediumFor (item, Action_Release);
@@ -1457,5 +1366,4 @@
     mNewAction->setEnabled (newEnabled);
     mAddAction->setEnabled (addEnabled);
-//  mEditAction->setEnabled (editEnabled);
     mRemoveAction->setEnabled (removeEnabled);
     mReleaseAction->setEnabled (releaseEnabled);
@@ -1473,20 +1381,20 @@
                         formatPaneText (item->usage());
 
-        if (item->treeWidget() == mHardDiskView)
-        {
-            mHdsPane1->setText (formatPaneText (item->location(), true, "end"));
-            mHdsPane2->setText (formatPaneText (QString ("%1 (%2)").arg (item->hardDiskType())
-                                                                   .arg (item->hardDiskFormat()), false));
-            mHdsPane3->setText (usage);
-        }
-        else if (item->treeWidget() == mDVDView)
-        {
-            mCdsPane1->setText (formatPaneText (item->location(), true, "end"));
-            mCdsPane2->setText (usage);
-        }
-        else if (item->treeWidget() == mFloppyView)
-        {
-            mFdsPane1->setText (formatPaneText (item->location(), true, "end"));
-            mFdsPane2->setText (usage);
+        if (item->treeWidget() == mTwHD)
+        {
+            mIpHD1->setText (formatPaneText (item->location(), true, "end"));
+            mIpHD2->setText (formatPaneText (QString ("%1 (%2)").arg (item->hardDiskType())
+                                                                .arg (item->hardDiskFormat()), false));
+            mIpHD3->setText (usage);
+        }
+        else if (item->treeWidget() == mTwCD)
+        {
+            mIpCD1->setText (formatPaneText (item->location(), true, "end"));
+            mIpCD2->setText (usage);
+        }
+        else if (item->treeWidget() == mTwFD)
+        {
+            mIpFD1->setText (formatPaneText (item->location(), true, "end"));
+            mIpFD2->setText (usage);
         }
     }
@@ -1494,7 +1402,7 @@
         clearInfoPanes();
 
-    mHdsContainer->setEnabled (item);
-    mCdsContainer->setEnabled (item);
-    mFdsContainer->setEnabled (item);
+    mHDContainer->setEnabled (item);
+    mCDContainer->setEnabled (item);
+    mFDContainer->setEnabled (item);
 }
 
@@ -1521,8 +1429,4 @@
 void VBoxMediaManagerDlg::machineStateChanged (const VBoxMachineStateChangeEvent &aEvent)
 {
-    /// @todo (r=dmik) IVirtualBoxCallback::OnMachineStateChange
-    //  must also expose the old state! In this case we won't need to cache
-    //  the state value in every class in GUI that uses this signal.
-
     switch (aEvent.state)
     {
@@ -1553,7 +1457,7 @@
     /* Get all the tree widgets */
     QList <QITreeWidget*> widgetList;
-    widgetList << mHardDiskView;
-    widgetList << mDVDView;
-    widgetList << mFloppyView;
+    widgetList << mTwHD;
+    widgetList << mTwCD;
+    widgetList << mTwFD;
 
     /* Calculate deduction for every header */
@@ -1576,6 +1480,5 @@
 }
 
-void VBoxMediaManagerDlg::addMediumToList (const QString &aLocation,
-                                           VBoxDefs::MediumType aType)
+void VBoxMediaManagerDlg::addMediumToList (const QString &aLocation, VBoxDefs::MediumType aType)
 {
     AssertReturnVoid (!aLocation.isEmpty());
@@ -1588,11 +1491,7 @@
         case VBoxDefs::MediumType_HardDisk:
         {
-            CMedium hd = mVBox.OpenHardDisk(aLocation, KAccessMode_ReadWrite, false, "", false, "");
+            CMedium hd = mVBox.OpenHardDisk (aLocation, KAccessMode_ReadWrite, false, "", false, "");
             if (mVBox.isOk())
-            {
-                medium = VBoxMedium (CMedium (hd),
-                                     VBoxDefs::MediumType_HardDisk,
-                                     KMediumState_Created);
-            }
+                medium = VBoxMedium (CMedium (hd), VBoxDefs::MediumType_HardDisk, KMediumState_Created);
             break;
         }
@@ -1601,9 +1500,5 @@
             CMedium image = mVBox.OpenDVDImage (aLocation, uuid);
             if (mVBox.isOk())
-            {
-                medium = VBoxMedium (CMedium (image),
-                                     VBoxDefs::MediumType_DVD,
-                                     KMediumState_Created);
-            }
+                medium = VBoxMedium (CMedium (image), VBoxDefs::MediumType_DVD, KMediumState_Created);
             break;
         }
@@ -1612,9 +1507,5 @@
             CMedium image = mVBox.OpenFloppyImage (aLocation, uuid);
             if (mVBox.isOk())
-            {
-                medium = VBoxMedium (CMedium (image),
-                                     VBoxDefs::MediumType_Floppy,
-                                     KMediumState_Created);
-            }
+                medium = VBoxMedium (CMedium (image), VBoxDefs::MediumType_Floppy, KMediumState_Created);
             break;
         }
@@ -1629,6 +1520,5 @@
 }
 
-MediaItem* VBoxMediaManagerDlg::createHardDiskItem (QTreeWidget *aTree,
-                                                    const VBoxMedium &aMedium) const
+MediaItem* VBoxMediaManagerDlg::createHardDiskItem (QTreeWidget *aTree, const VBoxMedium &aMedium) const
 {
     AssertReturn (!aMedium.medium().isNull(), 0);
@@ -1687,11 +1577,10 @@
         {
             /* Does it change the overall state? */
-            if (*inaccessible ||
-                aItem->state() != KMediumState_Inaccessible)
+            if (*inaccessible || aItem->state() != KMediumState_Inaccessible)
                 break; /* no */
 
             *inaccessible = true;
 
-            mTwImages->setTabIcon (tab, vboxGlobal().warningIcon());
+            mTabWidget->setTabIcon (tab, vboxGlobal().warningIcon());
 
             break;
@@ -1728,6 +1617,5 @@
                 for (; *it; ++ it)
                 {
-                    if (*it != aItem &&
-                        (*it)->state() == KMediumState_Inaccessible)
+                    if (*it != aItem && (*it)->state() == KMediumState_Inaccessible)
                     {
                         *inaccessible = true;
@@ -1738,15 +1626,14 @@
 
             if (*inaccessible)
-                mTwImages->setTabIcon (tab, vboxGlobal().warningIcon());
+                mTabWidget->setTabIcon (tab, vboxGlobal().warningIcon());
             else
-                mTwImages->setTabIcon (tab, *icon);
-
-            break;
-        }
-    }
-}
-
-MediaItem* VBoxMediaManagerDlg::searchItem (QTreeWidget *aTree,
-                                            const QString &aId) const
+                mTabWidget->setTabIcon (tab, *icon);
+
+            break;
+        }
+    }
+}
+
+MediaItem* VBoxMediaManagerDlg::searchItem (QTreeWidget *aTree, const QString &aId) const
 {
     if (aId.isNull())
@@ -1872,7 +1759,7 @@
 void VBoxMediaManagerDlg::clearInfoPanes()
 {
-    mHdsPane1->clear(); mHdsPane2->clear(); mHdsPane3->clear();
-    mCdsPane1->clear(); mCdsPane2->clear();
-    mFdsPane1->clear(); mFdsPane2->clear();
+    mIpHD1->clear(); mIpHD2->clear(); mIpHD3->clear();
+    mIpCD1->clear(); mIpCD2->clear();
+    mIpFD1->clear(); mIpFD2->clear();
 }
 
@@ -1896,15 +1783,15 @@
     MediaItem *mi;
 
-    mi = toMediaItem (mHardDiskView->currentItem());
+    mi = toMediaItem (mTwHD->currentItem());
     if (mHDSelectedId.isNull())
         mHDSelectedId = mi ? mi->id() : QString::null;
 
-    mi = toMediaItem (mDVDView->currentItem());
-    if (mDVDSelectedId.isNull())
-        mDVDSelectedId = mi ? mi->id() : QString::null;
-
-    mi = toMediaItem (mFloppyView->currentItem());
-    if (mFloppySelectedId.isNull())
-        mFloppySelectedId = mi ? mi->id() : QString::null;
+    mi = toMediaItem (mTwCD->currentItem());
+    if (mCDSelectedId.isNull())
+        mCDSelectedId = mi ? mi->id() : QString::null;
+
+    mi = toMediaItem (mTwFD->currentItem());
+    if (mFDSelectedId.isNull())
+        mFDSelectedId = mi ? mi->id() : QString::null;
 
     /* Finally, clear all the lists...
@@ -1916,9 +1803,9 @@
      * is null and at least one element have to be selected (by policy).
      * So just blocking any signals outgoing from the list during clearing. */
-    mHardDiskView->blockSignals (true);
-    mHardDiskView->clear();
-    mHardDiskView->blockSignals (false);
-    mDVDView->clear();
-    mFloppyView->clear();
+    mTwHD->blockSignals (true);
+    mTwHD->clear();
+    mTwHD->blockSignals (false);
+    mTwCD->clear();
+    mTwFD->clear();
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxMediaManagerDlg.ui
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxMediaManagerDlg.ui	(revision 23952)
+++ /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxMediaManagerDlg.ui	(revision 23953)
@@ -3,5 +3,5 @@
  VBox frontends: Qt4 GUI ("VirtualBox"):
 
- Copyright (C) 2008 Sun Microsystems, Inc.
+ Copyright (C) 2006-2009 Sun Microsystems, Inc.
 
  This file is part of VirtualBox Open Source Edition (OSE), as
@@ -29,5 +29,5 @@
   <property name="minimumSize" >
    <size>
-    <width>283</width>
+    <width>280</width>
     <height>190</height>
    </size>
@@ -37,317 +37,310 @@
   </property>
   <widget class="QWidget" name="mCentralWidget" >
-   <layout class="QHBoxLayout" >
+   <layout class="QVBoxLayout" >
     <item>
-     <layout class="QVBoxLayout" >
-      <item>
-       <widget class="QTabWidget" name="mTwImages" >
-        <property name="sizePolicy" >
-         <sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="currentIndex" >
-         <number>0</number>
-        </property>
-        <widget class="QWidget" name="mTbHD" >
-         <attribute name="title" >
-          <string>Hard &amp;Disks</string>
-         </attribute>
-         <layout class="QVBoxLayout" >
-          <item>
-           <widget class="QITreeWidget" name="mHardDiskView" >
-            <property name="contextMenuPolicy" >
-             <enum>Qt::CustomContextMenu</enum>
-            </property>
-            <property name="acceptDrops" >
-             <bool>true</bool>
-            </property>
-            <property name="horizontalScrollBarPolicy" >
-             <enum>Qt::ScrollBarAlwaysOff</enum>
-            </property>
-            <property name="alternatingRowColors" >
-             <bool>true</bool>
-            </property>
-            <property name="allColumnsShowFocus" >
-             <bool>true</bool>
-            </property>
-            <column>
-             <property name="text" >
-              <string>Name</string>
-             </property>
-            </column>
-            <column>
-             <property name="text" >
-              <string>Virtual Size</string>
-             </property>
-            </column>
-            <column>
-             <property name="text" >
-              <string>Actual Size</string>
-             </property>
-            </column>
-           </widget>
-          </item>
-          <item>
-           <widget class="QFrame" name="mHdsContainer" >
-            <property name="frameShape" >
-             <enum>QFrame::Box</enum>
-            </property>
-            <property name="frameShadow" >
-             <enum>QFrame::Sunken</enum>
-            </property>
-            <layout class="QGridLayout" >
-             <property name="verticalSpacing" >
-              <number>0</number>
-             </property>
-             <property name="margin" >
-              <number>5</number>
-             </property>
-             <item row="0" column="0" >
-              <widget class="QLabel" name="mLbHD1" >
-               <property name="text" >
-                <string>Location</string>
-               </property>
-              </widget>
-             </item>
-             <item row="0" column="1" >
-              <widget class="QILabel" name="mHdsPane1" >
-               <property name="sizePolicy" >
-                <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
-                 <horstretch>0</horstretch>
-                 <verstretch>0</verstretch>
-                </sizepolicy>
-               </property>
-              </widget>
-             </item>
-             <item row="1" column="0" >
-              <widget class="QLabel" name="mLbHD2" >
-               <property name="text" >
-                <string>Type (Format)</string>
-               </property>
-              </widget>
-             </item>
-             <item row="1" column="1" >
-              <widget class="QILabel" name="mHdsPane2" >
-               <property name="sizePolicy" >
-                <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
-                 <horstretch>0</horstretch>
-                 <verstretch>0</verstretch>
-                </sizepolicy>
-               </property>
-              </widget>
-             </item>
-             <item row="2" column="0" >
-              <widget class="QLabel" name="mLbHD3" >
-               <property name="text" >
-                <string>Attached to</string>
-               </property>
-              </widget>
-             </item>
-             <item row="2" column="1" >
-              <widget class="QILabel" name="mHdsPane3" >
-               <property name="sizePolicy" >
-                <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
-                 <horstretch>0</horstretch>
-                 <verstretch>0</verstretch>
-                </sizepolicy>
-               </property>
-              </widget>
-             </item>
-            </layout>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-        <widget class="QWidget" name="mTbCD" >
-         <attribute name="title" >
-          <string>&amp;CD/DVD Images</string>
-         </attribute>
-         <layout class="QVBoxLayout" >
-          <item>
-           <widget class="QITreeWidget" name="mDVDView" >
-            <property name="contextMenuPolicy" >
-             <enum>Qt::CustomContextMenu</enum>
-            </property>
-            <property name="acceptDrops" >
-             <bool>true</bool>
-            </property>
-            <property name="horizontalScrollBarPolicy" >
-             <enum>Qt::ScrollBarAlwaysOff</enum>
-            </property>
-            <property name="alternatingRowColors" >
-             <bool>true</bool>
-            </property>
-            <property name="allColumnsShowFocus" >
-             <bool>true</bool>
-            </property>
-            <column>
-             <property name="text" >
-              <string>Name</string>
-             </property>
-            </column>
-            <column>
-             <property name="text" >
-              <string>Size</string>
-             </property>
-            </column>
-           </widget>
-          </item>
-          <item>
-           <widget class="QFrame" name="mCdsContainer" >
-            <property name="frameShape" >
-             <enum>QFrame::Box</enum>
-            </property>
-            <property name="frameShadow" >
-             <enum>QFrame::Sunken</enum>
-            </property>
-            <layout class="QGridLayout" >
-             <property name="verticalSpacing" >
-              <number>0</number>
-             </property>
-             <property name="margin" >
-              <number>5</number>
-             </property>
-             <item row="0" column="0" >
-              <widget class="QLabel" name="mLbCD1" >
-               <property name="text" >
-                <string>Location</string>
-               </property>
-              </widget>
-             </item>
-             <item row="0" column="1" >
-              <widget class="QILabel" name="mCdsPane1" >
-               <property name="sizePolicy" >
-                <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
-                 <horstretch>0</horstretch>
-                 <verstretch>0</verstretch>
-                </sizepolicy>
-               </property>
-              </widget>
-             </item>
-             <item row="1" column="0" >
-              <widget class="QLabel" name="mLbCD2" >
-               <property name="text" >
-                <string>Attached to</string>
-               </property>
-              </widget>
-             </item>
-             <item row="1" column="1" >
-              <widget class="QILabel" name="mCdsPane2" >
-               <property name="sizePolicy" >
-                <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
-                 <horstretch>0</horstretch>
-                 <verstretch>0</verstretch>
-                </sizepolicy>
-               </property>
-              </widget>
-             </item>
-            </layout>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-        <widget class="QWidget" name="mTbFD" >
-         <attribute name="title" >
-          <string>&amp;Floppy Images</string>
-         </attribute>
-         <layout class="QVBoxLayout" >
-          <item>
-           <widget class="QITreeWidget" name="mFloppyView" >
-            <property name="contextMenuPolicy" >
-             <enum>Qt::CustomContextMenu</enum>
-            </property>
-            <property name="acceptDrops" >
-             <bool>true</bool>
-            </property>
-            <property name="horizontalScrollBarPolicy" >
-             <enum>Qt::ScrollBarAlwaysOff</enum>
-            </property>
-            <property name="alternatingRowColors" >
-             <bool>true</bool>
-            </property>
-            <property name="allColumnsShowFocus" >
-             <bool>true</bool>
-            </property>
-            <column>
-             <property name="text" >
-              <string>Name</string>
-             </property>
-            </column>
-            <column>
-             <property name="text" >
-              <string>Size</string>
-             </property>
-            </column>
-           </widget>
-          </item>
-          <item>
-           <widget class="QFrame" name="mFdsContainer" >
-            <property name="frameShape" >
-             <enum>QFrame::Box</enum>
-            </property>
-            <property name="frameShadow" >
-             <enum>QFrame::Sunken</enum>
-            </property>
-            <layout class="QGridLayout" >
-             <property name="horizontalSpacing" >
-              <number>6</number>
-             </property>
-             <property name="verticalSpacing" >
-              <number>0</number>
-             </property>
-             <property name="margin" >
-              <number>5</number>
-             </property>
-             <item row="0" column="0" >
-              <widget class="QLabel" name="mLbFD1" >
-               <property name="text" >
-                <string>Location</string>
-               </property>
-              </widget>
-             </item>
-             <item row="0" column="1" >
-              <widget class="QILabel" name="mFdsPane1" >
-               <property name="sizePolicy" >
-                <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
-                 <horstretch>0</horstretch>
-                 <verstretch>0</verstretch>
-                </sizepolicy>
-               </property>
-              </widget>
-             </item>
-             <item row="1" column="0" >
-              <widget class="QLabel" name="mLbFD2" >
-               <property name="text" >
-                <string>Attached to</string>
-               </property>
-              </widget>
-             </item>
-             <item row="1" column="1" >
-              <widget class="QILabel" name="mFdsPane2" >
-               <property name="sizePolicy" >
-                <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
-                 <horstretch>0</horstretch>
-                 <verstretch>0</verstretch>
-                </sizepolicy>
-               </property>
-              </widget>
-             </item>
-            </layout>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-       </widget>
-      </item>
-      <item>
-       <widget class="QIDialogButtonBox" name="mButtonBox" >
-        <property name="standardButtons" >
-         <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
-        </property>
-       </widget>
-      </item>
-     </layout>
+     <widget class="QTabWidget" name="mTabWidget" >
+      <property name="sizePolicy" >
+       <sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <widget class="QWidget" name="mTabHD" >
+       <attribute name="title" >
+        <string>Hard &amp;Disks</string>
+       </attribute>
+       <layout class="QVBoxLayout" >
+        <item>
+         <widget class="QITreeWidget" name="mTwHD" >
+          <property name="contextMenuPolicy" >
+           <enum>Qt::CustomContextMenu</enum>
+          </property>
+          <property name="acceptDrops" >
+           <bool>true</bool>
+          </property>
+          <property name="horizontalScrollBarPolicy" >
+           <enum>Qt::ScrollBarAlwaysOff</enum>
+          </property>
+          <property name="alternatingRowColors" >
+           <bool>true</bool>
+          </property>
+          <property name="allColumnsShowFocus" >
+           <bool>true</bool>
+          </property>
+          <column>
+           <property name="text" >
+            <string>Name</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>Virtual Size</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>Actual Size</string>
+           </property>
+          </column>
+         </widget>
+        </item>
+        <item>
+         <widget class="QFrame" name="mHDContainer" >
+          <property name="frameShape" >
+           <enum>QFrame::Box</enum>
+          </property>
+          <property name="frameShadow" >
+           <enum>QFrame::Sunken</enum>
+          </property>
+          <layout class="QGridLayout" >
+           <property name="verticalSpacing" >
+            <number>0</number>
+           </property>
+           <property name="margin" >
+            <number>5</number>
+           </property>
+           <item row="0" column="0" >
+            <widget class="QLabel" name="mLbHD1" >
+             <property name="text" >
+              <string>Location</string>
+             </property>
+            </widget>
+           </item>
+           <item row="0" column="1" >
+            <widget class="QILabel" name="mIpHD1" >
+             <property name="sizePolicy" >
+              <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="0" >
+            <widget class="QLabel" name="mLbHD2" >
+             <property name="text" >
+              <string>Type (Format)</string>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="1" >
+            <widget class="QILabel" name="mIpHD2" >
+             <property name="sizePolicy" >
+              <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+            </widget>
+           </item>
+           <item row="2" column="0" >
+            <widget class="QLabel" name="mLbHD3" >
+             <property name="text" >
+              <string>Attached to</string>
+             </property>
+            </widget>
+           </item>
+           <item row="2" column="1" >
+            <widget class="QILabel" name="mIpHD3" >
+             <property name="sizePolicy" >
+              <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="mTabCD" >
+       <attribute name="title" >
+        <string>&amp;CD/DVD Images</string>
+       </attribute>
+       <layout class="QVBoxLayout" >
+        <item>
+         <widget class="QITreeWidget" name="mTwCD" >
+          <property name="contextMenuPolicy" >
+           <enum>Qt::CustomContextMenu</enum>
+          </property>
+          <property name="acceptDrops" >
+           <bool>true</bool>
+          </property>
+          <property name="horizontalScrollBarPolicy" >
+           <enum>Qt::ScrollBarAlwaysOff</enum>
+          </property>
+          <property name="alternatingRowColors" >
+           <bool>true</bool>
+          </property>
+          <property name="allColumnsShowFocus" >
+           <bool>true</bool>
+          </property>
+          <column>
+           <property name="text" >
+            <string>Name</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>Size</string>
+           </property>
+          </column>
+         </widget>
+        </item>
+        <item>
+         <widget class="QFrame" name="mCDContainer" >
+          <property name="frameShape" >
+           <enum>QFrame::Box</enum>
+          </property>
+          <property name="frameShadow" >
+           <enum>QFrame::Sunken</enum>
+          </property>
+          <layout class="QGridLayout" >
+           <property name="verticalSpacing" >
+            <number>0</number>
+           </property>
+           <property name="margin" >
+            <number>5</number>
+           </property>
+           <item row="0" column="0" >
+            <widget class="QLabel" name="mLbCD1" >
+             <property name="text" >
+              <string>Location</string>
+             </property>
+            </widget>
+           </item>
+           <item row="0" column="1" >
+            <widget class="QILabel" name="mIpCD1" >
+             <property name="sizePolicy" >
+              <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="0" >
+            <widget class="QLabel" name="mLbCD2" >
+             <property name="text" >
+              <string>Attached to</string>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="1" >
+            <widget class="QILabel" name="mIpCD2" >
+             <property name="sizePolicy" >
+              <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="mTabFD" >
+       <attribute name="title" >
+        <string>&amp;Floppy Images</string>
+       </attribute>
+       <layout class="QVBoxLayout" >
+        <item>
+         <widget class="QITreeWidget" name="mTwFD" >
+          <property name="contextMenuPolicy" >
+           <enum>Qt::CustomContextMenu</enum>
+          </property>
+          <property name="acceptDrops" >
+           <bool>true</bool>
+          </property>
+          <property name="horizontalScrollBarPolicy" >
+           <enum>Qt::ScrollBarAlwaysOff</enum>
+          </property>
+          <property name="alternatingRowColors" >
+           <bool>true</bool>
+          </property>
+          <property name="allColumnsShowFocus" >
+           <bool>true</bool>
+          </property>
+          <column>
+           <property name="text" >
+            <string>Name</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>Size</string>
+           </property>
+          </column>
+         </widget>
+        </item>
+        <item>
+         <widget class="QFrame" name="mFDContainer" >
+          <property name="frameShape" >
+           <enum>QFrame::Box</enum>
+          </property>
+          <property name="frameShadow" >
+           <enum>QFrame::Sunken</enum>
+          </property>
+          <layout class="QGridLayout" >
+           <property name="horizontalSpacing" >
+            <number>6</number>
+           </property>
+           <property name="verticalSpacing" >
+            <number>0</number>
+           </property>
+           <property name="margin" >
+            <number>5</number>
+           </property>
+           <item row="0" column="0" >
+            <widget class="QLabel" name="mLbFD1" >
+             <property name="text" >
+              <string>Location</string>
+             </property>
+            </widget>
+           </item>
+           <item row="0" column="1" >
+            <widget class="QILabel" name="mIpFD1" >
+             <property name="sizePolicy" >
+              <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="0" >
+            <widget class="QLabel" name="mLbFD2" >
+             <property name="text" >
+              <string>Attached to</string>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="1" >
+            <widget class="QILabel" name="mIpFD2" >
+             <property name="sizePolicy" >
+              <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+     </widget>
+    </item>
+    <item>
+     <widget class="QIDialogButtonBox" name="mButtonBox" >
+      <property name="standardButtons" >
+       <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
+      </property>
+     </widget>
     </item>
    </layout>
