Logo Search packages:      
Sourcecode: wicd version File versions

def wicd::gui::appGui::check_for_wireless (   self,
  iwconfig,
  wireless_ip 
)

Determine if wireless is active, and if yes, set the status. 

Definition at line 1670 of file gui.py.

01670                                                        :
        """ Determine if wireless is active, and if yes, set the status. """
        if not wireless_ip:
            return False
        
        network = wireless.GetCurrentNetwork(iwconfig)
        if not network:
            return False
    
        network = str(network)
        if daemon.GetSignalDisplayType() == 0:
            strength = wireless.GetCurrentSignalStrength(iwconfig)
        else:
            strength = wireless.GetCurrentDBMStrength(iwconfig)

        if strength is None:
            return False
        strength = str(strength)            
        ip = str(wireless_ip)
        self.set_status(language['connected_to_wireless'].replace
                        ('$A', network).replace
                        ('$B', daemon.FormatSignalForPrinting(strength)).replace
                        ('$C', wireless_ip))
        return True

    def set_status(self, msg):


Generated by  Doxygen 1.6.0   Back to index