From 46edb72b4fe27b4d1d3a3f0e68d9f1448a703150 Mon Sep 17 00:00:00 2001 From: mailchuck Date: Fri, 29 Apr 2016 09:31:56 +0200 Subject: [PATCH] Send from addressbook label When choosing an item from addressbook to send to, put both label and address into the lineEditTo widget. --- src/bitmessageqt/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 06c6f70b..fdac6d7c 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -3180,12 +3180,15 @@ class MyForm(settingsmixin.SMainWindow): self.ui.tableWidgetAddressBook.selectedIndexes()[i].row()] = 0 for currentRow in listOfSelectedRows: addressAtCurrentRow = self.ui.tableWidgetAddressBook.item( - currentRow, 1).text() + currentRow, 0).address + labelAtCurrentRow = self.ui.tableWidgetAddressBook.item( + currentRow, 0).label + stringToAdd = labelAtCurrentRow + " <" + addressAtCurrentRow + ">" if self.ui.lineEditTo.text() == '': - self.ui.lineEditTo.setText(str(addressAtCurrentRow)) + self.ui.lineEditTo.setText(stringToAdd) else: self.ui.lineEditTo.setText(str( - self.ui.lineEditTo.text()) + '; ' + str(addressAtCurrentRow)) + self.ui.lineEditTo.text()) + '; ' + stringToAdd) if listOfSelectedRows == {}: self.statusBar().showMessage(_translate( "MainWindow", "No addresses selected."))