[Sugar-devel] [PATCH] Update alpha according to filter after events in neighborhoodview icons - SL #3091 -v2

godiard at sugarlabs.org godiard at sugarlabs.org
Fri Oct 7 14:47:58 EDT 2011


From: Gonzalo Odiard <godiard at gmail.com>

The neighboard view use alpha to show the applied filter.
When the state of a ap change the graphic representation
is updated and the alpha should be restored acording the filter value.

v2 - As suggested by Simon by irc,moved the call to update_color in the class
OlpcMeshView to  __device_state_changed_cb

Signed-off-by: Gonzalo Odiard <gonzalo at laptop.org>
---
 src/jarabe/desktop/networkviews.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/jarabe/desktop/networkviews.py b/src/jarabe/desktop/networkviews.py
index 616f555..677452d 100644
--- a/src/jarabe/desktop/networkviews.py
+++ b/src/jarabe/desktop/networkviews.py
@@ -149,6 +149,7 @@ class WirelessNetworkView(CanvasPulsingIcon):
         self._update_state()
         self._update_icon()
         self._update_badge()
+        self._update_color()
 
     def __update_active_ap(self, ap_path):
         if ap_path in self._access_points:
@@ -558,6 +559,7 @@ class SugarAdhocView(CanvasPulsingIcon):
             self._connect_item.show()
             self._palette.props.secondary_text = None
             self.props.pulsing = False
+        self._update_color()
 
     def _update_color(self):
         self.props.base_color = self._state_color
@@ -650,6 +652,7 @@ class OlpcMeshView(CanvasPulsingIcon):
     def __device_state_changed_cb(self, new_state, old_state, reason):
         self._device_state = new_state
         self._update()
+        self._update_color()
 
     def __get_active_channel_reply_cb(self, channel):
         self._active = (channel == self._channel)
-- 
1.7.4.4



More information about the Sugar-devel mailing list