Index: trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 82942)
+++ trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 82944)
@@ -612,4 +612,5 @@
 	src/manager/UIVirtualBoxManagerWidget.h \
 	src/manager/UIVirtualMachineItem.h \
+	src/manager/UIVirtualMachineItemLocal.h \
 	src/manager/UIWelcomePane.h \
 	src/manager/chooser/UIChooser.h \
@@ -1054,4 +1055,5 @@
 	src/manager/UIVirtualBoxManagerWidget.cpp \
 	src/manager/UIVirtualMachineItem.cpp \
+	src/manager/UIVirtualMachineItemLocal.cpp \
 	src/manager/UIWelcomePane.cpp \
 	src/manager/chooser/UIChooser.cpp \
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp	(revision 82942)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp	(revision 82944)
@@ -37,5 +37,5 @@
 #include "UISettingsDialogSpecific.h"
 #include "UIVMLogViewerDialog.h"
-#include "UIVirtualMachineItem.h"
+#include "UIVirtualMachineItemLocal.h"
 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER
 # include "UIUpdateManager.h"
@@ -686,10 +686,13 @@
     UIVirtualMachineItem *pItem = currentItem();
     AssertMsgReturnVoid(pItem, ("Current item should be selected!\n"));
+    /* Make sure current item is local one: */
+    UIVirtualMachineItemLocal *pItemLocal = pItem->toLocal();
+    AssertMsgReturnVoid(pItemLocal, ("Current item should be local one!\n"));
 
     /* Use the "safe way" to open stack of Mac OS X Sheets: */
     QWidget *pWizardParent = windowManager().realParentWindow(this);
-    const QStringList &machineGroupNames = pItem->groups();
+    const QStringList &machineGroupNames = pItemLocal->groups();
     const QString strGroup = !machineGroupNames.isEmpty() ? machineGroupNames.at(0) : QString();
-    UISafePointerWizard pWizard = new UIWizardCloneVM(pWizardParent, pItem->machine(), strGroup);
+    UISafePointerWizard pWizard = new UIWizardCloneVM(pWizardParent, pItemLocal->machine(), strGroup);
     windowManager().registerNewParent(pWizard, pWizardParent);
     pWizard->prepare();
@@ -1086,4 +1089,9 @@
     foreach (UIVirtualMachineItem *pItem, items)
     {
+        /* Make sure current item is local one: */
+        UIVirtualMachineItemLocal *pItemLocal = pItem->toLocal();
+        if (!pItemLocal)
+            continue;
+
         /* Check if log could be show for the current item: */
         if (!isActionEnabled(UIActionIndexST_M_Group_S_ShowLogDialog, QList<UIVirtualMachineItem*>() << pItem))
@@ -1092,11 +1100,11 @@
         QIManagerDialog *pLogViewerDialog = 0;
         /* Create and Show VM Log Viewer: */
-        if (!m_logViewers[pItem->machine().GetHardwareUUID().toString()])
-        {
-            UIVMLogViewerDialogFactory dialogFactory(actionPool(), pItem->machine());
+        if (!m_logViewers[pItemLocal->machine().GetHardwareUUID().toString()])
+        {
+            UIVMLogViewerDialogFactory dialogFactory(actionPool(), pItemLocal->machine());
             dialogFactory.prepare(pLogViewerDialog, this);
             if (pLogViewerDialog)
             {
-                m_logViewers[pItem->machine().GetHardwareUUID().toString()] = pLogViewerDialog;
+                m_logViewers[pItemLocal->machine().GetHardwareUUID().toString()] = pLogViewerDialog;
                 connect(pLogViewerDialog, &QIManagerDialog::sigClose,
                         this, &UIVirtualBoxManager::sltCloseLogViewerWindow);
@@ -1105,5 +1113,5 @@
         else
         {
-            pLogViewerDialog = m_logViewers[pItem->machine().GetHardwareUUID().toString()];
+            pLogViewerDialog = m_logViewers[pItemLocal->machine().GetHardwareUUID().toString()];
         }
         if (pLogViewerDialog)
@@ -1166,4 +1174,9 @@
     foreach (UIVirtualMachineItem *pItem, items)
     {
+        /* Make sure current item is local one: */
+        UIVirtualMachineItemLocal *pItemLocal = pItem->toLocal();
+        if (!pItemLocal)
+            continue;
+
         /* Check if that item could be shown in file-browser: */
         if (!isActionEnabled(UIActionIndexST_M_Group_S_ShowInFileManager, QList<UIVirtualMachineItem*>() << pItem))
@@ -1171,5 +1184,5 @@
 
         /* Show VM in filebrowser: */
-        UIDesktopServices::openInFileManager(pItem->machine().GetSettingsFilePath());
+        UIDesktopServices::openInFileManager(pItemLocal->machine().GetSettingsFilePath());
     }
 }
@@ -1184,4 +1197,9 @@
     foreach (UIVirtualMachineItem *pItem, items)
     {
+        /* Make sure current item is local one: */
+        UIVirtualMachineItemLocal *pItemLocal = pItem->toLocal();
+        if (!pItemLocal)
+            continue;
+
         /* Check if shortcuts could be created for this item: */
         if (!isActionEnabled(UIActionIndexST_M_Group_S_CreateShortcut, QList<UIVirtualMachineItem*>() << pItem))
@@ -1189,5 +1207,5 @@
 
         /* Create shortcut for this VM: */
-        const CMachine &comMachine = pItem->machine();
+        const CMachine &comMachine = pItemLocal->machine();
         UIDesktopServices::createMachineShortcut(comMachine.GetSettingsFilePath(),
                                                  QStandardPaths::writableLocation(QStandardPaths::DesktopLocation),
@@ -1610,16 +1628,20 @@
                 && fStartConfirmed))
         {
-            /* Fetch item launch mode: */
-            UICommon::LaunchMode enmItemLaunchMode = enmLaunchMode;
-            if (enmItemLaunchMode == UICommon::LaunchMode_Invalid)
-                enmItemLaunchMode = pItem->isItemRunningHeadless()
-                                  ? UICommon::LaunchMode_Separate
-                                  : qApp->keyboardModifiers() == Qt::ShiftModifier
-                                  ? UICommon::LaunchMode_Headless
-                                  : UICommon::LaunchMode_Default;
-
-            /* Launch current VM: */
-            CMachine machine = pItem->machine();
-            uiCommon().launchMachine(machine, enmItemLaunchMode);
+            /* Make sure item is local one: */
+            if (pItem->itemType() == UIVirtualMachineItem::ItemType_Local)
+            {
+                /* Fetch item launch mode: */
+                UICommon::LaunchMode enmItemLaunchMode = enmLaunchMode;
+                if (enmItemLaunchMode == UICommon::LaunchMode_Invalid)
+                    enmItemLaunchMode = pItem->isItemRunningHeadless()
+                                      ? UICommon::LaunchMode_Separate
+                                      : qApp->keyboardModifiers() == Qt::ShiftModifier
+                                      ? UICommon::LaunchMode_Headless
+                                      : UICommon::LaunchMode_Default;
+
+                /* Launch current VM: */
+                CMachine machine = pItem->toLocal()->machine();
+                uiCommon().launchMachine(machine, enmItemLaunchMode);
+            }
         }
     }
@@ -2074,5 +2096,8 @@
     foreach (UIVirtualMachineItem *pItem, items)
     {
-        if (pItem->isItemStarted() && (pItem->canSwitchTo() || pItem->isItemRunningHeadless()))
+        if (   pItem->toLocal()
+            && pItem->isItemStarted()
+            && (   pItem->toLocal()->canSwitchTo()
+                || pItem->isItemRunningHeadless()))
             return true;
     }
@@ -2085,6 +2110,10 @@
     foreach (UIVirtualMachineItem *pItem, items)
     {
-        if ((pItem->isItemPoweredOff() && pItem->isItemEditable()) ||
-            (pItem->isItemStarted() && (pItem->canSwitchTo() || pItem->isItemRunningHeadless())))
+        if (   pItem->toLocal()
+            && (   (   pItem->isItemPoweredOff()
+                    && pItem->isItemEditable())
+                || (   pItem->isItemStarted()
+                    && (   pItem->toLocal()->canSwitchTo()
+                        || pItem->isItemRunningHeadless()))))
             return true;
     }
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp	(revision 82942)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp	(revision 82944)
@@ -32,5 +32,5 @@
 #include "UITabBar.h"
 #include "UIToolBar.h"
-#include "UIVirtualMachineItem.h"
+#include "UIVirtualMachineItemLocal.h"
 #include "UITools.h"
 #ifndef VBOX_WS_MAC
@@ -720,5 +720,6 @@
         m_pPaneToolsMachine->setItems(currentItems());
         /* Propagate current machine to update the Snapshots-pane or/and Logviewer-pane: */
-        m_pPaneToolsMachine->setMachine(pItem->machine());
+        if (pItem->itemType() == UIVirtualMachineItem::ItemType_Local)
+            m_pPaneToolsMachine->setMachine(pItem->toLocal()->machine());
     }
     else
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItem.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItem.cpp	(revision 82942)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItem.cpp	(revision 82944)
@@ -16,19 +16,6 @@
  */
 
-/* Qt includes: */
-#include <QFileInfo>
-#include <QIcon>
-
 /* GUI includes: */
-#include "UIVirtualMachineItem.h"
-#include "UICommon.h"
-#include "UIConverter.h"
-#include "UIExtraDataManager.h"
-#ifdef VBOX_WS_MAC
-# include <ApplicationServices/ApplicationServices.h>
-#endif /* VBOX_WS_MAC */
-
-/* COM includes: */
-#include "CSnapshot.h"
+#include "UIVirtualMachineItemLocal.h"
 
 
@@ -37,18 +24,22 @@
 *********************************************************************************************************************************/
 
-UIVirtualMachineItem::UIVirtualMachineItem(const CMachine &comMachine)
-    : m_comMachine(comMachine)
+UIVirtualMachineItem::UIVirtualMachineItem(ItemType enmType)
+    : m_enmType(enmType)
     , m_fAccessible(false)
-    , m_cSnaphot(0)
     , m_enmMachineState(KMachineState_Null)
-    , m_enmSessionState(KSessionState_Null)
     , m_enmConfigurationAccessLevel(ConfigurationAccessLevel_Null)
     , m_fHasDetails(false)
 {
-    recache();
 }
 
 UIVirtualMachineItem::~UIVirtualMachineItem()
 {
+}
+
+UIVirtualMachineItemLocal *UIVirtualMachineItem::toLocal()
+{
+    return   itemType() == ItemType_Local
+           ? static_cast<UIVirtualMachineItemLocal*>(this)
+           : 0;
 }
 
@@ -58,272 +49,4 @@
         *pLogicalSize = m_logicalPixmapSize;
     return m_pixmap;
-}
-
-void UIVirtualMachineItem::recache()
-{
-    /* Determine attributes which are always available: */
-    m_strId = m_comMachine.GetId().toString();
-    m_strSettingsFile = m_comMachine.GetSettingsFilePath();
-
-    /* Now determine whether VM is accessible: */
-    m_fAccessible = m_comMachine.GetAccessible();
-    if (m_fAccessible)
-    {
-        /* Reset last access error information: */
-        m_comAccessError = CVirtualBoxErrorInfo();
-
-        /* Determine own VM attributes: */
-        m_strName = m_comMachine.GetName();
-        m_strOSTypeId = m_comMachine.GetOSTypeId();
-        m_groups = m_comMachine.GetGroups().toList();
-
-        /* Determine snapshot attributes: */
-        CSnapshot comSnapshot = m_comMachine.GetCurrentSnapshot();
-        m_strSnapshotName = comSnapshot.isNull() ? QString() : comSnapshot.GetName();
-        m_lastStateChange.setTime_t(m_comMachine.GetLastStateChange() / 1000);
-        m_cSnaphot = m_comMachine.GetSnapshotCount();
-
-        /* Determine VM states: */
-        m_enmMachineState = m_comMachine.GetState();
-        m_strMachineStateName = gpConverter->toString(m_enmMachineState);
-        m_machineStateIcon = gpConverter->toIcon(m_enmMachineState);
-        m_enmSessionState = m_comMachine.GetSessionState();
-        m_strSessionStateName = gpConverter->toString(m_enmSessionState);
-
-        /* Determine configuration access level: */
-        m_enmConfigurationAccessLevel = ::configurationAccessLevel(m_enmSessionState, m_enmMachineState);
-        /* Also take restrictions into account: */
-        if (   m_enmConfigurationAccessLevel != ConfigurationAccessLevel_Null
-            && !gEDataManager->machineReconfigurationEnabled(m_strId))
-            m_enmConfigurationAccessLevel = ConfigurationAccessLevel_Null;
-
-        /* Determine PID finally: */
-        if (   m_enmMachineState == KMachineState_PoweredOff
-            || m_enmMachineState == KMachineState_Saved
-            || m_enmMachineState == KMachineState_Teleported
-            || m_enmMachineState == KMachineState_Aborted
-           )
-        {
-            m_pid = (ULONG) ~0;
-        }
-        else
-        {
-            m_pid = m_comMachine.GetSessionPID();
-        }
-
-        /* Determine whether we should show this VM details: */
-        m_fHasDetails = gEDataManager->showMachineInVirtualBoxManagerDetails(m_strId);
-    }
-    else
-    {
-        /* Update last access error information: */
-        m_comAccessError = m_comMachine.GetAccessError();
-
-        /* Determine machine name on the basis of settings file only: */
-        QFileInfo fi(m_strSettingsFile);
-        m_strName = UICommon::hasAllowedExtension(fi.completeSuffix(), VBoxFileExts)
-                  ? fi.completeBaseName()
-                  : fi.fileName();
-        /* Reset other VM attributes: */
-        m_strOSTypeId = QString();
-        m_groups.clear();
-
-        /* Reset snapshot attributes: */
-        m_strSnapshotName = QString();
-        m_lastStateChange = QDateTime::currentDateTime();
-        m_cSnaphot = 0;
-
-        /* Reset VM states: */
-        m_enmMachineState = KMachineState_Null;
-        m_machineStateIcon = gpConverter->toIcon(KMachineState_Aborted);
-        m_enmSessionState = KSessionState_Null;
-
-        /* Reset configuration access level: */
-        m_enmConfigurationAccessLevel = ConfigurationAccessLevel_Null;
-
-        /* Reset PID finally: */
-        m_pid = (ULONG) ~0;
-
-        /* Reset whether we should show this VM details: */
-        m_fHasDetails = true;
-    }
-
-    /* Recache item pixmap: */
-    recachePixmap();
-
-    /* Retranslate finally: */
-    retranslateUi();
-}
-
-void UIVirtualMachineItem::recachePixmap()
-{
-    /* If machine is accessible: */
-    if (m_fAccessible)
-    {
-        /* First, we are trying to acquire personal machine guest OS type icon: */
-        m_pixmap = uiCommon().vmUserPixmapDefault(m_comMachine, &m_logicalPixmapSize);
-        /* If there is nothing, we are using icon corresponding to cached guest OS type: */
-        if (m_pixmap.isNull())
-            m_pixmap = uiCommon().vmGuestOSTypePixmapDefault(m_strOSTypeId, &m_logicalPixmapSize);
-    }
-    /* Otherwise: */
-    else
-    {
-        /* We are using "Other" guest OS type icon: */
-        m_pixmap = uiCommon().vmGuestOSTypePixmapDefault("Other", &m_logicalPixmapSize);
-    }
-}
-
-bool UIVirtualMachineItem::canSwitchTo() const
-{
-    return const_cast <CMachine&>(m_comMachine).CanShowConsoleWindow();
-}
-
-bool UIVirtualMachineItem::switchTo()
-{
-#ifdef VBOX_WS_MAC
-    ULONG64 id = m_comMachine.ShowConsoleWindow();
-#else
-    WId id = (WId) m_comMachine.ShowConsoleWindow();
-#endif
-    AssertWrapperOk(m_comMachine);
-    if (!m_comMachine.isOk())
-        return false;
-
-    /* winId = 0 it means the console window has already done everything
-     * necessary to implement the "show window" semantics. */
-    if (id == 0)
-        return true;
-
-#if defined (VBOX_WS_WIN) || defined (VBOX_WS_X11)
-
-    return uiCommon().activateWindow(id, true);
-
-#elif defined (VBOX_WS_MAC)
-
-    // WORKAROUND:
-    // This is just for the case were the other process cannot steal
-    // the focus from us. It will send us a PSN so we can try.
-    ProcessSerialNumber psn;
-    psn.highLongOfPSN = id >> 32;
-    psn.lowLongOfPSN = (UInt32)id;
-    OSErr rc = ::SetFrontProcess(&psn);
-    if (!rc)
-        Log(("GUI: %#RX64 couldn't do SetFrontProcess on itself, the selector (we) had to do it...\n", id));
-    else
-        Log(("GUI: Failed to bring %#RX64 to front. rc=%#x\n", id, rc));
-    return !rc;
-
-#else
-
-    return false;
-
-#endif
-}
-
-bool UIVirtualMachineItem::isItemEditable() const
-{
-    return    accessible()
-           && sessionState() == KSessionState_Unlocked;
-}
-
-bool UIVirtualMachineItem::isItemSaved() const
-{
-    return    accessible()
-           && machineState() == KMachineState_Saved;
-}
-
-bool UIVirtualMachineItem::isItemPoweredOff() const
-{
-    return    accessible()
-           && (   machineState() == KMachineState_PoweredOff
-               || machineState() == KMachineState_Saved
-               || machineState() == KMachineState_Teleported
-               || machineState() == KMachineState_Aborted);
-}
-
-bool UIVirtualMachineItem::isItemStarted() const
-{
-    return    isItemRunning()
-           || isItemPaused();
-}
-
-bool UIVirtualMachineItem::isItemRunning() const
-{
-    return    accessible()
-           && (   machineState() == KMachineState_Running
-               || machineState() == KMachineState_Teleporting
-               || machineState() == KMachineState_LiveSnapshotting);
-}
-
-bool UIVirtualMachineItem::isItemRunningHeadless() const
-{
-    if (isItemRunning())
-    {
-        /* Open session to determine which frontend VM is started with: */
-        CSession comSession = uiCommon().openExistingSession(id());
-        if (!comSession.isNull())
-        {
-            /* Acquire the session name: */
-            const QString strSessionName = comSession.GetMachine().GetSessionName();
-            /* Close the session early: */
-            comSession.UnlockMachine();
-            /* Check whether we are in 'headless' session: */
-            return strSessionName == "headless";
-        }
-    }
-    return false;
-}
-
-bool UIVirtualMachineItem::isItemPaused() const
-{
-    return    accessible()
-           && (   machineState() == KMachineState_Paused
-               || machineState() == KMachineState_TeleportingPausedVM);
-}
-
-bool UIVirtualMachineItem::isItemStuck() const
-{
-    return    accessible()
-           && machineState() == KMachineState_Stuck;
-}
-
-void UIVirtualMachineItem::retranslateUi()
-{
-    /* This is used in tool-tip generation: */
-    const QString strDateTime = (m_lastStateChange.date() == QDate::currentDate())
-                              ? m_lastStateChange.time().toString(Qt::LocalDate)
-                              : m_lastStateChange.toString(Qt::LocalDate);
-
-    /* If machine is accessible: */
-    if (m_fAccessible)
-    {
-        /* Update tool-tip: */
-        m_strToolTipText = QString("<b>%1</b>").arg(m_strName);
-        if (!m_strSnapshotName.isNull())
-            m_strToolTipText += QString(" (%1)").arg(m_strSnapshotName);
-        m_strToolTipText = tr("<nobr>%1<br></nobr>"
-                              "<nobr>%2 since %3</nobr><br>"
-                              "<nobr>Session %4</nobr>",
-                              "VM tooltip (name, last state change, session state)")
-                              .arg(m_strToolTipText)
-                              .arg(gpConverter->toString(m_enmMachineState))
-                              .arg(strDateTime)
-                              .arg(gpConverter->toString(m_enmSessionState).toLower());
-    }
-    /* Otherwise: */
-    else
-    {
-        /* Update tool-tip: */
-        m_strToolTipText = tr("<nobr><b>%1</b><br></nobr>"
-                              "<nobr>Inaccessible since %2</nobr>",
-                              "Inaccessible VM tooltip (name, last state change)")
-                              .arg(m_strSettingsFile)
-                              .arg(strDateTime);
-
-        /* We have our own translation for Null states: */
-        m_strMachineStateName = tr("Inaccessible");
-        m_strSessionStateName = tr("Inaccessible");
-    }
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItem.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItem.h	(revision 82942)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItem.h	(revision 82944)
@@ -23,5 +23,4 @@
 
 /* Qt includes: */
-#include <QDateTime>
 #include <QIcon>
 #include <QMimeData>
@@ -34,6 +33,8 @@
 /* COM includes: */
 #include "COMEnums.h"
-#include "CMachine.h"
 #include "CVirtualBoxErrorInfo.h"
+
+/* Forward declarations: */
+class UIVirtualMachineItemLocal;
 
 /* Using declarations: */
@@ -47,13 +48,18 @@
 public:
 
-    /** Constructs local VM item on the basis of taken @a comMachine. */
-    UIVirtualMachineItem(const CMachine &comMachine);
-    /** Destructs local VM item. */
+    /** Item types. */
+    enum ItemType { ItemType_Local };
+
+    /** Constructs VM item on the basis of taken @a enmType. */
+    UIVirtualMachineItem(ItemType enmType);
+    /** Destructs VM item. */
     virtual ~UIVirtualMachineItem();
 
-    /** @name Arguments.
-      * @{ */
-        /** Returns cached virtual machine object. */
-        CMachine machine() const { return m_comMachine; }
+    /** @name RTTI stuff.
+      * @{ */
+        /** Returns item type. */
+        ItemType itemType() const { return m_enmType; }
+        /** Returns item casted to local type. */
+        UIVirtualMachineItemLocal *toLocal();
     /** @} */
 
@@ -70,6 +76,4 @@
         /** Returns cached machine id. */
         QString id() const { return m_strId; }
-        /** Returns cached machine settings file name. */
-        QString settingsFile() const { return m_strSettingsFile; }
         /** Returns cached machine name. */
         QString name() const { return m_strName; }
@@ -79,14 +83,4 @@
           * @param  pLogicalSize  Argument to assign actual pixmap size to. */
         QPixmap osPixmap(QSize *pLogicalSize = 0) const;
-        /** Returns cached machine group list. */
-        const QStringList &groups() { return m_groups; }
-    /** @} */
-
-    /** @name Snapshot attributes.
-      * @{ */
-        /** Returns cached snapshot name. */
-        QString snapshotName() const { return m_strSnapshotName; }
-        /** Returns cached snapshot children count. */
-        ULONG snapshotCount() const { return m_cSnaphot; }
     /** @} */
 
@@ -100,9 +94,4 @@
         QIcon machineStateIcon() const { return m_machineStateIcon; }
 
-        /** Returns cached session state. */
-        KSessionState sessionState() const { return m_enmSessionState; }
-        /** Returns cached session state name. */
-        QString sessionStateName() const { return m_strSessionStateName; }
-
         /** Returns cached configuration access level. */
         ConfigurationAccessLevel configurationAccessLevel() const { return m_enmConfigurationAccessLevel; }
@@ -115,13 +104,4 @@
     /** @} */
 
-    /** @name Console attributes.
-      * @{ */
-        /** Returns whether we can switch to main window of VM process. */
-        bool canSwitchTo() const;
-        /** Tries to switch to the main window of the VM process.
-          * @return true if switched successfully. */
-        bool switchTo();
-    /** @} */
-
     /** @name Extra-data options.
       * @{ */
@@ -133,7 +113,7 @@
       * @{ */
         /** Recaches machine data. */
-        void recache();
+        virtual void recache() = 0;
         /** Recaches machine item pixmap. */
-        void recachePixmap();
+        virtual void recachePixmap() = 0;
     /** @} */
 
@@ -141,35 +121,27 @@
       * @{ */
         /** Returns whether passed machine @a pItem is editable. */
-        bool isItemEditable() const;
+        virtual bool isItemEditable() const = 0;
         /** Returns whether passed machine @a pItem is saved. */
-        bool isItemSaved() const;
+        virtual bool isItemSaved() const = 0;
         /** Returns whether passed machine @a pItem is powered off. */
-        bool isItemPoweredOff() const;
+        virtual bool isItemPoweredOff() const = 0;
         /** Returns whether passed machine @a pItem is started. */
-        bool isItemStarted() const;
+        virtual bool isItemStarted() const = 0;
         /** Returns whether passed machine @a pItem is running. */
-        bool isItemRunning() const;
+        virtual bool isItemRunning() const = 0;
         /** Returns whether passed machine @a pItem is running headless. */
-        bool isItemRunningHeadless() const;
+        virtual bool isItemRunningHeadless() const = 0;
         /** Returns whether passed machine @a pItem is paused. */
-        bool isItemPaused() const;
+        virtual bool isItemPaused() const = 0;
         /** Returns whether passed machine @a pItem is stuck. */
-        bool isItemStuck() const;
+        virtual bool isItemStuck() const = 0;
     /** @} */
 
 protected:
 
-    /** @name Event handling.
-      * @{ */
-        /** Handles translation event. */
-        virtual void retranslateUi() /* override */;
-    /** @} */
-
-private:
-
-    /** @name Arguments.
-      * @{ */
-        /** Holds cached machine object reference. */
-        CMachine  m_comMachine;
+    /** @name RTTI stuff.
+      * @{ */
+        /** Holds item type. */
+        ItemType  m_enmType;
     /** @} */
 
@@ -186,6 +158,4 @@
         /** Holds cached machine id. */
         QString      m_strId;
-        /** Holds cached machine settings file name. */
-        QString      m_strSettingsFile;
         /** Holds cached machine name. */
         QString      m_strName;
@@ -196,16 +166,4 @@
         /** Holds cached machine OS type pixmap size. */
         QSize        m_logicalPixmapSize;
-        /** Holds cached machine group list. */
-        QStringList  m_groups;
-    /** @} */
-
-    /** @name Snapshot attributes.
-      * @{ */
-        /** Holds cached snapshot name. */
-        QString    m_strSnapshotName;
-        /** Holds cached last state change date/time. */
-        QDateTime  m_lastStateChange;
-        /** Holds cached snapshot children count. */
-        ULONG      m_cSnaphot;
     /** @} */
 
@@ -219,9 +177,4 @@
         QIcon                     m_machineStateIcon;
 
-        /** Holds cached session state. */
-        KSessionState             m_enmSessionState;
-        /** Holds cached session state name. */
-        QString                   m_strSessionStateName;
-
         /** Holds configuration access level. */
         ConfigurationAccessLevel  m_enmConfigurationAccessLevel;
@@ -232,10 +185,4 @@
         /** Holds cached machine tool-tip. */
         QString  m_strToolTipText;
-    /** @} */
-
-    /** @name Console attributes.
-      * @{ */
-        /** Holds machine PID. */
-        ULONG  m_pid;
     /** @} */
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemLocal.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemLocal.cpp	(revision 82944)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemLocal.cpp	(revision 82944)
@@ -0,0 +1,318 @@
+/* $Id$ */
+/** @file
+ * VBox Qt GUI - UIVirtualMachineItem class implementation.
+ */
+
+/*
+ * Copyright (C) 2006-2020 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.
+ */
+
+/* Qt includes: */
+#include <QFileInfo>
+#include <QIcon>
+
+/* GUI includes: */
+#include "UIVirtualMachineItemLocal.h"
+#include "UICommon.h"
+#include "UIConverter.h"
+#include "UIExtraDataManager.h"
+#ifdef VBOX_WS_MAC
+# include <ApplicationServices/ApplicationServices.h>
+#endif /* VBOX_WS_MAC */
+
+/* COM includes: */
+#include "CSnapshot.h"
+
+
+/*********************************************************************************************************************************
+*   Class UIVirtualMachineItemLocal implementation.                                                                              *
+*********************************************************************************************************************************/
+
+UIVirtualMachineItemLocal::UIVirtualMachineItemLocal(const CMachine &comMachine)
+    : UIVirtualMachineItem(ItemType_Local)
+    , m_comMachine(comMachine)
+    , m_cSnaphot(0)
+    , m_enmSessionState(KSessionState_Null)
+{
+    recache();
+}
+
+UIVirtualMachineItemLocal::~UIVirtualMachineItemLocal()
+{
+}
+
+void UIVirtualMachineItemLocal::recache()
+{
+    /* Determine attributes which are always available: */
+    m_strId = m_comMachine.GetId().toString();
+    m_strSettingsFile = m_comMachine.GetSettingsFilePath();
+
+    /* Now determine whether VM is accessible: */
+    m_fAccessible = m_comMachine.GetAccessible();
+    if (m_fAccessible)
+    {
+        /* Reset last access error information: */
+        m_comAccessError = CVirtualBoxErrorInfo();
+
+        /* Determine own VM attributes: */
+        m_strName = m_comMachine.GetName();
+        m_strOSTypeId = m_comMachine.GetOSTypeId();
+        m_groups = m_comMachine.GetGroups().toList();
+
+        /* Determine snapshot attributes: */
+        CSnapshot comSnapshot = m_comMachine.GetCurrentSnapshot();
+        m_strSnapshotName = comSnapshot.isNull() ? QString() : comSnapshot.GetName();
+        m_lastStateChange.setTime_t(m_comMachine.GetLastStateChange() / 1000);
+        m_cSnaphot = m_comMachine.GetSnapshotCount();
+
+        /* Determine VM states: */
+        m_enmMachineState = m_comMachine.GetState();
+        m_strMachineStateName = gpConverter->toString(m_enmMachineState);
+        m_machineStateIcon = gpConverter->toIcon(m_enmMachineState);
+        m_enmSessionState = m_comMachine.GetSessionState();
+        m_strSessionStateName = gpConverter->toString(m_enmSessionState);
+
+        /* Determine configuration access level: */
+        m_enmConfigurationAccessLevel = ::configurationAccessLevel(m_enmSessionState, m_enmMachineState);
+        /* Also take restrictions into account: */
+        if (   m_enmConfigurationAccessLevel != ConfigurationAccessLevel_Null
+            && !gEDataManager->machineReconfigurationEnabled(m_strId))
+            m_enmConfigurationAccessLevel = ConfigurationAccessLevel_Null;
+
+        /* Determine PID finally: */
+        if (   m_enmMachineState == KMachineState_PoweredOff
+            || m_enmMachineState == KMachineState_Saved
+            || m_enmMachineState == KMachineState_Teleported
+            || m_enmMachineState == KMachineState_Aborted
+           )
+        {
+            m_pid = (ULONG) ~0;
+        }
+        else
+        {
+            m_pid = m_comMachine.GetSessionPID();
+        }
+
+        /* Determine whether we should show this VM details: */
+        m_fHasDetails = gEDataManager->showMachineInVirtualBoxManagerDetails(m_strId);
+    }
+    else
+    {
+        /* Update last access error information: */
+        m_comAccessError = m_comMachine.GetAccessError();
+
+        /* Determine machine name on the basis of settings file only: */
+        QFileInfo fi(m_strSettingsFile);
+        m_strName = UICommon::hasAllowedExtension(fi.completeSuffix(), VBoxFileExts)
+                  ? fi.completeBaseName()
+                  : fi.fileName();
+        /* Reset other VM attributes: */
+        m_strOSTypeId = QString();
+        m_groups.clear();
+
+        /* Reset snapshot attributes: */
+        m_strSnapshotName = QString();
+        m_lastStateChange = QDateTime::currentDateTime();
+        m_cSnaphot = 0;
+
+        /* Reset VM states: */
+        m_enmMachineState = KMachineState_Null;
+        m_machineStateIcon = gpConverter->toIcon(KMachineState_Aborted);
+        m_enmSessionState = KSessionState_Null;
+
+        /* Reset configuration access level: */
+        m_enmConfigurationAccessLevel = ConfigurationAccessLevel_Null;
+
+        /* Reset PID finally: */
+        m_pid = (ULONG) ~0;
+
+        /* Reset whether we should show this VM details: */
+        m_fHasDetails = true;
+    }
+
+    /* Recache item pixmap: */
+    recachePixmap();
+
+    /* Retranslate finally: */
+    retranslateUi();
+}
+
+void UIVirtualMachineItemLocal::recachePixmap()
+{
+    /* If machine is accessible: */
+    if (m_fAccessible)
+    {
+        /* First, we are trying to acquire personal machine guest OS type icon: */
+        m_pixmap = uiCommon().vmUserPixmapDefault(m_comMachine, &m_logicalPixmapSize);
+        /* If there is nothing, we are using icon corresponding to cached guest OS type: */
+        if (m_pixmap.isNull())
+            m_pixmap = uiCommon().vmGuestOSTypePixmapDefault(m_strOSTypeId, &m_logicalPixmapSize);
+    }
+    /* Otherwise: */
+    else
+    {
+        /* We are using "Other" guest OS type icon: */
+        m_pixmap = uiCommon().vmGuestOSTypePixmapDefault("Other", &m_logicalPixmapSize);
+    }
+}
+
+bool UIVirtualMachineItemLocal::canSwitchTo() const
+{
+    return const_cast <CMachine&>(m_comMachine).CanShowConsoleWindow();
+}
+
+bool UIVirtualMachineItemLocal::switchTo()
+{
+#ifdef VBOX_WS_MAC
+    ULONG64 id = m_comMachine.ShowConsoleWindow();
+#else
+    WId id = (WId) m_comMachine.ShowConsoleWindow();
+#endif
+    AssertWrapperOk(m_comMachine);
+    if (!m_comMachine.isOk())
+        return false;
+
+    /* winId = 0 it means the console window has already done everything
+     * necessary to implement the "show window" semantics. */
+    if (id == 0)
+        return true;
+
+#if defined (VBOX_WS_WIN) || defined (VBOX_WS_X11)
+
+    return uiCommon().activateWindow(id, true);
+
+#elif defined (VBOX_WS_MAC)
+
+    // WORKAROUND:
+    // This is just for the case were the other process cannot steal
+    // the focus from us. It will send us a PSN so we can try.
+    ProcessSerialNumber psn;
+    psn.highLongOfPSN = id >> 32;
+    psn.lowLongOfPSN = (UInt32)id;
+    OSErr rc = ::SetFrontProcess(&psn);
+    if (!rc)
+        Log(("GUI: %#RX64 couldn't do SetFrontProcess on itself, the selector (we) had to do it...\n", id));
+    else
+        Log(("GUI: Failed to bring %#RX64 to front. rc=%#x\n", id, rc));
+    return !rc;
+
+#else
+
+    return false;
+
+#endif
+}
+
+bool UIVirtualMachineItemLocal::isItemEditable() const
+{
+    return    accessible()
+           && sessionState() == KSessionState_Unlocked;
+}
+
+bool UIVirtualMachineItemLocal::isItemSaved() const
+{
+    return    accessible()
+           && machineState() == KMachineState_Saved;
+}
+
+bool UIVirtualMachineItemLocal::isItemPoweredOff() const
+{
+    return    accessible()
+           && (   machineState() == KMachineState_PoweredOff
+               || machineState() == KMachineState_Saved
+               || machineState() == KMachineState_Teleported
+               || machineState() == KMachineState_Aborted);
+}
+
+bool UIVirtualMachineItemLocal::isItemStarted() const
+{
+    return    isItemRunning()
+           || isItemPaused();
+}
+
+bool UIVirtualMachineItemLocal::isItemRunning() const
+{
+    return    accessible()
+           && (   machineState() == KMachineState_Running
+               || machineState() == KMachineState_Teleporting
+               || machineState() == KMachineState_LiveSnapshotting);
+}
+
+bool UIVirtualMachineItemLocal::isItemRunningHeadless() const
+{
+    if (isItemRunning())
+    {
+        /* Open session to determine which frontend VM is started with: */
+        CSession comSession = uiCommon().openExistingSession(id());
+        if (!comSession.isNull())
+        {
+            /* Acquire the session name: */
+            const QString strSessionName = comSession.GetMachine().GetSessionName();
+            /* Close the session early: */
+            comSession.UnlockMachine();
+            /* Check whether we are in 'headless' session: */
+            return strSessionName == "headless";
+        }
+    }
+    return false;
+}
+
+bool UIVirtualMachineItemLocal::isItemPaused() const
+{
+    return    accessible()
+           && (   machineState() == KMachineState_Paused
+               || machineState() == KMachineState_TeleportingPausedVM);
+}
+
+bool UIVirtualMachineItemLocal::isItemStuck() const
+{
+    return    accessible()
+           && machineState() == KMachineState_Stuck;
+}
+
+void UIVirtualMachineItemLocal::retranslateUi()
+{
+    /* This is used in tool-tip generation: */
+    const QString strDateTime = (m_lastStateChange.date() == QDate::currentDate())
+                              ? m_lastStateChange.time().toString(Qt::LocalDate)
+                              : m_lastStateChange.toString(Qt::LocalDate);
+
+    /* If machine is accessible: */
+    if (m_fAccessible)
+    {
+        /* Update tool-tip: */
+        m_strToolTipText = QString("<b>%1</b>").arg(m_strName);
+        if (!m_strSnapshotName.isNull())
+            m_strToolTipText += QString(" (%1)").arg(m_strSnapshotName);
+        m_strToolTipText = tr("<nobr>%1<br></nobr>"
+                              "<nobr>%2 since %3</nobr><br>"
+                              "<nobr>Session %4</nobr>",
+                              "VM tooltip (name, last state change, session state)")
+                              .arg(m_strToolTipText)
+                              .arg(gpConverter->toString(m_enmMachineState))
+                              .arg(strDateTime)
+                              .arg(gpConverter->toString(m_enmSessionState).toLower());
+    }
+    /* Otherwise: */
+    else
+    {
+        /* Update tool-tip: */
+        m_strToolTipText = tr("<nobr><b>%1</b><br></nobr>"
+                              "<nobr>Inaccessible since %2</nobr>",
+                              "Inaccessible VM tooltip (name, last state change)")
+                              .arg(m_strSettingsFile)
+                              .arg(strDateTime);
+
+        /* We have our own translation for Null states: */
+        m_strMachineStateName = tr("Inaccessible");
+        m_strSessionStateName = tr("Inaccessible");
+    }
+}
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemLocal.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemLocal.h	(revision 82944)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemLocal.h	(revision 82944)
@@ -0,0 +1,161 @@
+/* $Id$ */
+/** @file
+ * VBox Qt GUI - UIVirtualMachineItemLocal class declarations.
+ */
+
+/*
+ * Copyright (C) 2006-2020 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 FEQT_INCLUDED_SRC_manager_UIVirtualMachineItemLocal_h
+#define FEQT_INCLUDED_SRC_manager_UIVirtualMachineItemLocal_h
+#ifndef RT_WITHOUT_PRAGMA_ONCE
+# pragma once
+#endif
+
+/* Qt includes: */
+#include <QDateTime>
+
+/* GUI includes: */
+#include "UIVirtualMachineItem.h"
+
+/* COM includes: */
+#include "CMachine.h"
+
+/** UIVirtualMachineItem sub-class used as local Virtual Machine item interface. */
+class UIVirtualMachineItemLocal : public UIVirtualMachineItem
+{
+    Q_OBJECT;
+
+public:
+
+    /** Constructs local VM item on the basis of taken @a comMachine. */
+    UIVirtualMachineItemLocal(const CMachine &comMachine);
+    /** Destructs local VM item. */
+    virtual ~UIVirtualMachineItemLocal();
+
+    /** @name Arguments.
+      * @{ */
+        /** Returns cached virtual machine object. */
+        CMachine machine() const { return m_comMachine; }
+    /** @} */
+
+    /** @name Basic attributes.
+      * @{ */
+        /** Returns cached machine settings file name. */
+        QString settingsFile() const { return m_strSettingsFile; }
+        /** Returns cached machine group list. */
+        const QStringList &groups() { return m_groups; }
+    /** @} */
+
+    /** @name Snapshot attributes.
+      * @{ */
+        /** Returns cached snapshot name. */
+        QString snapshotName() const { return m_strSnapshotName; }
+        /** Returns cached snapshot children count. */
+        ULONG snapshotCount() const { return m_cSnaphot; }
+    /** @} */
+
+    /** @name State attributes.
+      * @{ */
+        /** Returns cached session state. */
+        KSessionState sessionState() const { return m_enmSessionState; }
+        /** Returns cached session state name. */
+        QString sessionStateName() const { return m_strSessionStateName; }
+    /** @} */
+
+    /** @name Console attributes.
+      * @{ */
+        /** Returns whether we can switch to main window of VM process. */
+        bool canSwitchTo() const;
+        /** Tries to switch to the main window of the VM process.
+          * @return true if switched successfully. */
+        bool switchTo();
+    /** @} */
+
+    /** @name Update stuff.
+      * @{ */
+        /** Recaches machine data. */
+        virtual void recache() /* override */;
+        /** Recaches machine item pixmap. */
+        virtual void recachePixmap() /* override */;
+    /** @} */
+
+    /** @name Validation stuff.
+      * @{ */
+        /** Returns whether passed machine @a pItem is editable. */
+        virtual bool isItemEditable() const /* override */;
+        /** Returns whether passed machine @a pItem is saved. */
+        virtual bool isItemSaved() const /* override */;
+        /** Returns whether passed machine @a pItem is powered off. */
+        virtual bool isItemPoweredOff() const /* override */;
+        /** Returns whether passed machine @a pItem is started. */
+        virtual bool isItemStarted() const /* override */;
+        /** Returns whether passed machine @a pItem is running. */
+        virtual bool isItemRunning() const /* override */;
+        /** Returns whether passed machine @a pItem is running headless. */
+        virtual bool isItemRunningHeadless() const /* override */;
+        /** Returns whether passed machine @a pItem is paused. */
+        virtual bool isItemPaused() const /* override */;
+        /** Returns whether passed machine @a pItem is stuck. */
+        virtual bool isItemStuck() const /* override */;
+    /** @} */
+
+protected:
+
+    /** @name Event handling.
+      * @{ */
+        /** Handles translation event. */
+        virtual void retranslateUi() /* override */;
+    /** @} */
+
+private:
+
+    /** @name Arguments.
+      * @{ */
+        /** Holds cached machine object reference. */
+        CMachine  m_comMachine;
+    /** @} */
+
+    /** @name Basic attributes.
+      * @{ */
+        /** Holds cached machine settings file name. */
+        QString      m_strSettingsFile;
+        /** Holds cached machine group list. */
+        QStringList  m_groups;
+    /** @} */
+
+    /** @name Snapshot attributes.
+      * @{ */
+        /** Holds cached snapshot name. */
+        QString    m_strSnapshotName;
+        /** Holds cached last state change date/time. */
+        QDateTime  m_lastStateChange;
+        /** Holds cached snapshot children count. */
+        ULONG      m_cSnaphot;
+    /** @} */
+
+    /** @name State attributes.
+      * @{ */
+        /** Holds cached session state. */
+        KSessionState  m_enmSessionState;
+        /** Holds cached session state name. */
+        QString        m_strSessionStateName;
+    /** @} */
+
+    /** @name Console attributes.
+      * @{ */
+        /** Holds machine PID. */
+        ULONG  m_pid;
+    /** @} */
+};
+
+#endif /* !FEQT_INCLUDED_SRC_manager_UIVirtualMachineItemLocal_h */
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp	(revision 82942)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp	(revision 82944)
@@ -27,4 +27,8 @@
 #include "UIMessageCenter.h"
 #include "UIVirtualBoxEventHandler.h"
+#include "UIVirtualMachineItem.h"
+
+/* COM includes: */
+#include "CMachine.h"
 
 /* Type defs: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp	(revision 82942)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp	(revision 82944)
@@ -38,4 +38,5 @@
 #include "UIIconPool.h"
 #include "UIVirtualBoxManager.h"
+#include "UIVirtualMachineItem.h"
 
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp	(revision 82942)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp	(revision 82944)
@@ -31,4 +31,5 @@
 #include "UIIconPool.h"
 #include "UIVirtualBoxManager.h"
+#include "UIVirtualMachineItemLocal.h"
 
 /* Other VBox includes: */
@@ -289,5 +290,5 @@
     /* And machine-item content to take into account: */
     int iTopLineWidth = m_iMinimumNameWidth;
-    if (!node()->toMachineNode()->cache()->snapshotName().isEmpty())
+    if (!node()->toMachineNode()->cache()->toLocal()->snapshotName().isEmpty())
         iTopLineWidth += (iMinorSpacing +
                           m_iMinimumSnapshotNameWidth);
@@ -700,9 +701,9 @@
     int iMinimumSnapshotNameWidth = 0;
     /* Is there any snapshot exists? */
-    if (!node()->toMachineNode()->cache()->snapshotName().isEmpty())
+    if (!node()->toMachineNode()->cache()->toLocal()->snapshotName().isEmpty())
     {
         QFontMetrics fm(m_snapshotNameFont, model()->paintDevice());
         int iBracketWidth = fm.width("()"); /* bracket width */
-        int iActualTextWidth = fm.width(node()->toMachineNode()->cache()->snapshotName()); /* snapshot-name width */
+        int iActualTextWidth = fm.width(node()->toMachineNode()->cache()->toLocal()->snapshotName()); /* snapshot-name width */
         int iMinimumTextWidth = fm.width("..."); /* ellipsis width */
         iMinimumSnapshotNameWidth = iBracketWidth + qMin(iActualTextWidth, iMinimumTextWidth);
@@ -789,5 +790,5 @@
     /* Calculate new visible snapshot-name: */
     int iBracketWidth = QFontMetrics(m_snapshotNameFont, pPaintDevice).width("()");
-    QString strVisibleSnapshotName = compressText(m_snapshotNameFont, pPaintDevice, node()->toMachineNode()->cache()->snapshotName(),
+    QString strVisibleSnapshotName = compressText(m_snapshotNameFont, pPaintDevice, node()->toMachineNode()->cache()->toLocal()->snapshotName(),
                                                   m_iMaximumSnapshotNameWidth - iBracketWidth);
     strVisibleSnapshotName = QString("(%1)").arg(strVisibleSnapshotName);
@@ -1087,5 +1088,5 @@
 
             /* Paint middle element: */
-            if (!node()->toMachineNode()->cache()->snapshotName().isEmpty())
+            if (!node()->toMachineNode()->cache()->toLocal()->snapshotName().isEmpty())
             {
                 /* Prepare variables: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeGroup.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeGroup.cpp	(revision 82942)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeGroup.cpp	(revision 82944)
@@ -20,4 +20,7 @@
 #include "UIChooserNodeGlobal.h"
 #include "UIChooserNodeMachine.h"
+
+/* Other VBox includes: */
+#include "iprt/assert.h"
 
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeMachine.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeMachine.cpp	(revision 82942)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeMachine.cpp	(revision 82944)
@@ -18,4 +18,5 @@
 /* GUI includes: */
 #include "UIChooserNodeMachine.h"
+#include "UIVirtualMachineItemLocal.h"
 
 
@@ -25,5 +26,5 @@
                                            const CMachine &comMachine)
     : UIChooserNode(pParent, fFavorite)
-    , m_pCache(new UIVirtualMachineItem(comMachine))
+    , m_pCache(new UIVirtualMachineItemLocal(comMachine))
 {
     if (parentNode())
@@ -36,5 +37,5 @@
                                            int iPosition)
     : UIChooserNode(pParent, pCopyFrom->isFavorite())
-    , m_pCache(new UIVirtualMachineItem(pCopyFrom->cache()->machine()))
+    , m_pCache(new UIVirtualMachineItemLocal(pCopyFrom->cache()->toLocal()->machine()))
 {
     if (parentNode())
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeMachine.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeMachine.h	(revision 82942)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeMachine.h	(revision 82944)
@@ -24,5 +24,8 @@
 /* GUI includes: */
 #include "UIChooserNode.h"
-#include "UIVirtualMachineItem.h"
+
+/* Forward declarations: */
+class UIVirtualMachineItem;
+class CMachine;
 
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp	(revision 82942)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp	(revision 82944)
@@ -22,10 +22,10 @@
 
 /* GUI includes: */
+#include "UICommon.h"
 #include "UIDetailsElements.h"
 #include "UIDetailsModel.h"
 #include "UIDetailsSet.h"
 #include "UIVirtualBoxEventHandler.h"
-#include "UIVirtualMachineItem.h"
-#include "UICommon.h"
+#include "UIVirtualMachineItemLocal.h"
 
 /* COM includes: */
@@ -66,5 +66,5 @@
     /* Remember passed arguments: */
     m_pMachineItem = pMachineItem;
-    m_machine = m_pMachineItem->machine();
+    m_machine = m_pMachineItem->toLocal()->machine();
     m_fHasDetails = m_pMachineItem->hasDetails();
     m_fFullSet = fFullSet;
