Logo Search packages:      
Sourcecode: audit version File versions

def main_window::MainWindow::_refresh_status (   self  )  [private]

Refresh status displayed in the window.

Definition at line 86 of file main_window.py.

00086                              :
        '''Refresh status displayed in the window.'''
        try:
            status = self.client.audit_status()
        except IOError:
            status = None
        if status is not None:
            (_1, enabled, _2, pid, _3, _4, lost, backlog) = status
            self.enabled_value = enabled
            if enabled == 0:
                self.status_enabled.set_text(_('Auditing disabled.'))
                self.enabled_change_button.set_label(_('_Enable'))
                self.enabled_change_button.set_sensitive(True)
            elif enabled == 1:
                self.status_enabled.set_text(_('Auditing enabled.'))
                self.enabled_change_button.set_label(_('_Disable'))
                self.enabled_change_button.set_sensitive(True)
            elif enabled == 2:
                self.status_enabled.set_text(_('Auditing enabled and locked.'))
                self.enabled_change_button.set_label(_('_Disable'))
                self.enabled_change_button.set_sensitive(False)
            else:
                self.status_enabled.set_text(_('Unknown auditing status %s.')
                                             % enabled)
                self.enabled_change_button.set_label(_('???'))
                self.enabled_change_button.set_sensitive(False)
            self.status_auditd_pid.set_text(str(pid))
            self.status_lost.set_text(str(lost))
            self.status_backlog.set_text(str(backlog))
        else:
            self.enabled_value = None
            self.status_enabled.set_text(_('Error determining auditing status'))
            self.enabled_change_button.set_label(_('???'))
            self.enabled_change_button.set_sensitive(False)
            self.status_auditd_pid.set_text('')
            self.status_lost.set_text('')
            self.status_backlog.set_text('')

    def run(self, client):


Generated by  Doxygen 1.6.0   Back to index