Broadcast sending from was wrong

Fixes #51
This commit is contained in:
mailchuck 2015-10-16 20:34:15 +02:00 committed by Peter Surda
parent 5b12f2dffa
commit 7998d77b9c
1 changed files with 9 additions and 7 deletions

View File

@ -2178,13 +2178,15 @@ class MyForm(QtGui.QMainWindow):
def rerenderComboBoxSendFromBroadcast(self):
queryreturn = sqlQuery(
'''select label, address from subscriptions where enabled = 1'''
for row in queryreturn:
label, address = row
self.ui.comboBoxSendFromBroadcast.insertItem(0, avatarize(address), unicode(label, 'utf-8'), address)
configSections = shared.config.sections()
for addressInKeysFile in configSections:
if addressInKeysFile != 'bitmessagesettings':
isEnabled = shared.config.getboolean(
addressInKeysFile, 'enabled') # I realize that this is poor programming practice but I don't care. It's easier for others to read.
isMaillinglist = shared.safeConfigGetBoolean(addressInKeysFile, 'mailinglist')
if isEnabled and isMaillinglist:
self.ui.comboBoxSendFromBroadcast.insertItem(0, avatarize(addressInKeysFile), unicode(shared.config.get(
addressInKeysFile, 'label'), 'utf-8'), addressInKeysFile)
self.ui.comboBoxSendFromBroadcast.insertItem(0, '', '')
if(self.ui.comboBoxSendFromBroadcast.count() == 2):