dont show WLAN Status when WLAN IF is not up
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sat, 12 Jul 2008 10:20:54 +0000 (10:20 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sat, 12 Jul 2008 10:20:54 +0000 (10:20 +0000)
lib/python/Screens/NetworkSetup.py

index 88c078de33322bdc75a03f43f5516d84d218cd69..be2a763dc1b005eb3d7d039f4b5006d583fc3da1 100644 (file)
@@ -510,7 +510,8 @@ class AdapterSetupConfiguration(Screen):
                        callFnc = p.__call__["ifaceSupported"](self.iface)
                        if callFnc is not None:
                                menu.append((_("Scan Wireless Networks"), "scanwlan"))
                        callFnc = p.__call__["ifaceSupported"](self.iface)
                        if callFnc is not None:
                                menu.append((_("Scan Wireless Networks"), "scanwlan"))
-                               menu.append((_("Show WLAN Status"), "wlanstatus"))
+                               if iNetwork.getAdapterAttribute(self.iface, "up"):
+                                       menu.append((_("Show WLAN Status"), "wlanstatus"))
                                
                if os_path.exists(resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkWizard/networkwizard.xml")):
                        menu.append((_("NetworkWizard"), "openwizard"));
                                
                if os_path.exists(resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkWizard/networkwizard.xml")):
                        menu.append((_("NetworkWizard"), "openwizard"));