simplify last commit
This commit is contained in:
parent
3c00a443ae
commit
9fdff73ee1
|
@ -2618,10 +2618,6 @@ class MyForm(QtGui.QMainWindow):
|
||||||
toAddressAtCurrentInboxRow = str(self.ui.tableWidgetInbox.item(
|
toAddressAtCurrentInboxRow = str(self.ui.tableWidgetInbox.item(
|
||||||
currentInboxRow, 0).data(Qt.UserRole).toPyObject())
|
currentInboxRow, 0).data(Qt.UserRole).toPyObject())
|
||||||
|
|
||||||
|
|
||||||
toAddressAtCurrentInboxRow_label = str(self.ui.tableWidgetInbox.item(
|
|
||||||
currentInboxRow, 0).text())
|
|
||||||
|
|
||||||
fromAddressAtCurrentInboxRow = str(self.ui.tableWidgetInbox.item(
|
fromAddressAtCurrentInboxRow = str(self.ui.tableWidgetInbox.item(
|
||||||
currentInboxRow, 1).data(Qt.UserRole).toPyObject())
|
currentInboxRow, 1).data(Qt.UserRole).toPyObject())
|
||||||
msgid = str(self.ui.tableWidgetInbox.item(
|
msgid = str(self.ui.tableWidgetInbox.item(
|
||||||
|
@ -2653,29 +2649,11 @@ class MyForm(QtGui.QMainWindow):
|
||||||
print 'original sent to a chan. Setting the to address in the reply to the chan address.'
|
print 'original sent to a chan. Setting the to address in the reply to the chan address.'
|
||||||
self.ui.lineEditTo.setText(str(toAddressAtCurrentInboxRow))
|
self.ui.lineEditTo.setText(str(toAddressAtCurrentInboxRow))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
listOfLabelsInComboBoxSendFrom = [str(self.ui.comboBoxSendFrom.itemText(i)) for i in range(self.ui.comboBoxSendFrom.count())]
|
|
||||||
listOfAddressesInComboBoxSendFrom = [str(self.ui.comboBoxSendFrom.itemData(i).toPyObject()) for i in range(self.ui.comboBoxSendFrom.count())]
|
listOfAddressesInComboBoxSendFrom = [str(self.ui.comboBoxSendFrom.itemData(i).toPyObject()) for i in range(self.ui.comboBoxSendFrom.count())]
|
||||||
"""
|
if toAddressAtCurrentInboxRow in listOfAddressesInComboBoxSendFrom:
|
||||||
isPresent_Label = False
|
|
||||||
for item in listOfLabelsInComboBoxSendFrom:
|
|
||||||
if toAddressAtCurrentInboxRow_label == item:
|
|
||||||
isPresent_Label = True
|
|
||||||
break;
|
|
||||||
"""
|
|
||||||
#if isPresent_Label:
|
|
||||||
if toAddressAtCurrentInboxRow_label in listOfLabelsInComboBoxSendFrom:
|
|
||||||
currentIndex = listOfLabelsInComboBoxSendFrom.index(toAddressAtCurrentInboxRow_label)
|
|
||||||
self.ui.comboBoxSendFrom.setCurrentIndex(currentIndex)
|
|
||||||
|
|
||||||
else:
|
|
||||||
try:
|
|
||||||
currentIndex = listOfAddressesInComboBoxSendFrom.index(toAddressAtCurrentInboxRow)
|
currentIndex = listOfAddressesInComboBoxSendFrom.index(toAddressAtCurrentInboxRow)
|
||||||
self.ui.comboBoxSendFrom.setCurrentIndex(currentIndex)
|
self.ui.comboBoxSendFrom.setCurrentIndex(currentIndex)
|
||||||
except:
|
else:
|
||||||
# The toAddressAtCurrentInboxRow isn't in our combo box which can happen if
|
|
||||||
# we are replying to a broadcast address or if the address is disabled.
|
|
||||||
self.ui.comboBoxSendFrom.setCurrentIndex(0)
|
self.ui.comboBoxSendFrom.setCurrentIndex(0)
|
||||||
|
|
||||||
self.ui.textEditMessage.setText('\n\n------------------------------------------------------\n' + unicode(messageAtCurrentInboxRow, 'utf-8)'))
|
self.ui.textEditMessage.setText('\n\n------------------------------------------------------\n' + unicode(messageAtCurrentInboxRow, 'utf-8)'))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user