Skip to content

Commit 46edb72

Browse files
mailchuckPeterSurda
authored andcommitted
Send from addressbook label
When choosing an item from addressbook to send to, put both label and address into the lineEditTo widget.
1 parent 98313d5 commit 46edb72

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/bitmessageqt/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3180,12 +3180,15 @@ def on_action_AddressBookSend(self):
31803180
self.ui.tableWidgetAddressBook.selectedIndexes()[i].row()] = 0
31813181
for currentRow in listOfSelectedRows:
31823182
addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(
3183-
currentRow, 1).text()
3183+
currentRow, 0).address
3184+
labelAtCurrentRow = self.ui.tableWidgetAddressBook.item(
3185+
currentRow, 0).label
3186+
stringToAdd = labelAtCurrentRow + " <" + addressAtCurrentRow + ">"
31843187
if self.ui.lineEditTo.text() == '':
3185-
self.ui.lineEditTo.setText(str(addressAtCurrentRow))
3188+
self.ui.lineEditTo.setText(stringToAdd)
31863189
else:
31873190
self.ui.lineEditTo.setText(str(
3188-
self.ui.lineEditTo.text()) + '; ' + str(addressAtCurrentRow))
3191+
self.ui.lineEditTo.text()) + '; ' + stringToAdd)
31893192
if listOfSelectedRows == {}:
31903193
self.statusBar().showMessage(_translate(
31913194
"MainWindow", "No addresses selected."))

0 commit comments

Comments
 (0)