mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 13:30:36 -04:00
Used GPGME_VALIDITY_... constants in ConfCertDialog and NetworkDialog.
Changed the usage of RsPeerDetails.validLvl to RsPeerDetails.trustLvl for the display in the column "Did I authenticated peer" in NetworkDialog. Added an icon to the MessageBox of the NotifySysMessage. Fixed german language. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3926 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ab42691a31
commit
312f23bd4e
7 changed files with 38 additions and 34 deletions
|
@ -18,6 +18,8 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
#include <gpgme.h>
|
||||
|
||||
#include "ConfCertDialog.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
|
@ -237,7 +239,7 @@ void ConfCertDialog::load()
|
|||
}
|
||||
|
||||
//web of trust
|
||||
if (detail.trustLvl == 5) {
|
||||
if (detail.trustLvl == GPGME_VALIDITY_ULTIMATE) {
|
||||
//trust is ultimate, it means it's one of our own keys
|
||||
ui.web_of_trust_label->setText(tr("Your trust in this peer is ultimate, it's probably a key you own."));
|
||||
ui.radioButton_trust_fully->hide();
|
||||
|
@ -247,19 +249,19 @@ void ConfCertDialog::load()
|
|||
ui.radioButton_trust_fully->show();
|
||||
ui.radioButton_trust_marginnaly->show();
|
||||
ui.radioButton_trust_never->show();
|
||||
if (detail.trustLvl == 4) {
|
||||
if (detail.trustLvl == GPGME_VALIDITY_FULL) {
|
||||
ui.web_of_trust_label->setText(tr("Your trust in this peer is full."));
|
||||
ui.radioButton_trust_fully->setChecked(true);
|
||||
ui.radioButton_trust_fully->setIcon(QIcon(":/images/security-high-48.png"));
|
||||
ui.radioButton_trust_marginnaly->setIcon(QIcon(":/images/security-medium-off-48.png"));
|
||||
ui.radioButton_trust_never->setIcon(QIcon(":/images/security-low-off-48.png"));
|
||||
} else if (detail.trustLvl == 3) {
|
||||
} else if (detail.trustLvl == GPGME_VALIDITY_MARGINAL) {
|
||||
ui.web_of_trust_label->setText(tr("Your trust in this peer is marginal."));
|
||||
ui.radioButton_trust_marginnaly->setChecked(true);
|
||||
ui.radioButton_trust_marginnaly->setIcon(QIcon(":/images/security-medium-48.png"));
|
||||
ui.radioButton_trust_never->setIcon(QIcon(":/images/security-low-off-48.png"));
|
||||
ui.radioButton_trust_fully->setIcon(QIcon(":/images/security-high-off-48.png"));
|
||||
} else if (detail.trustLvl == 2) {
|
||||
} else if (detail.trustLvl == GPGME_VALIDITY_NEVER) {
|
||||
ui.web_of_trust_label->setText(tr("Your trust in this peer is none."));
|
||||
ui.radioButton_trust_never->setChecked(true);
|
||||
ui.radioButton_trust_never->setIcon(QIcon(":/images/security-low-48.png"));
|
||||
|
@ -331,13 +333,13 @@ void ConfCertDialog::applyDialog()
|
|||
}
|
||||
|
||||
//check the GPG trustlvl
|
||||
if (ui.radioButton_trust_fully->isChecked() && detail.trustLvl != 4) {
|
||||
if (ui.radioButton_trust_fully->isChecked() && detail.trustLvl != GPGME_VALIDITY_FULL) {
|
||||
//trust has changed to fully
|
||||
rsPeers->trustGPGCertificate(detail.id, 4);
|
||||
} else if (ui.radioButton_trust_marginnaly->isChecked() && detail.trustLvl != 3) {
|
||||
rsPeers->trustGPGCertificate(detail.id, 3);
|
||||
} else if (ui.radioButton_trust_never->isChecked() && detail.trustLvl != 2) {
|
||||
rsPeers->trustGPGCertificate(detail.id, 2);
|
||||
rsPeers->trustGPGCertificate(detail.id, GPGME_VALIDITY_FULL);
|
||||
} else if (ui.radioButton_trust_marginnaly->isChecked() && detail.trustLvl != GPGME_VALIDITY_MARGINAL) {
|
||||
rsPeers->trustGPGCertificate(detail.id, GPGME_VALIDITY_MARGINAL);
|
||||
} else if (ui.radioButton_trust_never->isChecked() && detail.trustLvl != GPGME_VALIDITY_NEVER) {
|
||||
rsPeers->trustGPGCertificate(detail.id, GPGME_VALIDITY_NEVER);
|
||||
}
|
||||
|
||||
if (!detail.isOnlyGPGdetail) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue