Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDialogPanel.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDialogPanel.cpp	(revision 100905)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDialogPanel.cpp	(revision 100906)
@@ -42,4 +42,46 @@
 #endif
 
+/* Other VBox includes: */
+#include <iprt/assert.h>
+
+
+
+UIDialogPanelBase::UIDialogPanelBase(QWidget *pParent /* = 0 */)
+    : QWidget(pParent)
+    , m_pTabWidget(0)
+{
+    prepare();
+}
+
+void UIDialogPanelBase::prepare()
+{
+    QHBoxLayout *pLayout = new QHBoxLayout(this);
+    AssertReturnVoid(pLayout);
+    pLayout->setContentsMargins(0, 0, 0, 0);
+    m_pTabWidget = new QTabWidget();
+    connect(m_pTabWidget, &QTabWidget::currentChanged, this, &UIDialogPanelBase::sigCurrentTabChanged);
+    AssertReturnVoid(m_pTabWidget);
+    pLayout->addWidget(m_pTabWidget);
+}
+
+void UIDialogPanelBase::insertTab(int iIndex, QWidget *pPage, const QString &strLabel)
+{
+    if (m_pTabWidget)
+        m_pTabWidget->insertTab(iIndex, pPage, strLabel);
+}
+
+void UIDialogPanelBase::setTabText(int iIndex, const QString &strText)
+{
+    if (!m_pTabWidget || iIndex < 0 || iIndex >= m_pTabWidget->count())
+        return;
+    m_pTabWidget->setTabText(iIndex, strText);
+}
+
+void UIDialogPanelBase::setCurrentIndex(int iIndex)
+{
+    if (!m_pTabWidget || iIndex >= m_pTabWidget->count() || iIndex < 0)
+        return;
+    m_pTabWidget->setCurrentIndex(iIndex);
+}
 
 UIDialogPanel::UIDialogPanel(QWidget *pParent /* = 0 */)
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDialogPanel.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDialogPanel.h	(revision 100905)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDialogPanel.h	(revision 100906)
@@ -44,4 +44,29 @@
 
 /** QWidget extension acting as the base class for all the dialog panels like file manager, logviewer etc. */
+class SHARED_LIBRARY_STUFF UIDialogPanelBase : public QWidget
+{
+    Q_OBJECT;
+
+signals:
+
+    void sigCurrentTabChanged(int iIndex);
+
+public:
+
+    UIDialogPanelBase(QWidget *pParent = 0);
+    void setCurrentIndex(int iIndex);
+
+protected:
+
+    virtual void prepare();
+    void insertTab(int iIndex, QWidget *pPage, const QString &strLabel);
+    void setTabText(int iIndex, const QString &strText);
+
+private:
+
+    QTabWidget *m_pTabWidget;
+};
+
+/** QWidget extension acting as the base class for all the dialog panels like file manager, logviewer etc. */
 class SHARED_LIBRARY_STUFF UIDialogPanel : public QIWithRetranslateUI<QWidget>
 {
Index: trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp	(revision 100905)
+++ trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp	(revision 100906)
@@ -328,4 +328,6 @@
         connect(m_pPanel, &UIFileManagerPanel::sigFileOperationFail,
                 this, &UIFileManager::sltReceieveLogOutput);
+        connect(m_pPanel, &UIFileManagerPanel::sigCurrentTabChanged,
+                this, &UIFileManager::sltPanelCurrentTabChanged);
     }
 
@@ -411,5 +413,7 @@
             pAction->blockSignals(false);
         }
+        m_pPanel->blockSignals(true);
         m_pPanel->setCurrentIndex(pSenderAction->data().toInt());
+        m_pPanel->blockSignals(false);
     }
 
@@ -541,4 +545,35 @@
         m_pHostFileTable->optionsUpdated();
     saveOptions();
+}
+
+void UIFileManager::sltPanelCurrentTabChanged(int iIndex)
+{
+    if (!m_pPanel || !m_pPanel->isVisible())
+        return;
+
+    for(QSet<QAction*>::iterator iter = m_panelActions.begin(); iter != m_panelActions.end(); ++iter)
+    {
+        QAction *pAction = *iter;
+
+        pAction->blockSignals(true);
+        pAction->setChecked(false);
+        pAction->blockSignals(false);
+    }
+
+    switch (static_cast<UIFileManagerPanel::Page>(iIndex))
+    {
+        case UIFileManagerPanel::Page_Preferences:
+            m_pActionPool->action(UIActionIndex_M_FileManager_T_Preferences)->setChecked(true);
+            break;
+        case UIFileManagerPanel::Page_Operations:
+            m_pActionPool->action(UIActionIndex_M_FileManager_T_Operations)->setChecked(true);
+            break;
+        case UIFileManagerPanel::Page_Log:
+            m_pActionPool->action(UIActionIndex_M_FileManager_T_Log)->setChecked(true);
+            break;
+        case UIFileManagerPanel::Page_Max:
+        default:
+            break;
+    }
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.h	(revision 100905)
+++ trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.h	(revision 100906)
@@ -129,4 +129,5 @@
     void sltGuestFileTableStateChanged(bool fIsRunning);
     void sltHandleOptionsUpdated();
+    void sltPanelCurrentTabChanged(int iIndex);
 
 private:
Index: trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerPanel.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerPanel.cpp	(revision 100905)
+++ trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerPanel.cpp	(revision 100906)
@@ -369,6 +369,5 @@
 
 UIFileManagerPanel::UIFileManagerPanel(QWidget *pParent, UIFileManagerOptions *pFileManagerOptions)
-    : QIWithRetranslateUI<QWidget>(pParent)
-    , m_pTabWidget(0)
+    : QIWithRetranslateUI<UIDialogPanelBase>(pParent)
     , m_pListDirectoriesOnTopCheckBox(0)
     , m_pDeleteConfirmationCheckBox(0)
@@ -389,10 +388,4 @@
 void UIFileManagerPanel::prepare()
 {
-    QHBoxLayout *pMainLayout = new QHBoxLayout(this);
-    AssertReturnVoid(pMainLayout);
-
-    m_pTabWidget = new QTabWidget;
-    AssertReturnVoid(m_pTabWidget);
-    pMainLayout->addWidget(m_pTabWidget);
     preparePreferencesTab();
     prepareLogTab();
@@ -445,5 +438,5 @@
     pPreferencesLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding), 2, 0, 1, 2);
 
-    m_pTabWidget->insertTab(Page_Preferences, pPreferencesTab, QString());
+    insertTab(Page_Preferences, pPreferencesTab, QString());
 }
 
@@ -458,5 +451,5 @@
     if (m_pLogTextEdit)
         pLogLayout->addWidget(m_pLogTextEdit);
-    m_pTabWidget->insertTab(Page_Log, pLogTab, QString());
+    insertTab(Page_Log, pLogTab, QString());
 }
 
@@ -486,5 +479,5 @@
     pOperationsTab->setLayout(m_pOperationsTabLayout);
     m_pOperationsTabLayout->addStretch(4);
-    m_pTabWidget->insertTab(Page_Operations, m_pScrollArea, QString());
+    insertTab(Page_Operations, m_pScrollArea, QString());
 }
 
@@ -548,10 +541,8 @@
         m_pShowHiddenObjectsCheckBox->setToolTip(QApplication::translate("UIFileManager", "Show hidden files/directories"));
     }
-    if (m_pTabWidget)
-    {
-        m_pTabWidget->setTabText(Page_Preferences, QApplication::translate("UIFileManager", "Preferences"));
-        m_pTabWidget->setTabText(Page_Log, QApplication::translate("UIFileManager", "Log"));
-        m_pTabWidget->setTabText(Page_Operations, QApplication::translate("UIFileManager", "Operations"));
-    }
+
+    setTabText(Page_Preferences, QApplication::translate("UIFileManager", "Preferences"));
+    setTabText(Page_Log, QApplication::translate("UIFileManager", "Log"));
+    setTabText(Page_Operations, QApplication::translate("UIFileManager", "Operations"));
 }
 
@@ -627,11 +618,4 @@
     connect(pOperationsWidget, &UIFileOperationProgressWidget::sigFocusOut,
             this, &UIFileManagerPanel::sltHandleWidgetFocusOut);
-}
-
-void UIFileManagerPanel::setCurrentIndex(int iIndex)
-{
-    if (!m_pTabWidget || iIndex >= m_pTabWidget->count() || iIndex < 0)
-        return;
-    m_pTabWidget->setCurrentIndex(iIndex);
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerPanel.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerPanel.h	(revision 100905)
+++ trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerPanel.h	(revision 100906)
@@ -37,4 +37,5 @@
 
 /* GUI includes: */
+#include "UIDialogPanel.h"
 #include "UIGuestControlDefs.h"
 #include "QIWithRetranslateUI.h"
@@ -52,5 +53,5 @@
 class QVBoxLayout;
 
-class UIFileManagerPanel : public QIWithRetranslateUI<QWidget>
+class UIFileManagerPanel : public QIWithRetranslateUI<UIDialogPanelBase>
 {
     Q_OBJECT;
@@ -70,10 +71,10 @@
     void appendLog(const QString &strLog, const QString &strMachineName, FileManagerLogType eLogType);
     void addNewProgress(const CProgress &comProgress, const QString &strSourceTableName);
-    void setCurrentIndex(int iIndex);
+
     enum Page
     {
         Page_Preferences = 0,
+        Page_Operations,
         Page_Log,
-        Page_Operations,
         Page_Max
     };
@@ -107,10 +108,8 @@
 private:
 
-    void prepare();
+    void prepare() override;
     void preparePreferencesTab();
     void prepareLogTab();
     void prepareOperationsTab();
-
-    QTabWidget   *m_pTabWidget;
 
     /** @name Preferences tab
