(self, link)
| 52 | self.setLineWrapColumnOrWidth(width) |
| 53 | |
| 54 | def confirmURL(self, link): |
| 55 | if link.scheme() == "mailto": |
| 56 | window = QtGui.QApplication.activeWindow() |
| 57 | window.ui.lineEditTo.setText(link.path()) |
| 58 | if link.hasQueryItem("subject"): |
| 59 | window.ui.lineEditSubject.setText( |
| 60 | link.queryItemValue("subject")) |
| 61 | if link.hasQueryItem("body"): |
| 62 | window.ui.textEditMessage.setText( |
| 63 | link.queryItemValue("body")) |
| 64 | window.setSendFromComboBox() |
| 65 | window.ui.tabWidgetSend.setCurrentIndex(0) |
| 66 | window.ui.tabWidget.setCurrentIndex( |
| 67 | window.ui.tabWidget.indexOf(window.ui.send) |
| 68 | ) |
| 69 | window.ui.textEditMessage.setFocus() |
| 70 | return |
| 71 | reply = QtGui.QMessageBox.warning(self, |
| 72 | QtGui.QApplication.translate("MessageView", "Follow external link"), |
| 73 | QtGui.QApplication.translate("MessageView", "The link \"%1\" will open in a browser. It may be a security risk, it could de-anonymise you or download malicious data. Are you sure?").arg(unicode(link.toString())), |
| 74 | QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) |
| 75 | if reply == QtGui.QMessageBox.Yes: |
| 76 | QtGui.QDesktopServices.openUrl(link) |
| 77 | |
| 78 | def loadResource (self, restype, name): |
| 79 | if restype == QtGui.QTextDocument.ImageResource and name.scheme() == "bmmsg": |
nothing calls this directly
no test coverage detected