Send from addressbook label
When choosing an item from addressbook to send to, put both label and address into the lineEditTo widget.
This commit is contained in:
parent
98313d594f
commit
46edb72b4f
|
@ -3180,12 +3180,15 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
self.ui.tableWidgetAddressBook.selectedIndexes()[i].row()] = 0
|
self.ui.tableWidgetAddressBook.selectedIndexes()[i].row()] = 0
|
||||||
for currentRow in listOfSelectedRows:
|
for currentRow in listOfSelectedRows:
|
||||||
addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(
|
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() == '':
|
if self.ui.lineEditTo.text() == '':
|
||||||
self.ui.lineEditTo.setText(str(addressAtCurrentRow))
|
self.ui.lineEditTo.setText(stringToAdd)
|
||||||
else:
|
else:
|
||||||
self.ui.lineEditTo.setText(str(
|
self.ui.lineEditTo.setText(str(
|
||||||
self.ui.lineEditTo.text()) + '; ' + str(addressAtCurrentRow))
|
self.ui.lineEditTo.text()) + '; ' + stringToAdd)
|
||||||
if listOfSelectedRows == {}:
|
if listOfSelectedRows == {}:
|
||||||
self.statusBar().showMessage(_translate(
|
self.statusBar().showMessage(_translate(
|
||||||
"MainWindow", "No addresses selected."))
|
"MainWindow", "No addresses selected."))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user