From 2571db3ace84f0240f55e332aab5c3df7c5f23c7 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Tue, 11 Dec 2012 20:10:58 +0000 Subject: Frame, Wireless Device icon: use the same status code as the newtworkview has, call update_color - SL #4188 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 Signed-off-by: Manuel QuiƱones --- diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py index 2a60481..ab3b73f 100644 --- a/extensions/deviceicon/network.py +++ b/extensions/deviceicon/network.py @@ -470,6 +470,7 @@ class WirelessDeviceView(ToolButton): def __state_changed_cb(self, new_state, old_state, reason): self._device_state = new_state + self._update_color() self._update_state() self._device_props.Get(network.NM_WIRELESS_IFACE, 'ActiveAccessPoint', reply_handler=self.__get_active_ap_reply_cb, @@ -552,8 +553,10 @@ class WirelessDeviceView(ToolButton): self._icon.props.icon_name = 'network-adhoc-%s' % channel self._icon.props.base_color = profile.get_color() - if (state >= network.NM_DEVICE_STATE_PREPARE) and \ - (state <= network.NM_DEVICE_STATE_IP_CONFIG): + if state == network.NM_DEVICE_STATE_PREPARE or \ + state == network.NM_DEVICE_STATE_CONFIG or \ + state == network.NM_DEVICE_STATE_NEED_AUTH or \ + state == network.NM_DEVICE_STATE_IP_CONFIG: self._palette.set_connecting() self._icon.props.pulsing = True elif state == network.NM_DEVICE_STATE_ACTIVATED: -- cgit v0.9.1