Index: trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h	(revision 806)
+++ trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h	(revision 809)
@@ -45,4 +45,5 @@
 
 class VBoxUSBMenu;
+class VBoxSwitchMenu;
 class VBoxUSBLedTip;
 
@@ -118,5 +119,5 @@
     void vmClose();
     void vmTakeSnapshot();
-    void vmDisableMouseIntegr();
+    void vmDisableMouseIntegr (bool);
 
     void devicesMountFloppyImage();
@@ -124,10 +125,9 @@
     void devicesMountDVDImage();
     void devicesUnmountDVD();
-    void devicesSwitchVrdp();
+    void devicesSwitchVrdp (bool);
     void devicesInstallGuestAdditions();
 
     void prepareFloppyMenu();
     void prepareDVDMenu();
-    void prepareVRDPMenu();
 
     void captureFloppy (int id);
@@ -168,4 +168,8 @@
     QAction *vmDisableMouseIntegrAction;
 
+    // VM popup menus
+    VBoxSwitchMenu *vmAutoresizeMenu;
+    VBoxSwitchMenu *vmDisMouseIntegrMenu;
+
     // Devices actions
     QAction *devicesMountFloppyImageAction;
@@ -192,5 +196,5 @@
     QPopupMenu *devicesMountDVDMenu;
     VBoxUSBMenu *devicesUSBMenu;
-    QPopupMenu *devicesVRDPMenu;
+    VBoxSwitchMenu *devicesVRDPMenu;
 
     int devicesUSBMenuSeparatorId;
Index: trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h	(revision 806)
+++ trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h	(revision 809)
@@ -43,4 +43,6 @@
 #include <qintdict.h>
 
+class QAction;
+
 // Auxiliary types
 ////////////////////////////////////////////////////////////////////////////////
@@ -525,3 +527,29 @@
 };
 
+
+/**
+ *  Enable/Disable Menu class.
+ *  This class provides enable/disable menu items.
+ */
+class VBoxSwitchMenu : public QPopupMenu
+{
+    Q_OBJECT
+
+public:
+
+    VBoxSwitchMenu (QWidget *, QAction *, const QString &, bool aInverted = false);
+
+private slots:
+
+    void processAboutToShow();
+
+    void processActivated (int);
+
+private:
+
+    QAction *mAction;
+    QString  mTip;
+    bool     mInverted;
+};
+
 #endif /* __VBoxGlobal_h__ */
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp	(revision 806)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp	(revision 809)
@@ -240,5 +240,5 @@
                                                      "cd_unmount_dis_16px.png"));
 
-    devicesSwitchVrdpAction = new QAction (this, "devicesSwitchVrdpAction");
+    devicesSwitchVrdpAction = new QAction (runningActions, "devicesSwitchVrdpAction");
     devicesSwitchVrdpAction->setIconSet (VBoxGlobal::iconSet ("vrdp_16px.png",
                                                               "vrdp_disabled_16px.png"));
@@ -295,4 +295,11 @@
     vmCloseAction->addTo (vmMenu);
     menuBar()->insertItem (QString::null, vmMenu, vmMenuId);
+    vmAutoresizeMenu = new VBoxSwitchMenu (vmMenu, vmAutoresizeGuestAction,
+                                           tr ("Auto-resize Guest Display",
+                                               "enable/disable..."));
+    vmDisMouseIntegrMenu = new VBoxSwitchMenu (vmMenu, vmDisableMouseIntegrAction,
+                                               tr ("Mouse Integration",
+                                                   "enable/disable..."),
+                                               true /* inverted toggle state */);
 
     /* Devices popup menu */
@@ -304,5 +311,7 @@
     devicesMountDVDMenu = new QPopupMenu (devicesMenu, "devicesMountDVDMenu");
     devicesUSBMenu = new VBoxUSBMenu (devicesMenu);
-    devicesVRDPMenu = new QPopupMenu (devicesMenu, "devicesVRDPMenu");
+    devicesVRDPMenu = new VBoxSwitchMenu (devicesMenu, devicesSwitchVrdpAction,
+                                          tr ("Remote Desktop (RDP) Server",
+                                              "enable/disable..."));
 
     devicesMenu->insertItem (VBoxGlobal::iconSet ("fd_16px.png", "fd_disabled_16px.png"),
@@ -440,5 +449,5 @@
     connect (vmTakeSnapshotAction, SIGNAL(activated()), this, SLOT(vmTakeSnapshot()));
 
-    connect (vmDisableMouseIntegrAction, SIGNAL(activated()), this, SLOT(vmDisableMouseIntegr()));
+    connect (vmDisableMouseIntegrAction, SIGNAL(toggled (bool)), this, SLOT(vmDisableMouseIntegr (bool)));
 
     connect (devicesMountFloppyImageAction, SIGNAL(activated()), this, SLOT(devicesMountFloppyImage()));
@@ -446,5 +455,5 @@
     connect (devicesMountDVDImageAction, SIGNAL(activated()), this, SLOT(devicesMountDVDImage()));
     connect (devicesUnmountDVDAction, SIGNAL(activated()), this, SLOT(devicesUnmountDVD()));
-    connect (devicesSwitchVrdpAction, SIGNAL(activated()), this, SLOT(devicesSwitchVrdp()));
+    connect (devicesSwitchVrdpAction, SIGNAL(toggled (bool)), this, SLOT(devicesSwitchVrdp (bool)));
     connect (devicesInstallGuestToolsAction, SIGNAL(activated()), this, SLOT(devicesInstallGuestAdditions()));
 
@@ -452,10 +461,8 @@
     connect (devicesMountFloppyMenu, SIGNAL(aboutToShow()), this, SLOT(prepareFloppyMenu()));
     connect (devicesMountDVDMenu, SIGNAL(aboutToShow()), this, SLOT(prepareDVDMenu()));
-    connect (devicesVRDPMenu, SIGNAL(aboutToShow()), this, SLOT(prepareVRDPMenu()));
 
     connect (devicesMountFloppyMenu, SIGNAL(activated(int)), this, SLOT(captureFloppy(int)));
     connect (devicesMountDVDMenu, SIGNAL(activated(int)), this, SLOT(captureDVD(int)));
     connect (devicesUSBMenu, SIGNAL(activated(int)), this, SLOT(switchUSB(int)));
-    connect (devicesVRDPMenu, SIGNAL(activated(int)), this, SLOT(devicesSwitchVrdp()));
 
     connect (helpWebAction, SIGNAL (activated()),
@@ -473,4 +480,8 @@
              this, SLOT (showIndicatorContextMenu (QIStateIndicator *, QContextMenuEvent *)));
     connect (vrdp_state, SIGNAL (contextMenuRequested (QIStateIndicator *, QContextMenuEvent *)),
+             this, SLOT (showIndicatorContextMenu (QIStateIndicator *, QContextMenuEvent *)));
+    connect (autoresize_state, SIGNAL (contextMenuRequested (QIStateIndicator *, QContextMenuEvent *)),
+             this, SLOT (showIndicatorContextMenu (QIStateIndicator *, QContextMenuEvent *)));
+    connect (mouse_state, SIGNAL (contextMenuRequested (QIStateIndicator *, QContextMenuEvent *)),
              this, SLOT (showIndicatorContextMenu (QIStateIndicator *, QContextMenuEvent *)));
 
@@ -603,5 +614,12 @@
     /* initialize usb stuff */
     CUSBController usbctl = cmachine.GetUSBController();
-    if (!usbctl.isNull())
+    if (usbctl.isNull())
+    {
+        /* hide usb_menu & usb_separator & usb_status_led */
+        devicesMenu->setItemVisible (devicesUSBMenuId, false);
+        devicesMenu->setItemVisible (devicesUSBMenuSeparatorId, false);
+        usb_light->setHidden (true);
+    }
+    else
     {
         bool isUSBEnabled = usbctl.GetEnabled();
@@ -609,5 +627,5 @@
         devicesUSBMenu->setConsole (cconsole);
         usb_light->setState (isUSBEnabled ? CEnums::DeviceIdle
-                                      : CEnums::InvalidActivity);
+                                          : CEnums::InvalidActivity);
         mUsbLedTip = new VBoxUSBLedTip (usb_light, cconsole, isUSBEnabled);
     }
@@ -1189,5 +1207,6 @@
     QToolTip::add (autoresize_state,
         tr ("Indicates whether the guest display auto-resize function is On "
-            "(<img src=auto_resize_on_16px.png/>) or Off (<img src=auto_resize_off_16px.png/>)"));
+            "(<img src=auto_resize_on_16px.png/>) or Off (<img src=auto_resize_off_16px.png/>). "
+            "Note that this function requires Guest Additions to be installed in the guest OS."));
     QToolTip::add (mouse_state,
         tr ("Indicates whether the host mouse pointer is captured by the guest OS:<br>"
@@ -1196,10 +1215,14 @@
             "<nobr><img src=mouse_seamless_16px.png/>&nbsp;&nbsp;mouse integration (MI) is On</nobr><br>"
             "<nobr><img src=mouse_can_seamless_16px.png/>&nbsp;&nbsp;MI is Off, pointer is captured</nobr><br>"
-            "<nobr><img src=mouse_can_seamless_uncaptured_16px.png/>&nbsp;&nbsp;MI is Off, pointer is not captured</nobr>"));
+            "<nobr><img src=mouse_can_seamless_uncaptured_16px.png/>&nbsp;&nbsp;MI is Off, pointer is not captured</nobr><br>"
+            "Note that the mouse integration feature requires Guest Additions to be installed in the guest OS."));
     QToolTip::add (hostkey_state,
         tr ("Indicates whether the keyboard is captured by the guest OS "
             "(<img src=hostkey_captured_16px.png/>) or not (<img src=hostkey_16px.png/>)"));
     QToolTip::add (hostkey_name,
-        tr ("Shows the currently assigned host key"));
+        tr ("Shows the currently assigned Host key.<br>"
+            "This key, when pressed alone, toggles the the keyboard and mouse "
+            "capture state. It can also be used in combination with other keys "
+            "to quickly perform actions from the main menu." ));
 
     updateAppearanceOf (AllStuff);
@@ -1359,9 +1382,4 @@
         vrdp_state->setState (isVRDPEnabled ? 1 : 0);
 
-        /// @todo (r=dsen) do we really need to disable the control while
-        //  in Pause? We'll check the same for USB above.
-        devicesSwitchVrdpAction->setEnabled (machine_state == CEnums::Running);
-        devicesVRDPMenu->setEnabled (machine_state == CEnums::Running);
-
         /* compose status icon tooltip */
         QString tip = tr ("Indicates whether the Remote Display (VRDP Server) "
@@ -1661,10 +1679,9 @@
 }
 
-void VBoxConsoleWnd::vmDisableMouseIntegr()
+void VBoxConsoleWnd::vmDisableMouseIntegr (bool aOff)
 {
     if (console)
     {
-        bool on = vmDisableMouseIntegrAction->isOn();
-        console->setMouseIntegrationEnabled (!on);
+        console->setMouseIntegrationEnabled (!aOff);
         updateAppearanceOf (DisableMouseIntegrAction);
     }
@@ -1729,5 +1746,5 @@
 }
 
-void VBoxConsoleWnd::devicesSwitchVrdp()
+void VBoxConsoleWnd::devicesSwitchVrdp (bool aOn)
 {
     if (!console) return;
@@ -1737,5 +1754,5 @@
     Assert (!vrdpServer.isNull());
 
-    vrdpServer.SetEnabled (!vrdpServer.GetEnabled());
+    vrdpServer.SetEnabled (aOn);
     updateAppearanceOf (VRDPStuff);
 }
@@ -1889,16 +1906,4 @@
 
 /**
- *  Prepares the "VRDP enable/disable" menu.
- */
-void VBoxConsoleWnd::prepareVRDPMenu()
-{
-    if (!console) return;
-
-    CVRDPServer vrdpServer = csession.GetMachine().GetVRDPServer();
-    devicesVRDPMenu->clear();
-    devicesVRDPMenu->insertItem (vrdpServer.GetEnabled() ? tr ("Disable") : tr ("Enable"));
-}
-
-/**
  *  Captures a floppy device corresponding to a given menu id.
  */
@@ -2017,4 +2022,14 @@
     {
         devicesVRDPMenu->exec (e->globalPos());
+    }
+    else
+    if (ind == autoresize_state)
+    {
+        vmAutoresizeMenu->exec (e->globalPos());
+    }
+    else
+    if (ind == mouse_state)
+    {
+        vmDisMouseIntegrMenu->exec (e->globalPos());
     }
 }
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp	(revision 806)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp	(revision 809)
@@ -2157,2 +2157,34 @@
 }
 
+
+/**
+ *  Enable/Disable Menu class.
+ *  This class provides enable/disable menu items.
+ */
+VBoxSwitchMenu::VBoxSwitchMenu (QWidget *aParent, QAction *aAction,
+                                const QString &aTip, bool aInverted)
+    : QPopupMenu (aParent), mAction (aAction)
+    , mTip (aTip), mInverted (aInverted)
+{
+    /* this menu works only with toggle action */
+    Assert (aAction->isToggleAction());
+    connect (this, SIGNAL (aboutToShow()),
+             this, SLOT   (processAboutToShow()));
+    connect (this, SIGNAL (activated (int)),
+             this, SLOT   (processActivated (int)));
+}
+
+void VBoxSwitchMenu::processAboutToShow()
+{
+    clear();
+    QString text = mAction->isOn() ^ mInverted ? tr ("Disable") : tr ("Enable");
+    int id = insertItem (text);
+    setItemEnabled (id, mAction->isEnabled());
+    QToolTip::add (this, tr ("%1 %2").arg (text).arg (mTip));
+}
+
+void VBoxSwitchMenu::processActivated (int /*aIndex*/)
+{
+    mAction->setOn (!mAction->isOn());
+}
+
