From 2f02f6cd2dcd4df158037084761a1f0a9d563307 Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 16 Apr 2025 22:10:58 +0200 Subject: [PATCH] fixed coloring for insecure identities --- retroshare-gui/src/gui/Identity/IdentityListModel.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/gui/Identity/IdentityListModel.cpp b/retroshare-gui/src/gui/Identity/IdentityListModel.cpp index 2726d5a32..4768fe54d 100644 --- a/retroshare-gui/src/gui/Identity/IdentityListModel.cpp +++ b/retroshare-gui/src/gui/Identity/IdentityListModel.cpp @@ -430,6 +430,9 @@ QVariant RsIdentityListModel::toolTipRole(const EntryIndex& fmpe,int /*column*/) if(!id_info) return QVariant(); + if(id_info->flags & RS_IDENTITY_FLAGS_IS_DEPRECATED) + return QVariant( tr("\nThis identity has a insecure fingerprint (It's probably quite old).\nYou should get rid of it now and use a new one.\nThese identities are not supported anymore.") ) ; + if(rsIdentity->isOwnId(id_info->id)) return QVariant(tr("This identity is owned by you")); @@ -438,9 +441,10 @@ QVariant RsIdentityListModel::toolTipRole(const EntryIndex& fmpe,int /*column*/) else { RsPeerDetails dd; - rsPeers->getGPGDetails(id_info->owner,dd); - - return QVariant("Identity owned by profile \""+ QString::fromUtf8(dd.name.c_str()) +"\" ("+QString::fromStdString(id_info->owner.toStdString())); + if(rsPeers->getGPGDetails(id_info->owner,dd)) + return QVariant(tr("Identity owned by profile")+" \""+ QString::fromUtf8(dd.name.c_str()) +"\" ("+QString::fromStdString(id_info->owner.toStdString())); + else + return QVariant(tr("Identity possibly owned by unknown profile")+" \""+ QString::fromUtf8(dd.name.c_str()) +"\" ("+QString::fromStdString(id_info->owner.toStdString())); } }