...
This commit is contained in:
parent
bd4d6b2e26
commit
c6a9ab6041
|
@ -2615,6 +2615,7 @@ class MyForm(QtGui.QMainWindow):
|
||||||
def on_comboboxFindLabel_change(self, int):
|
def on_comboboxFindLabel_change(self, int):
|
||||||
address = str(self.ui.comboboxFindLabel.itemData(int).toString())
|
address = str(self.ui.comboboxFindLabel.itemData(int).toString())
|
||||||
found = self.ui.comboboxFindAddress.findText(address)
|
found = self.ui.comboboxFindAddress.findText(address)
|
||||||
|
print address, found
|
||||||
# synchronize the other combobox
|
# synchronize the other combobox
|
||||||
self.ui.comboboxFindAddress.blockSignals(True)
|
self.ui.comboboxFindAddress.blockSignals(True)
|
||||||
self.ui.comboboxFindAddress.setCurrentIndex(found if found > 0 else 0)
|
self.ui.comboboxFindAddress.setCurrentIndex(found if found > 0 else 0)
|
||||||
|
@ -2623,6 +2624,7 @@ class MyForm(QtGui.QMainWindow):
|
||||||
def on_comboboxFindAddress_change(self, int):
|
def on_comboboxFindAddress_change(self, int):
|
||||||
address = str(self.ui.comboboxFindAddress.itemText(int))
|
address = str(self.ui.comboboxFindAddress.itemText(int))
|
||||||
found = self.ui.comboboxFindLabel.findData(address)
|
found = self.ui.comboboxFindLabel.findData(address)
|
||||||
|
print address, found
|
||||||
# synchronize the other combobox
|
# synchronize the other combobox
|
||||||
self.ui.comboboxFindLabel.blockSignals(True)
|
self.ui.comboboxFindLabel.blockSignals(True)
|
||||||
self.ui.comboboxFindLabel.setCurrentIndex(found if found > 0 else 0)
|
self.ui.comboboxFindLabel.setCurrentIndex(found if found > 0 else 0)
|
||||||
|
@ -2637,7 +2639,7 @@ class MyForm(QtGui.QMainWindow):
|
||||||
found = self.ui.comboboxFindLabel.findText(label)
|
found = self.ui.comboboxFindLabel.findText(label)
|
||||||
if (found > 0) & (index == found):
|
if (found > 0) & (index == found):
|
||||||
address = self.ui.comboboxFindLabel.itemData(found).toString()
|
address = self.ui.comboboxFindLabel.itemData(found).toString()
|
||||||
self.on_addRecipient_submit(label, address)
|
self.on_addRecipient_submit(address)
|
||||||
return QtGui.QComboBox.keyPressEvent(self.ui.comboboxFindLabel, event)
|
return QtGui.QComboBox.keyPressEvent(self.ui.comboboxFindLabel, event)
|
||||||
|
|
||||||
def on_comboboxFindAddress_enter(self, event):
|
def on_comboboxFindAddress_enter(self, event):
|
||||||
|
@ -2646,20 +2648,19 @@ class MyForm(QtGui.QMainWindow):
|
||||||
address = str(addBMIfNotPresent(self.ui.comboboxFindAddress.currentText()))
|
address = str(addBMIfNotPresent(self.ui.comboboxFindAddress.currentText()))
|
||||||
found = self.ui.comboboxFindAddress.findText(address)
|
found = self.ui.comboboxFindAddress.findText(address)
|
||||||
if (found > 0) & (index == found):
|
if (found > 0) & (index == found):
|
||||||
label = self.ui.comboboxFindAddress.itemData(found).toString()
|
address = str(self.ui.comboboxFindAddress.itemText(found))
|
||||||
self.on_addRecipient_submit(label, address)
|
self.on_addRecipient_submit(address)
|
||||||
else:
|
else:
|
||||||
# no matching contact
|
# no matching contact
|
||||||
self.ui.comboboxFindLabel.setCurrentIndex(0)
|
self.ui.comboboxFindLabel.setCurrentIndex(0)
|
||||||
label = False
|
|
||||||
self.ui.comboboxFindAddress.setEditText(address) # otherwise you will lose the text on enter
|
self.ui.comboboxFindAddress.setEditText(address) # otherwise you will lose the text on enter
|
||||||
# but maybe the address is valid?
|
# but maybe the address is valid?
|
||||||
# random address for testing: BM-2DAArASbJckBdn3HvTt7kHAbPA5tGxc2R1
|
# random address for testing: BM-2DAArASbJckBdn3HvTt7kHAbPA5tGxc2R1
|
||||||
self.on_addRecipient_submit(label, address)
|
self.on_addRecipient_submit(address)
|
||||||
|
|
||||||
return QtGui.QComboBox.keyPressEvent(self.ui.comboboxFindAddress, event)
|
return QtGui.QComboBox.keyPressEvent(self.ui.comboboxFindAddress, event)
|
||||||
|
|
||||||
def on_addRecipient_submit(self, label, address):
|
def on_addRecipient_submit(self, address):
|
||||||
# check whether address already in TO list
|
# check whether address already in TO list
|
||||||
address = addBMIfNotPresent(address)
|
address = addBMIfNotPresent(address)
|
||||||
recipients = []
|
recipients = []
|
||||||
|
@ -2746,6 +2747,7 @@ class MyForm(QtGui.QMainWindow):
|
||||||
self.ui.tableWidgetAddressBook.removeRow(currentRow)
|
self.ui.tableWidgetAddressBook.removeRow(currentRow)
|
||||||
self.rerenderInboxFromLabels()
|
self.rerenderInboxFromLabels()
|
||||||
self.rerenderSentToLabels()
|
self.rerenderSentToLabels()
|
||||||
|
self.loadPossibleRecipients()
|
||||||
|
|
||||||
def on_action_AddressBookClipboard(self):
|
def on_action_AddressBookClipboard(self):
|
||||||
fullStringOfAddresses = ''
|
fullStringOfAddresses = ''
|
||||||
|
@ -2827,6 +2829,7 @@ class MyForm(QtGui.QMainWindow):
|
||||||
shared.sqlLock.release()
|
shared.sqlLock.release()
|
||||||
self.ui.tableWidgetSubscriptions.removeRow(currentRow)
|
self.ui.tableWidgetSubscriptions.removeRow(currentRow)
|
||||||
self.rerenderInboxFromLabels()
|
self.rerenderInboxFromLabels()
|
||||||
|
self.loadPossibleRecipients()
|
||||||
shared.reloadBroadcastSendersForWhichImWatching()
|
shared.reloadBroadcastSendersForWhichImWatching()
|
||||||
|
|
||||||
def on_action_SubscriptionsClipboard(self):
|
def on_action_SubscriptionsClipboard(self):
|
||||||
|
|
Reference in New Issue
Block a user