Logo Search packages:      
Sourcecode: audit version File versions  Download package

def global_dialog::GlobalDialog::_validate_get_failure (   self  )  [private]

Check whether the window state is a valid configuration.

Return None if it is valid.  Otherwise, return (message, notebook page
index or None, widget).

Reimplemented from dialog_base::DialogBase.

Definition at line 298 of file global_dialog.py.

00298                                    :
        # Validate single values first
      msg = self.__validate_action_mail_acct(self.action_mail_acct.get_text())
        if msg:
            return (msg, 1, self.action_mail_acct)
      if self.dispatcher_enabled.get_active():
            msg = self.__validate_dispatcher(self.dispatcher.get_text())
            if msg:
                return (msg, 1, self.dispatcher)

      if self.log_format_raw.get_active():
            msg = self.__validate_log_file(self.log_file.get_text())
            if msg:
                return (msg, 2, self.log_file)

      if self.space_left_email.get_active():
            msg = self.__validate_email_use()
            if msg:
                return (msg, 3, self.space_left_email)
        if self.space_left_exec.get_active():
            msg = self.__validate_exe(self.space_left_exe.get_text())
            if msg:
                return (msg, 3, self.space_left_exe)
      if self.admin_space_left_email.get_active():
            msg = self.__validate_email_use()
            if msg:
                return (msg, 3, self.admin_space_left_email)
        if self.admin_space_left_exec.get_active():
            msg = self.__validate_exe(self.admin_space_left_exe.get_text())
            if msg:
                return (msg, 3, self.admin_space_left_exe)

        if self.disk_full_exec.get_active():
            msg = self.__validate_exe(self.disk_full_exe.get_text())
            if msg:
                return (msg, 4, self.disk_full_exe)
        if self.disk_error_exec.get_active():
            msg = self.__validate_exe(self.disk_error_exe.get_text())
            if msg:
                return (msg, 4, self.disk_error_exe)

        # Now verify the configuration is consistent
        if (self.space_left.get_value_as_int() <=
            self.admin_space_left.get_value_as_int()):
            return (_('First threshold must be larger than second threshold'),
                    3, self.space_left)
        return None

    @staticmethod
    def __validate_action_mail_acct(email):


Generated by  Doxygen 1.6.0   Back to index