Display strength of wireless device/networks

This commit is contained in:
Marco Pesenti Gritti
2007-02-25 14:30:17 +01:00
parent 81e2e9ed8d
commit f907ceeae6
6 changed files with 74 additions and 9 deletions
+11 -1
View File
@@ -42,7 +42,17 @@ class AccessPointView(CanvasIcon):
network_manager.set_active_device(device, network)
def _update_icon(self):
self.props.icon_name = 'theme:stock-net-wireless-00'
strength = self._model.props.strength
if strength < 21:
self.props.icon_name = 'theme:stock-net-wireless-00'
elif strength < 41:
self.props.icon_name = 'theme:stock-net-wireless-21-40'
elif strength < 61:
self.props.icon_name = 'theme:stock-net-wireless-41-60'
elif strength < 81:
self.props.icon_name = 'theme:stock-net-wireless-61-80'
else:
self.props.icon_name = 'theme:stock-net-wireless-81-100'
class ActivityView(SnowflakeBox):
def __init__(self, shell, menu_shell, model):