Logo Search packages:      
Sourcecode: wicd version File versions

def wicd::gui::appGui::update_statusbar (   self  ) 

Updates the status bar. 

Definition at line 1604 of file gui.py.

01604                               :
        """ Updates the status bar. """
        if not self.is_visible:
            return True

        wired_connecting = wired.CheckIfWiredConnecting()
        wireless_connecting = wireless.CheckIfWirelessConnecting()
        self.connecting = wired_connecting or wireless_connecting
        
        if self.connecting:
            if not self.pulse_active:
                self.pulse_active = True
                gobject.timeout_add(100, self.pulse_progress_bar)
                self.network_list.set_sensitive(False)
                self.status_area.show_all()
            if self.statusID:
                self.status_bar.remove(1, self.statusID)
            if wireless_connecting:
                iwconfig = wireless.GetIwconfig()
                self.set_status(wireless.GetCurrentNetwork(iwconfig) + ': ' +
                       language[str(wireless.CheckWirelessConnectingMessage())])
            if wired_connecting:
                self.set_status(language['wired_network'] + ': ' + 
                             language[str(wired.CheckWiredConnectingMessage())])
            return True
        else:
            if self.pulse_active:
                self.pulse_progress_bar()
                self.pulse_active = False
                self.network_list.set_sensitive(True)
                self.status_area.hide_all()

            if self.statusID:
                self.status_bar.remove(1, self.statusID)

            # Determine connection status.
            if self.check_for_wired(wired.GetWiredIP()):
                return True
    
            if self.check_for_wireless(wireless.GetIwconfig(),
                                       wireless.GetWirelessIP()):
                return True
            self.set_status(language['not_connected'])
            return True
    
    def update_connect_buttons(self, state=None, x=None, force_check=False):


Generated by  Doxygen 1.6.0   Back to index