From fbf5bcc74c19ea7b55851d3608d7a5e239bbbb96 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Mon, 3 Jun 2019 12:18:15 +0300 Subject: [PATCH] Blacklist object has no .statusBar() method - use UISignalQueue.put() --- src/bitmessageqt/blacklist.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/bitmessageqt/blacklist.py b/src/bitmessageqt/blacklist.py index 64413ebb..fc6ec85c 100644 --- a/src/bitmessageqt/blacklist.py +++ b/src/bitmessageqt/blacklist.py @@ -6,6 +6,7 @@ from addresses import addBMIfNotPresent from bmconfigparser import BMConfigParser from dialogs import AddAddressDialog from helper_sql import sqlExecute, sqlQuery +from queues import UISignalQueue from retranslateui import RetranslateMixin from utils import avatarize from uisignaler import UISignaler @@ -88,11 +89,21 @@ class Blacklist(QtGui.QWidget, RetranslateMixin): sql = '''INSERT INTO whitelist VALUES (?,?,?)''' sqlExecute(sql, *t) else: - self.statusBar().showMessage(_translate( - "MainWindow", "Error: You cannot add the same address to your list twice. Perhaps rename the existing one if you want.")) + UISignalQueue.put(( + 'updateStatusBar', + _translate( + "MainWindow", + "Error: You cannot add the same address to your" + " list twice. Perhaps rename the existing one" + " if you want.") + )) else: - self.statusBar().showMessage(_translate( - "MainWindow", "The address you entered was invalid. Ignoring it.")) + UISignalQueue.put(( + 'updateStatusBar', + _translate( + "MainWindow", + "The address you entered was invalid. Ignoring it.") + )) def tableWidgetBlacklistItemChanged(self, item): if item.column() == 0: