Improve blacklist autolabel

This commit is contained in:
mailchuck 2015-11-14 18:53:11 +01:00 committed by Peter Surda
parent 1db7635893
commit 5cb02dc783

View File

@ -3090,8 +3090,9 @@ class MyForm(settingsmixin.SMainWindow):
queryreturn = sqlQuery('''select * from blacklist where address=?''', queryreturn = sqlQuery('''select * from blacklist where address=?''',
addressAtCurrentInboxRow) addressAtCurrentInboxRow)
if queryreturn == []: if queryreturn == []:
label = "\"" + str(tableWidget.item(currentInboxRow, 2).data(Qt.UserRole).toPyObject()) + "\" in " + shared.config.get(self.getCurrentAccount(), "label")
sqlExecute('''INSERT INTO blacklist VALUES (?,?, ?)''', sqlExecute('''INSERT INTO blacklist VALUES (?,?, ?)''',
'--New entry. Change label in Blacklist.--', label,
addressAtCurrentInboxRow, True) addressAtCurrentInboxRow, True)
self.rerenderBlackWhiteList() self.rerenderBlackWhiteList()
self.statusBar().showMessage(_translate( self.statusBar().showMessage(_translate(