fromAddress - str, subject - unicode
(for simple encoding like for extended)
This commit is contained in:
parent
b6192410c1
commit
650c30d472
|
@ -12,8 +12,9 @@ class UISignaler(QtCore.QThread):
|
||||||
updateStatusBar = QtCore.Signal(object)
|
updateStatusBar = QtCore.Signal(object)
|
||||||
updateSentItemStatusByToAddress = QtCore.Signal(object, str)
|
updateSentItemStatusByToAddress = QtCore.Signal(object, str)
|
||||||
updateSentItemStatusByAckdata = QtCore.Signal(object, str)
|
updateSentItemStatusByAckdata = QtCore.Signal(object, str)
|
||||||
displayNewInboxMessage = QtCore.Signal(object, str, str, object, str)
|
displayNewInboxMessage = QtCore.Signal(object, str, object, object, str)
|
||||||
displayNewSentMessage = QtCore.Signal(object, str, str, str, object, str)
|
displayNewSentMessage = QtCore.Signal(
|
||||||
|
object, str, str, object, object, str)
|
||||||
updateNetworkStatusTab = QtCore.Signal(bool, bool, Peer)
|
updateNetworkStatusTab = QtCore.Signal(bool, bool, Peer)
|
||||||
updateNumberOfMessagesProcessed = QtCore.Signal()
|
updateNumberOfMessagesProcessed = QtCore.Signal()
|
||||||
updateNumberOfPubkeysProcessed = QtCore.Signal()
|
updateNumberOfPubkeysProcessed = QtCore.Signal()
|
||||||
|
@ -52,9 +53,10 @@ class UISignaler(QtCore.QThread):
|
||||||
self.updateSentItemStatusByAckdata.emit(ackData, message)
|
self.updateSentItemStatusByAckdata.emit(ackData, message)
|
||||||
elif command == 'displayNewInboxMessage':
|
elif command == 'displayNewInboxMessage':
|
||||||
inventoryHash, toAddress, fromAddress, subject, body = data
|
inventoryHash, toAddress, fromAddress, subject, body = data
|
||||||
|
|
||||||
self.displayNewInboxMessage.emit(
|
self.displayNewInboxMessage.emit(
|
||||||
inventoryHash, toAddress, fromAddress,
|
inventoryHash, toAddress, fromAddress,
|
||||||
unicode(subject, 'utf-8'), body)
|
subject, body)
|
||||||
elif command == 'displayNewSentMessage':
|
elif command == 'displayNewSentMessage':
|
||||||
toAddress, fromLabel, fromAddress, subject, message, ackdata = data
|
toAddress, fromLabel, fromAddress, subject, message, ackdata = data
|
||||||
self.displayNewSentMessage.emit(
|
self.displayNewSentMessage.emit(
|
||||||
|
|
|
@ -155,5 +155,6 @@ class MsgDecode(object):
|
||||||
# Throw away any extra lines (headers) after the subject.
|
# Throw away any extra lines (headers) after the subject.
|
||||||
if subject:
|
if subject:
|
||||||
subject = subject.splitlines()[0]
|
subject = subject.splitlines()[0]
|
||||||
self.subject = subject
|
# Field types should be the same for all message types
|
||||||
self.body = body
|
self.subject = unicode(subject, 'utf-8', 'replace')
|
||||||
|
self.body = unicode(body, 'utf-8', 'replace')
|
||||||
|
|
Reference in New Issue
Block a user