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): |
470 | 470 | |
471 | 471 | def __state_changed_cb(self, new_state, old_state, reason): |
472 | 472 | self._device_state = new_state |
| 473 | self._update_color() |
473 | 474 | self._update_state() |
474 | 475 | self._device_props.Get(network.NM_WIRELESS_IFACE, 'ActiveAccessPoint', |
475 | 476 | reply_handler=self.__get_active_ap_reply_cb, |
… |
… |
class WirelessDeviceView(ToolButton): |
552 | 553 | self._icon.props.icon_name = 'network-adhoc-%s' % channel |
553 | 554 | self._icon.props.base_color = profile.get_color() |
554 | 555 | |
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: |
557 | 560 | self._palette.set_connecting() |
558 | 561 | self._icon.props.pulsing = True |
559 | 562 | elif state == network.NM_DEVICE_STATE_ACTIVATED: |