Index: trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.cpp	(revision 70518)
+++ trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.cpp	(revision 70519)
@@ -120,6 +120,7 @@
     if (pFocus && pFocus->parent() == this)
         focusNextPrevChild(true);
+    if(m_pViewer)
+        m_pViewer->hidePanel(this);
 
     QWidget::hideEvent(pEvent);
-    emit sigHide();
 }
Index: trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.h	(revision 70518)
+++ trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.h	(revision 70519)
@@ -40,8 +40,4 @@
 {
     Q_OBJECT;
-
-signals:
-
-    void sigHide();
 
 public:
Index: trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.cpp	(revision 70518)
+++ trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.cpp	(revision 70519)
@@ -336,11 +336,11 @@
     m_pNextPrevButtons->setToolTip(1, UIVMLogViewerWidget::tr("Search for the next occurrence of the string"));
 
-    m_pCaseSensitiveCheckBox->setText(UIVMLogViewerWidget::tr("C&ase\nSensitive"));
+    m_pCaseSensitiveCheckBox->setText(UIVMLogViewerWidget::tr("C&ase Sensitive"));
     m_pCaseSensitiveCheckBox->setToolTip(UIVMLogViewerWidget::tr("Perform case sensitive search (when checked)"));
 
-    m_pMatchWholeWordCheckBox->setText(UIVMLogViewerWidget::tr("Ma&tch\nWhole Word"));
+    m_pMatchWholeWordCheckBox->setText(UIVMLogViewerWidget::tr("Ma&tch Whole Word"));
     m_pMatchWholeWordCheckBox->setToolTip(UIVMLogViewerWidget::tr("Search matches only complete words when checked"));
 
-    m_pHighlightAllCheckBox->setText(UIVMLogViewerWidget::tr("&Highlight\nAll"));
+    m_pHighlightAllCheckBox->setText(UIVMLogViewerWidget::tr("&Highlight All"));
     m_pHighlightAllCheckBox->setToolTip(UIVMLogViewerWidget::tr("All occurence of the search text are highlighted"));
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp	(revision 70518)
+++ trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp	(revision 70519)
@@ -181,4 +181,5 @@
     QString m_logFileName;
 };
+
 
 UIVMLogViewerWidget::UIVMLogViewerWidget(EmbedTo enmEmbedding, QWidget *pParent /* = 0 */, const CMachine &machine /* = CMachine() */)
@@ -238,16 +239,21 @@
 void UIVMLogViewerWidget::sltPanelActionTriggered(bool checked)
 {
-    RT_NOREF(checked);
-
     QAction *pSenderAction = qobject_cast<QAction*>(sender());
     if(!pSenderAction)
         return;
+    UIVMLogViewerPanel* pPanel = 0;
     /* Look for the sender() within the m_panelActionMap's values: */
-    for(QMap<UIVMLogViewerPanel**, QAction**>::const_iterator iterator = m_panelActionMap.begin();
+    for(QMap<UIVMLogViewerPanel*, QAction*>::const_iterator iterator = m_panelActionMap.begin();
         iterator != m_panelActionMap.end(); ++iterator)
     {
-        if(iterator.value() == &pSenderAction)
-            continue;
-    }
+        if(iterator.value() == pSenderAction)
+            pPanel = iterator.key();
+    }
+    if(!pPanel)
+        return;
+    if(checked)
+        showPanel(pPanel);
+    else
+        hidePanel(pPanel);
 }
 
@@ -452,4 +458,8 @@
     m_pMainLayout = new QVBoxLayout(this);
 
+    /* Prepare widgets: */
+    prepareWidgets();
+
+
     prepareActions();
 
@@ -457,7 +467,4 @@
     prepareMenu();
 
-    /* Prepare widgets: */
-    prepareWidgets();
-
     /* Reading log files: */
     sltRefresh();
@@ -465,4 +472,8 @@
     /* Loading language constants: */
     retranslateUi();
+
+    m_panelActionMap.insert(m_pBookmarksPanel, m_pActionBookmark);
+    m_panelActionMap.insert(m_pSearchPanel, m_pActionFind);
+    m_panelActionMap.insert(m_pFilterPanel, m_pActionFilter);
 }
 
@@ -515,11 +526,9 @@
     AssertPtrReturnVoid(m_pBookmarksPanel);
     {
-        //QMap<UIVMLogViewerPanel*&, QAction*&> m_panelActionMap;
-        m_panelActionMap.insert(reinterpret_cast<UIVMLogViewerPanel**>(&m_pBookmarksPanel), &m_pActionBookmark);
-        //connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigHide, this, &UIVMLogViewerWidget::sltHidePanel);
         installEventFilter(m_pBookmarksPanel);
         m_pBookmarksPanel->hide();
         m_pMainLayout->insertWidget(4, m_pBookmarksPanel);
     }
+
 }
 
@@ -532,5 +541,5 @@
         m_pActionFind->setShortcut(QKeySequence("Ctrl+F"));
         m_pActionFind->setCheckable(true);
-        connect(m_pActionFind, &QAction::triggered, this, &UIVMLogViewerWidget::sltShowHideSearchPanel);
+        connect(m_pActionFind, &QAction::triggered, this, &UIVMLogViewerWidget::sltPanelActionTriggered);
     }
 
@@ -541,5 +550,16 @@
         m_pActionFilter->setShortcut(QKeySequence("Ctrl+T"));
         m_pActionFilter->setCheckable(true);
-        connect(m_pActionFilter, &QAction::triggered, this, &UIVMLogViewerWidget::sltShowHideFilterPanel);
+        connect(m_pActionFilter, &QAction::triggered, this, &UIVMLogViewerWidget::sltPanelActionTriggered);
+    }
+    /* Create and configure 'Bookmark' action: */
+    m_pActionBookmark = new QAction(this);
+    AssertPtrReturnVoid(m_pActionBookmark);
+    {
+        /* tie Ctrl+D to save only if we show this in a dialog since Ctrl+D is
+           already assigned to another action in the selector UI: */
+        if (m_enmEmbedding == EmbedTo_Dialog)
+            m_pActionBookmark->setShortcut(QKeySequence("Ctrl+D"));
+        m_pActionBookmark->setCheckable(true);
+        connect(m_pActionBookmark, &QAction::triggered, this, &UIVMLogViewerWidget::sltPanelActionTriggered);
     }
 
@@ -562,16 +582,4 @@
         connect(m_pActionSave, &QAction::triggered, this, &UIVMLogViewerWidget::sltSave);
      }
-
-    /* Create and configure 'Bookmark' action: */
-    m_pActionBookmark = new QAction(this);
-    AssertPtrReturnVoid(m_pActionBookmark);
-    {
-        /* tie Ctrl+D to save only if we show this in a dialog since Ctrl+D is
-           already assigned to another action in the selector UI: */
-        if (m_enmEmbedding == EmbedTo_Dialog)
-            m_pActionBookmark->setShortcut(QKeySequence("Ctrl+D"));
-        m_pActionBookmark->setCheckable(true);
-        connect(m_pActionBookmark, &QAction::triggered, this, &UIVMLogViewerWidget::sltShowHideBookmarkPanel);
-    }
 
     /* Update action icons: */
@@ -829,14 +837,24 @@
 void UIVMLogViewerWidget::hidePanel(UIVMLogViewerPanel* panel)
 {
-    if (!panel || panel->isHidden())
-        return;
-    panel->setVisible(false);
+    if (panel && panel->isVisible())
+        panel->setVisible(false);
+    QMap<UIVMLogViewerPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel);
+    if(iterator != m_panelActionMap.end())
+    {
+        if(iterator.value()->isChecked())
+            iterator.value()->setChecked(false);
+    }
 }
 
 void UIVMLogViewerWidget::showPanel(UIVMLogViewerPanel* panel)
 {
-    if (!panel || panel->isVisible())
-        return;
-    panel->setVisible(true);
+    if (panel && panel->isHidden())
+        panel->setVisible(true);
+    QMap<UIVMLogViewerPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel);
+    if(iterator != m_panelActionMap.end())
+    {
+        if(!iterator.value()->isChecked())
+            iterator.value()->setChecked(true);
+    }
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h	(revision 70518)
+++ trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h	(revision 70519)
@@ -174,5 +174,5 @@
     UIVMLogViewerFilterPanel    *m_pFilterPanel;
     UIVMLogViewerBookmarksPanel *m_pBookmarksPanel;
-    QMap<UIVMLogViewerPanel**, QAction**> m_panelActionMap;
+    QMap<UIVMLogViewerPanel*, QAction*> m_panelActionMap;
 
     /** Holds the list of log file content. */
@@ -207,4 +207,5 @@
     friend class UIVMLogViewerFilterPanel;
     friend class UIVMLogViewerSearchPanel;
+    friend class UIVMLogViewerPanel;
 };
 
