def on_btn_aceptar_clicked(self, widget):
        errors = self.__validate_form()
        # Si la lista de errores contiene algo entonces no es valido.
        if errors != []:
            message_error(list_to_lines(errors))
            return False

        if self.__is_viewonly():
            self.note.write_to_file()
            worker = ThreadTxtEditor(self)
            worker.start()
            
        else:
            self.note.send_note()
            worker = ThreadWebBrowser(self)
            worker.start()
            message_info(_("The sending of the note was successful...!\n\n")+str(self.note.msg))
            self.txt_correo.set_text("")
            
        return True
예제 #2
0
 def __str__(self):
     return list_to_lines(self.__data)