Index: /trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.cpp	(revision 76908)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.cpp	(revision 76909)
@@ -369,4 +369,5 @@
         connect(m_pTreeWidget, &QITreeWidget::itemSelectionChanged, this, &UIMediumSelector::sltHandleItemSelectionChanged);
         connect(m_pTreeWidget, &QITreeWidget::itemDoubleClicked, this, &UIMediumSelector::sltHandleTreeWidgetDoubleClick);
+        connect(m_pTreeWidget, &QITreeWidget::customContextMenuRequested, this, &UIMediumSelector::sltHandleTreeContextMenuRequest);
     }
 
@@ -384,5 +385,5 @@
                 this, &UIMediumSelector::sltHandleShowNextMatchingItem);
         connect(m_pSearchWidget, &UIMediumSearchWidget::sigShowPreviousMatchingItem,
-                this, &UIMediumSelector::sltHandlehowPreviousMatchingItem);
+                this, &UIMediumSelector::sltHandleShowPreviousMatchingItem);
     }
 }
@@ -513,4 +514,5 @@
         m_pTreeWidget->setSortingEnabled(true);
         m_pTreeWidget->sortItems(0, Qt::AscendingOrder);
+        m_pTreeWidget->setContextMenuPolicy(Qt::CustomContextMenu);
     }
 
@@ -611,5 +613,5 @@
 }
 
-void UIMediumSelector::sltHandlehowPreviousMatchingItem()
+void UIMediumSelector::sltHandleShowPreviousMatchingItem()
 {
     if (m_mathingItemList.isEmpty())
@@ -618,4 +620,37 @@
         m_iCurrentShownIndex = m_mathingItemList.size() -1;
     scrollToItem(m_mathingItemList[m_iCurrentShownIndex]);
+}
+
+void UIMediumSelector::sltHandleTreeContextMenuRequest(const QPoint &point)
+{
+    QWidget *pSender = qobject_cast<QWidget*>(sender());
+    if (!pSender)
+        return;
+
+    QMenu menu;
+    QAction *pExpandAll = menu.addAction(tr("Expand All"));
+    QAction *pCollapseAll = menu.addAction(tr("Collapse All"));
+
+    connect(pExpandAll, &QAction::triggered, this, &UIMediumSelector::sltHandleTreeExpandAllSignal);
+    connect(pCollapseAll, &QAction::triggered, this, &UIMediumSelector::sltHandleTreeCollapseAllSignal);
+
+    menu.exec(pSender->mapToGlobal(point));
+}
+
+void UIMediumSelector::sltHandleTreeExpandAllSignal()
+{
+    if (m_pTreeWidget)
+        m_pTreeWidget->expandAll();
+}
+
+void UIMediumSelector::sltHandleTreeCollapseAllSignal()
+{
+    if (m_pTreeWidget)
+        m_pTreeWidget->collapseAll();
+
+    if (m_pAttachedSubTreeRoot)
+        m_pTreeWidget->setExpanded(m_pTreeWidget->itemIndex(m_pAttachedSubTreeRoot), true);
+    if (m_pNotAttachedSubTreeRoot)
+        m_pTreeWidget->setExpanded(m_pTreeWidget->itemIndex(m_pNotAttachedSubTreeRoot), true);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.h	(revision 76908)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.h	(revision 76909)
@@ -71,5 +71,8 @@
     void sltHandlePerformSearch();
     void sltHandleShowNextMatchingItem();
-    void sltHandlehowPreviousMatchingItem();
+    void sltHandleShowPreviousMatchingItem();
+    void sltHandleTreeContextMenuRequest(const QPoint &point);
+    void sltHandleTreeExpandAllSignal();
+    void sltHandleTreeCollapseAllSignal();
 
  private:
