diff options
author | Simon Schampijer <simon@laptop.org> | 2012-12-11 20:10:58 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2013-02-19 08:44:06 (GMT) |
commit | 976c3f5ef1202d586f65d90d959d123d33d70e07 (patch) | |
tree | 31e5070e9c2e38e3d9213ab0661837536ef6a6bb | |
parent | 7b118678414a7221fe844031bbdd5941b2094d0f (diff) |
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 <simon@laptop.org>
Signed-off-by: Manuel QuiƱones <manuq@laptop.org>
-rw-r--r-- | extensions/deviceicon/network.py | 7 |
1 files changed, 5 insertions, 2 deletions
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: |