Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@laptop.org>2012-12-11 20:10:58 (GMT)
committer Simon Schampijer <simon@laptop.org>2013-02-19 08:45:07 (GMT)
commit2571db3ace84f0240f55e332aab5c3df7c5f23c7 (patch)
treee662db2d265b1e17a21daf3a672f9a85199d5cdf
parentcd07d06ebbb750671f453fd17dd002b5fa607dc2 (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.py7
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: