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

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

Updated patch: move the update_color code before the update_state call

  • extensions/deviceicon/network.py

    From 51d382fa0823d09e2ecbd67d381b6eeb9f6299f9 Mon Sep 17 00:00:00 2001
    From: Simon Schampijer <simon@laptop.org>
    Date: Tue, 11 Dec 2012 21:10:58 +0100
    Subject: [PATCH 1/2] Frame, Wireless Device icon: use the same status code as
     the newtworkview has, call update_color - SL #4188
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    Using the same code to indicate connection status as the
    WirelessNetworkView, and calling update_color as WirelessNetworkView
    does too, this fixes the issue described in SL #4188.
    
    Signed-off-by: Simon Schampijer <simon@laptop.org>
    Signed-off-by: Manuel Quiñones <manuq@laptop.org>
    ---
     extensions/deviceicon/network.py | 7 +++++--
     1 file changed, 5 insertions(+), 2 deletions(-)
    
    diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py
    index 2a60481..ab3b73f 100644
    a b class WirelessDeviceView(ToolButton): 
    470470
    471471    def __state_changed_cb(self, new_state, old_state, reason):
    472472        self._device_state = new_state
     473        self._update_color()
    473474        self._update_state()
    474475        self._device_props.Get(network.NM_WIRELESS_IFACE, 'ActiveAccessPoint',
    475476                               reply_handler=self.__get_active_ap_reply_cb,
    class WirelessDeviceView(ToolButton): 
    552553                self._icon.props.icon_name = 'network-adhoc-%s' % channel
    553554            self._icon.props.base_color = profile.get_color()
    554555
    555         if (state >= network.NM_DEVICE_STATE_PREPARE) and \
    556            (state <= network.NM_DEVICE_STATE_IP_CONFIG):
     556        if state == network.NM_DEVICE_STATE_PREPARE or \
     557           state == network.NM_DEVICE_STATE_CONFIG or \
     558           state == network.NM_DEVICE_STATE_NEED_AUTH or \
     559           state == network.NM_DEVICE_STATE_IP_CONFIG:
    557560            self._palette.set_connecting()
    558561            self._icon.props.pulsing = True
    559562        elif state == network.NM_DEVICE_STATE_ACTIVATED: