VirtualBox

Changeset 438 in vbox


Ignore:
Timestamp:
Jan 30, 2007 3:47:59 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
18015
Message:

FE/Qt: Enabled USB device activity function (doesn't actually work yet since the code in Console is not impelmented).

File:
1 edited

Legend:

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

    r382 r438  
    7575
    7676    ~VBoxUSBLedTip() { remove (parentWidget()); }
     77   
     78    bool isUSBEnabled() const { return mUSBEnabled; }
    7779   
    7880protected:
     
    580582    bool isUSBEnabled = cmachine.GetUSBController().GetEnabled();
    581583    devicesUSBMenu->setEnabled (isUSBEnabled);
    582     usb_light->setState (CEnums::InvalidActivity);
     584    usb_light->setState (isUSBEnabled ? CEnums::DeviceIdle
     585                                      : CEnums::InvalidActivity);
    583586    mUsbLedTip = new VBoxUSBLedTip (usb_light, cconsole, isUSBEnabled);
    584587
     
    12901293    if (element & USBStuff)
    12911294    {
    1292         devicesUSBMenu->setEnabled (machine_state == CEnums::Running);
     1295        /// @todo (r=dmik) do we really need to disable the control while
     1296        //  in Pause? Check the same for CD/DVD above.
     1297        if (mUsbLedTip->isUSBEnabled())
     1298            devicesUSBMenu->setEnabled (machine_state == CEnums::Running);
    12931299    }
    12941300    if (element & PauseAction)
     
    20232029                net_light->setState (st);
    20242030        }
     2031        if (usb_light->state() != CEnums::InvalidActivity) {
     2032            st = cconsole.GetDeviceActivity (CEnums::USBDevice);
     2033            if (usb_light->state() != st)
     2034                usb_light->setState (st);
     2035        }
    20252036    }
    20262037}
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