Index: trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 73469)
+++ trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 73492)
@@ -751,4 +751,5 @@
 	src/manager/UIToolPaneMachine.h \
 	src/manager/UIVirtualBoxManager.h \
+	src/manager/UIVirtualBoxManagerWidget.h \
 	src/manager/UIVirtualMachineItem.h \
 	src/manager/UIWelcomePane.h \
@@ -1427,4 +1428,5 @@
 	src/manager/UIToolPaneMachine.cpp \
 	src/manager/UIVirtualBoxManager.cpp \
+	src/manager/UIVirtualBoxManagerWidget.cpp \
 	src/manager/UIVirtualMachineItem.cpp \
 	src/manager/UIWelcomePane.cpp \
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp	(revision 73469)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp	(revision 73492)
@@ -21,19 +21,14 @@
 
 /* Qt includes: */
-# include <QMenuBar>
 # include <QResizeEvent>
 # include <QStandardPaths>
 # include <QStatusBar>
-# include <QToolButton>
-# include <QTimer>
+//# include <QToolButton>
 
 /* GUI includes: */
 # include "QIFileDialog.h"
-# include "QISplitter.h"
 # include "UIActionPoolSelector.h"
 # include "UIDesktopServices.h"
-# include "UIErrorString.h"
 # include "UIExtraDataManager.h"
-# include "UIChooser.h"
 # include "UIHostNetworkManager.h"
 # include "UIMedium.h"
@@ -42,12 +37,8 @@
 # include "UIModalWindowManager.h"
 # include "UIVirtualBoxManager.h"
+# include "UIVirtualBoxManagerWidget.h"
 # include "UISettingsDialogSpecific.h"
-# include "UISlidingWidget.h"
-# include "UITabBar.h"
-# include "UIToolBar.h"
 # include "UIVMLogViewerDialog.h"
 # include "UIVirtualMachineItem.h"
-# include "UIToolPaneMachine.h"
-# include "UIToolbarTools.h"
 # ifdef VBOX_GUI_WITH_NETWORK_MANAGER
 #  include "UIUpdateManager.h"
@@ -119,15 +110,4 @@
     , m_fFirstMediumEnumerationHandled(false)
     , m_pActionPool(0)
-    , m_pSlidingWidget(0)
-    , m_pSplitter(0)
-    , m_pToolBar(0)
-    , m_pTabBarMachine(0)
-    , m_pTabBarGlobal(0)
-    , m_pActionTabBarMachine(0)
-    , m_pActionTabBarGlobal(0)
-    , m_pToolbarTools(0)
-    , m_pPaneChooser(0)
-    , m_pPaneToolsMachine(0)
-    , m_pPaneToolsGlobal(0)
     , m_pGroupMenuAction(0)
     , m_pMachineMenuAction(0)
@@ -173,4 +153,5 @@
             break;
     }
+
     /* Call to base-class: */
     return QIWithRetranslateUI<QIMainWindow>::eventFilter(pObject, pEvent);
@@ -191,16 +172,4 @@
 #endif /* VBOX_BLEEDING_EDGE */
     setWindowTitle(strTitle);
-
-    /* Make sure chosen item fetched: */
-    sltHandleChooserPaneIndexChange(false /* update details? */, false /* update snapshots? */, false /* update the logviewer? */);
-
-#ifdef VBOX_WS_MAC
-    // WORKAROUND:
-    // There is a bug in Qt Cocoa which result in showing a "more arrow" when
-    // the necessary size of the toolbar is increased. Also for some languages
-    // the with doesn't match if the text increase. So manually adjust the size
-    // after changing the text.
-    m_pToolBar->updateLayout();
-#endif
 }
 
@@ -251,16 +220,4 @@
             break;
         }
-#ifdef VBOX_WS_MAC
-        case QEvent::ContextMenu:
-        {
-            /* This is the unified context menu event. Lets show the context menu. */
-            QContextMenuEvent *pContextMenuEvent = static_cast<QContextMenuEvent*>(pEvent);
-            sltHandleContextMenuRequest(pContextMenuEvent->globalPos());
-            /* Accept it to interrupt the chain. */
-            pContextMenuEvent->accept();
-            return false;
-            break;
-        }
-#endif /* VBOX_WS_MAC */
         default:
             break;
@@ -287,10 +244,6 @@
 void UIVirtualBoxManager::polishEvent(QShowEvent *)
 {
-    /* Make sure user warned about inaccessible medium(s)
-     * even if enumeration had finished before selector window shown: */
-    QTimer::singleShot(0, this, SLOT(sltHandleMediumEnumerationFinish()));
-
-    /* Call for async polishing: */
-    QMetaObject::invokeMethod(this, "sltHandlePolishEvent", Qt::QueuedConnection);
+    /* Make sure user warned about inaccessible media: */
+    QMetaObject::invokeMethod(this, "sltHandleMediumEnumerationFinish", Qt::QueuedConnection);
 }
 
@@ -302,28 +255,4 @@
     /* Quit application: */
     QApplication::quit();
-}
-
-void UIVirtualBoxManager::sltHandlePolishEvent()
-{
-    /* Get current item: */
-    UIVirtualMachineItem *pItem = currentItem();
-
-    /* Make sure there is accessible VM item chosen: */
-    if (pItem && pItem->accessible())
-    {
-        // WORKAROUND:
-        // By some reason some of X11 DEs unable to update() tab-bars on startup.
-        // Let's just _create_ them later, asynchronously after the showEvent().
-        /* Restore previously opened Machine tools at startup: */
-        QMap<ToolTypeMachine, QAction*> mapActionsMachine;
-        mapActionsMachine[ToolTypeMachine_Details] = actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_Details);
-        mapActionsMachine[ToolTypeMachine_Snapshots] = actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_Snapshots);
-        mapActionsMachine[ToolTypeMachine_LogViewer] = actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_LogViewer);
-        for (int i = m_orderMachine.size() - 1; i >= 0; --i)
-            if (m_orderMachine.at(i) != ToolTypeMachine_Invalid)
-                mapActionsMachine.value(m_orderMachine.at(i))->trigger();
-        /* Make sure further action triggering cause tool type switch as well: */
-        actionPool()->action(UIActionIndexST_M_Tools_T_Machine)->setProperty("watch_child_activation", true);
-    }
 }
 
@@ -341,121 +270,4 @@
 #endif /* VBOX_WS_X11 */
 
-void UIVirtualBoxManager::sltHandleContextMenuRequest(const QPoint &position)
-{
-    /* Populate toolbar/statusbar acctions: */
-    QList<QAction*> actions;
-
-    /* Create 'Show Toolbar' action: */
-    QAction *pShowToolBar = new QAction(tr("Show Toolbar"), 0);
-    AssertPtrReturnVoid(pShowToolBar);
-    {
-        /* Configure action: */
-        pShowToolBar->setCheckable(true);
-        pShowToolBar->setChecked(m_pToolBar->isVisible());
-
-        /* Add into action list: */
-        actions << pShowToolBar;
-    }
-
-    /* Create 'Show Toolbar Text' action: */
-    QAction *pShowToolBarText = new QAction(tr("Show Toolbar Text"), 0);
-    AssertPtrReturnVoid(pShowToolBarText);
-    {
-        /* Configure action: */
-        pShowToolBarText->setCheckable(true);
-        pShowToolBarText->setChecked(m_pToolBar->toolButtonStyle() == Qt::ToolButtonTextUnderIcon);
-
-        /* Add into action list: */
-        actions << pShowToolBarText;
-    }
-
-    /* Prepare the menu position: */
-    QPoint globalPosition = position;
-    QWidget *pSender = static_cast<QWidget*>(sender());
-    if (pSender)
-        globalPosition = pSender->mapToGlobal(position);
-    QAction *pResult = QMenu::exec(actions, globalPosition);
-    if (pResult == pShowToolBar)
-    {
-        if (pResult->isChecked())
-            m_pToolBar->show();
-        else
-            m_pToolBar->hide();
-    }
-    else if (pResult == pShowToolBarText)
-    {
-        m_pToolBar->setToolButtonStyle(  pResult->isChecked()
-                                       ? Qt::ToolButtonTextUnderIcon
-                                       : Qt::ToolButtonIconOnly);
-        m_pToolbarTools->setToolButtonStyle(  pResult->isChecked()
-                                            ? Qt::ToolButtonTextUnderIcon
-                                            : Qt::ToolButtonIconOnly);
-    }
-}
-
-void UIVirtualBoxManager::sltHandleChooserPaneIndexChange(bool fUpdateDetails /* = true */,
-                                                          bool fUpdateSnapshots /* = true */,
-                                                          bool fUpdateLogViewer /* = true */)
-{
-    /* Get current item: */
-    UIVirtualMachineItem *pItem = currentItem();
-
-    /* Update action visibility: */
-    updateActionsVisibility();
-    /* Update action appearance: */
-    updateActionsAppearance();
-
-    /* Update Tools-pane: */
-    m_pPaneToolsMachine->setCurrentItem(pItem);
-
-    /* Update Machine tab-bar visibility */
-    m_pTabBarMachine->setEnabled(pItem && pItem->accessible());
-
-    /* If current item exists & accessible: */
-    if (pItem && pItem->accessible())
-    {
-        /* If Desktop pane is chosen currently: */
-        if (m_pPaneToolsMachine->currentTool() == ToolTypeMachine_Desktop)
-        {
-            /* Make sure Details or Snapshot pane is chosen if opened: */
-            if (m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_Details))
-                actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_Details)->trigger();
-            else
-            if (m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_Snapshots))
-                actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_Snapshots)->trigger();
-            else
-            if (m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_LogViewer))
-                actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_LogViewer)->trigger();
-        }
-
-        /* Update Details-pane (if requested): */
-        if (   fUpdateDetails
-            && m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_Details))
-            m_pPaneToolsMachine->setItems(currentItems());
-        /* Update the Snapshots-pane or/and Logviewer-pane (if requested): */
-        if (fUpdateSnapshots || fUpdateLogViewer)
-            m_pPaneToolsMachine->setMachine(pItem->machine());
-    }
-    else
-    {
-        /* Make sure Desktop-pane raised: */
-        m_pPaneToolsMachine->openTool(ToolTypeMachine_Desktop);
-
-        /* Note that the machine becomes inaccessible (or if the last VM gets
-         * deleted), we have to update all fields, ignoring input arguments. */
-        if (pItem)
-        {
-            /* The VM is inaccessible: */
-            m_pPaneToolsMachine->setDetailsError(UIErrorString::formatErrorInfo(pItem->accessError()));
-        }
-
-        /* Update Details-pane (in any case): */
-        if (m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_Details))
-            m_pPaneToolsMachine->setItems(currentItems());
-        /* Update Snapshots-pane and Logviewer-pane (in any case): */
-        m_pPaneToolsMachine->setMachine(CMachine());
-    }
-}
-
 void UIVirtualBoxManager::sltHandleMediumEnumerationFinish()
 {
@@ -469,5 +281,5 @@
      * otherwise user sees everything himself: */
     if (   m_pManagerVirtualMedia
-        || m_pPaneToolsGlobal->isToolOpened(ToolTypeGlobal_VirtualMedia))
+        || m_pWidget->isToolOpened(ToolTypeGlobal_VirtualMedia))
         return;
 
@@ -549,4 +361,10 @@
 }
 
+void UIVirtualBoxManager::sltHandleChooserPaneIndexChange()
+{
+    updateActionsVisibility();
+    updateActionsAppearance();
+}
+
 void UIVirtualBoxManager::sltHandleGroupSavingProgressChange()
 {
@@ -556,12 +374,4 @@
 void UIVirtualBoxManager::sltHandleStateChange(const QString &)
 {
-    /* Get current item: */
-    UIVirtualMachineItem *pItem = currentItem();
-
-    /* Make sure current item present: */
-    if (!pItem)
-        return;
-
-    /* Update actions: */
     updateActionsAppearance();
 }
@@ -570,7 +380,7 @@
 {
     /* First check if instance of widget opened the embedded way: */
-    if (m_pPaneToolsGlobal->isToolOpened(ToolTypeGlobal_VirtualMedia))
-    {
-        sltHandleToolOpenedGlobal(ToolTypeGlobal_VirtualMedia);
+    if (m_pWidget->isToolOpened(ToolTypeGlobal_VirtualMedia))
+    {
+        m_pWidget->switchToTool(ToolTypeGlobal_VirtualMedia);
         return;
     }
@@ -600,7 +410,7 @@
 {
     /* First check if instance of widget opened the embedded way: */
-    if (m_pPaneToolsGlobal->isToolOpened(ToolTypeGlobal_HostNetwork))
-    {
-        sltHandleToolOpenedGlobal(ToolTypeGlobal_HostNetwork);
+    if (m_pWidget->isToolOpened(ToolTypeGlobal_HostNetwork))
+    {
+        m_pWidget->switchToTool(ToolTypeGlobal_HostNetwork);
         return;
     }
@@ -1201,7 +1011,7 @@
 
     /* First check if a logviewer is already opened in embedded mode: */
-    if (m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_LogViewer))
-    {
-        sltHandleToolOpenedMachine(ToolTypeMachine_LogViewer);
+    if (m_pWidget->isToolOpened(ToolTypeMachine_LogViewer))
+    {
+        m_pWidget->switchToTool(ToolTypeMachine_LogViewer);
         return;
     }
@@ -1320,89 +1130,4 @@
 }
 
-void UIVirtualBoxManager::sltHandleToolsTypeSwitch()
-{
-    /* If Machine tool button is checked => go backward: */
-    if (actionPool()->action(UIActionIndexST_M_Tools_T_Machine)->isChecked())
-        m_pSlidingWidget->moveBackward();
-
-    else
-
-    /* If Global tool button is checked => go forward: */
-    if (actionPool()->action(UIActionIndexST_M_Tools_T_Global)->isChecked())
-        m_pSlidingWidget->moveForward();
-
-    /* Update action visibility: */
-    updateActionsVisibility();
-
-    /* Make sure chosen item fetched: */
-    sltHandleChooserPaneIndexChange(false /* update details? */, false /* update snapshots? */, false /* update the logviewer? */);
-}
-
-void UIVirtualBoxManager::sltHandleShowTabBarMachine()
-{
-    m_pActionTabBarGlobal->setVisible(false);
-    m_pActionTabBarMachine->setVisible(true);
-}
-
-void UIVirtualBoxManager::sltHandleShowTabBarGlobal()
-{
-    m_pActionTabBarMachine->setVisible(false);
-    m_pActionTabBarGlobal->setVisible(true);
-}
-
-void UIVirtualBoxManager::sltHandleToolOpenedMachine(ToolTypeMachine enmType)
-{
-    /* First, make sure corresponding tool set opened: */
-    if (   !actionPool()->action(UIActionIndexST_M_Tools_T_Machine)->isChecked()
-        && actionPool()->action(UIActionIndexST_M_Tools_T_Machine)->property("watch_child_activation").toBool())
-        actionPool()->action(UIActionIndexST_M_Tools_T_Machine)->setChecked(true);
-
-    /* Open corresponding tool: */
-    m_pPaneToolsMachine->openTool(enmType);
-    /* If that was 'Details' => pass there current items: */
-    if (   enmType == ToolTypeMachine_Details
-        && m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_Details))
-        m_pPaneToolsMachine->setItems(currentItems());
-    /* If that was 'Snapshot' or 'LogViewer' => pass there current or null machine: */
-    if (enmType == ToolTypeMachine_Snapshots || enmType == ToolTypeMachine_LogViewer)
-    {
-        UIVirtualMachineItem *pItem = currentItem();
-        m_pPaneToolsMachine->setMachine(pItem ? pItem->machine() : CMachine());
-    }
-}
-
-void UIVirtualBoxManager::sltHandleToolOpenedGlobal(ToolTypeGlobal enmType)
-{
-    /* First, make sure corresponding tool set opened: */
-    if (   !actionPool()->action(UIActionIndexST_M_Tools_T_Global)->isChecked()
-        && actionPool()->action(UIActionIndexST_M_Tools_T_Global)->property("watch_child_activation").toBool())
-        actionPool()->action(UIActionIndexST_M_Tools_T_Global)->setChecked(true);
-
-    /* Open corresponding tool: */
-    m_pPaneToolsGlobal->openTool(enmType);
-}
-
-void UIVirtualBoxManager::sltHandleToolClosedMachine(ToolTypeMachine enmType)
-{
-    /* Close corresponding tool: */
-    m_pPaneToolsMachine->closeTool(enmType);
-}
-
-void UIVirtualBoxManager::sltHandleToolClosedGlobal(ToolTypeGlobal enmType)
-{
-    /* Close corresponding tool: */
-    m_pPaneToolsGlobal->closeTool(enmType);
-}
-
-UIVirtualMachineItem *UIVirtualBoxManager::currentItem() const
-{
-    return m_pPaneChooser->currentItem();
-}
-
-QList<UIVirtualMachineItem*> UIVirtualBoxManager::currentItems() const
-{
-    return m_pPaneChooser->currentItems();
-}
-
 void UIVirtualBoxManager::prepare()
 {
@@ -1425,5 +1150,4 @@
     prepareMenuBar();
     prepareStatusBar();
-    prepareToolbar();
     prepareWidgets();
     prepareConnections();
@@ -1436,7 +1160,4 @@
 
 #ifdef VBOX_WS_MAC
-    /* Enable unified toolbar: */
-    m_pToolBar->enableMacToolbar();
-
     /* Beta label? */
     if (vboxGlobal().isBeta())
@@ -1445,11 +1166,5 @@
         ::darwinLabelWindow(this, &betaLabel, true);
     }
-
-    /* General event filter: */
-    qApp->installEventFilter(this);
 #endif /* VBOX_WS_MAC */
-
-    /* Make sure current Chooser-pane index fetched: */
-    sltHandleChooserPaneIndexChange();
 }
 
@@ -1880,178 +1595,13 @@
 }
 
-void UIVirtualBoxManager::prepareToolbar()
-{
-    /* Create Main toolbar: */
-    m_pToolBar = new UIToolBar(this);
-    AssertPtrReturnVoid(m_pToolBar);
-    {
-        /* Configure toolbar: */
-        const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_LargeIconSize);
-        m_pToolBar->setIconSize(QSize(iIconMetric, iIconMetric));
-        m_pToolBar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
-        m_pToolBar->setContextMenuPolicy(Qt::CustomContextMenu);
-        m_pToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
-
-        /* Add main actions block: */
-        m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_New));
-        m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Settings));
-        m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Discard));
-        m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow));
-#ifdef VBOX_WS_MAC
-        // WORKAROUND:
-        // Actually Qt should do that itself but by some unknown reason it sometimes
-        // forget to update toolbar after changing its actions on cocoa platform.
-        connect(actionPool()->action(UIActionIndexST_M_Machine_S_New), &UIAction::changed,
-                m_pToolBar, static_cast<void(UIToolBar::*)(void)>(&UIToolBar::update));
-        connect(actionPool()->action(UIActionIndexST_M_Machine_S_Settings), &UIAction::changed,
-                m_pToolBar, static_cast<void(UIToolBar::*)(void)>(&UIToolBar::update));
-        connect(actionPool()->action(UIActionIndexST_M_Machine_S_Discard), &UIAction::changed,
-                m_pToolBar, static_cast<void(UIToolBar::*)(void)>(&UIToolBar::update));
-        connect(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow), &UIAction::changed,
-                m_pToolBar, static_cast<void(UIToolBar::*)(void)>(&UIToolBar::update));
-#endif /* VBOX_WS_MAC */
-
-        /* Create Machine tab-bar: */
-        m_pTabBarMachine = new UITabBar;
-        AssertPtrReturnVoid(m_pTabBarMachine);
-        {
-            /* Configure tab-bar: */
-            const int iL = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin);
-            const int iR = qApp->style()->pixelMetric(QStyle::PM_LayoutRightMargin);
-            m_pTabBarMachine->setContentsMargins(iL, 0, iR, 0);
-
-            /* Add into toolbar: */
-            m_pActionTabBarMachine = m_pToolBar->addWidget(m_pTabBarMachine);
-        }
-
-        /* Create Global tab-bar: */
-        m_pTabBarGlobal = new UITabBar;
-        AssertPtrReturnVoid(m_pTabBarGlobal);
-        {
-            /* Configure tab-bar: */
-            const int iL = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin);
-            const int iR = qApp->style()->pixelMetric(QStyle::PM_LayoutRightMargin);
-            m_pTabBarGlobal->setContentsMargins(iL, 0, iR, 0);
-
-            /* Add into toolbar: */
-            m_pActionTabBarGlobal = m_pToolBar->addWidget(m_pTabBarGlobal);
-        }
-
-        /* Create Tools toolbar: */
-        m_pToolbarTools = new UIToolbarTools(actionPool());
-        if (m_pToolbarTools)
-        {
-            /* Configure toolbar: */
-            m_pToolbarTools->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding);
-            connect(m_pToolbarTools, &UIToolbarTools::sigShowTabBarMachine,
-                    this, &UIVirtualBoxManager::sltHandleShowTabBarMachine);
-            connect(m_pToolbarTools, &UIToolbarTools::sigShowTabBarGlobal,
-                    this, &UIVirtualBoxManager::sltHandleShowTabBarGlobal);
-            m_pToolbarTools->setTabBars(m_pTabBarMachine, m_pTabBarGlobal);
-
-            /* Create exclusive action-group: */
-            QActionGroup *pActionGroupTools = new QActionGroup(m_pToolbarTools);
-            AssertPtrReturnVoid(pActionGroupTools);
-            {
-                /* Configure action-group: */
-                pActionGroupTools->setExclusive(true);
-
-                /* Add 'Tools' actions into action-group: */
-                pActionGroupTools->addAction(actionPool()->action(UIActionIndexST_M_Tools_T_Machine));
-                pActionGroupTools->addAction(actionPool()->action(UIActionIndexST_M_Tools_T_Global));
-            }
-
-            /* Add into toolbar: */
-            m_pToolBar->addWidget(m_pToolbarTools);
-        }
-
-#ifdef VBOX_WS_MAC
-        // WORKAROUND:
-        // There is a bug in Qt Cocoa which result in showing a "more arrow" when
-        // the necessary size of the toolbar is increased. Also for some languages
-        // the with doesn't match if the text increase. So manually adjust the size
-        // after changing the text.
-        m_pToolBar->updateLayout();
-#endif
-    }
-}
-
 void UIVirtualBoxManager::prepareWidgets()
 {
     /* Create central-widget: */
-    QWidget *pWidget = new QWidget;
-    AssertPtrReturnVoid(pWidget);
+    m_pWidget = new UIVirtualBoxManagerWidget(this);
+    if (m_pWidget)
     {
         /* Configure central-widget: */
-        setCentralWidget(pWidget);
-
-        /* Create central-layout: */
-        QVBoxLayout *pLayout = new QVBoxLayout(pWidget);
-        AssertPtrReturnVoid(pLayout);
-        {
-            /* Configure layout: */
-            pLayout->setSpacing(0);
-            pLayout->setContentsMargins(0, 0, 0, 0);
-
-#ifdef VBOX_WS_MAC
-            /* Native toolbar on MAC: */
-            addToolBar(m_pToolBar);
-#else
-            /* Add into layout: */
-            pLayout->addWidget(m_pToolBar);
-#endif
-
-            /* Create sliding-widget: */
-            m_pSlidingWidget = new UISlidingWidget;
-            AssertPtrReturnVoid(m_pSlidingWidget);
-            {
-                /* Create splitter: */
-                m_pSplitter = new QISplitter;
-                AssertPtrReturnVoid(m_pSplitter);
-                {
-                    /* Configure splitter: */
-#ifdef VBOX_WS_X11
-                    m_pSplitter->setHandleType(QISplitter::Native);
-#endif
-
-                    /* Create Chooser-pane: */
-                    m_pPaneChooser = new UIChooser(this);
-                    AssertPtrReturnVoid(m_pPaneChooser);
-                    {
-                        /* Add into splitter: */
-                        m_pSplitter->addWidget(m_pPaneChooser);
-                    }
-
-                    /* Create Machine Tools-pane: */
-                    m_pPaneToolsMachine = new UIToolPaneMachine(actionPool());
-                    AssertPtrReturnVoid(m_pPaneToolsMachine);
-                    {
-                        /* Add into splitter: */
-                        m_pSplitter->addWidget(m_pPaneToolsMachine);
-                    }
-
-                    /* Adjust splitter colors according to main widgets it splits: */
-                    m_pSplitter->configureColors(m_pPaneChooser->palette().color(QPalette::Active, QPalette::Window),
-                                                 m_pPaneToolsMachine->palette().color(QPalette::Active, QPalette::Window));
-                    /* Set the initial distribution. The right site is bigger. */
-                    m_pSplitter->setStretchFactor(0, 2);
-                    m_pSplitter->setStretchFactor(1, 3);
-                }
-
-                /* Create Global Tools-pane: */
-                m_pPaneToolsGlobal = new UIToolPaneGlobal(actionPool());
-                AssertPtrReturnVoid(m_pPaneToolsGlobal);
-
-                /* Add left/right widgets into sliding widget: */
-                m_pSlidingWidget->setWidgets(m_pSplitter, m_pPaneToolsGlobal);
-
-                /* Add into layout: */
-                pLayout->addWidget(m_pSlidingWidget);
-            }
-        }
-    }
-
-    /* Bring the VM list to the focus: */
-    m_pPaneChooser->setFocus();
+        setCentralWidget(m_pWidget);
+    }
 }
 
@@ -2060,103 +1610,127 @@
 #ifdef VBOX_WS_X11
     /* Desktop event handlers: */
-    connect(gpDesktop, SIGNAL(sigHostScreenWorkAreaResized(int)), this, SLOT(sltHandleHostScreenAvailableAreaChange()));
-#endif /* VBOX_WS_X11 */
+    connect(gpDesktop, &UIDesktopWidgetWatchdog::sigHostScreenWorkAreaResized,
+            this, &UIVirtualBoxManager::sltHandleHostScreenAvailableAreaChange);
+#endif
 
     /* Medium enumeration connections: */
-    connect(&vboxGlobal(), SIGNAL(sigMediumEnumerationFinished()), this, SLOT(sltHandleMediumEnumerationFinish()));
-
-    /* Menu-bar connections: */
-    connect(menuBar(), SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(sltHandleContextMenuRequest(const QPoint&)));
+    connect(&vboxGlobal(), &VBoxGlobal::sigMediumEnumerationFinished,
+            this, &UIVirtualBoxManager::sltHandleMediumEnumerationFinish);
+
+    /* Widget connections: */
+    connect(m_pWidget, &UIVirtualBoxManagerWidget::sigChooserPaneIndexChange,
+            this, &UIVirtualBoxManager::sltHandleChooserPaneIndexChange);
+    connect(m_pWidget, &UIVirtualBoxManagerWidget::sigGroupSavingStateChanged,
+            this, &UIVirtualBoxManager::sltHandleGroupSavingProgressChange);
+    connect(m_pWidget, &UIVirtualBoxManagerWidget::sigMachineSettingsLinkClicked,
+            this, &UIVirtualBoxManager::sltOpenMachineSettingsDialogDefault);
+    connect(menuBar(), &QMenuBar::customContextMenuRequested,
+            m_pWidget, &UIVirtualBoxManagerWidget::sltHandleContextMenuRequest);
+
+    /* Global VBox event handlers: */
+    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineStateChange,
+            this, &UIVirtualBoxManager::sltHandleStateChange);
+    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSessionStateChange,
+            this, &UIVirtualBoxManager::sltHandleStateChange);
 
     /* 'File' menu connections: */
-    connect(actionPool()->action(UIActionIndexST_M_File_S_ShowVirtualMediumManager), SIGNAL(triggered()), this, SLOT(sltOpenVirtualMediumManagerWindow()));
-    connect(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager), SIGNAL(triggered()), this, SLOT(sltOpenHostNetworkManagerWindow()));
-    connect(actionPool()->action(UIActionIndexST_M_File_S_ImportAppliance), SIGNAL(triggered()), this, SLOT(sltOpenImportApplianceWizard()));
-    connect(actionPool()->action(UIActionIndexST_M_File_S_ExportAppliance), SIGNAL(triggered()), this, SLOT(sltOpenExportApplianceWizard()));
+    connect(actionPool()->action(UIActionIndexST_M_File_S_ShowVirtualMediumManager), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltOpenVirtualMediumManagerWindow);
+    connect(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltOpenHostNetworkManagerWindow);
+    connect(actionPool()->action(UIActionIndexST_M_File_S_ImportAppliance), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltOpenImportApplianceWizardDefault);
+    connect(actionPool()->action(UIActionIndexST_M_File_S_ExportAppliance), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltOpenExportApplianceWizard);
 #ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
-    connect(actionPool()->action(UIActionIndexST_M_File_S_ShowExtraDataManager), SIGNAL(triggered()), this, SLOT(sltOpenExtraDataManagerWindow()));
+    connect(actionPool()->action(UIActionIndexST_M_File_S_ShowExtraDataManager), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltOpenExtraDataManagerWindow);
 #endif /* VBOX_GUI_WITH_EXTRADATA_MANAGER_UI */
-    connect(actionPool()->action(UIActionIndex_M_Application_S_Preferences), SIGNAL(triggered()), this, SLOT(sltOpenPreferencesDialog()));
-    connect(actionPool()->action(UIActionIndexST_M_File_S_Close), SIGNAL(triggered()), this, SLOT(sltPerformExit()));
+    connect(actionPool()->action(UIActionIndex_M_Application_S_Preferences), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltOpenPreferencesDialog);
+    connect(actionPool()->action(UIActionIndexST_M_File_S_Close), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformExit);
 
     /* 'Group' menu connections: */
-    connect(actionPool()->action(UIActionIndexST_M_Group_S_Add), SIGNAL(triggered()), this, SLOT(sltOpenAddMachineDialog()));
-    connect(actionPool()->action(UIActionIndexST_M_Group_M_StartOrShow), SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowMachine()));
-    connect(actionPool()->action(UIActionIndexST_M_Group_T_Pause), SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseOrResumeMachine(bool)));
-    connect(actionPool()->action(UIActionIndexST_M_Group_S_Reset), SIGNAL(triggered()), this, SLOT(sltPerformResetMachine()));
-    connect(actionPool()->action(UIActionIndexST_M_Group_S_Discard), SIGNAL(triggered()), this, SLOT(sltPerformDiscardMachineState()));
-    connect(actionPool()->action(UIActionIndexST_M_Group_S_ShowLogDialog), SIGNAL(triggered()), this, SLOT(sltOpenMachineLogDialog()));
-    connect(actionPool()->action(UIActionIndexST_M_Group_S_ShowInFileManager), SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager()));
-    connect(actionPool()->action(UIActionIndexST_M_Group_S_CreateShortcut), SIGNAL(triggered()), this, SLOT(sltPerformCreateMachineShortcut()));
+    connect(actionPool()->action(UIActionIndexST_M_Group_S_Add), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltOpenAddMachineDialogDefault);
+    connect(actionPool()->action(UIActionIndexST_M_Group_M_StartOrShow), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformStartOrShowMachine);
+    connect(actionPool()->action(UIActionIndexST_M_Group_T_Pause), &UIAction::toggled,
+            this, &UIVirtualBoxManager::sltPerformPauseOrResumeMachine);
+    connect(actionPool()->action(UIActionIndexST_M_Group_S_Reset), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformResetMachine);
+    connect(actionPool()->action(UIActionIndexST_M_Group_S_Discard), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformDiscardMachineState);
+    connect(actionPool()->action(UIActionIndexST_M_Group_S_ShowLogDialog), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltOpenMachineLogDialog);
+    connect(actionPool()->action(UIActionIndexST_M_Group_S_ShowInFileManager), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltShowMachineInFileManager);
+    connect(actionPool()->action(UIActionIndexST_M_Group_S_CreateShortcut), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformCreateMachineShortcut);
 
     /* 'Machine' menu connections: */
-    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Add), SIGNAL(triggered()), this, SLOT(sltOpenAddMachineDialog()));
-    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Settings), SIGNAL(triggered()), this, SLOT(sltOpenMachineSettingsDialog()));
-    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Clone), SIGNAL(triggered()), this, SLOT(sltOpenCloneMachineWizard()));
-    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Move), SIGNAL(triggered()), this, SLOT(sltPerformMachineMove()));
-    connect(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow), SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowMachine()));
-    connect(actionPool()->action(UIActionIndexST_M_Machine_T_Pause), SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseOrResumeMachine(bool)));
-    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Reset), SIGNAL(triggered()), this, SLOT(sltPerformResetMachine()));
-    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Discard), SIGNAL(triggered()), this, SLOT(sltPerformDiscardMachineState()));
-    connect(actionPool()->action(UIActionIndexST_M_Machine_S_ShowLogDialog), SIGNAL(triggered()), this, SLOT(sltOpenMachineLogDialog()));
-    connect(actionPool()->action(UIActionIndexST_M_Machine_S_ShowInFileManager), SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager()));
-    connect(actionPool()->action(UIActionIndexST_M_Machine_S_CreateShortcut), SIGNAL(triggered()), this, SLOT(sltPerformCreateMachineShortcut()));
+    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Add), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltOpenAddMachineDialogDefault);
+    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Settings), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltOpenMachineSettingsDialogDefault);
+    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Clone), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltOpenCloneMachineWizard);
+    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Move), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformMachineMove);
+    connect(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformStartOrShowMachine);
+    connect(actionPool()->action(UIActionIndexST_M_Machine_T_Pause), &UIAction::toggled,
+            this, &UIVirtualBoxManager::sltPerformPauseOrResumeMachine);
+    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Reset), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformResetMachine);
+    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Discard), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformDiscardMachineState);
+    connect(actionPool()->action(UIActionIndexST_M_Machine_S_ShowLogDialog), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltOpenMachineLogDialog);
+    connect(actionPool()->action(UIActionIndexST_M_Machine_S_ShowInFileManager), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltShowMachineInFileManager);
+    connect(actionPool()->action(UIActionIndexST_M_Machine_S_CreateShortcut), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformCreateMachineShortcut);
 
     /* 'Group/Start or Show' menu connections: */
-    connect(actionPool()->action(UIActionIndexST_M_Group_M_StartOrShow_S_StartNormal), SIGNAL(triggered()), this, SLOT(sltPerformStartMachineNormal()));
-    connect(actionPool()->action(UIActionIndexST_M_Group_M_StartOrShow_S_StartHeadless), SIGNAL(triggered()), this, SLOT(sltPerformStartMachineHeadless()));
-    connect(actionPool()->action(UIActionIndexST_M_Group_M_StartOrShow_S_StartDetachable), SIGNAL(triggered()), this, SLOT(sltPerformStartMachineDetachable()));
+    connect(actionPool()->action(UIActionIndexST_M_Group_M_StartOrShow_S_StartNormal), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformStartMachineNormal);
+    connect(actionPool()->action(UIActionIndexST_M_Group_M_StartOrShow_S_StartHeadless), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformStartMachineHeadless);
+    connect(actionPool()->action(UIActionIndexST_M_Group_M_StartOrShow_S_StartDetachable), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformStartMachineDetachable);
 
     /* 'Machine/Start or Show' menu connections: */
-    connect(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow_S_StartNormal), SIGNAL(triggered()), this, SLOT(sltPerformStartMachineNormal()));
-    connect(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow_S_StartHeadless), SIGNAL(triggered()), this, SLOT(sltPerformStartMachineHeadless()));
-    connect(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow_S_StartDetachable), SIGNAL(triggered()), this, SLOT(sltPerformStartMachineDetachable()));
+    connect(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow_S_StartNormal), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformStartMachineNormal);
+    connect(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow_S_StartHeadless), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformStartMachineHeadless);
+    connect(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow_S_StartDetachable), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformStartMachineDetachable);
 
     /* 'Group/Close' menu connections: */
-    connect(actionPool()->action(UIActionIndexST_M_Group_M_Close)->menu(), SIGNAL(aboutToShow()), this, SLOT(sltGroupCloseMenuAboutToShow()));
-    connect(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_Detach), SIGNAL(triggered()), this, SLOT(sltPerformDetachMachineUI()));
-    connect(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_SaveState), SIGNAL(triggered()), this, SLOT(sltPerformSaveMachineState()));
-    connect(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_Shutdown), SIGNAL(triggered()), this, SLOT(sltPerformShutdownMachine()));
-    connect(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_PowerOff), SIGNAL(triggered()), this, SLOT(sltPerformPowerOffMachine()));
+    connect(actionPool()->action(UIActionIndexST_M_Group_M_Close)->menu(), &UIMenu::aboutToShow,
+            this, &UIVirtualBoxManager::sltGroupCloseMenuAboutToShow);
+    connect(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_Detach), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformDetachMachineUI);
+    connect(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_SaveState), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformSaveMachineState);
+    connect(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_Shutdown), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformShutdownMachine);
+    connect(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_PowerOff), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformPowerOffMachine);
 
     /* 'Machine/Close' menu connections: */
-    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close)->menu(), SIGNAL(aboutToShow()), this, SLOT(sltMachineCloseMenuAboutToShow()));
-    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_Detach), SIGNAL(triggered()), this, SLOT(sltPerformDetachMachineUI()));
-    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_SaveState), SIGNAL(triggered()), this, SLOT(sltPerformSaveMachineState()));
-    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown), SIGNAL(triggered()), this, SLOT(sltPerformShutdownMachine()));
-    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff), SIGNAL(triggered()), this, SLOT(sltPerformPowerOffMachine()));
-
-    /* 'Tools' actions connections: */
-    connect(actionPool()->action(UIActionIndexST_M_Tools_T_Machine), &UIAction::toggled,
-            this, &UIVirtualBoxManager::sltHandleToolsTypeSwitch);
-    connect(actionPool()->action(UIActionIndexST_M_Tools_T_Global), &UIAction::toggled,
-            this, &UIVirtualBoxManager::sltHandleToolsTypeSwitch);
-
-    /* Graphics VM chooser connections: */
-    connect(m_pPaneChooser, SIGNAL(sigSelectionChanged()), this, SLOT(sltHandleChooserPaneIndexChange()));
-    connect(m_pPaneChooser, SIGNAL(sigSlidingStarted()), m_pPaneToolsMachine, SIGNAL(sigSlidingStarted()));
-    connect(m_pPaneChooser, SIGNAL(sigToggleStarted()), m_pPaneToolsMachine, SIGNAL(sigToggleStarted()));
-    connect(m_pPaneChooser, SIGNAL(sigToggleFinished()), m_pPaneToolsMachine, SIGNAL(sigToggleFinished()));
-    connect(m_pPaneChooser, SIGNAL(sigGroupSavingStateChanged()), this, SLOT(sltHandleGroupSavingProgressChange()));
-
-    /* Tool-bar connections: */
-#ifndef VBOX_WS_MAC
-    connect(m_pToolBar, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(sltHandleContextMenuRequest(const QPoint&)));
-#else /* VBOX_WS_MAC */
-    /* We want to receive right click notifications on the title bar, so register our own handler: */
-    ::darwinRegisterForUnifiedToolbarContextMenuEvents(this);
-#endif /* VBOX_WS_MAC */
-    connect(m_pToolbarTools, &UIToolbarTools::sigToolOpenedMachine, this, &UIVirtualBoxManager::sltHandleToolOpenedMachine);
-    connect(m_pToolbarTools, &UIToolbarTools::sigToolOpenedGlobal,  this, &UIVirtualBoxManager::sltHandleToolOpenedGlobal);
-    connect(m_pToolbarTools, &UIToolbarTools::sigToolClosedMachine, this, &UIVirtualBoxManager::sltHandleToolClosedMachine);
-    connect(m_pToolbarTools, &UIToolbarTools::sigToolClosedGlobal,  this, &UIVirtualBoxManager::sltHandleToolClosedGlobal);
-
-    /* VM desktop connections: */
-    connect(m_pPaneToolsMachine, SIGNAL(sigLinkClicked(const QString&, const QString&, const QString&)),
-            this, SLOT(sltOpenMachineSettingsDialog(const QString&, const QString&, const QString&)));
-
-    /* Global event handlers: */
-    connect(gVBoxEvents, SIGNAL(sigMachineStateChange(QString, KMachineState)), this, SLOT(sltHandleStateChange(QString)));
-    connect(gVBoxEvents, SIGNAL(sigSessionStateChange(QString, KSessionState)), this, SLOT(sltHandleStateChange(QString)));
+    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close)->menu(), &UIMenu::aboutToShow,
+            this, &UIVirtualBoxManager::sltMachineCloseMenuAboutToShow);
+    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_Detach), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformDetachMachineUI);
+    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_SaveState), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformSaveMachineState);
+    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformShutdownMachine);
+    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff), &UIAction::triggered,
+            this, &UIVirtualBoxManager::sltPerformPowerOffMachine);
 }
 
@@ -2173,78 +1747,8 @@
         restoreGeometry();
     }
-
-    /* Restore splitter handle position: */
-    {
-        /* Read splitter hints: */
-        QList<int> sizes = gEDataManager->selectorWindowSplitterHints();
-        /* If both hints are zero, we have the 'default' case: */
-        if (sizes[0] == 0 && sizes[1] == 0)
-        {
-            /* Propose some 'default' based on current dialog width: */
-            sizes[0] = (int)(width() * .9 * (1.0 / 3));
-            sizes[1] = (int)(width() * .9 * (2.0 / 3));
-        }
-        /* Pass hints to the splitter: */
-        m_pSplitter->setSizes(sizes);
-    }
-
-    /* Restore toolbar and statusbar functionality: */
-    {
-#ifdef VBOX_WS_MAC
-        // WORKAROUND:
-        // There is an issue in Qt5 main-window toolbar implementation:
-        // if you are hiding it before it's shown for the first time,
-        // there is an ugly empty container appears instead, so we
-        // have to hide toolbar asynchronously to avoid that.
-        if (!gEDataManager->selectorWindowToolBarVisible())
-            QMetaObject::invokeMethod(m_pToolBar, "hide", Qt::QueuedConnection);
-#else
-        m_pToolBar->setHidden(!gEDataManager->selectorWindowToolBarVisible());
-#endif
-        m_pToolBar->setToolButtonStyle(gEDataManager->selectorWindowToolBarTextVisible()
-                                       ? Qt::ToolButtonTextUnderIcon : Qt::ToolButtonIconOnly);
-        m_pToolbarTools->setToolButtonStyle(gEDataManager->selectorWindowToolBarTextVisible()
-                                            ? Qt::ToolButtonTextUnderIcon : Qt::ToolButtonIconOnly);
-    }
-
-    /* Restore toolbar Machine/Global tools orders:  */
-    {
-        m_orderMachine = gEDataManager->selectorWindowToolsOrderMachine();
-        m_orderGlobal = gEDataManager->selectorWindowToolsOrderGlobal();
-
-        /* We can restore previously opened Global tools right here: */
-        QMap<ToolTypeGlobal, QAction*> mapActionsGlobal;
-        mapActionsGlobal[ToolTypeGlobal_VirtualMedia] = actionPool()->action(UIActionIndexST_M_Tools_M_Global_S_VirtualMediaManager);
-        mapActionsGlobal[ToolTypeGlobal_HostNetwork] = actionPool()->action(UIActionIndexST_M_Tools_M_Global_S_HostNetworkManager);
-        for (int i = m_orderGlobal.size() - 1; i >= 0; --i)
-            if (m_orderGlobal.at(i) != ToolTypeGlobal_Invalid)
-                mapActionsGlobal.value(m_orderGlobal.at(i))->trigger();
-        /* Make sure further action triggering cause tool type switch as well: */
-        actionPool()->action(UIActionIndexST_M_Tools_T_Global)->setProperty("watch_child_activation", true);
-
-        /* But we can't restore previously opened Machine tools here,
-         * see the reason in corresponding async sltHandlePolishEvent slot. */
-    }
 }
 
 void UIVirtualBoxManager::saveSettings()
 {
-    /* Save toolbar Machine/Global tools orders: */
-    {
-        gEDataManager->setSelectorWindowToolsOrderMachine(m_pToolbarTools->tabOrderMachine());
-        gEDataManager->setSelectorWindowToolsOrderGlobal(m_pToolbarTools->tabOrderGlobal());
-    }
-
-    /* Save toolbar and statusbar visibility: */
-    {
-        gEDataManager->setSelectorWindowToolBarVisible(!m_pToolBar->isHidden());
-        gEDataManager->setSelectorWindowToolBarTextVisible(m_pToolBar->toolButtonStyle() == Qt::ToolButtonTextUnderIcon);
-    }
-
-    /* Save splitter handle position: */
-    {
-        gEDataManager->setSelectorWindowSplitterHints(m_pSplitter->sizes());
-    }
-
     /* Save window geometry: */
     {
@@ -2259,10 +1763,11 @@
 }
 
-void UIVirtualBoxManager::cleanupConnections()
-{
-#ifdef VBOX_WS_MAC
-    /* Tool-bar connections: */
-    ::darwinUnregisterForUnifiedToolbarContextMenuEvents(this);
-#endif /* VBOX_WS_MAC */
+void UIVirtualBoxManager::cleanupWidgets()
+{
+    /* Deconfigure central-widget: */
+    setCentralWidget(0);
+    /* Destroy central-widget: */
+    delete m_pWidget;
+    m_pWidget = 0;
 }
 
@@ -2288,12 +1793,37 @@
 
     /* Cleanup: */
-    cleanupConnections();
+    cleanupWidgets();
     cleanupMenuBar();
 }
 
+UIVirtualMachineItem *UIVirtualBoxManager::currentItem() const
+{
+    return m_pWidget->currentItem();
+}
+
+QList<UIVirtualMachineItem*> UIVirtualBoxManager::currentItems() const
+{
+    return m_pWidget->currentItems();
+}
+
+bool UIVirtualBoxManager::isGroupSavingInProgress() const
+{
+    return m_pWidget->isGroupSavingInProgress();
+}
+
+bool UIVirtualBoxManager::isAllItemsOfOneGroupSelected() const
+{
+    return m_pWidget->isAllItemsOfOneGroupSelected();
+}
+
+bool UIVirtualBoxManager::isSingleGroupSelected() const
+{
+    return m_pWidget->isSingleGroupSelected();
+}
+
 void UIVirtualBoxManager::performStartOrShowVirtualMachines(const QList<UIVirtualMachineItem*> &items, VBoxGlobal::LaunchMode enmLaunchMode)
 {
     /* Do nothing while group saving is in progress: */
-    if (m_pPaneChooser->isGroupSavingInProgress())
+    if (isGroupSavingInProgress())
         return;
 
@@ -2342,5 +1872,5 @@
     /* Determine whether Machine or Group menu should be shown at all: */
     const bool fMachineOrGroupMenuShown = actionPool()->action(UIActionIndexST_M_Tools_T_Machine)->isChecked();
-    const bool fMachineMenuShown = !m_pPaneChooser->isSingleGroupSelected();
+    const bool fMachineMenuShown = !isSingleGroupSelected();
     m_pMachineMenuAction->setVisible(fMachineOrGroupMenuShown && fMachineMenuShown);
     m_pGroupMenuAction->setVisible(fMachineOrGroupMenuShown && !fMachineMenuShown);
@@ -2433,7 +1963,8 @@
         actionPool()->action(UIActionIndexST_M_Group_M_StartOrShow)->toActionPolymorphicMenu()->setState(UIVirtualMachineItem::isItemPoweredOff(pItem) ? 0 : 1);
         actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow)->toActionPolymorphicMenu()->setState(UIVirtualMachineItem::isItemPoweredOff(pItem) ? 0 : 1);
-        QToolButton *pButton = qobject_cast<QToolButton*>(m_pToolBar->widgetForAction(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow)));
-        if (pButton)
-            pButton->setPopupMode(UIVirtualMachineItem::isItemPoweredOff(pItem) ? QToolButton::MenuButtonPopup : QToolButton::DelayedPopup);
+        /// todo Hmm, fix it?
+//        QToolButton *pButton = qobject_cast<QToolButton*>(m_pToolBar->widgetForAction(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow)));
+//        if (pButton)
+//            pButton->setPopupMode(UIVirtualMachineItem::isItemPoweredOff(pItem) ? QToolButton::MenuButtonPopup : QToolButton::DelayedPopup);
     }
     else
@@ -2441,7 +1972,8 @@
         actionPool()->action(UIActionIndexST_M_Group_M_StartOrShow)->toActionPolymorphicMenu()->setState(0);
         actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow)->toActionPolymorphicMenu()->setState(0);
-        QToolButton *pButton = qobject_cast<QToolButton*>(m_pToolBar->widgetForAction(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow)));
-        if (pButton)
-            pButton->setPopupMode(UIVirtualMachineItem::isItemPoweredOff(pItem) ? QToolButton::MenuButtonPopup : QToolButton::DelayedPopup);
+        /// todo Hmm, fix it?
+//        QToolButton *pButton = qobject_cast<QToolButton*>(m_pToolBar->widgetForAction(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow)));
+//        if (pButton)
+//            pButton->setPopupMode(UIVirtualMachineItem::isItemPoweredOff(pItem) ? QToolButton::MenuButtonPopup : QToolButton::DelayedPopup);
     }
 
@@ -2489,15 +2021,15 @@
         case UIActionIndexST_M_Group_S_Remove:
         {
-            return !m_pPaneChooser->isGroupSavingInProgress() &&
+            return !isGroupSavingInProgress() &&
                    isItemsPoweredOff(items);
         }
         case UIActionIndexST_M_Group_S_Sort:
         {
-            return !m_pPaneChooser->isGroupSavingInProgress() &&
-                   m_pPaneChooser->isSingleGroupSelected();
+            return !isGroupSavingInProgress() &&
+                   isSingleGroupSelected();
         }
         case UIActionIndexST_M_Machine_S_Settings:
         {
-            return !m_pPaneChooser->isGroupSavingInProgress() &&
+            return !isGroupSavingInProgress() &&
                    items.size() == 1 &&
                    pItem->configurationAccessLevel() != ConfigurationAccessLevel_Null;
@@ -2506,5 +2038,5 @@
         case UIActionIndexST_M_Machine_S_Move:
         {
-            return !m_pPaneChooser->isGroupSavingInProgress() &&
+            return !isGroupSavingInProgress() &&
                    items.size() == 1 &&
                    UIVirtualMachineItem::isItemEditable(pItem);
@@ -2512,11 +2044,11 @@
         case UIActionIndexST_M_Machine_S_Remove:
         {
-            return !m_pPaneChooser->isGroupSavingInProgress() &&
+            return !isGroupSavingInProgress() &&
                    isAtLeastOneItemRemovable(items);
         }
         case UIActionIndexST_M_Machine_S_AddGroup:
         {
-            return !m_pPaneChooser->isGroupSavingInProgress() &&
-                   !m_pPaneChooser->isAllItemsOfOneGroupSelected() &&
+            return !isGroupSavingInProgress() &&
+                   !isAllItemsOfOneGroupSelected() &&
                    isItemsPoweredOff(items);
         }
@@ -2530,5 +2062,5 @@
         case UIActionIndexST_M_Machine_M_StartOrShow_S_StartDetachable:
         {
-            return !m_pPaneChooser->isGroupSavingInProgress() &&
+            return !isGroupSavingInProgress() &&
                    isAtLeastOneItemCanBeStartedOrShown(items);
         }
@@ -2536,5 +2068,5 @@
         case UIActionIndexST_M_Machine_S_Discard:
         {
-            return !m_pPaneChooser->isGroupSavingInProgress() &&
+            return !isGroupSavingInProgress() &&
                    isAtLeastOneItemDiscardable(items);
         }
@@ -2566,5 +2098,5 @@
         case UIActionIndexST_M_Machine_S_SortParent:
         {
-            return !m_pPaneChooser->isGroupSavingInProgress();
+            return !isGroupSavingInProgress();
         }
         case UIActionIndexST_M_Group_S_CreateShortcut:
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h	(revision 73469)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h	(revision 73492)
@@ -25,6 +25,4 @@
 #include "QIMainWindow.h"
 #include "QIWithRetranslateUI.h"
-#include "UIToolPaneGlobal.h"
-#include "UIToolPaneMachine.h"
 #include "VBoxGlobal.h"
 
@@ -32,12 +30,7 @@
 class QMenu;
 class QIManagerDialog;
-class QISplitter;
 class UIAction;
 class UIActionPool;
-class UIChooser;
-class UISlidingWidget;
-class UITabBar;
-class UIToolBar;
-class UIToolbarTools;
+class UIVirtualBoxManagerWidget;
 class UIVirtualMachineItem;
 
@@ -101,7 +94,4 @@
     /** @name Common stuff.
       * @{ */
-        /** Handles polishing in the async way. */
-        void sltHandlePolishEvent();
-
 #if QT_VERSION == 0
         /** Stupid moc does not warn if it cannot find headers! */
@@ -112,14 +102,4 @@
 #endif /* VBOX_WS_X11 */
 
-        /** Handles context-menu request for passed @a position. */
-        void sltHandleContextMenuRequest(const QPoint &position);
-
-        /** Handles signal about Chooser-pane index change.
-          * @param  fUpdateDetails    Brings whether details should be updated.
-          * @param  fUpdateSnapshots  Brings whether tools should be updated. */
-        void sltHandleChooserPaneIndexChange(bool fUpdateDetails = true,
-                                             bool fUpdateSnapshots = true,
-                                             bool fUpdateLogViewer = true);
-
         /** Handles signal about medium-enumeration finished. */
         void sltHandleMediumEnumerationFinish();
@@ -128,4 +108,6 @@
         void sltHandleOpenUrlCall(QList<QUrl> list = QList<QUrl>());
 
+        /** Hnadles singal about Chooser-pane index change.  */
+        void sltHandleChooserPaneIndexChange();
         /** Handles signal about group saving progress change. */
         void sltHandleGroupSavingProgressChange();
@@ -156,4 +138,6 @@
           * @param strFileName can bring the name of file to import appliance from. */
         void sltOpenImportApplianceWizard(const QString &strFileName = QString());
+        /** Handles call to open Import Appliance wizard the default way. */
+        void sltOpenImportApplianceWizardDefault() { sltOpenImportApplianceWizard(); }
         /** Handles call to open Export Appliance wizard. */
         void sltOpenExportApplianceWizard();
@@ -176,4 +160,6 @@
           * @param strFileName can bring the name of file to add machine from. */
         void sltOpenAddMachineDialog(const QString &strFileName = QString());
+        /** Handles call to open Add Machine dialog the default way. */
+        void sltOpenAddMachineDialogDefault() { sltOpenAddMachineDialog(); }
 
         /** Handles call to open Machine Settings dialog.
@@ -184,4 +170,6 @@
                                           QString strControl = QString(),
                                           const QString &strID = QString());
+        /** Handles call to open Machine Settings dialog the default way. */
+        void sltOpenMachineSettingsDialogDefault() { sltOpenMachineSettingsDialog(); }
 
         /** Handles call to open Clone Machine wizard. */
@@ -233,31 +221,5 @@
     /** @} */
 
-    /** @name Tools stuff.
-      * @{ */
-        /** Handles tools type switch. */
-        void sltHandleToolsTypeSwitch();
-
-        /** Handles request to show Machine tab-bar. */
-        void sltHandleShowTabBarMachine();
-        /** Handles request to show Global tab-bar. */
-        void sltHandleShowTabBarGlobal();
-
-        /** Handles rquest to open Machine tool of passed @a enmType. */
-        void sltHandleToolOpenedMachine(ToolTypeMachine enmType);
-        /** Handles rquest to open Global tool of passed @a enmType. */
-        void sltHandleToolOpenedGlobal(ToolTypeGlobal enmType);
-
-        /** Handles rquest to close Machine tool of passed @a enmType. */
-        void sltHandleToolClosedMachine(ToolTypeMachine enmType);
-        /** Handles rquest to close Global tool of passed @a enmType. */
-        void sltHandleToolClosedGlobal(ToolTypeGlobal enmType);
-    /** @} */
-
 private:
-
-    /** Returns current-item. */
-    UIVirtualMachineItem *currentItem() const;
-    /** Returns a list of current-items. */
-    QList<UIVirtualMachineItem*> currentItems() const;
 
     /** @name Prepare/Cleanup cascade.
@@ -296,10 +258,25 @@
         /** Saves settings. */
         void saveSettings();
-        /** Cleanups connections. */
-        void cleanupConnections();
+        /** Cleanups widgets. */
+        void cleanupWidgets();
         /** Cleanups menu-bar. */
         void cleanupMenuBar();
         /** Cleanups window. */
         void cleanup();
+    /** @} */
+
+    /** @name Common stuff.
+      * @{ */
+        /** Returns current-item. */
+        UIVirtualMachineItem *currentItem() const;
+        /** Returns a list of current-items. */
+        QList<UIVirtualMachineItem*> currentItems() const;
+
+        /** Returns whether group saving is in progress. */
+        bool isGroupSavingInProgress() const;
+        /** Returns whether all items of one group is selected. */
+        bool isAllItemsOfOneGroupSelected() const;
+        /** Returns whether single group is selected. */
+        bool isSingleGroupSelected() const;
     /** @} */
 
@@ -358,37 +335,4 @@
     UIActionPool *m_pActionPool;
 
-    /** Holds the sliding-widget isntance. */
-    UISlidingWidget *m_pSlidingWidget;
-
-    /** Holds the central splitter instance. */
-    QISplitter *m_pSplitter;
-
-    /** Holds the main toolbar instance. */
-    UIToolBar *m_pToolBar;
-
-    /** Holds the Machine tab-bar instance. */
-    UITabBar *m_pTabBarMachine;
-    /** Holds the Global tab-bar instance. */
-    UITabBar *m_pTabBarGlobal;
-    /** Holds the Machine tab-bar action reference. */
-    QAction *m_pActionTabBarMachine;
-    /** Holds the Global tab-bar action reference. */
-    QAction *m_pActionTabBarGlobal;
-
-    /** Holds the Tools-toolbar instance. */
-    UIToolbarTools *m_pToolbarTools;
-
-    /** Holds the Machine Tools order. */
-    QList<ToolTypeMachine>  m_orderMachine;
-    /** Holds the Global Tools order. */
-    QList<ToolTypeGlobal>   m_orderGlobal;
-
-    /** Holds the Chooser-pane instance. */
-    UIChooser         *m_pPaneChooser;
-    /** Holds the Machine Tools-pane instance. */
-    UIToolPaneMachine *m_pPaneToolsMachine;
-    /** Holds the Global Tools-pane instance. */
-    UIToolPaneGlobal  *m_pPaneToolsGlobal;
-
     /** Holds the list of Group menu actions. */
     QList<UIAction*>  m_groupActions;
@@ -407,4 +351,7 @@
     /** Holds a map of (machineUUID, UIVMLogViewerDialog). */
     VMLogViewerMap   m_logViewers;
+
+    /** Holds the central-widget instance. */
+    UIVirtualBoxManagerWidget *m_pWidget;
 };
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp	(revision 73492)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp	(revision 73492)
@@ -0,0 +1,634 @@
+/* $Id$ */
+/** @file
+ * VBox Qt GUI - UIVirtualBoxManagerWidget class implementation.
+ */
+
+/*
+ * Copyright (C) 2006-2018 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#ifdef VBOX_WITH_PRECOMPILED_HEADERS
+# include <precomp.h>
+#else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
+
+/* Qt includes: */
+# include <QStyle>
+# include <QVBoxLayout>
+
+/* GUI includes: */
+# include "QISplitter.h"
+# include "UIActionPoolSelector.h"
+# include "UIErrorString.h"
+# include "UIExtraDataManager.h"
+# include "UIChooser.h"
+# include "UIVirtualBoxManager.h"
+# include "UIVirtualBoxManagerWidget.h"
+# include "UISlidingWidget.h"
+# include "UITabBar.h"
+# include "UIToolBar.h"
+# include "UIVirtualMachineItem.h"
+# include "UIToolbarTools.h"
+# ifndef VBOX_WS_MAC
+#  include "UIMenuBar.h"
+# endif
+
+#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
+
+
+UIVirtualBoxManagerWidget::UIVirtualBoxManagerWidget(UIVirtualBoxManager *pParent)
+    : m_fPolished(false)
+    , m_pActionPool(pParent->actionPool())
+    , m_pSlidingWidget(0)
+    , m_pSplitter(0)
+    , m_pToolBar(0)
+    , m_pTabBarMachine(0)
+    , m_pTabBarGlobal(0)
+    , m_pActionTabBarMachine(0)
+    , m_pActionTabBarGlobal(0)
+    , m_pToolbarTools(0)
+    , m_pPaneChooser(0)
+    , m_pPaneToolsMachine(0)
+    , m_pPaneToolsGlobal(0)
+{
+    prepare();
+}
+
+UIVirtualBoxManagerWidget::~UIVirtualBoxManagerWidget()
+{
+    cleanup();
+}
+
+UIVirtualMachineItem *UIVirtualBoxManagerWidget::currentItem() const
+{
+    return m_pPaneChooser->currentItem();
+}
+
+QList<UIVirtualMachineItem*> UIVirtualBoxManagerWidget::currentItems() const
+{
+    return m_pPaneChooser->currentItems();
+}
+
+bool UIVirtualBoxManagerWidget::isGroupSavingInProgress() const
+{
+    return m_pPaneChooser->isGroupSavingInProgress();
+}
+
+bool UIVirtualBoxManagerWidget::isAllItemsOfOneGroupSelected() const
+{
+    return m_pPaneChooser->isAllItemsOfOneGroupSelected();
+}
+
+bool UIVirtualBoxManagerWidget::isSingleGroupSelected() const
+{
+    return m_pPaneChooser->isSingleGroupSelected();
+}
+
+bool UIVirtualBoxManagerWidget::isToolOpened(ToolTypeMachine enmType) const
+{
+    return m_pPaneToolsMachine->isToolOpened(enmType);
+}
+
+bool UIVirtualBoxManagerWidget::isToolOpened(ToolTypeGlobal enmType) const
+{
+    return m_pPaneToolsGlobal->isToolOpened(enmType);
+}
+
+void UIVirtualBoxManagerWidget::switchToTool(ToolTypeMachine enmType)
+{
+    sltHandleToolOpenedMachine(enmType);
+}
+
+void UIVirtualBoxManagerWidget::switchToTool(ToolTypeGlobal enmType)
+{
+    sltHandleToolOpenedGlobal(enmType);
+}
+
+void UIVirtualBoxManagerWidget::sltHandleContextMenuRequest(const QPoint &position)
+{
+    /* Populate toolbar actions: */
+    QList<QAction*> actions;
+    /* Add 'Show Toolbar Text' action: */
+    QAction *pShowToolBarText = new QAction(tr("Show Toolbar Text"), 0);
+    AssertPtrReturnVoid(pShowToolBarText);
+    {
+        /* Configure action: */
+        pShowToolBarText->setCheckable(true);
+        pShowToolBarText->setChecked(m_pToolBar->toolButtonStyle() == Qt::ToolButtonTextUnderIcon);
+
+        /* Add into action list: */
+        actions << pShowToolBarText;
+    }
+
+    /* Prepare the menu position: */
+    QPoint globalPosition = position;
+    QWidget *pSender = static_cast<QWidget*>(sender());
+    if (pSender)
+        globalPosition = pSender->mapToGlobal(position);
+
+    /* Execute the menu: */
+    QAction *pResult = QMenu::exec(actions, globalPosition);
+
+    /* Handle the menu execution result: */
+    if (pResult == pShowToolBarText)
+    {
+        m_pToolBar->setToolButtonStyle(  pResult->isChecked()
+                                       ? Qt::ToolButtonTextUnderIcon
+                                       : Qt::ToolButtonIconOnly);
+        m_pToolbarTools->setToolButtonStyle(  pResult->isChecked()
+                                            ? Qt::ToolButtonTextUnderIcon
+                                            : Qt::ToolButtonIconOnly);
+    }
+}
+
+void UIVirtualBoxManagerWidget::retranslateUi()
+{
+    /* Make sure chosen item fetched: */
+    sltHandleChooserPaneIndexChange(false /* update details? */, false /* update snapshots? */, false /* update the logviewer? */);
+
+#ifdef VBOX_WS_MAC
+    // WORKAROUND:
+    // There is a bug in Qt Cocoa which result in showing a "more arrow" when
+    // the necessary size of the toolbar is increased. Also for some languages
+    // the with doesn't match if the text increase. So manually adjust the size
+    // after changing the text.
+    m_pToolBar->updateLayout();
+#endif
+}
+
+void UIVirtualBoxManagerWidget::showEvent(QShowEvent *pEvent)
+{
+    /* Call to base-class: */
+    QIWithRetranslateUI<QWidget>::showEvent(pEvent);
+
+    /* Is polishing required? */
+    if (!m_fPolished)
+    {
+        /* Pass the show-event to polish-event: */
+        polishEvent(pEvent);
+        /* Mark as polished: */
+        m_fPolished = true;
+    }
+}
+
+void UIVirtualBoxManagerWidget::polishEvent(QShowEvent *)
+{
+    /* Call for async polishing finally: */
+    QMetaObject::invokeMethod(this, "sltHandlePolishEvent", Qt::QueuedConnection);
+}
+
+void UIVirtualBoxManagerWidget::sltHandlePolishEvent()
+{
+    /* Get current item: */
+    UIVirtualMachineItem *pItem = currentItem();
+
+    /* Make sure there is accessible VM item chosen: */
+    if (pItem && pItem->accessible())
+    {
+        // WORKAROUND:
+        // By some reason some of X11 DEs unable to update() tab-bars on startup.
+        // Let's just _create_ them later, asynchronously after the showEvent().
+        /* Restore previously opened Machine tools at startup: */
+        QMap<ToolTypeMachine, QAction*> mapActionsMachine;
+        mapActionsMachine[ToolTypeMachine_Details] = actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_Details);
+        mapActionsMachine[ToolTypeMachine_Snapshots] = actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_Snapshots);
+        mapActionsMachine[ToolTypeMachine_LogViewer] = actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_LogViewer);
+        for (int i = m_orderMachine.size() - 1; i >= 0; --i)
+            if (m_orderMachine.at(i) != ToolTypeMachine_Invalid)
+                mapActionsMachine.value(m_orderMachine.at(i))->trigger();
+        /* Make sure further action triggering cause tool type switch as well: */
+        actionPool()->action(UIActionIndexST_M_Tools_T_Machine)->setProperty("watch_child_activation", true);
+    }
+}
+
+void UIVirtualBoxManagerWidget::sltHandleChooserPaneIndexChange(bool fUpdateDetails /* = true */,
+                                                                bool fUpdateSnapshots /* = true */,
+                                                                bool fUpdateLogViewer /* = true */)
+{
+    /* Let the parent know: */
+    emit sigChooserPaneIndexChange();
+
+    /* Get current item: */
+    UIVirtualMachineItem *pItem = currentItem();
+
+    /* Update Tools-pane: */
+    m_pPaneToolsMachine->setCurrentItem(pItem);
+
+    /* Update Machine tab-bar visibility */
+    m_pTabBarMachine->setEnabled(pItem && pItem->accessible());
+
+    /* If current item exists & accessible: */
+    if (pItem && pItem->accessible())
+    {
+        /* If Desktop pane is chosen currently: */
+        if (m_pPaneToolsMachine->currentTool() == ToolTypeMachine_Desktop)
+        {
+            /* Make sure Details or Snapshot pane is chosen if opened: */
+            if (m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_Details))
+                actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_Details)->trigger();
+            else
+            if (m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_Snapshots))
+                actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_Snapshots)->trigger();
+            else
+            if (m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_LogViewer))
+                actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_LogViewer)->trigger();
+        }
+
+        /* Update Details-pane (if requested): */
+        if (   fUpdateDetails
+            && m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_Details))
+            m_pPaneToolsMachine->setItems(currentItems());
+        /* Update the Snapshots-pane or/and Logviewer-pane (if requested): */
+        if (fUpdateSnapshots || fUpdateLogViewer)
+            m_pPaneToolsMachine->setMachine(pItem->machine());
+    }
+    else
+    {
+        /* Make sure Desktop-pane raised: */
+        m_pPaneToolsMachine->openTool(ToolTypeMachine_Desktop);
+
+        /* Note that the machine becomes inaccessible (or if the last VM gets
+         * deleted), we have to update all fields, ignoring input arguments. */
+        if (pItem)
+        {
+            /* The VM is inaccessible: */
+            m_pPaneToolsMachine->setDetailsError(UIErrorString::formatErrorInfo(pItem->accessError()));
+        }
+
+        /* Update Details-pane (in any case): */
+        if (m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_Details))
+            m_pPaneToolsMachine->setItems(currentItems());
+        /* Update Snapshots-pane and Logviewer-pane (in any case): */
+        m_pPaneToolsMachine->setMachine(CMachine());
+    }
+}
+
+void UIVirtualBoxManagerWidget::sltHandleToolsTypeSwitch()
+{
+    /* If Machine tool button is checked => go backward: */
+    if (actionPool()->action(UIActionIndexST_M_Tools_T_Machine)->isChecked())
+        m_pSlidingWidget->moveBackward();
+
+    else
+
+    /* If Global tool button is checked => go forward: */
+    if (actionPool()->action(UIActionIndexST_M_Tools_T_Global)->isChecked())
+        m_pSlidingWidget->moveForward();
+
+    /* Update action visibility: */
+    emit sigToolsTypeSwitch();
+
+    /* Make sure chosen item fetched: */
+    sltHandleChooserPaneIndexChange(false /* update details? */, false /* update snapshots? */, false /* update the logviewer? */);
+}
+
+void UIVirtualBoxManagerWidget::sltHandleShowTabBarMachine()
+{
+    m_pActionTabBarGlobal->setVisible(false);
+    m_pActionTabBarMachine->setVisible(true);
+}
+
+void UIVirtualBoxManagerWidget::sltHandleShowTabBarGlobal()
+{
+    m_pActionTabBarMachine->setVisible(false);
+    m_pActionTabBarGlobal->setVisible(true);
+}
+
+void UIVirtualBoxManagerWidget::sltHandleToolOpenedMachine(ToolTypeMachine enmType)
+{
+    /* First, make sure corresponding tool set opened: */
+    if (   !actionPool()->action(UIActionIndexST_M_Tools_T_Machine)->isChecked()
+        && actionPool()->action(UIActionIndexST_M_Tools_T_Machine)->property("watch_child_activation").toBool())
+        actionPool()->action(UIActionIndexST_M_Tools_T_Machine)->setChecked(true);
+
+    /* Open corresponding tool: */
+    m_pPaneToolsMachine->openTool(enmType);
+    /* If that was 'Details' => pass there current items: */
+    if (   enmType == ToolTypeMachine_Details
+        && m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_Details))
+        m_pPaneToolsMachine->setItems(currentItems());
+    /* If that was 'Snapshot' or 'LogViewer' => pass there current or null machine: */
+    if (enmType == ToolTypeMachine_Snapshots || enmType == ToolTypeMachine_LogViewer)
+    {
+        UIVirtualMachineItem *pItem = currentItem();
+        m_pPaneToolsMachine->setMachine(pItem ? pItem->machine() : CMachine());
+    }
+}
+
+void UIVirtualBoxManagerWidget::sltHandleToolOpenedGlobal(ToolTypeGlobal enmType)
+{
+    /* First, make sure corresponding tool set opened: */
+    if (   !actionPool()->action(UIActionIndexST_M_Tools_T_Global)->isChecked()
+        && actionPool()->action(UIActionIndexST_M_Tools_T_Global)->property("watch_child_activation").toBool())
+        actionPool()->action(UIActionIndexST_M_Tools_T_Global)->setChecked(true);
+
+    /* Open corresponding tool: */
+    m_pPaneToolsGlobal->openTool(enmType);
+}
+
+void UIVirtualBoxManagerWidget::sltHandleToolClosedMachine(ToolTypeMachine enmType)
+{
+    /* Close corresponding tool: */
+    m_pPaneToolsMachine->closeTool(enmType);
+}
+
+void UIVirtualBoxManagerWidget::sltHandleToolClosedGlobal(ToolTypeGlobal enmType)
+{
+    /* Close corresponding tool: */
+    m_pPaneToolsGlobal->closeTool(enmType);
+}
+
+void UIVirtualBoxManagerWidget::prepare()
+{
+    /* Prepare: */
+    prepareToolbar();
+    prepareWidgets();
+    prepareConnections();
+
+    /* Load settings: */
+    loadSettings();
+
+    /* Translate UI: */
+    retranslateUi();
+
+    /* Make sure current Chooser-pane index fetched: */
+    sltHandleChooserPaneIndexChange();
+}
+
+void UIVirtualBoxManagerWidget::prepareToolbar()
+{
+    /* Create Main toolbar: */
+    m_pToolBar = new UIToolBar(this);
+    if (m_pToolBar)
+    {
+        /* Configure toolbar: */
+        const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_LargeIconSize);
+        m_pToolBar->setIconSize(QSize(iIconMetric, iIconMetric));
+        m_pToolBar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+        m_pToolBar->setContextMenuPolicy(Qt::CustomContextMenu);
+        m_pToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
+
+        /* Add main actions block: */
+        m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_New));
+        m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Settings));
+        m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Discard));
+        m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow));
+#ifdef VBOX_WS_MAC
+        // WORKAROUND:
+        // Actually Qt should do that itself but by some unknown reason it sometimes
+        // forget to update toolbar after changing its actions on cocoa platform.
+        connect(actionPool()->action(UIActionIndexST_M_Machine_S_New), &UIAction::changed,
+                m_pToolBar, static_cast<void(UIToolBar::*)(void)>(&UIToolBar::update));
+        connect(actionPool()->action(UIActionIndexST_M_Machine_S_Settings), &UIAction::changed,
+                m_pToolBar, static_cast<void(UIToolBar::*)(void)>(&UIToolBar::update));
+        connect(actionPool()->action(UIActionIndexST_M_Machine_S_Discard), &UIAction::changed,
+                m_pToolBar, static_cast<void(UIToolBar::*)(void)>(&UIToolBar::update));
+        connect(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow), &UIAction::changed,
+                m_pToolBar, static_cast<void(UIToolBar::*)(void)>(&UIToolBar::update));
+#endif /* VBOX_WS_MAC */
+
+        /* Create Machine tab-bar: */
+        m_pTabBarMachine = new UITabBar;
+        if (m_pTabBarMachine)
+        {
+            /* Configure tab-bar: */
+            const int iL = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin);
+            const int iR = qApp->style()->pixelMetric(QStyle::PM_LayoutRightMargin);
+            m_pTabBarMachine->setContentsMargins(iL, 0, iR, 0);
+
+            /* Add into toolbar: */
+            m_pActionTabBarMachine = m_pToolBar->addWidget(m_pTabBarMachine);
+        }
+
+        /* Create Global tab-bar: */
+        m_pTabBarGlobal = new UITabBar;
+        if (m_pTabBarGlobal)
+        {
+            /* Configure tab-bar: */
+            const int iL = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin);
+            const int iR = qApp->style()->pixelMetric(QStyle::PM_LayoutRightMargin);
+            m_pTabBarGlobal->setContentsMargins(iL, 0, iR, 0);
+
+            /* Add into toolbar: */
+            m_pActionTabBarGlobal = m_pToolBar->addWidget(m_pTabBarGlobal);
+        }
+
+        /* Create Tools toolbar: */
+        m_pToolbarTools = new UIToolbarTools(actionPool());
+        if (m_pToolbarTools)
+        {
+            /* Configure toolbar: */
+            m_pToolbarTools->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding);
+            connect(m_pToolbarTools, &UIToolbarTools::sigShowTabBarMachine,
+                    this, &UIVirtualBoxManagerWidget::sltHandleShowTabBarMachine);
+            connect(m_pToolbarTools, &UIToolbarTools::sigShowTabBarGlobal,
+                    this, &UIVirtualBoxManagerWidget::sltHandleShowTabBarGlobal);
+            m_pToolbarTools->setTabBars(m_pTabBarMachine, m_pTabBarGlobal);
+
+            /* Create exclusive action-group: */
+            QActionGroup *pActionGroupTools = new QActionGroup(m_pToolbarTools);
+            if (pActionGroupTools)
+            {
+                /* Configure action-group: */
+                pActionGroupTools->setExclusive(true);
+
+                /* Add 'Tools' actions into action-group: */
+                pActionGroupTools->addAction(actionPool()->action(UIActionIndexST_M_Tools_T_Machine));
+                pActionGroupTools->addAction(actionPool()->action(UIActionIndexST_M_Tools_T_Global));
+            }
+
+            /* Add into toolbar: */
+            m_pToolBar->addWidget(m_pToolbarTools);
+        }
+
+#ifdef VBOX_WS_MAC
+        // WORKAROUND:
+        // There is a bug in Qt Cocoa which result in showing a "more arrow" when
+        // the necessary size of the toolbar is increased. Also for some languages
+        // the with doesn't match if the text increase. So manually adjust the size
+        // after changing the text.
+        m_pToolBar->updateLayout();
+#endif
+    }
+}
+
+void UIVirtualBoxManagerWidget::prepareWidgets()
+{
+    /* Create central-layout: */
+    QVBoxLayout *pLayout = new QVBoxLayout(this);
+    if (pLayout)
+    {
+        /* Configure layout: */
+        pLayout->setSpacing(0);
+        pLayout->setContentsMargins(0, 0, 0, 0);
+
+        /* Add into layout: */
+        pLayout->addWidget(m_pToolBar);
+
+        /* Create sliding-widget: */
+        m_pSlidingWidget = new UISlidingWidget;
+        if (m_pSlidingWidget)
+        {
+            /* Create splitter: */
+            m_pSplitter = new QISplitter;
+            if (m_pSplitter)
+            {
+                /* Configure splitter: */
+#ifdef VBOX_WS_X11
+                m_pSplitter->setHandleType(QISplitter::Native);
+#endif
+
+                /* Create Chooser-pane: */
+                m_pPaneChooser = new UIChooser(this);
+                if (m_pPaneChooser)
+                {
+                    /* Add into splitter: */
+                    m_pSplitter->addWidget(m_pPaneChooser);
+                }
+
+                /* Create Machine Tools-pane: */
+                m_pPaneToolsMachine = new UIToolPaneMachine(actionPool());
+                if (m_pPaneToolsMachine)
+                {
+                    /* Add into splitter: */
+                    m_pSplitter->addWidget(m_pPaneToolsMachine);
+                }
+
+                /* Adjust splitter colors according to main widgets it splits: */
+                m_pSplitter->configureColors(m_pPaneChooser->palette().color(QPalette::Active, QPalette::Window),
+                                             m_pPaneToolsMachine->palette().color(QPalette::Active, QPalette::Window));
+                /* Set the initial distribution. The right site is bigger. */
+                m_pSplitter->setStretchFactor(0, 2);
+                m_pSplitter->setStretchFactor(1, 3);
+            }
+
+            /* Create Global Tools-pane: */
+            m_pPaneToolsGlobal = new UIToolPaneGlobal(actionPool());
+            if (m_pPaneToolsGlobal)
+
+            /* Add left/right widgets into sliding widget: */
+            m_pSlidingWidget->setWidgets(m_pSplitter, m_pPaneToolsGlobal);
+
+            /* Add into layout: */
+            pLayout->addWidget(m_pSlidingWidget);
+        }
+    }
+
+    /* Bring the VM list to the focus: */
+    m_pPaneChooser->setFocus();
+}
+
+void UIVirtualBoxManagerWidget::prepareConnections()
+{
+    /* Tool-bar connections: */
+    connect(m_pToolBar, &UIToolBar::customContextMenuRequested,
+            this, &UIVirtualBoxManagerWidget::sltHandleContextMenuRequest);
+    connect(m_pToolbarTools, &UIToolbarTools::sigToolOpenedMachine,
+            this, &UIVirtualBoxManagerWidget::sltHandleToolOpenedMachine);
+    connect(m_pToolbarTools, &UIToolbarTools::sigToolOpenedGlobal,
+            this, &UIVirtualBoxManagerWidget::sltHandleToolOpenedGlobal);
+    connect(m_pToolbarTools, &UIToolbarTools::sigToolClosedMachine,
+            this, &UIVirtualBoxManagerWidget::sltHandleToolClosedMachine);
+    connect(m_pToolbarTools, &UIToolbarTools::sigToolClosedGlobal,
+            this, &UIVirtualBoxManagerWidget::sltHandleToolClosedGlobal);
+
+    /* 'Tools' actions connections: */
+    connect(actionPool()->action(UIActionIndexST_M_Tools_T_Machine), &UIAction::toggled,
+            this, &UIVirtualBoxManagerWidget::sltHandleToolsTypeSwitch);
+    connect(actionPool()->action(UIActionIndexST_M_Tools_T_Global), &UIAction::toggled,
+            this, &UIVirtualBoxManagerWidget::sltHandleToolsTypeSwitch);
+
+    /* Chooser-pane connections: */
+    connect(m_pPaneChooser, &UIChooser::sigSelectionChanged,
+            this, &UIVirtualBoxManagerWidget::sltHandleChooserPaneIndexChangeDefault);
+    connect(m_pPaneChooser, &UIChooser::sigSlidingStarted,
+            m_pPaneToolsMachine, &UIToolPaneMachine::sigSlidingStarted);
+    connect(m_pPaneChooser, &UIChooser::sigToggleStarted,
+            m_pPaneToolsMachine, &UIToolPaneMachine::sigToggleStarted);
+    connect(m_pPaneChooser, &UIChooser::sigToggleFinished,
+            m_pPaneToolsMachine, &UIToolPaneMachine::sigToggleFinished);
+    connect(m_pPaneChooser, &UIChooser::sigGroupSavingStateChanged,
+            this, &UIVirtualBoxManagerWidget::sigGroupSavingStateChanged);
+
+    /* Details-pane connections: */
+    connect(m_pPaneToolsMachine, &UIToolPaneMachine::sigLinkClicked,
+            this, &UIVirtualBoxManagerWidget::sigMachineSettingsLinkClicked);
+}
+
+void UIVirtualBoxManagerWidget::loadSettings()
+{
+    /* Restore splitter handle position: */
+    {
+        /* Read splitter hints: */
+        QList<int> sizes = gEDataManager->selectorWindowSplitterHints();
+        /* If both hints are zero, we have the 'default' case: */
+        if (sizes[0] == 0 && sizes[1] == 0)
+        {
+            /* Propose some 'default' based on current dialog width: */
+            sizes[0] = (int)(width() * .9 * (1.0 / 3));
+            sizes[1] = (int)(width() * .9 * (2.0 / 3));
+        }
+        /* Pass hints to the splitter: */
+        m_pSplitter->setSizes(sizes);
+    }
+
+    /* Restore toolbar settings: */
+    {
+        m_pToolBar->setToolButtonStyle(gEDataManager->selectorWindowToolBarTextVisible()
+                                       ? Qt::ToolButtonTextUnderIcon : Qt::ToolButtonIconOnly);
+        m_pToolbarTools->setToolButtonStyle(gEDataManager->selectorWindowToolBarTextVisible()
+                                            ? Qt::ToolButtonTextUnderIcon : Qt::ToolButtonIconOnly);
+    }
+
+    /* Restore toolbar Machine/Global tools orders:  */
+    {
+        m_orderMachine = gEDataManager->selectorWindowToolsOrderMachine();
+        m_orderGlobal = gEDataManager->selectorWindowToolsOrderGlobal();
+
+        /* We can restore previously opened Global tools right here: */
+        QMap<ToolTypeGlobal, QAction*> mapActionsGlobal;
+        mapActionsGlobal[ToolTypeGlobal_VirtualMedia] = actionPool()->action(UIActionIndexST_M_Tools_M_Global_S_VirtualMediaManager);
+        mapActionsGlobal[ToolTypeGlobal_HostNetwork] = actionPool()->action(UIActionIndexST_M_Tools_M_Global_S_HostNetworkManager);
+        for (int i = m_orderGlobal.size() - 1; i >= 0; --i)
+            if (m_orderGlobal.at(i) != ToolTypeGlobal_Invalid)
+                mapActionsGlobal.value(m_orderGlobal.at(i))->trigger();
+        /* Make sure further action triggering cause tool type switch as well: */
+        actionPool()->action(UIActionIndexST_M_Tools_T_Global)->setProperty("watch_child_activation", true);
+
+        /* But we can't restore previously opened Machine tools here,
+         * see the reason in corresponding async sltHandlePolishEvent slot. */
+    }
+}
+
+void UIVirtualBoxManagerWidget::saveSettings()
+{
+    /* Save toolbar Machine/Global tools orders: */
+    {
+        gEDataManager->setSelectorWindowToolsOrderMachine(m_pToolbarTools->tabOrderMachine());
+        gEDataManager->setSelectorWindowToolsOrderGlobal(m_pToolbarTools->tabOrderGlobal());
+    }
+
+    /* Save toolbar visibility: */
+    {
+        gEDataManager->setSelectorWindowToolBarVisible(!m_pToolBar->isHidden());
+        gEDataManager->setSelectorWindowToolBarTextVisible(m_pToolBar->toolButtonStyle() == Qt::ToolButtonTextUnderIcon);
+    }
+
+    /* Save splitter handle position: */
+    {
+        gEDataManager->setSelectorWindowSplitterHints(m_pSplitter->sizes());
+    }
+}
+
+void UIVirtualBoxManagerWidget::cleanup()
+{
+    /* Save settings: */
+    saveSettings();
+}
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h	(revision 73492)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h	(revision 73492)
@@ -0,0 +1,213 @@
+/* $Id$ */
+/** @file
+ * VBox Qt GUI - UIVirtualBoxManagerWidget class declaration.
+ */
+
+/*
+ * Copyright (C) 2006-2018 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#ifndef ___UIVirtualBoxManagerWidget_h___
+#define ___UIVirtualBoxManagerWidget_h___
+
+/* Qt includes: */
+#include <QWidget>
+
+/* GUI includes: */
+#include "QIWithRetranslateUI.h"
+#include "UIToolPaneGlobal.h"
+#include "UIToolPaneMachine.h"
+
+/* Forward declarations: */
+class QISplitter;
+class UIActionPool;
+class UIChooser;
+class UISlidingWidget;
+class UITabBar;
+class UIToolBar;
+class UIToolbarTools;
+class UIVirtualBoxManager;
+class UIVirtualMachineItem;
+
+/** QWidget extension used as VirtualBox Manager Widget instance. */
+class UIVirtualBoxManagerWidget : public QIWithRetranslateUI<QWidget>
+{
+    Q_OBJECT;
+
+signals:
+
+    /** Notifies about Chooser-pane index change. */
+    void sigChooserPaneIndexChange();
+    /** Notifies about Chooser-pane group saving change. */
+    void sigGroupSavingStateChanged();
+
+    /** Notifies aboud Details-pane link clicked. */
+    void sigMachineSettingsLinkClicked(const QString &strCategory, const QString &strControl, const QString &strId);
+
+    /** Notifies about Tool type switch. */
+    void sigToolsTypeSwitch();
+
+public:
+
+    /** Constructs VirtualBox Manager widget. */
+    UIVirtualBoxManagerWidget(UIVirtualBoxManager *pParent);
+    /** Destructs VirtualBox Manager widget. */
+    virtual ~UIVirtualBoxManagerWidget() /* override */;
+
+    /** @name Common stuff.
+      * @{ */
+        /** Returns the action-pool instance. */
+        UIActionPool *actionPool() const { return m_pActionPool; }
+
+        /** Returns current-item. */
+        UIVirtualMachineItem *currentItem() const;
+        /** Returns a list of current-items. */
+        QList<UIVirtualMachineItem*> currentItems() const;
+
+        /** Returns whether group saving is in progress. */
+        bool isGroupSavingInProgress() const;
+        /** Returns whether all items of one group is selected. */
+        bool isAllItemsOfOneGroupSelected() const;
+        /** Returns whether single group is selected. */
+        bool isSingleGroupSelected() const;
+
+        /** Returns whether Machine tool of passed @a enmType is opened. */
+        bool isToolOpened(ToolTypeMachine enmType) const;
+        /** Returns whether Global tool of passed @a enmType is opened. */
+        bool isToolOpened(ToolTypeGlobal enmType) const;
+        /** Switches to Machine tool of passed @a enmType. */
+        void switchToTool(ToolTypeMachine enmType);
+        /** Switches to Global tool of passed @a enmType. */
+        void switchToTool(ToolTypeGlobal enmType);
+    /** @} */
+
+public slots:
+
+    /** @name Common stuff.
+      * @{ */
+        /** Handles context-menu request for passed @a position. */
+        void sltHandleContextMenuRequest(const QPoint &position);
+    /** @} */
+
+protected:
+
+    /** @name Event handling stuff.
+      * @{ */
+        /** Handles translation event. */
+        virtual void retranslateUi() /* override */;
+
+        /** Handles show @a pEvent. */
+        virtual void showEvent(QShowEvent *pEvent) /* override */;
+        /** Handles first show @a pEvent. */
+        virtual void polishEvent(QShowEvent *pEvent) /* override */;
+    /** @} */
+
+private slots:
+
+    /** @name Common stuff.
+      * @{ */
+        /** Handles polishing in the async way. */
+        void sltHandlePolishEvent();
+
+        /** Handles signal about Chooser-pane index change.
+          * @param  fUpdateDetails    Brings whether details should be updated.
+          * @param  fUpdateSnapshots  Brings whether snapshots should be updated.
+          * @param  fUpdateLogViewer  Brings whether log-viewer should be updated. */
+        void sltHandleChooserPaneIndexChange(bool fUpdateDetails = true,
+                                             bool fUpdateSnapshots = true,
+                                             bool fUpdateLogViewer = true);
+        /** Handles signal about Chooser-pane index change the default way. */
+        void sltHandleChooserPaneIndexChangeDefault() { sltHandleChooserPaneIndexChange(); }
+    /** @} */
+
+    /** @name Tools stuff.
+      * @{ */
+        /** Handles tools type switch. */
+        void sltHandleToolsTypeSwitch();
+
+        /** Handles request to show Machine tab-bar. */
+        void sltHandleShowTabBarMachine();
+        /** Handles request to show Global tab-bar. */
+        void sltHandleShowTabBarGlobal();
+
+        /** Handles rquest to open Machine tool of passed @a enmType. */
+        void sltHandleToolOpenedMachine(ToolTypeMachine enmType);
+        /** Handles rquest to open Global tool of passed @a enmType. */
+        void sltHandleToolOpenedGlobal(ToolTypeGlobal enmType);
+
+        /** Handles rquest to close Machine tool of passed @a enmType. */
+        void sltHandleToolClosedMachine(ToolTypeMachine enmType);
+        /** Handles rquest to close Global tool of passed @a enmType. */
+        void sltHandleToolClosedGlobal(ToolTypeGlobal enmType);
+    /** @} */
+
+private:
+
+    /** @name Prepare/Cleanup cascade.
+      * @{ */
+        /** Prepares window. */
+        void prepare();
+        /** Prepares toolbar. */
+        void prepareToolbar();
+        /** Prepares widgets. */
+        void prepareWidgets();
+        /** Prepares connections. */
+        void prepareConnections();
+        /** Loads settings. */
+        void loadSettings();
+
+        /** Saves settings. */
+        void saveSettings();
+        /** Cleanups window. */
+        void cleanup();
+    /** @} */
+
+    /** Holds whether the dialog is polished. */
+    bool  m_fPolished : 1;
+
+    /** Holds the action-pool instance. */
+    UIActionPool *m_pActionPool;
+
+    /** Holds the sliding-widget isntance. */
+    UISlidingWidget *m_pSlidingWidget;
+
+    /** Holds the central splitter instance. */
+    QISplitter *m_pSplitter;
+
+    /** Holds the main toolbar instance. */
+    UIToolBar *m_pToolBar;
+
+    /** Holds the Machine tab-bar instance. */
+    UITabBar *m_pTabBarMachine;
+    /** Holds the Global tab-bar instance. */
+    UITabBar *m_pTabBarGlobal;
+    /** Holds the Machine tab-bar action reference. */
+    QAction *m_pActionTabBarMachine;
+    /** Holds the Global tab-bar action reference. */
+    QAction *m_pActionTabBarGlobal;
+
+    /** Holds the Tools-toolbar instance. */
+    UIToolbarTools *m_pToolbarTools;
+
+    /** Holds the Machine Tools order. */
+    QList<ToolTypeMachine>  m_orderMachine;
+    /** Holds the Global Tools order. */
+    QList<ToolTypeGlobal>   m_orderGlobal;
+
+    /** Holds the Chooser-pane instance. */
+    UIChooser         *m_pPaneChooser;
+    /** Holds the Machine Tools-pane instance. */
+    UIToolPaneMachine *m_pPaneToolsMachine;
+    /** Holds the Global Tools-pane instance. */
+    UIToolPaneGlobal  *m_pPaneToolsGlobal;
+};
+
+#endif /* !___UIVirtualBoxManagerWidget_h___ */
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp	(revision 73469)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp	(revision 73492)
@@ -29,5 +29,5 @@
 # include "UIChooserModel.h"
 # include "UIChooserView.h"
-# include "UIVirtualBoxManager.h"
+# include "UIVirtualBoxManagerWidget.h"
 # include "VBoxGlobal.h"
 
@@ -35,7 +35,7 @@
 
 
-UIChooser::UIChooser(UIVirtualBoxManager *pParent)
+UIChooser::UIChooser(UIVirtualBoxManagerWidget *pParent)
     : QWidget(pParent)
-    , m_pSelectorWindow(pParent)
+    , m_pManagerWidget(pParent)
     , m_pMainLayout(0)
     , m_pChooserModel(0)
@@ -69,5 +69,5 @@
 UIActionPool* UIChooser::actionPool() const
 {
-    return selector()->actionPool();
+    return managerWidget()->actionPool();
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h	(revision 73469)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h	(revision 73492)
@@ -28,5 +28,5 @@
 class UIVirtualMachineItem;
 class QVBoxLayout;
-class UIVirtualBoxManager;
+class UIVirtualBoxManagerWidget;
 class UIActionPool;
 class UIChooserModel;
@@ -57,9 +57,9 @@
 
     /* Constructor/destructor: */
-    UIChooser(UIVirtualBoxManager *pParent);
+    UIChooser(UIVirtualBoxManagerWidget *pParent);
     ~UIChooser();
 
-    /** Returns the selector-window reference. */
-    UIVirtualBoxManager* selector() const { return m_pSelectorWindow; }
+    /** Returns the manager-widget reference. */
+    UIVirtualBoxManagerWidget *managerWidget() const { return m_pManagerWidget; }
     /** Returns the action-pool reference. */
     UIActionPool* actionPool() const;
@@ -92,6 +92,6 @@
     void save();
 
-    /** Holds the selector-window reference. */
-    UIVirtualBoxManager* m_pSelectorWindow;
+    /** Holds the manager-widget reference. */
+    UIVirtualBoxManagerWidget *m_pManagerWidget;
 
     /* Variables: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp	(revision 73469)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp	(revision 73492)
@@ -45,5 +45,5 @@
 # include "UIChooserHandlerKeyboard.h"
 # include "UIWizardNewVM.h"
-# include "UIVirtualBoxManager.h"
+# include "UIVirtualBoxManagerWidget.h"
 # include "UIVirtualBoxEventHandler.h"
 # include "UIModalWindowManager.h"
@@ -928,5 +928,5 @@
 
     /* Use the "safe way" to open stack of Mac OS X Sheets: */
-    QWidget *pWizardParent = windowManager().realParentWindow(m_pChooser->selector());
+    QWidget *pWizardParent = windowManager().realParentWindow(m_pChooser->managerWidget());
     UISafePointerWizardNewVM pWizard = new UIWizardNewVM(pWizardParent, strGroupName);
     windowManager().registerNewParent(pWizard, pWizardParent);
