V0.6 #852

Merged
Atheros1 merged 399 commits from v0.6 into master 2016-05-03 01:58:38 +02:00
Showing only changes of commit 6123b27315 - Show all commits

View File

@ -1862,15 +1862,28 @@ class MyForm(QtGui.QMainWindow):
self.ui.tableWidgetInbox.item(i, 3).setText(textToDisplay) self.ui.tableWidgetInbox.item(i, 3).setText(textToDisplay)
def removeInboxRowByMsgid(self, msgid): # msgid and inventoryHash are the same thing def removeInboxRowByMsgid(self, msgid): # msgid and inventoryHash are the same thing
inbox = self.getCurrentMessagelist() def widgetConvert (tableWidget):
for i in range(inbox.rowCount()): if tableWidget == self.ui.tableWidgetInbox:
if msgid == str(inbox.item(i, 3).data(Qt.UserRole).toPyObject()): return self.ui.treeWidgetYourIdentities
self.statusBar().showMessage(_translate( elif tableWidget == self.ui.tableWidgetInboxSubscriptions:
"MainWindow", "Message trashed")) return self.ui.treeWidgetSubscriptions
inbox.removeRow(i) elif tableWidget == self.ui.tableWidgetInboxChans:
break return self.ui.treeWidgetChans
# this is a callback from core, not initiated by UI. We don't care about performance else:
self.propagateUnreadCount(None, None, None, 0) return None
for inbox in ([
self.ui.tableWidgetInbox,
self.ui.tableWidgetInboxSubscriptions,
self.ui.tableWidgetInboxChans]):
for i in range(inbox.rowCount()):
if msgid == str(inbox.item(i, 3).data(Qt.UserRole).toPyObject()):
self.statusBar().showMessage(_translate(
"MainWindow", "Message trashed"))
treeWidget = widgetConvert(inbox)
self.propagateUnreadCount(self.getCurrentAccount(treeWidget), self.getCurrentFolder(treeWidget), treeWidget, 0)
inbox.removeRow(i)
break
def newVersionAvailable(self, version): def newVersionAvailable(self, version):
# if (not (self.windowState() & QtCore.Qt.WindowActive)) or (self.windowState() & QtCore.Qt.WindowMinimized): # if (not (self.windowState() & QtCore.Qt.WindowActive)) or (self.windowState() & QtCore.Qt.WindowMinimized):