Merge pull request #122 from Atheros1/master
fix delete address book entry bug
This commit is contained in:
commit
1ef5361108
|
@ -3507,6 +3507,16 @@ class MyForm(QtGui.QMainWindow):
|
||||||
for row in queryreturn:
|
for row in queryreturn:
|
||||||
fromLabel, = row
|
fromLabel, = row
|
||||||
|
|
||||||
|
if fromLabel == '': #If this address wasn't in our address book..
|
||||||
|
t = (fromAddress,)
|
||||||
|
sqlSubmitQueue.put('''select label from subscriptions where address=?''')
|
||||||
|
sqlSubmitQueue.put(t)
|
||||||
|
queryreturn = sqlReturnQueue.get()
|
||||||
|
|
||||||
|
if queryreturn <> []:
|
||||||
|
for row in queryreturn:
|
||||||
|
fromLabel, = row
|
||||||
|
|
||||||
self.ui.tableWidgetInbox.insertRow(0)
|
self.ui.tableWidgetInbox.insertRow(0)
|
||||||
newItem = QtGui.QTableWidgetItem(unicode(toLabel,'utf-8'))
|
newItem = QtGui.QTableWidgetItem(unicode(toLabel,'utf-8'))
|
||||||
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
|
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
|
||||||
|
@ -4299,6 +4309,7 @@ class MyForm(QtGui.QMainWindow):
|
||||||
sqlSubmitQueue.put('commit')
|
sqlSubmitQueue.put('commit')
|
||||||
sqlLock.release()
|
sqlLock.release()
|
||||||
self.rerenderInboxFromLabels()
|
self.rerenderInboxFromLabels()
|
||||||
|
self.rerenderSentToLabels()
|
||||||
else:
|
else:
|
||||||
self.statusBar().showMessage('Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want.')
|
self.statusBar().showMessage('Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want.')
|
||||||
else:
|
else:
|
||||||
|
@ -4723,8 +4734,8 @@ class MyForm(QtGui.QMainWindow):
|
||||||
def on_action_AddressBookNew(self):
|
def on_action_AddressBookNew(self):
|
||||||
self.click_pushButtonAddAddressBook()
|
self.click_pushButtonAddAddressBook()
|
||||||
def on_action_AddressBookDelete(self):
|
def on_action_AddressBookDelete(self):
|
||||||
while self.ui.tableWidgetInbox.selectedIndexes() != []:
|
while self.ui.tableWidgetAddressBook.selectedIndexes() != []:
|
||||||
currentRow = self.ui.tableWidgetInbox.selectedIndexes()[0].row()
|
currentRow = self.ui.tableWidgetAddressBook.selectedIndexes()[0].row()
|
||||||
labelAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,0).text().toUtf8()
|
labelAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,0).text().toUtf8()
|
||||||
addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,1).text()
|
addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,1).text()
|
||||||
t = (str(labelAtCurrentRow),str(addressAtCurrentRow))
|
t = (str(labelAtCurrentRow),str(addressAtCurrentRow))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user