VirtualBox

Changeset 53301 in vbox for trunk/src


Ignore:
Timestamp:
Nov 11, 2014 11:12:21 AM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 7464: Change network status-bar indicator to have disconnected state icon when all of the existing network adapters have their cables disconnected.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc

    r52696 r53301  
    217217        <file alias="nw_32px.png">images/nw_32px.png</file>
    218218        <file alias="nw_disabled_16px.png">images/nw_disabled_16px.png</file>
     219        <file alias="nw_disconnected_16px.png">images/nw_disconnected_16px.png</file>
    219220        <file alias="nw_error_16px.png">images/nw_error_16px.png</file>
    220221        <file alias="nw_loading_16px.png">images/nw_loading_16px.png</file>
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox1_hidpi.qrc

    r52696 r53301  
    211211        <file alias="nw_32px_hidpi.png">images/hidpi/nw_32px_hidpi.png</file>
    212212        <file alias="nw_disabled_16px_hidpi.png">images/hidpi/nw_disabled_16px_hidpi.png</file>
     213        <file alias="nw_disconnected_16px_hidpi.png">images/hidpi/nw_disconnected_16px_hidpi.png</file>
    213214        <file alias="nw_error_16px_hidpi.png">images/hidpi/nw_error_16px_hidpi.png</file>
    214215        <file alias="nw_loading_16px_hidpi.png">images/hidpi/nw_loading_16px_hidpi.png</file>
     
    253254        <file alias="os_opensuse_64_hidpi.png">images/hidpi/os_opensuse_64_hidpi.png</file>
    254255        <file alias="os_opensuse_hidpi.png">images/hidpi/os_opensuse_hidpi.png</file>
    255         <file alias="os_oracle_64_hidpi.png">images/hidpi/os_oracle_64_hidpi.png</file>
    256256    </qresource>
    257257</RCC>
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox2_hidpi.qrc

    r52696 r53301  
    11<RCC>
    22    <qresource prefix="/">
     3        <file alias="os_oracle_64_hidpi.png">images/hidpi/os_oracle_64_hidpi.png</file>
    34        <file alias="os_oracle_hidpi.png">images/hidpi/os_oracle_hidpi.png</file>
    45        <file alias="os_oraclesolaris_64_hidpi.png">images/hidpi/os_oraclesolaris_64_hidpi.png</file>
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp

    r53050 r53301  
    403403        /* Enumerate up to uMaxCount adapters: */
    404404        bool fAdaptersPresent = false;
     405        bool fCablesDisconnected = true;
    405406        for (ulong uSlot = 0; uSlot < uMaxCount; ++uSlot)
    406407        {
     
    417418                        strGuestIp = ipList[iIp];
    418419                }
     420                /* Check if the adapter's cable is connected: */
     421                const bool fCableConnected = adapter.GetCableConnected();
     422                if (fCablesDisconnected && fCableConnected)
     423                    fCablesDisconnected = false;
    419424                /* Append adapter data: */
    420425                strFullData += QApplication::translate("UIIndicatorsPool",
     
    423428                    .arg(gpConverter->toString(adapter.GetAttachmentType()))
    424429                    .arg(strGuestIp.isEmpty() ? "" : "IP " + strGuestIp + ", ")
    425                     .arg(adapter.GetCableConnected() ?
     430                    .arg(fCableConnected ?
    426431                         QApplication::translate("UIIndicatorsPool", "connected", "Network adapters tooltip") :
    427432                         QApplication::translate("UIIndicatorsPool", "disconnected", "Network adapters tooltip"));
     
    437442            hide();
    438443
     444        /* Update icon for the 'Null' state: */
     445        if (fAdaptersPresent && fCablesDisconnected)
     446            setStateIcon(KDeviceActivity_Null, UIIconPool::iconSet(":/nw_disconnected_16px.png"));
     447
    439448        /* Update tool-tip: */
    440449        setToolTip(strToolTip.arg(strFullData));
    441450        /* Update indicator state: */
    442         setState(fAdaptersPresent ? KDeviceActivity_Idle : KDeviceActivity_Null);
     451        setState(fAdaptersPresent && !fCablesDisconnected ? KDeviceActivity_Idle : KDeviceActivity_Null);
    443452    }
    444453
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