mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-10 11:58:36 -05:00
added display of trust level in NetworkDialog
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3827 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1585606c4c
commit
58dcb79f42
@ -18,6 +18,7 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
#include <gpgme.h>
|
||||||
|
|
||||||
#include <QTreeWidget>
|
#include <QTreeWidget>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
@ -431,21 +432,32 @@ void NetworkDialog::insertConnect()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString TrustLevelString ;
|
||||||
|
|
||||||
/* (2) Key validity */
|
/* (2) Key validity */
|
||||||
if (detail.ownsign) {
|
if (detail.ownsign)
|
||||||
item -> setText(2, tr("Authenticated"));
|
{
|
||||||
item -> setToolTip(2, tr("GPG key signed"));
|
item -> setText(2, tr("Personal signature"));
|
||||||
} else {
|
item -> setToolTip(2, tr("GPG key signed by you"));
|
||||||
item -> setText(2, tr("Not Authenticated"));
|
}
|
||||||
item -> setToolTip(2, tr("GPG key not signed"));
|
else
|
||||||
|
switch(detail.validLvl)
|
||||||
|
{
|
||||||
|
case GPGME_VALIDITY_MARGINAL: item->setText(2,tr("Marginally trusted peer")) ; break;
|
||||||
|
case GPGME_VALIDITY_FULL:
|
||||||
|
case GPGME_VALIDITY_ULTIMATE: item->setText(2,tr("Fully trusted peer")) ; break ;
|
||||||
|
case GPGME_VALIDITY_UNKNOWN:
|
||||||
|
case GPGME_VALIDITY_UNDEFINED:
|
||||||
|
case GPGME_VALIDITY_NEVER:
|
||||||
|
default: item->setText(2,tr("Untrusted peer")) ; break ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString PeerAuthenticationString = tr("Unknown") ;
|
||||||
/* (3) has me auth */
|
/* (3) has me auth */
|
||||||
if (detail.hasSignedMe)
|
if (detail.hasSignedMe)
|
||||||
item -> setText(3, tr("Has authenticated me"));
|
PeerAuthenticationString = tr("Has authenticated me");
|
||||||
else
|
|
||||||
item -> setText(3, tr("Unknown"));
|
|
||||||
|
|
||||||
|
item->setText(3,PeerAuthenticationString) ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determinated the Background Color
|
* Determinated the Background Color
|
||||||
|
Loading…
x
Reference in New Issue
Block a user