Index: trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 88646)
+++ trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 88647)
@@ -1009,4 +1009,5 @@
 	src/logviewer/UIVMLogViewerFilterPanel.cpp \
 	src/logviewer/UIVMLogViewerTextEdit.cpp \
+	src/logviewer/UIVMLogViewerWidget.cpp \
 	src/activity/vmactivity/UIVMActivityMonitor.cpp \
 	src/medium/UIMediumEnumerator.cpp \
Index: trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp	(revision 88646)
+++ trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp	(revision 88647)
@@ -55,4 +55,39 @@
 const ULONG uAllowedLogSize = _256M;
 
+class UIMachineListMenu : public QWidget
+{
+
+    Q_OBJECT;
+
+public:
+
+    UIMachineListMenu(QWidget *pParent = 0);
+    /** Removes the actions and deletes them. */
+    void clear();
+    QAction *addAction(const QString &strText);
+};
+
+UIMachineListMenu::UIMachineListMenu(QWidget *pParent /* = 0 */)
+    :QWidget(pParent)
+{
+}
+
+void UIMachineListMenu::clear()
+{
+    QList<QAction*> actionList = actions();
+    for (int i = 0; i < actionList.size(); ++i)
+    {
+        removeAction(actionList[i]);
+        delete actionList[i];
+    }
+}
+
+QAction *UIMachineListMenu::addAction(const QString &strText)
+{
+    QAction *pAction = new QAction(strText, this);
+    QWidget::addAction(pAction);
+    return pAction;
+}
+
 UIVMLogViewerWidget::Machine::Machine(const QUuid &id, const QString &strName)
     : m_id(id)
@@ -60,4 +95,7 @@
 {
 }
+
+UIVMLogViewerWidget::Machine::Machine()
+{}
 
 UIVMLogViewerWidget::UIVMLogViewerWidget(EmbedTo enmEmbedding,
@@ -446,4 +484,9 @@
 }
 
+void UIVMLogViewerWidget::sltCornerButtonToggled(bool fToggle)
+{
+    printf("%d\n", fToggle);
+}
+
 void UIVMLogViewerWidget::prepare()
 {
@@ -520,7 +563,9 @@
                 m_pTabWidget->setCornerWidget(m_pCornerButton, Qt::TopLeftCorner);
                 m_pCornerButton->setIcon(UIIconPool::iconSet(":/machine_16px.png"));
-                m_pMachineSelectionMenu = new QMenu(this);
-                m_pCornerButton->setMenu(m_pMachineSelectionMenu);
-                m_pCornerButton->setPopupMode(QToolButton::InstantPopup);
+                m_pCornerButton->setCheckable(true);
+                m_pMachineSelectionMenu = new UIMachineListMenu(this);
+                connect(m_pCornerButton, &QIToolButton::toggled, this, &UIVMLogViewerWidget::sltCornerButtonToggled);
+                //m_pCornerButton->setMenu(m_pMachineSelectionMenu);
+                //m_pCornerButton->setPopupMode(QToolButton::InstantPopup);
             }
         }
@@ -958,9 +1003,5 @@
 {
     if (!m_pMachineSelectionMenu)
-    {
-        m_pMachineSelectionMenu = new QMenu(this);
-        if (m_pCornerButton)
-            m_pCornerButton->setMenu(m_pMachineSelectionMenu);
-    }
+        return;
     m_pMachineSelectionMenu->clear();
 
@@ -972,2 +1013,4 @@
     }
 }
+
+#include "UIVMLogViewerWidget.moc"
Index: trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h	(revision 88646)
+++ trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h	(revision 88647)
@@ -44,4 +44,5 @@
 class QIToolBar;
 class QIToolButton;
+class UIMachineListMenu;
 class UIVirtualMachineItem;
 class UIVMLogPage;
@@ -137,9 +138,10 @@
         void sltResetOptionsToDefault();
     /** @} */
-
+    void sltCornerButtonToggled(bool fToggle);
 private:
         struct Machine
         {
             Machine(const QUuid &id, const QString &strName);
+            Machine();
             QUuid   m_id;
             QString m_strName;
@@ -245,5 +247,5 @@
     /** @} */
     QIToolButton *m_pCornerButton;
-    QMenu *m_pMachineSelectionMenu;
+    UIMachineListMenu *m_pMachineSelectionMenu;
     friend class UIVMLogViewerFilterPanel;
     friend class UIVMLogViewerPanel;
