Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 54303)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 54305)
@@ -69,4 +69,5 @@
 # include "CHostNetworkInterface.h"
 # include "CVRDEServer.h"
+# include "CNetworkAdapter.h"
 # include "CEmulatedUSB.h"
 # ifdef VBOX_WITH_DRAG_AND_DROP
@@ -2007,4 +2008,15 @@
 }
 
+void UIMessageCenter::cannotToggleVideoCapture(const CMachine &machine, bool fEnable)
+{
+    /* Get machine-name preserving error-info: */
+    QString strMachineName(CMachine(machine).GetName());
+    error(0, MessageType_Error,
+          fEnable ?
+              tr("Failed to enable video capturing for the virtual machine <b>%1</b>.").arg(strMachineName) :
+              tr("Failed to disable video capturing for the virtual machine <b>%1</b>.").arg(strMachineName),
+          formatErrorInfo(machine));
+}
+
 void UIMessageCenter::cannotToggleVRDEServer(const CVRDEServer &server, const QString &strMachineName, bool fEnable)
 {
@@ -2016,13 +2028,11 @@
 }
 
-void UIMessageCenter::cannotToggleVideoCapture(const CMachine &machine, bool fEnable)
-{
-    /* Get machine-name preserving error-info: */
-    QString strMachineName(CMachine(machine).GetName());
-    error(0, MessageType_Error,
-          fEnable ?
-              tr("Failed to enable video capturing for the virtual machine <b>%1</b>.").arg(strMachineName) :
-              tr("Failed to disable video capturing for the virtual machine <b>%1</b>.").arg(strMachineName),
-          formatErrorInfo(machine));
+void UIMessageCenter::cannotToggleNetworkAdapterCable(const CNetworkAdapter &adapter, const QString &strMachineName, bool fConnect)
+{
+    error(0, MessageType_Error,
+          fConnect ?
+              tr("Failed to connect network adapter cable of the virtual machine <b>%1</b>.").arg(strMachineName) :
+              tr("Failed to disconnect network adapter cable of the virtual machine <b>%1</b>.").arg(strMachineName),
+          formatErrorInfo(adapter));
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h	(revision 54303)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h	(revision 54305)
@@ -298,6 +298,7 @@
     void cannotAttachWebCam(const CEmulatedUSB &dispatcher, const QString &strWebCamName, const QString &strMachineName) const;
     void cannotDetachWebCam(const CEmulatedUSB &dispatcher, const QString &strWebCamName, const QString &strMachineName) const;
+    void cannotToggleVideoCapture(const CMachine &machine, bool fEnable);
     void cannotToggleVRDEServer(const CVRDEServer &server, const QString &strMachineName, bool fEnable);
-    void cannotToggleVideoCapture(const CMachine &machine, bool fEnable);
+    void cannotToggleNetworkAdapterCable(const CNetworkAdapter &adapter, const QString &strMachineName, bool fConnect);
     void remindAboutGuestAdditionsAreNotActive() const;
     void cannotMountGuestAdditions(const QString &strMachineName) const;
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 54303)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 54305)
@@ -1605,27 +1605,21 @@
 
     /* Update Video Capture state: */
-    AssertMsg(machine().isOk(), ("Machine should be OK!\n"));
     machine().SetVideoCaptureEnabled(fEnabled);
-    /* Machine is not OK? */
     if (!machine().isOk())
     {
+        /* Make sure action is updated: */
+        uisession()->updateStatusVideoCapture();
         /* Notify about the error: */
-        msgCenter().cannotToggleVideoCapture(machine(), fEnabled);
-        /* Make sure action is updated! */
+        return msgCenter().cannotToggleVideoCapture(machine(), fEnabled);
+    }
+
+    /* Save machine-settings: */
+    machine().SaveSettings();
+    if (!machine().isOk())
+    {
+        /* Make sure action is updated: */
         uisession()->updateStatusVideoCapture();
-    }
-    /* Machine is OK? */
-    else
-    {
-        /* Save machine-settings: */
-        machine().SaveSettings();
-        /* Machine is not OK? */
-        if (!machine().isOk())
-        {
-            /* Notify about the error: */
-            msgCenter().cannotSaveMachineSettings(machine());
-            /* Make sure action is updated! */
-            uisession()->updateStatusVideoCapture();
-        }
+        /* Notify about the error: */
+        return msgCenter().cannotSaveMachineSettings(machine());
     }
 }
@@ -1639,7 +1633,6 @@
     /* Access VRDE server: */
     CVRDEServer server = machine().GetVRDEServer();
-    AssertMsg(!server.isNull(), ("VRDE server should NOT be null!\n"));
-    if (!machine().isOk() || server.isNull())
-        return;
+    AssertMsgReturnVoid(machine().isOk() && !server.isNull(),
+                        ("VRDE server should NOT be null!\n"));
 
     /* Make sure something had changed: */
@@ -1647,30 +1640,22 @@
         return;
 
-    /* Server is OK? */
-    if (server.isOk())
-    {
-        /* Update VRDE server state: */
-        server.SetEnabled(fEnabled);
-        /* Server still OK? */
-        if (server.isOk())
-        {
-            /* Save machine-settings: */
-            machine().SaveSettings();
-            /* Machine still OK? */
-            if (!machine().isOk())
-            {
-                /* Notify about the error: */
-                msgCenter().cannotSaveMachineSettings(machine());
-                /* Make sure action is updated! */
-                uisession()->updateStatusVRDE();
-            }
-        }
-        else
-        {
-            /* Notify about the error: */
-            msgCenter().cannotToggleVRDEServer(server, machineName(), fEnabled);
-            /* Make sure action is updated! */
-            uisession()->updateStatusVRDE();
-        }
+    /* Update VRDE server state: */
+    server.SetEnabled(fEnabled);
+    if (!server.isOk())
+    {
+        /* Make sure action is updated: */
+        uisession()->updateStatusVRDE();
+        /* Notify about the error: */
+        return msgCenter().cannotToggleVRDEServer(server, machineName(), fEnabled);
+    }
+
+    /* Save machine-settings: */
+    machine().SaveSettings();
+    if (!machine().isOk())
+    {
+        /* Make sure action is updated: */
+        uisession()->updateStatusVRDE();
+        /* Notify about the error: */
+        return msgCenter().cannotSaveMachineSettings(machine());
     }
 }
@@ -1828,20 +1813,29 @@
 }
 
-/** Toggles network adapter's <i>Cable Connected</i> state. */
 void UIMachineLogic::sltToggleNetworkAdapterConnection()
 {
+    /* Do not process if window(s) missed! */
+    if (!isMachineWindowsCreated())
+        return;
+
     /* Get and check 'the sender' action object: */
     QAction *pAction = qobject_cast<QAction*>(sender());
-    AssertReturnVoid(pAction);
+    AssertMsgReturnVoid(pAction, ("Sender action should NOT be null!\n"));
 
     /* Get operation target: */
     CNetworkAdapter adapter = machine().GetNetworkAdapter((ULONG)pAction->property("slot").toInt());
-    AssertReturnVoid(machine().isOk() && !adapter.isNull());
+    AssertMsgReturnVoid(machine().isOk() && !adapter.isNull(),
+                        ("Network adapter should NOT be null!\n"));
 
     /* Connect/disconnect cable to/from target: */
-    adapter.SetCableConnected(!adapter.GetCableConnected());
+    const bool fConnect = !adapter.GetCableConnected();
+    adapter.SetCableConnected(fConnect);
+    if (!adapter.isOk())
+        return msgCenter().cannotToggleNetworkAdapterCable(adapter, machineName(), fConnect);
+
+    /* Save machine-settings: */
     machine().SaveSettings();
     if (!machine().isOk())
-        msgCenter().cannotSaveMachineSettings(machine());
+        return msgCenter().cannotSaveMachineSettings(machine());
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 54303)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 54305)
@@ -746,14 +746,14 @@
 void UISession::sltVRDEChange()
 {
-    /* Get VRDE server: */
-    const CVRDEServer &server = machine().GetVRDEServer();
-    bool fIsVRDEServerAvailable = !server.isNull();
-    /* Show/Hide VRDE action depending on VRDE server availability status: */
-    // TODO: Is this status can be changed at runtime?
-    //       Because if no => the place for that stuff is in prepareActions().
-    actionPool()->action(UIActionIndexRT_M_View_T_VRDEServer)->setVisible(fIsVRDEServerAvailable);
-    /* Check/Uncheck VRDE action depending on VRDE server activity status: */
-    if (fIsVRDEServerAvailable)
-        actionPool()->action(UIActionIndexRT_M_View_T_VRDEServer)->setChecked(server.GetEnabled());
+    /* Make sure VRDE server is present: */
+    const CVRDEServer server = machine().GetVRDEServer();
+    AssertMsgReturnVoid(machine().isOk() && !server.isNull(),
+                        ("VRDE server should NOT be null!\n"));
+
+    /* Check/Uncheck VRDE Server action depending on feature status: */
+    actionPool()->action(UIActionIndexRT_M_View_T_VRDEServer)->blockSignals(true);
+    actionPool()->action(UIActionIndexRT_M_View_T_VRDEServer)->setChecked(server.GetEnabled());
+    actionPool()->action(UIActionIndexRT_M_View_T_VRDEServer)->blockSignals(false);
+
     /* Notify listeners about VRDE change: */
     emit sigVRDEChange();
@@ -763,5 +763,8 @@
 {
     /* Check/Uncheck Video Capture action depending on feature status: */
+    actionPool()->action(UIActionIndexRT_M_View_M_VideoCapture_T_Start)->blockSignals(true);
     actionPool()->action(UIActionIndexRT_M_View_M_VideoCapture_T_Start)->setChecked(machine().GetVideoCaptureEnabled());
+    actionPool()->action(UIActionIndexRT_M_View_M_VideoCapture_T_Start)->blockSignals(false);
+
     /* Notify listeners about Video Capture change: */
     emit sigVideoCaptureChange();
@@ -1074,5 +1077,14 @@
         /* Get host: */
         const CHost host = vboxGlobal().host();
-        UIExtraDataMetaDefs::RuntimeMenuDevicesActionType restriction = UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Invalid;
+        UIExtraDataMetaDefs::RuntimeMenuViewActionType restrictionForView = UIExtraDataMetaDefs::RuntimeMenuViewActionType_Invalid;
+        UIExtraDataMetaDefs::RuntimeMenuDevicesActionType restrictionForDevices = UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Invalid;
+
+        /* VRDE server stuff: */
+        {
+            /* Initialize 'View' menu: */
+            const CVRDEServer server = machine().GetVRDEServer();
+            if (server.isNull())
+                restrictionForView = (UIExtraDataMetaDefs::RuntimeMenuViewActionType)(restrictionForView | UIExtraDataMetaDefs::RuntimeMenuViewActionType_VRDEServer);
+        }
 
         /* Storage stuff: */
@@ -1093,7 +1105,7 @@
             pFloppyDevicesMenu->setData(iDevicesCountFD);
             if (!iDevicesCountCD)
-                restriction = (UIExtraDataMetaDefs::RuntimeMenuDevicesActionType)(restriction | UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_OpticalDevices);
+                restrictionForDevices = (UIExtraDataMetaDefs::RuntimeMenuDevicesActionType)(restrictionForDevices | UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_OpticalDevices);
             if (!iDevicesCountFD)
-                restriction = (UIExtraDataMetaDefs::RuntimeMenuDevicesActionType)(restriction | UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_FloppyDevices);
+                restrictionForDevices = (UIExtraDataMetaDefs::RuntimeMenuDevicesActionType)(restrictionForDevices | UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_FloppyDevices);
         }
 
@@ -1114,5 +1126,5 @@
             }
             if (!fAtLeastOneAdapterActive)
-                restriction = (UIExtraDataMetaDefs::RuntimeMenuDevicesActionType)(restriction | UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Network);
+                restrictionForDevices = (UIExtraDataMetaDefs::RuntimeMenuDevicesActionType)(restrictionForDevices | UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Network);
         }
 
@@ -1124,5 +1136,5 @@
                                      && machine().GetUSBProxyAvailable();
             if (!fUSBEnabled)
-                restriction = (UIExtraDataMetaDefs::RuntimeMenuDevicesActionType)(restriction | UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevices);
+                restrictionForDevices = (UIExtraDataMetaDefs::RuntimeMenuDevicesActionType)(restrictionForDevices | UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevices);
         }
 
@@ -1133,9 +1145,11 @@
             const bool fWebCamsEnabled = host.isOk() && !machine().GetUSBControllers().isEmpty();
             if (!fWebCamsEnabled)
-                restriction = (UIExtraDataMetaDefs::RuntimeMenuDevicesActionType)(restriction | UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_WebCams);
-        }
-
-        /* Apply cumulative restriction: */
-        actionPool()->toRuntime()->setRestrictionForMenuDevices(UIActionRestrictionLevel_Session, restriction);
+                restrictionForDevices = (UIExtraDataMetaDefs::RuntimeMenuDevicesActionType)(restrictionForDevices | UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_WebCams);
+        }
+
+        /* Apply cumulative restriction for 'View' menu: */
+        actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Session, restrictionForView);
+        /* Apply cumulative restriction for 'Devices' menu: */
+        actionPool()->toRuntime()->setRestrictionForMenuDevices(UIActionRestrictionLevel_Session, restrictionForDevices);
 
 #ifdef Q_WS_MAC
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h	(revision 54303)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h	(revision 54305)
@@ -245,6 +245,7 @@
     const QVector<ComObjPtr<UIFrameBuffer> >& frameBuffers() const { return m_frameBufferVector; }
 
-    /* Temporary API: */
+    /** Updates VRDE Server action state. */
     void updateStatusVRDE() { sltVRDEChange(); }
+    /** Updates Video Capture action state. */
     void updateStatusVideoCapture() { sltVideoCaptureChange(); }
 
