VirtualBox

Changeset 75686 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Nov 23, 2018 12:54:14 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6699. Enable the context menu in guest file pane

Location:
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestFileTable.cpp

    r75682 r75686  
    595595}
    596596
    597 void UIGuestFileTable::createFileViewContextMenu(const QWidget *pWidget, const QPoint &/*point*/)
     597void UIGuestFileTable::createFileViewContextMenu(const QWidget *pWidget, const QPoint &point)
    598598{
    599599    if (!pWidget)
    600600        return;
    601601
    602     // QMenu menu;
    603     // menu.exec(mapToGlobal(position));
     602    QMenu menu;
     603    menu.addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_GoUp));
     604
     605    menu.addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_GoHome));
     606    menu.addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_Refresh));
     607    menu.addSeparator();
     608    menu.addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_Delete));
     609    menu.addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_Rename));
     610    menu.addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_CreateNewDirectory));
     611    /* Hide cut, copy, and paste for now. We will implement those
     612       when we have an API for host file operations: */
     613    menu.addSeparator();
     614    menu.addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_Copy));
     615    menu.addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_Cut));
     616    menu.addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_Paste));
     617    menu.addSeparator();
     618    menu.addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_SelectAll));
     619    menu.addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_InvertSelection));
     620    menu.addSeparator();
     621    menu.addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Guest_ShowProperties));
     622    menu.exec(pWidget->mapToGlobal(point));
    604623}
    605624
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIHostFileTable.cpp

    r75682 r75686  
    203203    menu.addSeparator();
    204204    menu.addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_Host_ShowProperties));
    205 
    206 
    207 
    208205    menu.exec(pWidget->mapToGlobal(point));
    209206}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette