def accept(self): """Send text.""" # build up the text of the message text = ( _sendformat % ( unicode(self.emailedit.text()), self.text, unicode(self.detailsedit.toPlainText()) )) # send the message as base-64 encoded utf-8 text = str( qt4.QString(text).toUtf8().toBase64() ) try: # send the message urllib2.urlopen('http://barmag.net/veusz-mail.php', 'message=%s' % text) except urllib2.URLError: # something went wrong... qt4.QMessageBox.critical(None, _("Veusz"), _("Failed to connect to error server " "to send report. Is your internet " "connected?")) return qt4.QMessageBox.information(self, _("Submitted"), _("Thank you for submitting an error report")) VeuszDialog.accept(self)
def accept(self): """Send text.""" # build up the text of the message text = (_sendformat % (unicode(self.emailedit.text()), self.text, unicode(self.detailsedit.toPlainText()))) # send the message as base-64 encoded utf-8 text = str(qt4.QString(text).toUtf8().toBase64()) try: # send the message urllib2.urlopen('http://barmag.net/veusz-mail.php', 'message=%s' % text) except urllib2.URLError: # something went wrong... qt4.QMessageBox.critical( None, _("Veusz"), _("Failed to connect to error server " "to send report. Is your internet " "connected?")) return qt4.QMessageBox.information( self, _("Submitted"), _("Thank you for submitting an error report")) VeuszDialog.accept(self)
def accept(self): """Accept by opening send dialog.""" d = ExceptionSendDialog(self.backtrace, self) if d.exec_() == qt4.QDialog.Accepted: VeuszDialog.accept(self)