Message status update
Someone reported the exception via BM. Fixes #90 Signed-off-by: mailchuck <dev@mailchuck.com>
This commit is contained in:
parent
f5f46dae45
commit
df3c662832
|
@ -1794,23 +1794,25 @@ class MyForm(QtGui.QMainWindow):
|
||||||
self.unreadCount = count
|
self.unreadCount = count
|
||||||
return self.unreadCount
|
return self.unreadCount
|
||||||
|
|
||||||
def updateSentItemStatusByHash(self, toRipe, textToDisplay):
|
def updateSentItemStatusByToAddress(self, toAddress, textToDisplay):
|
||||||
for i in range(self.ui.tableWidgetInbox.rowCount()):
|
sent = self.getAccountMessagelist(toAddress)
|
||||||
toAddress = str(self.ui.tableWidgetInbox.item(
|
treeWidget = self.getAccountTreeWidget(toAddress)
|
||||||
|
if self.getCurrentFolder(treeWidget) != "sent":
|
||||||
|
return
|
||||||
|
for i in range(sent.rowCount()):
|
||||||
|
rowAddress = str(sent.item(
|
||||||
i, 0).data(Qt.UserRole).toPyObject())
|
i, 0).data(Qt.UserRole).toPyObject())
|
||||||
status, addressVersionNumber, streamNumber, ripe = decodeAddress(
|
if toAddress == rowAddress:
|
||||||
toAddress)
|
sent.item(i, 3).setToolTip(textToDisplay)
|
||||||
if ripe == toRipe:
|
|
||||||
self.ui.tableWidgetInbox.item(i, 3).setToolTip(textToDisplay)
|
|
||||||
try:
|
try:
|
||||||
newlinePosition = textToDisplay.indexOf('\n')
|
newlinePosition = textToDisplay.indexOf('\n')
|
||||||
except: # If someone misses adding a "_translate" to a string before passing it to this function, this function won't receive a qstring which will cause an exception.
|
except: # If someone misses adding a "_translate" to a string before passing it to this function, this function won't receive a qstring which will cause an exception.
|
||||||
newlinePosition = 0
|
newlinePosition = 0
|
||||||
if newlinePosition > 1:
|
if newlinePosition > 1:
|
||||||
self.ui.tableWidgetInbox.item(i, 3).setText(
|
sent.item(i, 3).setText(
|
||||||
textToDisplay[:newlinePosition])
|
textToDisplay[:newlinePosition])
|
||||||
else:
|
else:
|
||||||
self.ui.tableWidgetInbox.item(i, 3).setText(textToDisplay)
|
sent.item(i, 3).setText(textToDisplay)
|
||||||
|
|
||||||
def updateSentItemStatusByAckdata(self, ackdata, textToDisplay):
|
def updateSentItemStatusByAckdata(self, ackdata, textToDisplay):
|
||||||
for i in range(self.ui.tableWidgetInbox.rowCount()):
|
for i in range(self.ui.tableWidgetInbox.rowCount()):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user