From 4c8ba431e560a7a50b59da058bdde0a5aa376f1c Mon Sep 17 00:00:00 2001 From: mailchuck Date: Tue, 15 Dec 2015 12:15:19 +0100 Subject: [PATCH] Add to blacklist from "All accounts" It didn't work before --- src/bitmessageqt/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 5831987c..a2e31ac8 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -3159,11 +3159,13 @@ class MyForm(settingsmixin.SMainWindow): # tableWidget.item(currentRow,1).data(Qt.UserRole).toPyObject() addressAtCurrentInboxRow = str(tableWidget.item( currentInboxRow, 1).data(Qt.UserRole).toPyObject()) + recipientAddress = str(tableWidget.item( + currentInboxRow, 0).data(Qt.UserRole).toPyObject()) # Let's make sure that it isn't already in the address book queryreturn = sqlQuery('''select * from blacklist where address=?''', addressAtCurrentInboxRow) if queryreturn == []: - label = "\"" + unicode(tableWidget.item(currentInboxRow, 2).data(Qt.UserRole).toString(), 'utf-8') + "\" in " + shared.config.get(self.getCurrentAccount(), "label") + label = "\"" + unicode(tableWidget.item(currentInboxRow, 2).data(Qt.UserRole).toString(), 'utf-8') + "\" in " + shared.config.get(recipientAddress, "label") sqlExecute('''INSERT INTO blacklist VALUES (?,?, ?)''', label, addressAtCurrentInboxRow, True)