From 6a97577356473a55c6126a695c0a94315ae5e600 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 10 Apr 2013 10:48:36 -0400 Subject: [PATCH 1/3] Upon adding address book entry, update To labels on Sent tab --- bitmessagemain.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bitmessagemain.py b/bitmessagemain.py index 0e71b1f5..e56ff2e9 100755 --- a/bitmessagemain.py +++ b/bitmessagemain.py @@ -4299,6 +4299,7 @@ class MyForm(QtGui.QMainWindow): sqlSubmitQueue.put('commit') sqlLock.release() self.rerenderInboxFromLabels() + self.rerenderSentToLabels() else: self.statusBar().showMessage('Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want.') else: -- 2.45.1 From c0ad2bfd4db04e1883f06c5800b11ce9d4c24ad3 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 10 Apr 2013 10:54:59 -0400 Subject: [PATCH 2/3] Load label for subscriptions on startup --- bitmessagemain.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bitmessagemain.py b/bitmessagemain.py index e56ff2e9..1396d36e 100755 --- a/bitmessagemain.py +++ b/bitmessagemain.py @@ -3507,6 +3507,16 @@ class MyForm(QtGui.QMainWindow): for row in queryreturn: 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) newItem = QtGui.QTableWidgetItem(unicode(toLabel,'utf-8')) newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled ) -- 2.45.1 From e02816b5eaa00ea49de1d9e04deb893f0ffd0f52 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 10 Apr 2013 14:56:32 -0400 Subject: [PATCH 3/3] fix address book delete entry --- bitmessagemain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitmessagemain.py b/bitmessagemain.py index 1396d36e..5fe3fc92 100755 --- a/bitmessagemain.py +++ b/bitmessagemain.py @@ -4734,8 +4734,8 @@ class MyForm(QtGui.QMainWindow): def on_action_AddressBookNew(self): self.click_pushButtonAddAddressBook() def on_action_AddressBookDelete(self): - while self.ui.tableWidgetInbox.selectedIndexes() != []: - currentRow = self.ui.tableWidgetInbox.selectedIndexes()[0].row() + while self.ui.tableWidgetAddressBook.selectedIndexes() != []: + currentRow = self.ui.tableWidgetAddressBook.selectedIndexes()[0].row() labelAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,0).text().toUtf8() addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,1).text() t = (str(labelAtCurrentRow),str(addressAtCurrentRow)) -- 2.45.1