Quick fix for refactoring artifact in blacklist module (#1138)
This commit is contained in:
parent
634a49cd6d
commit
a3436fef9c
|
@ -56,9 +56,10 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
|
||||||
def click_pushButtonAddBlacklist(self):
|
def click_pushButtonAddBlacklist(self):
|
||||||
self.NewBlacklistDialogInstance = AddAddressDialog(self)
|
self.NewBlacklistDialogInstance = AddAddressDialog(self)
|
||||||
if self.NewBlacklistDialogInstance.exec_():
|
if self.NewBlacklistDialogInstance.exec_():
|
||||||
if self.NewBlacklistDialogInstance.ui.labelAddressCheck.text() == _translate("MainWindow", "Address is valid."):
|
if self.NewBlacklistDialogInstance.labelAddressCheck.text() == \
|
||||||
|
_translate("MainWindow", "Address is valid."):
|
||||||
address = addBMIfNotPresent(str(
|
address = addBMIfNotPresent(str(
|
||||||
self.NewBlacklistDialogInstance.ui.lineEditAddress.text()))
|
self.NewBlacklistDialogInstance.lineEditAddress.text()))
|
||||||
# First we must check to see if the address is already in the
|
# First we must check to see if the address is already in the
|
||||||
# address book. The user cannot add it again or else it will
|
# address book. The user cannot add it again or else it will
|
||||||
# cause problems when updating and deleting the entry.
|
# cause problems when updating and deleting the entry.
|
||||||
|
@ -72,7 +73,7 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
|
||||||
self.tableWidgetBlacklist.setSortingEnabled(False)
|
self.tableWidgetBlacklist.setSortingEnabled(False)
|
||||||
self.tableWidgetBlacklist.insertRow(0)
|
self.tableWidgetBlacklist.insertRow(0)
|
||||||
newItem = QtGui.QTableWidgetItem(unicode(
|
newItem = QtGui.QTableWidgetItem(unicode(
|
||||||
self.NewBlacklistDialogInstance.ui.newAddressLabel.text().toUtf8(), 'utf-8'))
|
self.NewBlacklistDialogInstance.lineEditLabel.text().toUtf8(), 'utf-8'))
|
||||||
newItem.setIcon(avatarize(address))
|
newItem.setIcon(avatarize(address))
|
||||||
self.tableWidgetBlacklist.setItem(0, 0, newItem)
|
self.tableWidgetBlacklist.setItem(0, 0, newItem)
|
||||||
newItem = QtGui.QTableWidgetItem(address)
|
newItem = QtGui.QTableWidgetItem(address)
|
||||||
|
@ -80,7 +81,7 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
|
||||||
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
|
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
|
||||||
self.tableWidgetBlacklist.setItem(0, 1, newItem)
|
self.tableWidgetBlacklist.setItem(0, 1, newItem)
|
||||||
self.tableWidgetBlacklist.setSortingEnabled(True)
|
self.tableWidgetBlacklist.setSortingEnabled(True)
|
||||||
t = (str(self.NewBlacklistDialogInstance.ui.newAddressLabel.text().toUtf8()), address, True)
|
t = (str(self.NewBlacklistDialogInstance.lineEditLabel.text().toUtf8()), address, True)
|
||||||
if BMConfigParser().get('bitmessagesettings', 'blackwhitelist') == 'black':
|
if BMConfigParser().get('bitmessagesettings', 'blackwhitelist') == 'black':
|
||||||
sql = '''INSERT INTO blacklist VALUES (?,?,?)'''
|
sql = '''INSERT INTO blacklist VALUES (?,?,?)'''
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user