[Sugar-devel] [PATCH sugar] Wireless network Frame device: Add text for disconnected state

Sascha Silbe silbe at activitycentral.com
Thu Jun 30 16:41:36 EDT 2011


Showing just an empty palette whenever we are disconnected (e.g. because no
favourite AP is in range) is rather confusing for users.

Signed-off-by: Sascha Silbe <silbe at activitycentral.com>
---
This patch changes the appearance [1] for the case that wifi is enabled.
I'll post an updated patch for disabling wifi that will show a different
text when the wifi is disabled.

[1] http://wiki.sugarlabs.org/go/File:Sugar-wifi-disconn-text.png

 extensions/deviceicon/network.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py
index 9a74237..bdd2405 100644
--- a/extensions/deviceicon/network.py
+++ b/extensions/deviceicon/network.py
@@ -127,7 +127,8 @@ class WirelessPalette(Palette):
         self._set_channel(channel)

     def set_disconnected(self):
-        self.props.primary_text = ''
+        label = glib.markup_escape_text(_('No wireless connection'))
+        self.props.primary_text = label
         self.props.secondary_text = ''
         self._disconnect_item.hide()
         self.set_content(None)
--
1.7.2.5



More information about the Sugar-devel mailing list