Index: /trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.cpp	(revision 75161)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.cpp	(revision 75162)
@@ -92,5 +92,4 @@
     virtual void selectionChanged(const QItemSelection & selected, const QItemSelection & deselected) /*override */;
     void contextMenuEvent(QContextMenuEvent *pEvent);
-    //void keyPressEvent(QKeyEvent * pEvent);
 
 private:
@@ -1110,4 +1109,5 @@
     m_pModel->endReset();
     m_pView->setRootIndex(m_pProxyModel->mapFromSource(currentIndex));
+    setSelectionDependentActionsEnabled(m_pView->hasSelection());
 }
 
@@ -1208,10 +1208,6 @@
     Q_UNUSED(selected);
     Q_UNUSED(deselected);
-    if (m_pView->hasSelection())
-        enableSelectionDependentActions();
-    else
-        disableSelectionDependentActions();
-}
-
+    setSelectionDependentActionsEnabled(m_pView->hasSelection());
+}
 
 void UIGuestControlFileTable::prepareActionConnections()
@@ -1483,20 +1479,9 @@
 }
 
-void UIGuestControlFileTable::enableSelectionDependentActions()
-{
-    for (int i = 0; i < m_selectionDependentActions.size(); ++i)
-    {
-        if (m_selectionDependentActions[i])
-            m_selectionDependentActions[i]->setEnabled(true);
-    }
-}
-
-void UIGuestControlFileTable::disableSelectionDependentActions()
-{
-    /* Disable all the action that operate on some selection: */
-    for (int i = 0; i < m_selectionDependentActions.size(); ++i)
-    {
-        if (m_selectionDependentActions[i])
-            m_selectionDependentActions[i]->setEnabled(false);
+void UIGuestControlFileTable::setSelectionDependentActionsEnabled(bool fIsEnabled)
+{
+    foreach (QAction *pAction, m_selectionDependentActions)
+    {
+        pAction->setEnabled(fIsEnabled);
     }
 }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.h	(revision 75161)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.h	(revision 75162)
@@ -293,6 +293,5 @@
     bool             eventFilter(QObject *pObject, QEvent *pEvent) /* override */;
     CGuestFsObjInfo  guestFsObjectInfo(const QString& path, CGuestSession &comGuestSession) const;
-    void             enableSelectionDependentActions();
-    void             disableSelectionDependentActions();
+    void             setSelectionDependentActionsEnabled(bool fIsEnabled);
     void             prepareActionConnections();
 
@@ -307,5 +306,6 @@
      *  systems this is empty and for windows system it should at least contain C:/ */
     QStringList m_driveLetterList;
-
+    /** The set of actions which need some selection to work on. Like cut, copy etc. */
+    QSet<QAction*> m_selectionDependentActions;
 
 protected slots:
@@ -362,15 +362,4 @@
     QGridLayout     *m_pMainLayout;
     QComboBox       *m_pLocationComboBox;
-    //QAction         *m_pGoUp;
-    //QAction         *m_pGoHome;
-    //QAction         *m_pRefresh;
-    //QAction         *m_pDelete;
-    //QAction         *m_pRename;
-    //QAction         *m_pCreateNewDirectory;
-    // QAction         *m_pShowProperties;
-    // QAction         *m_pSelectAll;
-    // QAction         *m_pInvertSelection;
-    /** The vector of actions which need some selection to work on. Like cut, copy etc. */
-    QVector<QAction*> m_selectionDependentActions;
     /** The absolue path list of the file objects which user has chosen to cut/copy. this
      *  list will be cleaned after a paste operation or overwritten by a subsequent cut/copy */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestFileTable.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestFileTable.cpp	(revision 75161)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestFileTable.cpp	(revision 75162)
@@ -611,7 +611,13 @@
         m_pToolBar->addSeparator();
         m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_ShowProperties));
-    }
-
-    disableSelectionDependentActions();
+
+        m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_Delete));
+        m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_Rename));
+        m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_Copy));
+        m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_Cut));
+        m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_ShowProperties));
+
+    }
+    setSelectionDependentActionsEnabled(false);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIHostFileTable.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIHostFileTable.cpp	(revision 75161)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIHostFileTable.cpp	(revision 75162)
@@ -148,5 +148,4 @@
         m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Host_GoHome));
         m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Host_Refresh));
-
         m_pToolBar->addSeparator();
         m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Host_Delete));
@@ -162,4 +161,10 @@
         m_pToolBar->addSeparator();
         m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Host_ShowProperties));
+
+        m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Host_Delete));
+        m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Host_Rename));
+        m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Host_Copy));
+        m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Host_Cut));
+        m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Host_ShowProperties));
     }
 
@@ -172,6 +177,5 @@
     // if (m_pPaste)
     //     m_pPaste->setVisible(false);
-
-    disableSelectionDependentActions();
+    setSelectionDependentActionsEnabled(false);
 }
 
