added a tooltip and read color for unsecure GXS identities. These are still supported for a few weeks at most. So get rid of them

This commit is contained in:
csoler 2016-06-17 22:21:06 -04:00
parent 4df4bb638f
commit eb05922cd1
5 changed files with 56 additions and 18 deletions

View file

@ -1373,19 +1373,33 @@ bool IdDialog::fillIdListItem(const RsGxsIdGroup& data, QTreeWidgetItem *&item,
item->setTextAlignment(RSID_COL_VOTES, Qt::AlignRight);
item->setData(RSID_COL_VOTES,Qt::DisplayRole, QString::number(info.mOverallReputationScore - 1.0f,'f',3));
if(isOwnId)
{
QFont font = item->font(RSID_COL_NICKNAME) ;
font.setBold(true) ;
item->setFont(RSID_COL_NICKNAME,font) ;
item->setFont(RSID_COL_IDTYPE,font) ;
item->setFont(RSID_COL_KEYID,font) ;
if(isOwnId)
{
RsIdentityDetails idd ;
rsIdentity->getIdDetails(RsGxsId(data.mMeta.mGroupId),idd) ;
QString tooltip = tr("This identity is owned by you");
item->setToolTip(RSID_COL_NICKNAME, tooltip) ;
item->setToolTip(RSID_COL_KEYID, tooltip) ;
item->setToolTip(RSID_COL_IDTYPE, tooltip) ;
}
QFont font = item->font(RSID_COL_NICKNAME) ;
font.setBold(true) ;
item->setFont(RSID_COL_NICKNAME,font) ;
item->setFont(RSID_COL_IDTYPE,font) ;
item->setFont(RSID_COL_KEYID,font) ;
QString tooltip = tr("This identity is owned by you");
if(idd.mFlags & RS_IDENTITY_FLAGS_IS_DEPRECATED)
{
item->setForeground(RSID_COL_NICKNAME,QBrush(Qt::red));
item->setForeground(RSID_COL_KEYID,QBrush(Qt::red));
item->setForeground(RSID_COL_IDTYPE,QBrush(Qt::red));
tooltip += tr("\nThis identity has a unsecure fingerprint (It's probably quite old).\nYou should get rid of it now and use a new one.\nThese identities will soon be not supported anymore.") ;
}
item->setToolTip(RSID_COL_NICKNAME, tooltip) ;
item->setToolTip(RSID_COL_KEYID, tooltip) ;
item->setToolTip(RSID_COL_IDTYPE, tooltip) ;
}
QPixmap pixmap ;