BlackWhitelist rerendering

It used to show entries with no address.
Fixes #170
This commit is contained in:
mailchuck 2016-01-24 10:55:08 +01:00
parent c5eb7f5d5e
commit cb28fa1b6a
Signed by untrusted user who does not match committer: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -2033,6 +2033,7 @@ class MyForm(settingsmixin.SMainWindow):
queryreturn = sqlQuery('''SELECT label, address, enabled FROM blacklist''')
else:
queryreturn = sqlQuery('''SELECT label, address, enabled FROM whitelist''')
self.ui.tableWidgetBlacklist.setSortingEnabled(False)
for row in queryreturn:
label, address, enabled = row
self.ui.tableWidgetBlacklist.insertRow(0)
@ -2047,6 +2048,7 @@ class MyForm(settingsmixin.SMainWindow):
if not enabled:
newItem.setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetBlacklist.setItem(0, 1, newItem)
self.ui.tableWidgetBlacklist.setSortingEnabled(True)
def click_pushButtonTTL(self):
QtGui.QMessageBox.information(self, 'Time To Live', _translate(