Replies to mailing lists

Attempt to fix #49. Will close after positive feedback.
This commit is contained in:
mailchuck 2015-10-14 23:38:34 +02:00 committed by Peter Surda
parent bf9bdaadc5
commit faeaad212d

View File

@ -2151,13 +2151,13 @@ class MyForm(QtGui.QMainWindow):
self.statusBar().showMessage(_translate( self.statusBar().showMessage(_translate(
"MainWindow", "Fetched address from namecoin identity.")) "MainWindow", "Fetched address from namecoin identity."))
def setBroadcastEnablementDependingOnWhetherThisIsAChanAddress(self, address): def setBroadcastEnablementDependingOnWhetherThisIsAMailingListAddress(self, address):
# If this is a chan then don't let people broadcast because no one # If this is a chan then don't let people broadcast because no one
# should subscribe to chan addresses. # should subscribe to chan addresses.
if shared.safeConfigGetBoolean(str(address), 'chan'): if shared.safeConfigGetBoolean(str(address), 'mailinglist'):
self.ui.tabWidgetSend.setCurrentIndex(0)
else:
self.ui.tabWidgetSend.setCurrentIndex(1) self.ui.tabWidgetSend.setCurrentIndex(1)
else:
self.ui.tabWidgetSend.setCurrentIndex(0)
def rerenderComboBoxSendFrom(self): def rerenderComboBoxSendFrom(self):
self.ui.comboBoxSendFrom.clear() self.ui.comboBoxSendFrom.clear()
@ -2866,13 +2866,8 @@ class MyForm(QtGui.QMainWindow):
'message': self.ui.textEditMessage 'message': self.ui.textEditMessage
} }
if toAddressAtCurrentInboxRow == str_broadcast_subscribers: if toAddressAtCurrentInboxRow == str_broadcast_subscribers:
widget = { self.ui.tabWidgetSend.setCurrentIndex(0)
'subject': self.ui.lineEditSubjectBroadcast, # toAddressAtCurrentInboxRow = fromAddressAtCurrentInboxRow
'from': self.ui.comboBoxSendFromBroadcast,
'message': self.ui.textEditMessageBroadcast
}
self.ui.tabWidgetSend.setCurrentIndex(1)
toAddressAtCurrentInboxRow = fromAddressAtCurrentInboxRow
elif not shared.config.has_section(toAddressAtCurrentInboxRow): elif not shared.config.has_section(toAddressAtCurrentInboxRow):
QtGui.QMessageBox.information(self, _translate("MainWindow", "Address is gone"), _translate( QtGui.QMessageBox.information(self, _translate("MainWindow", "Address is gone"), _translate(
"MainWindow", "Bitmessage cannot find your address %1. Perhaps you removed it?").arg(toAddressAtCurrentInboxRow), QMessageBox.Ok) "MainWindow", "Bitmessage cannot find your address %1. Perhaps you removed it?").arg(toAddressAtCurrentInboxRow), QMessageBox.Ok)
@ -2880,8 +2875,15 @@ class MyForm(QtGui.QMainWindow):
QtGui.QMessageBox.information(self, _translate("MainWindow", "Address disabled"), _translate( QtGui.QMessageBox.information(self, _translate("MainWindow", "Address disabled"), _translate(
"MainWindow", "Error: The address from which you are trying to send is disabled. You\'ll have to enable it on the \'Your Identities\' tab before using it."), QMessageBox.Ok) "MainWindow", "Error: The address from which you are trying to send is disabled. You\'ll have to enable it on the \'Your Identities\' tab before using it."), QMessageBox.Ok)
else: else:
#self.setBroadcastEnablementDependingOnWhetherThisIsAChanAddress(toAddressAtCurrentInboxRow) self.setBroadcastEnablementDependingOnWhetherThisIsAMailingListAddress(toAddressAtCurrentInboxRow)
self.ui.tabWidgetSend.setCurrentIndex(0) if self.ui.tabWidgetSend.currentIndex() == 1:
widget = {
'subject': self.ui.lineEditSubjectBroadcast,
'from': self.ui.comboBoxSendFromBroadcast,
'message': self.ui.textEditMessageBroadcast
}
self.ui.tabWidgetSend.setCurrentIndex(1)
toAddressAtCurrentInboxRow = fromAddressAtCurrentInboxRow
self.ui.lineEditTo.setText(str(acct.fromAddress)) self.ui.lineEditTo.setText(str(acct.fromAddress))