Index: trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h	(revision 2456)
+++ trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h	(revision 2458)
@@ -40,5 +40,5 @@
 # undef PAGE_SHIFT
 # include <Carbon/Carbon.h>
-#endif 
+#endif
 
 class QAction;
@@ -53,4 +53,5 @@
 class VBoxSwitchMenu;
 class VBoxUSBLedTip;
+class VBoxNetworkLedTip;
 
 class VBoxConsoleWnd : public QMainWindow
@@ -140,4 +141,7 @@
     void prepareDVDMenu();
 
+    void prepareNetworkMenu();
+    void activateNetworkMenu (int);
+
     void captureFloppy (int id);
     void captureDVD (int id);
@@ -207,4 +211,5 @@
     QPopupMenu *devicesMountDVDMenu;
     QPopupMenu *devicesSharedFolders;
+    QPopupMenu *devicesNetworkMenu;
     VBoxUSBMenu *devicesUSBMenu;
     VBoxSwitchMenu *devicesVRDPMenu;
@@ -226,4 +231,5 @@
         devicesMountDVDMenuId,
         devicesUSBMenuId,
+        devicesNetworkMenuId,
 #ifdef VBOX_WITH_DEBUGGER_GUI
         dbgMenuId,
@@ -245,4 +251,5 @@
 
     VBoxUSBLedTip *mUsbLedTip;
+    VBoxNetworkLedTip *mNetworkLedTip;
 
     QTimer *idle_timer;
@@ -280,5 +287,5 @@
     CGImageRef dockImgBack100x75;
     CGImageRef dockImgOS;
-#endif 
+#endif
 };
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp	(revision 2456)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp	(revision 2458)
@@ -119,4 +119,55 @@
 };
 
+/** class VBoxNetworkLedTip
+ *
+ *  The VBoxNetworkLedTip class is an auxiliary ToolTip class
+ *  for the Network LED indicator.
+ */
+class VBoxNetworkLedTip : public QToolTip
+{
+public:
+
+    VBoxNetworkLedTip (QWidget *aWidget, const CMachine &aMachine) :
+        QToolTip (aWidget), mMachine (aMachine) {}
+
+    ~VBoxNetworkLedTip() { remove (parentWidget()); }
+
+protected:
+
+    void maybeTip (const QPoint &/* aPoint */)
+    {
+        QString toolTip = VBoxConsoleWnd::tr (
+            "<qt>Indicates&nbsp;the&nbsp;activity&nbsp;of&nbsp;the&nbsp;network&nbsp;interfaces",
+            "Network adapters indicator"
+        );
+
+        QString devices;
+
+        ulong count = vboxGlobal().virtualBox().GetSystemProperties().GetNetworkAdapterCount();
+        for (ulong slot = 0; slot < count; ++ slot)
+        {
+            CNetworkAdapter adapter = mMachine.GetNetworkAdapter (slot);
+            if (adapter.GetEnabled())
+                devices += VBoxConsoleWnd::tr ("<br><nobr>[Adapter %1 (%2): cable %3]</nobr>",
+                                               "Network adapters indicator")
+                    .arg (slot)
+                    .arg (vboxGlobal().toString (adapter.GetAttachmentType()))
+                    .arg (adapter.GetCableConnected() ?
+                          VBoxConsoleWnd::tr ("connected", "Network adapters indicator") :
+                          VBoxConsoleWnd::tr ("disconnected", "Network adapters indicator"));
+        }
+
+        if (devices.isNull())
+            devices = VBoxConsoleWnd::tr ("<br><nobr>[<b>All Network adapters are disabled</b>]</nobr>",
+                                          "Network adapters indicator");
+
+        tip (parentWidget()->rect(), toolTip + devices);
+    }
+
+private:
+
+    CMachine mMachine;
+};
+
 /** \class VBoxConsoleWnd
  *
@@ -147,4 +198,5 @@
     , console (0)
     , mUsbLedTip (0)
+    , mNetworkLedTip (0)
     , machine_state (CEnums::InvalidMachineState)
     , no_auto_close (false)
@@ -164,5 +216,5 @@
     , dockImgBack100x75 (NULL)
     , dockImgOS (NULL)
-#endif 
+#endif
 {
     if (aSelf)
@@ -325,4 +377,5 @@
 
     devicesSharedFolders = new QPopupMenu (devicesMenu, "devicesSharedFolders");
+    devicesNetworkMenu = new QPopupMenu (devicesMenu, "devicesNetworkMenu");
     devicesUSBMenu = new VBoxUSBMenu (devicesMenu);
     devicesVRDPMenu = new VBoxSwitchMenu (devicesMenu, devicesSwitchVrdpAction);
@@ -341,4 +394,7 @@
     devicesSFDialogAction->addTo (devicesMenu);
     devicesSFMenuSeparatorId = devicesMenu->insertSeparator();
+    devicesMenu->insertItem (VBoxGlobal::iconSet ("nw_16px.png", "nw_disabled_16px.png"),
+        QString::null, devicesNetworkMenu, devicesNetworkMenuId);
+    devicesMenu->insertSeparator();
     devicesSwitchVrdpAction->addTo (devicesMenu);
     devicesVRDPMenuSeparatorId = devicesMenu->insertSeparator();
@@ -483,4 +539,5 @@
     connect (devicesMountFloppyMenu, SIGNAL(aboutToShow()), this, SLOT(prepareFloppyMenu()));
     connect (devicesMountDVDMenu, SIGNAL(aboutToShow()), this, SLOT(prepareDVDMenu()));
+    connect (devicesNetworkMenu, SIGNAL(aboutToShow()), this, SLOT(prepareNetworkMenu()));
 
     connect (devicesMountFloppyMenu, SIGNAL(activated(int)), this, SLOT(captureFloppy(int)));
@@ -488,4 +545,5 @@
     connect (devicesUSBMenu, SIGNAL(activated(int)), this, SLOT(switchUSB(int)));
     connect (devicesSharedFolders, SIGNAL(activated(int)), this, SLOT(activateSFMenu()));
+    connect (devicesNetworkMenu, SIGNAL(activated(int)), this, SLOT(activateNetworkMenu(int)));
 
     connect (helpWebAction, SIGNAL (activated()),
@@ -503,4 +561,6 @@
              this, SLOT (showIndicatorContextMenu (QIStateIndicator *, QContextMenuEvent *)));
     connect (sf_state, SIGNAL (contextMenuRequested (QIStateIndicator *, QContextMenuEvent *)),
+             this, SLOT (showIndicatorContextMenu (QIStateIndicator *, QContextMenuEvent *)));
+    connect (net_light, SIGNAL (contextMenuRequested (QIStateIndicator *, QContextMenuEvent *)),
              this, SLOT (showIndicatorContextMenu (QIStateIndicator *, QContextMenuEvent *)));
 
@@ -537,5 +597,5 @@
     SetApplicationDockTileImage (dockImgOS);
     OverlayApplicationDockTileImage (dockImgStateRunning);
-#endif 
+#endif
 }
 
@@ -544,4 +604,6 @@
     if (mUsbLedTip)
         delete mUsbLedTip;
+    if (mNetworkLedTip)
+        delete mNetworkLedTip;
 #ifdef Q_WS_MAC
     /* release the dock images */
@@ -560,5 +622,5 @@
     if (dockImgOS)
         CGImageRelease (dockImgOS);
-#endif 
+#endif
 }
 
@@ -694,4 +756,7 @@
     }
 
+    /* initialize network stuff */
+    mNetworkLedTip = new VBoxNetworkLedTip (net_light, cmachine);
+
     /* initialize vrdp stuff */
     CVRDPServer vrdpsrv = cmachine.GetVRDPServer();
@@ -732,5 +797,5 @@
     QImage osImg75x75 = vboxGlobal().vmGuestOSTypeIcon (osType).convertToImage().smoothScale (75, 75);
     QImage osImg = QImage::fromMimeSource ("dock_0.png");
-    bitBlt (&osImg, 25, 22, 
+    bitBlt (&osImg, 25, 22,
             &osImg75x75, 0, 0,
             75, 75, /* conversion_flags */ 0);
@@ -738,8 +803,8 @@
     QImage osImg100x75 = vboxGlobal().vmGuestOSTypeIcon (osType).convertToImage().smoothScale (100, 75);
     QImage osImg = QImage::fromMimeSource ("dock_1.png");
-    bitBlt (&osImg, 14, 22, 
+    bitBlt (&osImg, 14, 22,
             &osImg100x75, 0, 0,
             100, 75, /* conversion_flags */ 0);
-# endif 
+# endif
     if (dockImgOS)
         CGImageRelease (dockImgOS);
@@ -1307,4 +1372,5 @@
     devicesMenu->changeItem (devicesMountFloppyMenuId, tr ("Mount &Floppy"));
     devicesMenu->changeItem (devicesMountDVDMenuId, tr ("Mount &CD/DVD-ROM"));
+    devicesMenu->changeItem (devicesNetworkMenuId, tr ("&Network Adapters"));
     devicesMenu->changeItem (devicesUSBMenuId, tr ("&USB Devices"));
 
@@ -1479,9 +1545,4 @@
         net_light->setState (count > 0 ? CEnums::DeviceIdle
                                          : CEnums::InvalidActivity);
-        QString tip = tr (
-            "<qt>Indicates&nbsp;the&nbsp;activity&nbsp;of&nbsp;the&nbsp;network&nbsp;interfaces"
-            "<br>[<b>%1 adapter(s)</b>]</qt>"
-        );
-        QToolTip::add (net_light, tip.arg (count));
     }
     if (element & USBStuff)
@@ -2067,4 +2128,39 @@
 
 /**
+ *  Prepares the "Network adapter" menu by populating the existent adaptors.
+ */
+void VBoxConsoleWnd::prepareNetworkMenu()
+{
+    devicesNetworkMenu->clear();
+    ulong count = vboxGlobal().virtualBox().GetSystemProperties().GetNetworkAdapterCount();
+    for (ulong slot = 0; slot < count; ++ slot)
+    {
+        CNetworkAdapter adapter = csession.GetMachine().GetNetworkAdapter (slot);
+        int id = devicesNetworkMenu->insertItem (tr ("Adapter %1").arg (slot));
+        devicesNetworkMenu->setItemEnabled (id, adapter.GetEnabled());
+        devicesNetworkMenu->setItemChecked (id, adapter.GetEnabled() && adapter.GetCableConnected());
+    }
+}
+
+/**
+ *  Switch the cable connected/disconnected for the selected network adapter
+ */
+void VBoxConsoleWnd::activateNetworkMenu (int aId)
+{
+    ulong count = vboxGlobal().virtualBox().GetSystemProperties().GetNetworkAdapterCount();
+    for (ulong slot = 0; slot < count; ++ slot)
+    {
+        if (aId == devicesNetworkMenu->idAt (slot))
+        {
+            CNetworkAdapter adapter = csession.GetMachine().GetNetworkAdapter (slot);
+            bool connected = adapter.GetCableConnected();
+            if (adapter.GetEnabled())
+                adapter.SetCableConnected (!connected);
+            break;
+        }
+    }
+}
+
+/**
  *  Captures a floppy device corresponding to a given menu id.
  */
@@ -2207,4 +2303,9 @@
     {
         devicesSharedFolders->exec (e->globalPos());
+    }
+    else
+    if (ind == net_light)
+    {
+        devicesNetworkMenu->exec (e->globalPos());
     }
 }
