Index: /trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.cpp	(revision 66719)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.cpp	(revision 66720)
@@ -29,7 +29,7 @@
 # include "QITreeWidget.h"
 # include "UIIconPool.h"
-# include "UIMessageCenter.h"
 # include "UIHostNetworkDetailsDialog.h"
 # include "UIHostNetworkManager.h"
+# include "UIMessageCenter.h"
 # include "UIToolBar.h"
 # ifdef VBOX_WS_MAC
@@ -195,6 +195,6 @@
     , m_pMenu(0)
     , m_pActionAdd(0)
+    , m_pActionRemove(0)
     , m_pActionEdit(0)
-    , m_pActionRemove(0)
     , m_pTreeWidget(0)
     , m_pButtonBox(0)
@@ -245,4 +245,10 @@
         m_pActionAdd->setStatusTip(tr("Creates new host-only network."));
     }
+    if (m_pActionRemove)
+    {
+        m_pActionRemove->setText(tr("&Remove..."));
+        m_pActionRemove->setToolTip(tr("Remove Host-only Network (%1)").arg(m_pActionRemove->shortcut().toString()));
+        m_pActionRemove->setStatusTip(tr("Removes selected host-only network."));
+    }
     if (m_pActionEdit)
     {
@@ -250,10 +256,4 @@
         m_pActionEdit->setToolTip(tr("Modify Host-only Network (%1)").arg(m_pActionEdit->shortcut().toString()));
         m_pActionEdit->setStatusTip(tr("Modifies selected host-only network."));
-    }
-    if (m_pActionRemove)
-    {
-        m_pActionRemove->setText(tr("&Remove..."));
-        m_pActionRemove->setToolTip(tr("Remove Host-only Network (%1)").arg(m_pActionRemove->shortcut().toString()));
-        m_pActionRemove->setStatusTip(tr("Removes selected host-only network."));
     }
 
@@ -346,4 +346,84 @@
             /* Adjust tree-widget: */
             sltAdjustTreeWidget();
+        }
+    }
+}
+
+void UIHostNetworkManager::sltRemoveHostNetwork()
+{
+    /* Get network item: */
+    UIItemHostNetwork *pItem = static_cast<UIItemHostNetwork*>(m_pTreeWidget->currentItem());
+    AssertMsgReturnVoid(pItem, ("Current item must not be null!\n"));
+
+    /* Get interface name: */
+    const QString strInterfaceName(pItem->name());
+
+    /* Confirm host network removal: */
+    if (!msgCenter().confirmHostOnlyInterfaceRemoval(strInterfaceName, this))
+        return;
+
+    /* Get host for further activities: */
+    CHost comHost = vboxGlobal().host();
+
+    /* Find corresponding interface: */
+    const CHostNetworkInterface &comInterface = comHost.FindHostNetworkInterfaceByName(strInterfaceName);
+
+    /* Show error message if necessary: */
+    if (!comHost.isOk() || comInterface.isNull())
+        msgCenter().cannotFindHostNetworkInterface(comHost, strInterfaceName, this);
+    else
+    {
+        /* Get network name for further activities: */
+        QString strNetworkName;
+        if (comInterface.isOk())
+            strNetworkName = comInterface.GetNetworkName();
+        /* Get interface id for further activities: */
+        QString strInterfaceId;
+        if (comInterface.isOk())
+            strInterfaceId = comInterface.GetId();
+
+        /* Show error message if necessary: */
+        if (!comInterface.isOk())
+            msgCenter().cannotAcquireHostNetworkInterfaceParameter(comInterface, this);
+        else
+        {
+            /* Get VBox for further activities: */
+            CVirtualBox comVBox = vboxGlobal().virtualBox();
+
+            /* Find corresponding DHCP server: */
+            const CDHCPServer &comServer = comVBox.FindDHCPServerByNetworkName(strNetworkName);
+            if (comVBox.isOk() && comServer.isNotNull())
+            {
+                /* Remove server if any: */
+                comVBox.RemoveDHCPServer(comServer);
+
+                /* Show error message if necessary: */
+                if (!comVBox.isOk())
+                    msgCenter().cannotRemoveDHCPServer(comVBox, strInterfaceName, this);
+            }
+
+            /* Remove interface finally: */
+            CProgress progress = comHost.RemoveHostOnlyNetworkInterface(strInterfaceId);
+
+            /* Show error message if necessary: */
+            if (!comHost.isOk() || progress.isNull())
+                msgCenter().cannotRemoveHostNetworkInterface(comHost, strInterfaceName, this);
+            else
+            {
+                /* Show interface removal progress: */
+                msgCenter().showModalProgressDialog(progress, tr("Networking"), ":/progress_network_interface_90px.png", this, 0);
+
+                /* Show error message if necessary: */
+                if (!progress.isOk() || progress.GetResultCode() != 0)
+                    return msgCenter().cannotRemoveHostNetworkInterface(progress, strInterfaceName, this);
+                else
+                {
+                    /* Remove interface from the tree: */
+                    delete pItem;
+
+                    /* Adjust tree-widget: */
+                    sltAdjustTreeWidget();
+                }
+            }
         }
     }
@@ -445,84 +525,4 @@
 }
 
-void UIHostNetworkManager::sltRemoveHostNetwork()
-{
-    /* Get network item: */
-    UIItemHostNetwork *pItem = static_cast<UIItemHostNetwork*>(m_pTreeWidget->currentItem());
-    AssertMsgReturnVoid(pItem, ("Current item must not be null!\n"));
-
-    /* Get interface name: */
-    const QString strInterfaceName(pItem->name());
-
-    /* Confirm host network removal: */
-    if (!msgCenter().confirmHostOnlyInterfaceRemoval(strInterfaceName, this))
-        return;
-
-    /* Get host for further activities: */
-    CHost comHost = vboxGlobal().host();
-
-    /* Find corresponding interface: */
-    const CHostNetworkInterface &comInterface = comHost.FindHostNetworkInterfaceByName(strInterfaceName);
-
-    /* Show error message if necessary: */
-    if (!comHost.isOk() || comInterface.isNull())
-        msgCenter().cannotFindHostNetworkInterface(comHost, strInterfaceName, this);
-    else
-    {
-        /* Get network name for further activities: */
-        QString strNetworkName;
-        if (comInterface.isOk())
-            strNetworkName = comInterface.GetNetworkName();
-        /* Get interface id for further activities: */
-        QString strInterfaceId;
-        if (comInterface.isOk())
-            strInterfaceId = comInterface.GetId();
-
-        /* Show error message if necessary: */
-        if (!comInterface.isOk())
-            msgCenter().cannotAcquireHostNetworkInterfaceParameter(comInterface, this);
-        else
-        {
-            /* Get VBox for further activities: */
-            CVirtualBox comVBox = vboxGlobal().virtualBox();
-
-            /* Find corresponding DHCP server: */
-            const CDHCPServer &comServer = comVBox.FindDHCPServerByNetworkName(strNetworkName);
-            if (comVBox.isOk() && comServer.isNotNull())
-            {
-                /* Remove server if any: */
-                comVBox.RemoveDHCPServer(comServer);
-
-                /* Show error message if necessary: */
-                if (!comVBox.isOk())
-                    msgCenter().cannotRemoveDHCPServer(comVBox, strInterfaceName, this);
-            }
-
-            /* Remove interface finally: */
-            CProgress progress = comHost.RemoveHostOnlyNetworkInterface(strInterfaceId);
-
-            /* Show error message if necessary: */
-            if (!comHost.isOk() || progress.isNull())
-                msgCenter().cannotRemoveHostNetworkInterface(comHost, strInterfaceName, this);
-            else
-            {
-                /* Show interface removal progress: */
-                msgCenter().showModalProgressDialog(progress, tr("Networking"), ":/progress_network_interface_90px.png", this, 0);
-
-                /* Show error message if necessary: */
-                if (!progress.isOk() || progress.GetResultCode() != 0)
-                    return msgCenter().cannotRemoveHostNetworkInterface(progress, strInterfaceName, this);
-                else
-                {
-                    /* Remove interface from the tree: */
-                    delete pItem;
-
-                    /* Adjust tree-widget: */
-                    sltAdjustTreeWidget();
-                }
-            }
-        }
-    }
-}
-
 void UIHostNetworkManager::sltAdjustTreeWidget()
 {
@@ -633,6 +633,6 @@
     if (m_pTreeWidget->itemAt(pos))
     {
+        menu.addAction(m_pActionRemove);
         menu.addAction(m_pActionEdit);
-        menu.addAction(m_pActionRemove);
     }
     else
@@ -695,4 +695,17 @@
     }
 
+    /* Create 'Remove' action: */
+    m_pActionRemove = new QAction(this);
+    AssertPtrReturnVoid(m_pActionRemove);
+    {
+        /* Configure 'Remove' action: */
+        m_pActionRemove->setShortcut(QKeySequence("Del"));
+        m_pActionRemove->setIcon(UIIconPool::iconSetFull(":/remove_host_iface_22px.png",
+                                                         ":/remove_host_iface_16px.png",
+                                                         ":/remove_host_iface_disabled_22px.png",
+                                                         ":/remove_host_iface_disabled_16px.png"));
+        connect(m_pActionRemove, SIGNAL(triggered()), this, SLOT(sltRemoveHostNetwork()));
+    }
+
     /* Create 'Edit' action: */
     m_pActionEdit = new QAction(this);
@@ -708,17 +721,4 @@
     }
 
-    /* Create 'Remove' action: */
-    m_pActionRemove = new QAction(this);
-    AssertPtrReturnVoid(m_pActionRemove);
-    {
-        /* Configure 'Remove' action: */
-        m_pActionRemove->setShortcut(QKeySequence("Del"));
-        m_pActionRemove->setIcon(UIIconPool::iconSetFull(":/remove_host_iface_22px.png",
-                                                         ":/remove_host_iface_16px.png",
-                                                         ":/remove_host_iface_disabled_22px.png",
-                                                         ":/remove_host_iface_disabled_16px.png"));
-        connect(m_pActionRemove, SIGNAL(triggered()), this, SLOT(sltRemoveHostNetwork()));
-    }
-
     /* Prepare menu-bar: */
     prepareMenuBar();
@@ -733,6 +733,6 @@
         /* Configure 'File' menu: */
         m_pMenu->addAction(m_pActionAdd);
+        m_pMenu->addAction(m_pActionRemove);
         m_pMenu->addAction(m_pActionEdit);
-        m_pMenu->addAction(m_pActionRemove);
     }
 
@@ -780,8 +780,8 @@
         if (m_pActionAdd)
             m_pToolBar->addAction(m_pActionAdd);
+        if (m_pActionRemove)
+            m_pToolBar->addAction(m_pActionRemove);
         if (m_pActionEdit)
             m_pToolBar->addAction(m_pActionEdit);
-        if (m_pActionRemove)
-            m_pToolBar->addAction(m_pActionRemove);
         /* Integrate tool-bar into dialog: */
         QVBoxLayout *pMainLayout = qobject_cast<QVBoxLayout*>(centralWidget()->layout());
Index: /trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.h	(revision 66719)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.h	(revision 66720)
@@ -73,8 +73,8 @@
         /** Handles command to add host network. */
         void sltAddHostNetwork();
+        /** Handles command to remove host network. */
+        void sltRemoveHostNetwork();
         /** Handles command to edit host network. */
         void sltEditHostNetwork();
-        /** Handles command to remove host network. */
-        void sltRemoveHostNetwork();
     /** @} */
 
@@ -152,8 +152,8 @@
         /** Holds the Add action instance. */
         QAction   *m_pActionAdd;
+        /** Holds the Remove action instance. */
+        QAction   *m_pActionRemove;
         /** Holds the Edit action instance. */
         QAction   *m_pActionEdit;
-        /** Holds the Remove action instance. */
-        QAction   *m_pActionRemove;
     /** @} */
 
