Ticket #4188: 0001-Wireless-Device-icon-use-the-same-status-code-as-the.patch

File 0001-Wireless-Device-icon-use-the-same-status-code-as-the.patch, 1.4 KB (added by erikos, 11 years ago)

Wireless Device icon: use the same status code as the newtworkview has

  • extensions/deviceicon/network.py

    From 6b5907606b342c3b019815846db9a70d0a31c915 Mon Sep 17 00:00:00 2001
    From: Simon Schampijer <simon@laptop.org>
    Date: Tue, 11 Dec 2012 21:10:58 +0100
    Subject: [PATCH shell] Wireless Device icon: use the same status code as the
     newtworkview has, SL #4188
    
    Using the same code to indicate connection status as
    the WirelessNetworkView does fixes the issue described in
    SL #4188.
    
    Signed-off-by: Simon Schampijer <simon@laptop.org>
    ---
     extensions/deviceicon/network.py | 6 ++++--
     1 file changed, 4 insertions(+), 2 deletions(-)
    
    diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py
    index ebbafdd..ad39558 100644
    a b class WirelessDeviceView(ToolButton): 
    552552                self._icon.props.icon_name = 'network-adhoc-%s' % channel
    553553            self._icon.props.base_color = profile.get_color()
    554554
    555         if (state >= network.NM_DEVICE_STATE_PREPARE) and \
    556            (state <= network.NM_DEVICE_STATE_IP_CONFIG):
     555        if state == network.NM_DEVICE_STATE_PREPARE or \
     556           state == network.NM_DEVICE_STATE_CONFIG or \
     557           state == network.NM_DEVICE_STATE_NEED_AUTH or \
     558           state == network.NM_DEVICE_STATE_IP_CONFIG:
    557559            self._palette.set_connecting()
    558560            self._icon.props.pulsing = True
    559561        elif state == network.NM_DEVICE_STATE_ACTIVATED: