Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp	(revision 54144)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp	(revision 54145)
@@ -69,5 +69,5 @@
 
     /** Constructor which remembers passed @a session object. */
-    UISessionStateStatusBarIndicator(CSession &session) : m_session(session) {}
+    UISessionStateStatusBarIndicator(UISession *pSession) : m_pSession(pSession) {}
 
     /** Abstract update routine. */
@@ -76,6 +76,6 @@
 protected:
 
-    /** Holds the session reference. */
-    CSession &m_session;
+    /** Holds the session UI reference. */
+    UISession *m_pSession;
 };
 
@@ -87,7 +87,7 @@
 public:
 
-    /** Constructor, passes @a session to the UISessionStateStatusBarIndicator constructor. */
-    UIIndicatorHardDrive(CSession &session)
-        : UISessionStateStatusBarIndicator(session)
+    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
+    UIIndicatorHardDrive(UISession *pSession)
+        : UISessionStateStatusBarIndicator(pSession)
     {
         /* Assign state-icons: */
@@ -112,5 +112,5 @@
     {
         /* Get machine: */
-        const CMachine machine = m_session.GetMachine();
+        const CMachine machine = m_pSession->machine();
 
         /* Prepare tool-tip: */
@@ -160,7 +160,7 @@
 public:
 
-    /** Constructor, passes @a session to the UISessionStateStatusBarIndicator constructor. */
-    UIIndicatorOpticalDisks(CSession &session)
-        : UISessionStateStatusBarIndicator(session)
+    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
+    UIIndicatorOpticalDisks(UISession *pSession)
+        : UISessionStateStatusBarIndicator(pSession)
     {
         /* Assign state-icons: */
@@ -185,5 +185,5 @@
     {
         /* Get machine: */
-        const CMachine machine = m_session.GetMachine();
+        const CMachine machine = m_pSession->machine();
 
         /* Prepare tool-tip: */
@@ -237,7 +237,7 @@
 public:
 
-    /** Constructor, passes @a session to the UISessionStateStatusBarIndicator constructor. */
-    UIIndicatorFloppyDisks(CSession &session)
-        : UISessionStateStatusBarIndicator(session)
+    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
+    UIIndicatorFloppyDisks(UISession *pSession)
+        : UISessionStateStatusBarIndicator(pSession)
     {
         /* Assign state-icons: */
@@ -262,5 +262,5 @@
     {
         /* Get machine: */
-        const CMachine machine = m_session.GetMachine();
+        const CMachine machine = m_pSession->machine();
 
         /* Prepare tool-tip: */
@@ -314,8 +314,7 @@
 public:
 
-    /** Constructor, passes @a session to the UISessionStateStatusBarIndicator constructor. */
+    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
     UIIndicatorNetwork(UISession *pSession)
-        : UISessionStateStatusBarIndicator(pSession->session())
-        , m_pSession(pSession)
+        : UISessionStateStatusBarIndicator(pSession)
         , m_pTimerAutoUpdate(0)
     {
@@ -374,5 +373,5 @@
     {
         /* Get machine: */
-        const CMachine machine = m_session.GetMachine();
+        const CMachine machine = m_pSession->machine();
 
         /* Prepare tool-tip: */
@@ -452,6 +451,4 @@
     }
 
-    /** Holds the session UI reference. */
-    UISession *m_pSession;
     /** Holds the auto-update timer instance. */
     QTimer *m_pTimerAutoUpdate;
@@ -465,7 +462,7 @@
 public:
 
-    /** Constructor, passes @a session to the UISessionStateStatusBarIndicator constructor. */
-    UIIndicatorUSB(CSession &session)
-        : UISessionStateStatusBarIndicator(session)
+    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
+    UIIndicatorUSB(UISession *pSession)
+        : UISessionStateStatusBarIndicator(pSession)
     {
         /* Assign state-icons: */
@@ -490,5 +487,5 @@
     {
         /* Get machine: */
-        const CMachine machine = m_session.GetMachine();
+        const CMachine machine = m_pSession->machine();
 
         /* Prepare tool-tip: */
@@ -505,5 +502,5 @@
         {
             /* Enumerate all the USB devices: */
-            const CConsole &console = m_session.GetConsole();
+            const CConsole console = m_pSession->console();
             foreach (const CUSBDevice &usbDevice, console.GetUSBDevices())
                 strFullData += QString("<br><b><nobr>%1</nobr></b>").arg(vboxGlobal().details(usbDevice));
@@ -531,7 +528,7 @@
 public:
 
-    /** Constructor, passes @a session to the UISessionStateStatusBarIndicator constructor. */
-    UIIndicatorSharedFolders(CSession &session)
-        : UISessionStateStatusBarIndicator(session)
+    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
+    UIIndicatorSharedFolders(UISession *pSession)
+        : UISessionStateStatusBarIndicator(pSession)
     {
         /* Assign state-icons: */
@@ -555,7 +552,8 @@
     void updateAppearance()
     {
-        /* Get machine: */
-        const CMachine machine = m_session.GetMachine();
-        const CConsole console = m_session.GetConsole();
+        /* Get objects: */
+        const CMachine machine = m_pSession->machine();
+        const CConsole console = m_pSession->console();
+        const CGuest guest = m_pSession->guest();
 
         /* Prepare tool-tip: */
@@ -576,5 +574,5 @@
         {
             /* Select slashes depending on the OS type: */
-            if (VBoxGlobal::isDOSType(console.GetGuest().GetOSTypeId()))
+            if (VBoxGlobal::isDOSType(guest.GetOSTypeId()))
                 strFullData += QString("<br><nobr><b>\\\\vboxsvr\\%1&nbsp;</b></nobr><nobr>%2</nobr>")
                                        .arg(it.key(), it.value());
@@ -601,7 +599,7 @@
 public:
 
-    /** Constructor, passes @a session to the UISessionStateStatusBarIndicator constructor. */
-    UIIndicatorDisplay(CSession &session)
-        : UISessionStateStatusBarIndicator(session)
+    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
+    UIIndicatorDisplay(UISession *pSession)
+        : UISessionStateStatusBarIndicator(pSession)
     {
         /* Assign state-icons: */
@@ -625,5 +623,5 @@
     {
         /* Get machine: */
-        const CMachine machine = m_session.GetMachine();
+        const CMachine machine = m_pSession->machine();
 
         /* Prepare tool-tip: */
@@ -683,7 +681,7 @@
 public:
 
-    /** Constructor, passes @a session to the UISessionStateStatusBarIndicator constructor. */
-    UIIndicatorVideoCapture(CSession &session)
-        : UISessionStateStatusBarIndicator(session)
+    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
+    UIIndicatorVideoCapture(UISession *pSession)
+        : UISessionStateStatusBarIndicator(pSession)
         , m_pAnimation(0)
         , m_dRotationAngle(0)
@@ -756,5 +754,5 @@
     {
         /* Get machine: */
-        const CMachine machine = m_session.GetMachine();
+        const CMachine machine = m_pSession->machine();
 
         /* Prepare tool-tip: */
@@ -805,7 +803,7 @@
 public:
 
-    /** Constructor, passes @a session to the UISessionStateStatusBarIndicator constructor. */
-    UIIndicatorFeatures(CSession &session)
-        : UISessionStateStatusBarIndicator(session)
+    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
+    UIIndicatorFeatures(UISession *pSession)
+        : UISessionStateStatusBarIndicator(pSession)
     {
         /* Assign state-icons: */
@@ -827,13 +825,7 @@
     void updateAppearance()
     {
-        /* Get console: */
-        const CConsole console = m_session.GetConsole();
-        if (console.isNull())
-            return;
-
-        /* Get debugger: */
-        const CMachineDebugger debugger = console.GetDebugger();
-        if (debugger.isNull())
-            return;
+        /* Get objects: */
+        const CMachine machine = m_pSession->machine();
+        const CMachineDebugger debugger = m_pSession->debugger();
 
         /* VT-x/AMD-V feature: */
@@ -854,9 +846,4 @@
             VBoxGlobal::tr("Enabled", "details report (Unrestricted Execution)") :
             VBoxGlobal::tr("Disabled", "details report (Unrestricted Execution)");
-
-        /* Get machine: */
-        const CMachine machine = console.GetMachine();
-        if (machine.isNull())
-            return;
 
         /* CPU Execution Cap feature: */
@@ -898,5 +885,5 @@
     /** Constructor, using @a pSession for state-update routine. */
     UIIndicatorMouse(UISession *pSession)
-        : UISessionStateStatusBarIndicator(pSession->session())
+        : UISessionStateStatusBarIndicator(pSession)
     {
         /* Assign state-icons: */
@@ -958,5 +945,5 @@
     /** Constructor, using @a pSession for state-update routine. */
     UIIndicatorKeyboard(UISession *pSession)
-        : UISessionStateStatusBarIndicator(pSession->session())
+        : UISessionStateStatusBarIndicator(pSession)
     {
         /* Assign state-icons: */
@@ -1029,5 +1016,4 @@
     : QWidget(pParent)
     , m_pSession(pSession)
-    , m_session(m_pSession->session())
     , m_fEnabled(false)
     , m_pTimerAutoUpdate(0)
@@ -1103,6 +1089,6 @@
 
     /* Acquire current states from the console: */
-    CConsole console = m_session.GetConsole();
-    if (!m_session.isOk() || console.isNull())
+    CConsole console = m_pSession->console();
+    if (console.isNull() || !console.isOk())
         return;
     const QVector<KDeviceActivity> states = console.GetDeviceActivity(deviceTypes);
@@ -1258,16 +1244,16 @@
             switch (indicatorType)
             {
-                case IndicatorType_HardDisks:         m_pool[indicatorType] = new UIIndicatorHardDrive(m_session);     break;
-                case IndicatorType_OpticalDisks:      m_pool[indicatorType] = new UIIndicatorOpticalDisks(m_session);  break;
-                case IndicatorType_FloppyDisks:       m_pool[indicatorType] = new UIIndicatorFloppyDisks(m_session);   break;
+                case IndicatorType_HardDisks:         m_pool[indicatorType] = new UIIndicatorHardDrive(m_pSession);     break;
+                case IndicatorType_OpticalDisks:      m_pool[indicatorType] = new UIIndicatorOpticalDisks(m_pSession);  break;
+                case IndicatorType_FloppyDisks:       m_pool[indicatorType] = new UIIndicatorFloppyDisks(m_pSession);   break;
                 case IndicatorType_Network:           m_pool[indicatorType] = new UIIndicatorNetwork(m_pSession);       break;
-                case IndicatorType_USB:               m_pool[indicatorType] = new UIIndicatorUSB(m_session);           break;
-                case IndicatorType_SharedFolders:     m_pool[indicatorType] = new UIIndicatorSharedFolders(m_session); break;
-                case IndicatorType_Display:           m_pool[indicatorType] = new UIIndicatorDisplay(m_session);       break;
-                case IndicatorType_VideoCapture:      m_pool[indicatorType] = new UIIndicatorVideoCapture(m_session);  break;
-                case IndicatorType_Features:          m_pool[indicatorType] = new UIIndicatorFeatures(m_session);      break;
-                case IndicatorType_Mouse:             m_pool[indicatorType] = new UIIndicatorMouse(m_pSession);        break;
-                case IndicatorType_Keyboard:          m_pool[indicatorType] = new UIIndicatorKeyboard(m_pSession);     break;
-                case IndicatorType_KeyboardExtension: m_pool[indicatorType] = new UIIndicatorKeyboardExtension;        break;
+                case IndicatorType_USB:               m_pool[indicatorType] = new UIIndicatorUSB(m_pSession);           break;
+                case IndicatorType_SharedFolders:     m_pool[indicatorType] = new UIIndicatorSharedFolders(m_pSession); break;
+                case IndicatorType_Display:           m_pool[indicatorType] = new UIIndicatorDisplay(m_pSession);       break;
+                case IndicatorType_VideoCapture:      m_pool[indicatorType] = new UIIndicatorVideoCapture(m_pSession);  break;
+                case IndicatorType_Features:          m_pool[indicatorType] = new UIIndicatorFeatures(m_pSession);      break;
+                case IndicatorType_Mouse:             m_pool[indicatorType] = new UIIndicatorMouse(m_pSession);         break;
+                case IndicatorType_Keyboard:          m_pool[indicatorType] = new UIIndicatorKeyboard(m_pSession);      break;
+                case IndicatorType_KeyboardExtension: m_pool[indicatorType] = new UIIndicatorKeyboardExtension;         break;
                 default: break;
             }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.h	(revision 54144)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.h	(revision 54145)
@@ -106,6 +106,4 @@
     /** Holds the UI session reference. */
     UISession *m_pSession;
-    /** Holds the session reference. */
-    CSession &m_session;
     /** Holds whether status-bar is enabled. */
     bool m_fEnabled;
