Messagelist address tooltip

Fixes #108
This commit is contained in:
mailchuck 2015-11-19 18:45:46 +01:00
parent 90303b4619
commit b5fb485eb2
Signed by untrusted user who does not match committer: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -980,7 +980,7 @@ class MyForm(settingsmixin.SMainWindow):
tableWidget.insertRow(0) tableWidget.insertRow(0)
toAddressItem = QtGui.QTableWidgetItem(unicode(acct.toLabel, 'utf-8')) toAddressItem = QtGui.QTableWidgetItem(unicode(acct.toLabel, 'utf-8'))
toAddressItem.setToolTip(unicode(acct.toLabel, 'utf-8')) toAddressItem.setToolTip(unicode(acct.toLabel, 'utf-8') + " (" + str(acct.toAddress) + ")")
toAddressItem.setIcon(avatarize(toAddress)) toAddressItem.setIcon(avatarize(toAddress))
toAddressItem.setData(Qt.UserRole, str(toAddress)) toAddressItem.setData(Qt.UserRole, str(toAddress))
toAddressItem.setTextColor(AccountColor(toAddress).accountColor()) toAddressItem.setTextColor(AccountColor(toAddress).accountColor())
@ -989,7 +989,7 @@ class MyForm(settingsmixin.SMainWindow):
tableWidget.setItem(0, 0, toAddressItem) tableWidget.setItem(0, 0, toAddressItem)
fromAddressItem = QtGui.QTableWidgetItem(unicode(acct.fromLabel, 'utf-8')) fromAddressItem = QtGui.QTableWidgetItem(unicode(acct.fromLabel, 'utf-8'))
fromAddressItem.setToolTip(unicode(acct.fromLabel, 'utf-8')) fromAddressItem.setToolTip(unicode(acct.fromLabel, 'utf-8') + " (" + str(acct.fromAddress) + ")")
fromAddressItem.setIcon(avatarize(fromAddress)) fromAddressItem.setIcon(avatarize(fromAddress))
fromAddressItem.setData(Qt.UserRole, str(fromAddress)) fromAddressItem.setData(Qt.UserRole, str(fromAddress))
fromAddressItem.setTextColor(AccountColor(fromAddress).accountColor()) fromAddressItem.setTextColor(AccountColor(fromAddress).accountColor())
@ -1115,7 +1115,7 @@ class MyForm(settingsmixin.SMainWindow):
tableWidget.insertRow(0) tableWidget.insertRow(0)
# to # to
to_item = QtGui.QTableWidgetItem(unicode(acct.toLabel, 'utf-8')) to_item = QtGui.QTableWidgetItem(unicode(acct.toLabel, 'utf-8'))
to_item.setToolTip(unicode(acct.toLabel, 'utf-8')) to_item.setToolTip(unicode(acct.toLabel, 'utf-8') + " (" + str(acct.toAddress) + ")")
to_item.setFlags( to_item.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if not read: if not read:
@ -1126,7 +1126,7 @@ class MyForm(settingsmixin.SMainWindow):
tableWidget.setItem(0, 0, to_item) tableWidget.setItem(0, 0, to_item)
# from # from
from_item = QtGui.QTableWidgetItem(unicode(acct.fromLabel, 'utf-8')) from_item = QtGui.QTableWidgetItem(unicode(acct.fromLabel, 'utf-8'))
from_item.setToolTip(unicode(acct.fromLabel, 'utf-8')) from_item.setToolTip(unicode(acct.fromLabel, 'utf-8') + " (" + str(fromAddress) + ")")
from_item.setFlags( from_item.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if not read: if not read:
@ -2387,12 +2387,12 @@ class MyForm(settingsmixin.SMainWindow):
sent.setSortingEnabled(False) sent.setSortingEnabled(False)
sent.insertRow(0) sent.insertRow(0)
newItem = QtGui.QTableWidgetItem(unicode(acct.toLabel, 'utf-8')) newItem = QtGui.QTableWidgetItem(unicode(acct.toLabel, 'utf-8'))
newItem.setToolTip(unicode(acct.toLabel, 'utf-8')) newItem.setToolTip(unicode(acct.toLabel, 'utf-8') + " (" + str(acct.toAddress) + ")")
newItem.setData(Qt.UserRole, str(toAddress)) newItem.setData(Qt.UserRole, str(toAddress))
newItem.setIcon(avatarize(toAddress)) newItem.setIcon(avatarize(toAddress))
sent.setItem(0, 0, newItem) sent.setItem(0, 0, newItem)
newItem = QtGui.QTableWidgetItem(unicode(acct.fromLabel, 'utf-8')) newItem = QtGui.QTableWidgetItem(unicode(acct.fromLabel, 'utf-8'))
newItem.setToolTip(unicode(acct.fromLabel, 'utf-8')) newItem.setToolTip(unicode(acct.fromLabel, 'utf-8') + " (" + str(acct.fromAddress) + ")")
newItem.setData(Qt.UserRole, str(fromAddress)) newItem.setData(Qt.UserRole, str(fromAddress))
newItem.setIcon(avatarize(fromAddress)) newItem.setIcon(avatarize(fromAddress))
sent.setItem(0, 1, newItem) sent.setItem(0, 1, newItem)
@ -2434,7 +2434,7 @@ class MyForm(settingsmixin.SMainWindow):
font.setBold(True) font.setBold(True)
inbox.setSortingEnabled(False) inbox.setSortingEnabled(False)
newItem = QtGui.QTableWidgetItem(unicode(acct.toLabel, 'utf-8')) newItem = QtGui.QTableWidgetItem(unicode(acct.toLabel, 'utf-8'))
newItem.setToolTip(unicode(acct.toLabel, 'utf-8')) newItem.setToolTip(unicode(acct.toLabel, 'utf-8') + " (" + str(acct.toAddress) + ")")
newItem.setFont(font) newItem.setFont(font)
newItem.setData(Qt.UserRole, str(toAddress)) newItem.setData(Qt.UserRole, str(toAddress))
newItem.setTextColor(AccountColor(toAddress).accountColor()) newItem.setTextColor(AccountColor(toAddress).accountColor())
@ -2443,7 +2443,7 @@ class MyForm(settingsmixin.SMainWindow):
inbox.setItem(0, 0, newItem) inbox.setItem(0, 0, newItem)
newItem = QtGui.QTableWidgetItem(unicode(acct.fromLabel, 'utf-8')) newItem = QtGui.QTableWidgetItem(unicode(acct.fromLabel, 'utf-8'))
newItem.setToolTip(unicode(acct.fromLabel, 'utf-8')) newItem.setToolTip(unicode(acct.fromLabel, 'utf-8') + " (" + str(acct.fromAddress) + ")")
newItem.setData(Qt.UserRole, str(fromAddress)) newItem.setData(Qt.UserRole, str(fromAddress))
newItem.setFont(font) newItem.setFont(font)
newItem.setTextColor(AccountColor(fromAddress).accountColor()) newItem.setTextColor(AccountColor(fromAddress).accountColor())