VirtualBox

Changeset 993 in vbox


Ignore:
Timestamp:
Feb 19, 2007 6:53:15 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
18808
Message:

1758: Implement Shared Folders UI.

Implemented status icon for working console shared folders with popup menu, starting Shared Folders Dialog.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h

    r951 r993  
    136136    void captureDVD (int id);
    137137    void switchUSB (int id);
     138    void activateSFMenu();
    138139
    139140    void showIndicatorContextMenu (QIStateIndicator *ind, QContextMenuEvent *e);
     
    198199    QPopupMenu *devicesMountFloppyMenu;
    199200    QPopupMenu *devicesMountDVDMenu;
     201    QPopupMenu *devicesSharedFolders;
    200202    VBoxUSBMenu *devicesUSBMenu;
    201203    VBoxSwitchMenu *devicesVRDPMenu;
     
    231233    QIStateIndicator *autoresize_state;
    232234    QIStateIndicator *vrdp_state;
     235    QIStateIndicator *sf_state;
    233236    QHBox *hostkey_hbox;
    234237    QLabel *hostkey_name;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r952 r993  
    317317    devicesMountFloppyMenu = new QPopupMenu (devicesMenu, "devicesMountFloppyMenu");
    318318    devicesMountDVDMenu = new QPopupMenu (devicesMenu, "devicesMountDVDMenu");
     319
     320    devicesSharedFolders = new QPopupMenu (devicesMenu, "devicesSharedFolders");
     321    devicesSharedFolders->insertItem (tr ("Shared Folders"));
    319322    devicesUSBMenu = new VBoxUSBMenu (devicesMenu);
    320323    devicesVRDPMenu = new VBoxSwitchMenu (devicesMenu, devicesSwitchVrdpAction,
     
    405408    vrdp_state->setStateIcon (0, QPixmap::fromMimeSource ("vrdp_disabled_16px.png"));
    406409    vrdp_state->setStateIcon (1, QPixmap::fromMimeSource ("vrdp_16px.png"));
    407 
     410    /* shared folders state */
     411    sf_state = new QIStateIndicator (0, indicatorBox, "sf_state", WNoAutoErase);
     412    sf_state->setStateIcon (0, QPixmap::fromMimeSource ("select_file_16px.png"));
     413    sf_state->setStateIcon (1, QPixmap::fromMimeSource ("select_file_dis_16px.png"));
    408414    /* auto resize state */
    409415    autoresize_state = new QIStateIndicator (1, indicatorBox, "autoresize_state", WNoAutoErase);
     
    475481    connect (devicesMountDVDMenu, SIGNAL(activated(int)), this, SLOT(captureDVD(int)));
    476482    connect (devicesUSBMenu, SIGNAL(activated(int)), this, SLOT(switchUSB(int)));
     483    connect (devicesSharedFolders, SIGNAL(activated(int)), this, SLOT(activateSFMenu()));
    477484
    478485    connect (helpWebAction, SIGNAL (activated()),
     
    490497             this, SLOT (showIndicatorContextMenu (QIStateIndicator *, QContextMenuEvent *)));
    491498    connect (vrdp_state, SIGNAL (contextMenuRequested (QIStateIndicator *, QContextMenuEvent *)),
     499             this, SLOT (showIndicatorContextMenu (QIStateIndicator *, QContextMenuEvent *)));
     500    connect (sf_state, SIGNAL (contextMenuRequested (QIStateIndicator *, QContextMenuEvent *)),
    492501             this, SLOT (showIndicatorContextMenu (QIStateIndicator *, QContextMenuEvent *)));
    493502    connect (autoresize_state, SIGNAL (contextMenuRequested (QIStateIndicator *, QContextMenuEvent *)),
     
    662671        devicesSFDialogAction->setVisible (false);
    663672        devicesMenu->setItemVisible (devicesSFMenuSeparatorId, false);
    664         //vrdp_state->setHidden (true);
     673        sf_state->setHidden (true);
    665674    }
    666675
     
    12531262            "capture state. It can also be used in combination with other keys "
    12541263            "to quickly perform actions from the main menu." ));
     1264    QToolTip::add (sf_state,
     1265        tr ("Press right mouse button to open the dialog to operate on shared folders."));
    12551266
    12561267    updateAppearanceOf (AllStuff);
     
    20262037}
    20272038
     2039/**
     2040 *  Show Shared Folders list.
     2041 */
     2042void VBoxConsoleWnd::activateSFMenu()
     2043{
     2044    if (!devicesSFDialogAction->isOn())
     2045        devicesSFDialogAction->setOn (true);
     2046}
     2047
    20282048void VBoxConsoleWnd::showIndicatorContextMenu (QIStateIndicator *ind, QContextMenuEvent *e)
    20292049{
     
    20682088    {
    20692089        vmDisMouseIntegrMenu->exec (e->globalPos());
     2090    }
     2091    else
     2092    if (ind == sf_state)
     2093    {
     2094        devicesSharedFolders->exec (e->globalPos());
    20702095    }
    20712096}
Note: See TracChangeset for help on using the changeset viewer.

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