"From" combobox empty fix
- if label of your address is empty, the "From" combo box showed an empty entry (just the identicon). Now it shows the address instead - fixes #898
This commit is contained in:
parent
b0d1ed8304
commit
a3584bb141
|
@ -2181,8 +2181,10 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
addressInKeysFile, 'enabled') # I realize that this is poor programming practice but I don't care. It's easier for others to read.
|
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')
|
isMaillinglist = shared.safeConfigGetBoolean(addressInKeysFile, 'mailinglist')
|
||||||
if isEnabled and not isMaillinglist:
|
if isEnabled and not isMaillinglist:
|
||||||
self.ui.comboBoxSendFrom.addItem(avatarize(addressInKeysFile), unicode(shared.config.get(
|
label = unicode(shared.config.get(addressInKeysFile, 'label'), 'utf-8', 'ignore').strip()
|
||||||
addressInKeysFile, 'label'), 'utf-8'), addressInKeysFile)
|
if label == "":
|
||||||
|
label = addressInKeysFile
|
||||||
|
self.ui.comboBoxSendFrom.addItem(avatarize(addressInKeysFile), label, addressInKeysFile)
|
||||||
# self.ui.comboBoxSendFrom.model().sort(1, Qt.AscendingOrder)
|
# self.ui.comboBoxSendFrom.model().sort(1, Qt.AscendingOrder)
|
||||||
for i in range(self.ui.comboBoxSendFrom.count()):
|
for i in range(self.ui.comboBoxSendFrom.count()):
|
||||||
address = str(self.ui.comboBoxSendFrom.itemData(i, Qt.UserRole).toString())
|
address = str(self.ui.comboBoxSendFrom.itemData(i, Qt.UserRole).toString())
|
||||||
|
@ -2200,8 +2202,10 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
addressInKeysFile, 'enabled') # I realize that this is poor programming practice but I don't care. It's easier for others to read.
|
addressInKeysFile, 'enabled') # I realize that this is poor programming practice but I don't care. It's easier for others to read.
|
||||||
isChan = shared.safeConfigGetBoolean(addressInKeysFile, 'chan')
|
isChan = shared.safeConfigGetBoolean(addressInKeysFile, 'chan')
|
||||||
if isEnabled and not isChan:
|
if isEnabled and not isChan:
|
||||||
self.ui.comboBoxSendFromBroadcast.addItem(avatarize(addressInKeysFile), unicode(shared.config.get(
|
label = unicode(shared.config.get(addressInKeysFile, 'label'), 'utf-8', 'ignore').strip()
|
||||||
addressInKeysFile, 'label'), 'utf-8'), addressInKeysFile)
|
if label == "":
|
||||||
|
label = addressInKeysFile
|
||||||
|
self.ui.comboBoxSendFromBroadcast.addItem(avatarize(addressInKeysFile), label, addressInKeysFile)
|
||||||
for i in range(self.ui.comboBoxSendFromBroadcast.count()):
|
for i in range(self.ui.comboBoxSendFromBroadcast.count()):
|
||||||
address = str(self.ui.comboBoxSendFromBroadcast.itemData(i, Qt.UserRole).toString())
|
address = str(self.ui.comboBoxSendFromBroadcast.itemData(i, Qt.UserRole).toString())
|
||||||
self.ui.comboBoxSendFromBroadcast.setItemData(i, AccountColor(address).accountColor(), Qt.ForegroundRole)
|
self.ui.comboBoxSendFromBroadcast.setItemData(i, AccountColor(address).accountColor(), Qt.ForegroundRole)
|
||||||
|
|
Reference in New Issue
Block a user