attempt to improve/clarify relationship between nodes and PGP keys. Removed duplicate options and splitted ConfCerDialog into a dialog to show nodes certificates and PGP key information

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8232 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-05-12 20:30:44 +00:00
parent b5bf3ce130
commit e449e709b5
14 changed files with 1159 additions and 835 deletions

View File

@ -155,7 +155,7 @@ QList<int> sizes;
// add self nick and Avatar to Friends.
RsPeerDetails pd ;
if (rsPeers->getPeerDetails(rsPeers->getOwnId(),pd)) {
ui.nicknameLabel->setText(QString::fromUtf8(pd.name.c_str()));
ui.nicknameLabel->setText(QString::fromUtf8(pd.name.c_str()) + " (" + QString::fromUtf8(pd.location.c_str())+")");
}
QString hlp_str = tr(

View File

@ -39,7 +39,7 @@
//#include "TrustView.h"
#include "NetworkView.h"
#include "GenCertDialog.h"
#include "connect/ConfCertDialog.h"
#include "connect/PGPKeyDialog.h"
#include "settings/rsharesettings.h"
#include "RetroShareLink.h"
#include "util/QtVersion.h"
@ -204,13 +204,13 @@ void NetworkDialog::connectTreeWidgetCostumPopupMenu( QPoint /*point*/ )
if(!rsPeers->getGPGDetails(peer_id, detail)) // that is not suppose to fail.
return ;
if(peer_id != rsPeers->getGPGOwnId())
{
if(detail.accept_connection)
contextMnu->addAction(QIcon(IMAGE_DENIED), tr("Deny friend"), this, SLOT(denyFriend()));
else // not a friend
contextMnu->addAction(QIcon(IMAGE_MAKEFRIEND), tr("Make friend"), this, SLOT(makeFriend()));
}
if(peer_id != rsPeers->getGPGOwnId())
{
if(detail.accept_connection)
contextMnu->addAction(QIcon(IMAGE_DENIED), tr("Deny friend"), this, SLOT(denyFriend()));
else // not a friend
contextMnu->addAction(QIcon(IMAGE_MAKEFRIEND), tr("Make friend..."), this, SLOT(makeFriend()));
}
if(peer_id == rsPeers->getGPGOwnId())
contextMnu->addAction(QIcon(IMAGE_EXPORT), tr("Export/create a new node"), this, SLOT(on_actionExportKey_activated()));
@ -315,7 +315,7 @@ void NetworkDialog::denyFriend()
void NetworkDialog::makeFriend()
{
ConfCertDialog::showIt(RsPgpId(getCurrentNeighbour()->text(COLUMN_PEERID).toStdString()), ConfCertDialog::PageTrust);
PGPKeyDialog::showIt(RsPgpId(getCurrentNeighbour()->text(COLUMN_PEERID).toStdString()), PGPKeyDialog::PageDetails);
}
/** Shows Peer Information/Auth Dialog */
@ -325,7 +325,7 @@ void NetworkDialog::peerdetails()
if (item == NULL) {
return;
}
ConfCertDialog::showIt(RsPgpId(item->text(COLUMN_PEERID).toStdString()), ConfCertDialog::PageDetails);
PGPKeyDialog::showIt(RsPgpId(item->text(COLUMN_PEERID).toStdString()), PGPKeyDialog::PageDetails);
}
void NetworkDialog::copyLink()

View File

@ -30,7 +30,7 @@
<item>
<widget class="QCheckBox" name="onlyTrustedKeys">
<property name="text">
<string>Only show people you trusted</string>
<string>Trusted keys only</string>
</property>
</widget>
</item>

View File

@ -45,6 +45,7 @@
#include "common/RsCollectionFile.h"
#include "gui/connect/ConnectFriendWizard.h"
#include "gui/connect/ConfCertDialog.h"
#include "gui/connect/PGPKeyDialog.h"
#include <retroshare/rsfiles.h>
#include <retroshare/rsmsgs.h>
@ -973,9 +974,9 @@ static void processList(const QStringList &list, const QString &textSingular, co
processList(fileAdd, QObject::tr("Add file"), QObject::tr("Add files"), content);
}
if (personAdd.size()) {
processList(personAdd, QObject::tr("Add friend"), QObject::tr("Add friends"), content);
}
//if (personAdd.size()) {
// processList(personAdd, QObject::tr("Add friend"), QObject::tr("Add friends"), content);
//}
if (content.isEmpty() == false) {
QString question = "<html><body>";
@ -1147,34 +1148,41 @@ static void processList(const QStringList &list, const QString &textSingular, co
std::cerr << " RetroShareLink::process FriendRequest : name : " << link.name().toStdString() << ". id : " << link.hash().toStdString() << std::endl;
#endif
needNotifySuccess = true;
RsPeerDetails detail;
if (rsPeers->getGPGDetails(RsPgpId(link.hash().toStdString()), detail))
PGPKeyDialog::showIt(detail.gpg_id,PGPKeyDialog::PageDetails) ;
else
personNotFound.append(PeerDefs::rsid(link.name().toUtf8().constData(), RsPgpId(link.hash().toStdString())));
RsPeerDetails detail;
if (rsPeers->getGPGDetails(RsPgpId(link.hash().toStdString()), detail))
{
if (RsPgpId(detail.gpg_id) == rsPeers->getGPGOwnId()) {
// it's me, do nothing
break;
}
break;
// needNotifySuccess = true;
if (detail.accept_connection) {
// peer connection is already accepted
personExist.append(PeerDefs::rsid(detail));
break;
}
if (rsPeers->addFriend(RsPeerId(), RsPgpId(link.hash().toStdString()))) {
ConfCertDialog::loadAll();
personAdded.append(PeerDefs::rsid(detail));
break;
}
personFailed.append(PeerDefs::rsid(link.name().toUtf8().constData(), RsPgpId(link.hash().toStdString())));
break;
}
personNotFound.append(PeerDefs::rsid(link.name().toUtf8().constData(), RsPgpId(link.hash().toStdString())));
break;
// RsPeerDetails detail;
// if (rsPeers->getGPGDetails(RsPgpId(link.hash().toStdString()), detail))
// {
// if (RsPgpId(detail.gpg_id) == rsPeers->getGPGOwnId()) {
// // it's me, do nothing
// break;
// }
//
// if (detail.accept_connection) {
// // peer connection is already accepted
// personExist.append(PeerDefs::rsid(detail));
// break;
// }
//
// if (rsPeers->addFriend(RsPeerId(), RsPgpId(link.hash().toStdString()))) {
// ConfCertDialog::loadAll();
// personAdded.append(PeerDefs::rsid(detail));
// break;
// }
//
// personFailed.append(PeerDefs::rsid(link.name().toUtf8().constData(), RsPgpId(link.hash().toStdString())));
// break;
// }
//
// personNotFound.append(PeerDefs::rsid(link.name().toUtf8().constData(), RsPgpId(link.hash().toStdString())));
// break;
}

View File

@ -35,6 +35,7 @@
#include "gui/common/AvatarDefs.h"
#include "gui/connect/ConfCertDialog.h"
#include "gui/connect/PGPKeyDialog.h"
#include "gui/connect/ConnectFriendWizard.h"
#include "gui/groups/CreateGroup.h"
#include "gui/msgs/MessageComposer.h"
@ -379,6 +380,7 @@ void FriendList::peerTreeWidgetCustomPopupMenu()
break;
case TYPE_GPG:
{
contextMnu.addAction(QIcon(IMAGE_FRIENDINFO), tr("Details"), this, SLOT(configurefriend()));
contextMnu.addAction(QIcon(IMAGE_DENYFRIEND), tr("Deny"), this, SLOT(removefriend()));
if(mShowGroups)
@ -1499,7 +1501,7 @@ void FriendList::configurefriend()
if(!RsPeerId(getRsId(getCurrentPeer())).isNull())
ConfCertDialog::showIt(RsPeerId(getRsId(getCurrentPeer())), ConfCertDialog::PageDetails);
else if(!RsPgpId(getRsId(getCurrentPeer())).isNull())
ConfCertDialog::showIt(RsPgpId(getRsId(getCurrentPeer())), ConfCertDialog::PageDetails);
PGPKeyDialog::showIt(RsPgpId(getRsId(getCurrentPeer())), PGPKeyDialog::PageDetails);
else
std::cerr << "FriendList::configurefriend: id is not an SSL nor a PGP id." << std::endl;
}

View File

@ -93,7 +93,7 @@ ConfCertDialog::ConfCertDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidge
// }
ui.headerFrame->setHeaderImage(QPixmap(":/images/user/identityinfo64.png"));
ui.headerFrame->setHeaderText(tr("Friend Details"));
ui.headerFrame->setHeaderText(tr("Friend node details"));
//ui._chat_CB->hide() ;
@ -101,12 +101,10 @@ ConfCertDialog::ConfCertDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidge
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(applyDialog()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
connect(ui.make_friend_button, SIGNAL(clicked()), this, SLOT(makeFriend()));
connect(ui.denyFriendButton, SIGNAL(clicked()), this, SLOT(denyFriend()));
connect(ui.signKeyButton, SIGNAL(clicked()), this, SLOT(signGPGKey()));
connect(ui.trusthelpButton, SIGNAL(clicked()), this, SLOT(showHelpDialog()));
connect(ui._shouldAddSignatures_CB, SIGNAL(toggled(bool)), this, SLOT(loadInvitePage()));
connect(ui._shouldAddSignatures_CB_2, SIGNAL(toggled(bool)), this, SLOT(loadInvitePage()));
//connect(ui.denyFriendButton, SIGNAL(clicked()), this, SLOT(denyFriend()));
//connect(ui._shouldAddSignatures_CB_2, SIGNAL(toggled(bool)), this, SLOT(loadInvitePage()));
ui.avatar->setFrameType(AvatarWidget::NORMAL_FRAME);
@ -153,7 +151,7 @@ void ConfCertDialog::load()
{
RsPeerDetails detail;
if(!(rsPeers->getPeerDetails(peerId, detail) || rsPeers->getGPGDetails(pgpId, detail)))
if(!rsPeers->getPeerDetails(peerId, detail))
{
QMessageBox::information(this,
tr("RetroShare"),
@ -162,33 +160,18 @@ void ConfCertDialog::load()
return;
}
if(detail.isOnlyGPGdetail && !rsPeers->isKeySupported(pgpId))
{
ui.make_friend_button->setEnabled(false) ;
ui.make_friend_button->setToolTip(tr("The supplied key algorithm is not supported by RetroShare\n(Only RSA keys are supported at the moment)")) ;
}
else
{
ui.make_friend_button->setEnabled(true) ;
ui.make_friend_button->setToolTip("") ;
}
ui._direct_transfer_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_DIRECT_DL ) ;
ui._allow_push_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_ALLOW_PUSH) ;
ui._direct_transfer_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_DIRECT_DL ) ;
ui._allow_push_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_ALLOW_PUSH) ;
ui.name->setText(QString::fromUtf8(detail.name.c_str()));
//ui.pgpfingerprint->setText(QString::fromUtf8(detail.name.c_str()));
ui.peerid->setText(QString::fromStdString(detail.id.toStdString()));
RetroShareLink link;
link.createPerson(detail.gpg_id);
ui.rsid->setText(link.toHtml());
ui.pgpfingerprint->setText(misc::fingerPrintStyleSplit(QString::fromStdString(detail.fpr.toStdString())));
ui.rsid->setToolTip(link.title());
ui.pgpfingerprint->setText(link.toHtml());
ui.pgpfingerprint->setToolTip(link.title());
if (!detail.isOnlyGPGdetail)
{
ui.avatar->setId(ChatId(peerId));
ui.loc->setText(QString::fromUtf8(detail.location.c_str()));
@ -278,165 +261,23 @@ void ConfCertDialog::load()
ui.groupBox->show();
ui.groupBox_4->show();
ui.tabWidget->show();
ui.rsid->hide();
ui.label_rsid->hide();
//ui.rsid->hide();
//ui.label_rsid->hide();
ui.pgpfingerprint->show();
ui.pgpfingerprint_label->show();
//ui.pgpfingerprint_label->show();
ui.stabWidget->setTabEnabled(2,true) ;
ui.stabWidget->setTabEnabled(3,true) ;
ui.stabWidget->setTabEnabled(4,true) ;
}
else
{
//ui.avatar->setId(pgpId.toStdString(), true);
ui.rsid->show();
ui.peerid->hide();
ui.label_id->hide();
ui.label_rsid->show();
ui.pgpfingerprint->show();
ui.pgpfingerprint_label->show();
ui.loc->hide();
ui.label_loc->hide();
ui.statusline->hide();
ui.label_status->hide();
ui.lastcontact->hide();
ui.label_last_contact->hide();
ui.version->hide();
ui.label_version->hide();
ui.groupBox_4->hide();
ui.crypto_info->hide();
ui.crypto_label->hide();
ui.groupBox->hide();
ui.tabWidget->hide();
ui.stabWidget->setTabEnabled(2,true) ;
ui.stabWidget->setTabEnabled(3,false) ;
ui.stabWidget->setTabEnabled(4,false) ;
//ui._useOldFormat_CB->setEnabled(false) ;
}
if (detail.gpg_id == rsPeers->getGPGOwnId()) {
ui.make_friend_button->hide();
ui.signGPGKeyCheckBox->hide();
ui.signKeyButton->hide();
ui.denyFriendButton->hide();
ui.web_of_trust_label->hide();
ui.radioButton_trust_fully->hide();
ui.radioButton_trust_marginnaly->hide();
ui.radioButton_trust_never->hide();
ui.is_signing_me->hide();
ui.signersBox->setTitle(tr("My key is signed by : "));
} else {
ui.web_of_trust_label->show();
ui.radioButton_trust_fully->show();
ui.radioButton_trust_marginnaly->show();
ui.radioButton_trust_never->show();
ui.is_signing_me->show();
ui.signersBox->setTitle(tr("Peer key is signed by : "));
if (detail.accept_connection) {
ui.make_friend_button->hide();
ui.denyFriendButton->show();
ui.signGPGKeyCheckBox->hide();
//connection already accepted, propose to sign gpg key
if (!detail.ownsign) {
ui.signKeyButton->show();
} else {
ui.signKeyButton->hide();
}
} else {
ui.make_friend_button->show();
ui.denyFriendButton->hide();
ui.signKeyButton->hide();
if (!detail.ownsign) {
ui.signGPGKeyCheckBox->show();
ui.signGPGKeyCheckBox->setChecked(false);
} else {
ui.signGPGKeyCheckBox->hide();
}
}
//web of trust
if (detail.trustLvl == RS_TRUST_LVL_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();
ui.radioButton_trust_marginnaly->hide();
ui.radioButton_trust_never->hide();
} else {
ui.radioButton_trust_fully->show();
ui.radioButton_trust_marginnaly->show();
ui.radioButton_trust_never->show();
if (detail.trustLvl == RS_TRUST_LVL_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 == RS_TRUST_LVL_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 == RS_TRUST_LVL_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"));
ui.radioButton_trust_fully->setIcon(QIcon(":/images/security-high-off-48.png"));
ui.radioButton_trust_marginnaly->setIcon(QIcon(":/images/security-medium-off-48.png"));
} else {
ui.web_of_trust_label->setText(tr("Your trust in this peer is not set."));
//we have to set up the set exclusive to false in order to uncheck it all
ui.radioButton_trust_fully->setAutoExclusive(false);
ui.radioButton_trust_marginnaly->setAutoExclusive(false);
ui.radioButton_trust_never->setAutoExclusive(false);
ui.radioButton_trust_fully->setChecked(false);
ui.radioButton_trust_marginnaly->setChecked(false);
ui.radioButton_trust_never->setChecked(false);
ui.radioButton_trust_fully->setAutoExclusive(true);
ui.radioButton_trust_marginnaly->setAutoExclusive(true);
ui.radioButton_trust_never->setAutoExclusive(true);
ui.radioButton_trust_never->setIcon(QIcon(":/images/security-low-off-48.png"));
ui.radioButton_trust_fully->setIcon(QIcon(":/images/security-high-off-48.png"));
ui.radioButton_trust_marginnaly->setIcon(QIcon(":/images/security-medium-off-48.png"));
}
}
if (detail.hasSignedMe) {
ui.is_signing_me->setText(tr("Peer has authenticated me as a friend and did sign my PGP key"));
} else {
ui.is_signing_me->setText(tr("Peer has not authenticated me as a friend and did not sign my PGP key"));
}
}
QString text;
for(std::list<RsPgpId>::const_iterator it(detail.gpgSigners.begin());it!=detail.gpgSigners.end();++it) {
link.createPerson(*it);
if (link.valid()) {
text += link.toHtml() + "<BR>";
}
}
ui.signers->setHtml(text);
loadInvitePage() ;
loadInvitePage() ;
}
void ConfCertDialog::loadInvitePage()
{
RsPeerDetails detail;
if (!rsPeers->getPeerDetails(peerId, detail) && !rsPeers->getGPGDetails(pgpId,detail))
RsPeerDetails detail;
if (!rsPeers->getPeerDetails(peerId, detail))
{
QMessageBox::information(this,
tr("RetroShare"),
@ -444,31 +285,56 @@ void ConfCertDialog::loadInvitePage()
close();
return;
}
std::string pgp_key = rsPeers->getPGPKey(detail.gpg_id,ui._shouldAddSignatures_CB_2->isChecked()) ; // this needs to be a SSL id
// std::string pgp_key = rsPeers->getPGPKey(detail.gpg_id,ui._shouldAddSignatures_CB_2->isChecked()) ; // this needs to be a SSL id
ui.userCertificateText_2->setReadOnly(true);
ui.userCertificateText_2->setMinimumHeight(200);
ui.userCertificateText_2->setMinimumWidth(530);
QFont font("Courier New",10,50,false);
font.setStyleHint(QFont::TypeWriter,QFont::PreferMatch);
font.setStyle(QFont::StyleNormal);
ui.userCertificateText_2->setFont(font);
ui.userCertificateText_2->setText(QString::fromUtf8(pgp_key.c_str()));
// ui.userCertificateText_2->setReadOnly(true);
// ui.userCertificateText_2->setMinimumHeight(200);
// ui.userCertificateText_2->setMinimumWidth(530);
// QFont font("Courier New",10,50,false);
// font.setStyleHint(QFont::TypeWriter,QFont::PreferMatch);
// font.setStyle(QFont::StyleNormal);
// ui.userCertificateText_2->setFont(font);
// ui.userCertificateText_2->setText(QString::fromUtf8(pgp_key.c_str()));
if(!detail.isOnlyGPGdetail)
{
std::string invite = rsPeers->GetRetroshareInvite(detail.id,ui._shouldAddSignatures_CB->isChecked()) ; // this needs to be a SSL id
std::string invite = rsPeers->GetRetroshareInvite(detail.id,ui._shouldAddSignatures_CB->isChecked()) ; // this needs to be a SSL id
ui.userCertificateText->setReadOnly(true);
ui.userCertificateText->setMinimumHeight(200);
ui.userCertificateText->setMinimumWidth(530);
QFont font("Courier New",10,50,false);
font.setStyleHint(QFont::TypeWriter,QFont::PreferMatch);
font.setStyle(QFont::StyleNormal);
ui.userCertificateText->setFont(font);
ui.userCertificateText->setText(QString::fromUtf8(invite.c_str()));
}
QString infotext ;
//infotext += tr("<p>Use this certificate to make new friends. Send it by email, or give it hand to hand.</p>") ;
infotext += tr("<p>This certificate contains:") ;
infotext += "<UL>" ;
infotext += "<li> a <b>PGP public key</b>";
infotext += " (" + QString::fromUtf8(detail.name.c_str()) + "@" + detail.gpg_id.toStdString().c_str()+")" ;
if(ui._shouldAddSignatures_CB->isChecked())
infotext += tr(" with ")+QString::number(detail.gpgSigners.size()-1)+" external signatures</li> " ;
else
infotext += tr("</li> ") ;
infotext += tr("<li>a <b>node ID</b> and <b>name</b>") +" (" + detail.id.toStdString().c_str() + ", " + QString::fromUtf8(detail.location.c_str()) +")" ;
infotext += "</li>" ;
infotext += "<li>" ;
if(detail.isHiddenNode)
infotext += tr("an <b>onion address</b> and <b>port</b>") +" (" + detail.hiddenNodeAddress.c_str() + ":" + QString::number(detail.hiddenNodePort)+ ")";
else
infotext += tr("an <b>IP address</b> and <b>port</b>") +" (" + detail.connectAddr.c_str() + ":" + QString::number(detail.connectPort)+ ")";
infotext += "</li>" ;
infotext += QString("</p>") ;
if(rsPeers->getOwnId() == detail.id)
infotext += tr("<p>You can use this certificate to make new friends. Send it by email, or give it hand to hand.</p>") ;
ui.userCertificateText->setToolTip(infotext) ;
ui.userCertificateText->setReadOnly(true);
ui.userCertificateText->setMinimumHeight(200);
ui.userCertificateText->setMinimumWidth(530);
QFont font("Courier New",10,50,false);
font.setStyleHint(QFont::TypeWriter,QFont::PreferMatch);
font.setStyle(QFont::StyleNormal);
ui.userCertificateText->setFont(font);
ui.userCertificateText->setText(QString::fromUtf8(invite.c_str()));
}
@ -487,18 +353,8 @@ void ConfCertDialog::applyDialog()
}
}
//check the GPG trustlvl
if (ui.radioButton_trust_fully->isChecked() && detail.trustLvl != RS_TRUST_LVL_FULL) {
//trust has changed to fully
rsPeers->trustGPGCertificate(pgpId, RS_TRUST_LVL_FULL);
} else if (ui.radioButton_trust_marginnaly->isChecked() && detail.trustLvl != RS_TRUST_LVL_MARGINAL) {
rsPeers->trustGPGCertificate(pgpId, RS_TRUST_LVL_MARGINAL);
} else if (ui.radioButton_trust_never->isChecked() && detail.trustLvl != RS_TRUST_LVL_NEVER) {
rsPeers->trustGPGCertificate(pgpId, RS_TRUST_LVL_NEVER);
}
if (!detail.isOnlyGPGdetail) {
if(!detail.isHiddenNode) {
if(!detail.isHiddenNode)
{
/* check if the data is the same */
bool localChanged = false;
bool extChanged = false;
@ -526,13 +382,15 @@ void ConfCertDialog::applyDialog()
if(localChanged || extChanged || dnsChanged)
emit configChanged();
} else {
if((detail.hiddenNodeAddress != ui.localAddress->text().toStdString()) || (detail.hiddenNodePort != ui.localPort->value())) {
}
else
{
if((detail.hiddenNodeAddress != ui.localAddress->text().toStdString()) || (detail.hiddenNodePort != ui.localPort->value()))
{
rsPeers->setHiddenNode(peerId,ui.localAddress->text().toStdString(), ui.localPort->value());
emit configChanged();
}
}
}
setServiceFlags() ;
@ -540,42 +398,6 @@ void ConfCertDialog::applyDialog()
close();
}
void ConfCertDialog::makeFriend()
{
if (ui.signGPGKeyCheckBox->isChecked()) {
rsPeers->signGPGCertificate(pgpId);
}
rsPeers->addFriend(peerId, pgpId);
setServiceFlags() ;
loadAll();
emit configChanged();
}
void ConfCertDialog::denyFriend()
{
rsPeers->removeFriend(pgpId);
loadAll();
emit configChanged();
}
void ConfCertDialog::signGPGKey()
{
if (!rsPeers->signGPGCertificate(pgpId)) {
QMessageBox::warning ( NULL,
tr("Signature Failure"),
tr("Maybe password is wrong"),
QMessageBox::Ok);
}
loadAll();
emit configChanged();
}
/** Displays the help browser and displays the most recently viewed help
* topic. */
void ConfCertDialog::showHelpDialog()
{
showHelpDialog("trust");

View File

@ -76,9 +76,9 @@ private:
private slots:
void applyDialog();
void makeFriend();
void denyFriend();
void signGPGKey();
//void makeFriend();
//void denyFriend();
//void signGPGKey();
void loadInvitePage();
void setServiceFlags();

View File

@ -7,11 +7,11 @@
<x>0</x>
<y>0</y>
<width>635</width>
<height>669</height>
<height>634</height>
</rect>
</property>
<property name="windowTitle">
<string>Friend Details</string>
<string>Retroshare node details</string>
</property>
<property name="windowIcon">
<iconset resource="../images.qrc">
@ -60,7 +60,7 @@
<item row="0" column="0">
<widget class="QTabWidget" name="stabWidget">
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="icon">
@ -70,206 +70,180 @@
<attribute name="title">
<string>Details</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_10">
<item row="0" column="0">
<widget class="AvatarWidget" name="avatar">
<property name="minimumSize">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Location info</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="1">
<widget class="RSTextBrowser" name="pgpfingerprint">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>27</height>
</size>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_loc">
<property name="text">
<string>Node name :</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="loc">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_status">
<property name="text">
<string>Status :</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="statusline">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_last_contact">
<property name="text">
<string>Last Contact :</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="lastcontact">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_version">
<property name="text">
<string>Retroshare version :</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="version">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_id">
<property name="text">
<string>Node ID :</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="peerid">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This is the ID of the node's &lt;span style=&quot; font-weight:600;&quot;&gt;SSL&lt;/span&gt; certifcate, that is signed by the above &lt;span style=&quot; font-weight:600;&quot;&gt;PGP&lt;/span&gt; key. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="crypto_label">
<property name="text">
<string>Encryption</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="crypto_info">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The encryption string is given by &lt;span style=&quot; font-weight:600;&quot;&gt;SSL&lt;/span&gt;. The connection to friend nodes&lt;/p&gt;&lt;p&gt;is always heavily encrypted, but If DHE is present, the connection further uses&lt;/p&gt;&lt;p&gt;&amp;quot;perfect forward secrecy&amp;quot;.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_name">
<property name="text">
<string>PGP key :</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="AvatarWidget" name="avatar">
<property name="minimumSize">
<size>
<width>96</width>
<height>96</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>96</width>
<height>96</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>96</width>
<height>96</height>
<width>20</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>96</width>
<height>96</height>
</size>
</property>
</widget>
</spacer>
</item>
<item row="0" column="1">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Peer Info</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<widget class="QLabel" name="label_name">
<property name="text">
<string>Name</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="name">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_id">
<property name="text">
<string>Location ID</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="peerid">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_rsid">
<property name="text">
<string>RetroShare ID</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="RSTextBrowser" name="rsid">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>20</height>
</size>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="pgpfingerprint_label">
<property name="text">
<string>PGP fingerprint</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="RSTextBrowser" name="pgpfingerprint">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>20</height>
</size>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="crypto_label">
<property name="text">
<string>Encryption</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="crypto_info"/>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Other info</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_loc">
<property name="text">
<string>Loc</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="loc">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_status">
<property name="text">
<string>Status</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="statusline">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_last_contact">
<property name="text">
<string>Last Contact</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lastcontact">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_version">
<property name="text">
<string>Version</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="version">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0" colspan="2">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
@ -467,343 +441,6 @@
</widget>
</widget>
</item>
<item row="2" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/security-high-16.png</normaloff>:/images/security-high-16.png</iconset>
</attribute>
<attribute name="title">
<string>Trust </string>
</attribute>
<layout class="QVBoxLayout" name="_9">
<item>
<widget class="QLabel" name="web_of_trust_label">
<property name="text">
<string>Your trust in this peer is:</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="wotLayout">
<item>
<widget class="QRadioButton" name="radioButton_trust_never">
<property name="maximumSize">
<size>
<width>125</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>None </string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/security-low-48.png</normaloff>:/images/security-low-48.png</iconset>
</property>
<property name="iconSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_trust_marginnaly">
<property name="maximumSize">
<size>
<width>140</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Marginal </string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/security-medium-48.png</normaloff>:/images/security-medium-48.png</iconset>
</property>
<property name="iconSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_trust_fully">
<property name="maximumSize">
<size>
<width>130</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Full </string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/security-high-48.png</normaloff>:/images/security-high-48.png</iconset>
</property>
<property name="iconSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="title">
<string>PGP Key</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="is_signing_me">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Peer has signed my PGP key</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QToolButton" name="trusthelpButton">
<property name="toolTip">
<string>Show Help for Trust Settings and Signing</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/informations_24x24.png</normaloff>:/images/informations_24x24.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QGroupBox" name="signersBox">
<property name="title">
<string>Peer key is signed by :</string>
</property>
<layout class="QVBoxLayout" name="_11">
<item>
<widget class="RSTextBrowser" name="signers"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="friendAndSignLayout">
<property name="margin">
<number>6</number>
</property>
<item>
<widget class="QCheckBox" name="signGPGKeyCheckBox">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Signing a friend's key is a way to express your trust into this friend, to your other friends. Besides, only signed peers will receive information about your other trusted friends.&lt;/p&gt;
&lt;p align=&quot;justify&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Signing a key cannot be undone, so do it wisely.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Sign PGP key</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/view-certificate-sign-32.png</normaloff>:/images/view-certificate-sign-32.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="signKeyButton">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Signing a friend's key is a way to express your trust into this friend, to your other friends. Besides, only signed peers will receive information about your other trusted friends.&lt;/p&gt;
&lt;p align=&quot;justify&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Signing a key cannot be undone, so do it wisely.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Sign PGP key</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/view-certificate-sign-48.png</normaloff>:/images/view-certificate-sign-48.png</iconset>
</property>
<property name="iconSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="denyFriendButton">
<property name="text">
<string>Deny Friend</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/user/deny_user48.png</normaloff>:/images/user/deny_user48.png</iconset>
</property>
<property name="iconSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="make_friend_button">
<property name="text">
<string>Make Friend</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/user/add_user48.png</normaloff>:/images/user/add_user48.png</iconset>
</property>
<property name="iconSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="autoRepeat">
<bool>false</bool>
</property>
<property name="autoExclusive">
<bool>false</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
<property name="autoRaise">
<bool>false</bool>
</property>
<property name="arrowType">
<enum>Qt::NoArrow</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_7">
<attribute name="title">
<string>PGP Key</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QTextEdit" name="userCertificateText_2"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QCheckBox" name="_shouldAddSignatures_CB_2">
<property name="text">
<string>Include signatures</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_3">
@ -812,7 +449,7 @@ p, li { white-space: pre-wrap; }
<normaloff>:/images/view-certificate-sign-32.png</normaloff>:/images/view-certificate-sign-32.png</iconset>
</attribute>
<attribute name="title">
<string>Certificate</string>
<string>Retroshare Certificate</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>

View File

@ -0,0 +1,395 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2006, crypton
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
#include "PGPKeyDialog.h"
#include <QMessageBox>
#include <QDateTime>
#include <QMenu>
#include <QClipboard>
#include <QMap>
#include <iostream>
#include <retroshare/rspeers.h>
#include <retroshare/rsdisc.h>
#include <retroshare/rsmsgs.h>
#include "gui/help/browser/helpbrowser.h"
#include "gui/common/PeerDefs.h"
#include "gui/common/StatusDefs.h"
#include "gui/RetroShareLink.h"
#include "gui/notifyqt.h"
#include "gui/common/AvatarDefs.h"
#include "gui/MainWindow.h"
#include "mainpage.h"
#include "util/DateTime.h"
#include "util/misc.h"
static QMap<RsPgpId, PGPKeyDialog*> instances_pgp;
PGPKeyDialog *PGPKeyDialog::instance(const RsPgpId& pgp_id)
{
PGPKeyDialog *d = instances_pgp[pgp_id];
if (d) {
return d;
}
d = new PGPKeyDialog(RsPeerId(),pgp_id);
instances_pgp[pgp_id] = d;
return d;
}
/** Default constructor */
PGPKeyDialog::PGPKeyDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidget *parent, Qt::WindowFlags flags)
: QDialog(parent, flags), peerId(id), pgpId(pgp_id)
{
/* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this);
// if(id.isNull())
// ui._useOldFormat_CB->setChecked(true) ;
// else
// {
// ui._useOldFormat_CB->setChecked(false) ;
// ui._useOldFormat_CB->setEnabled(false) ;
// }
ui.headerFrame->setHeaderImage(QPixmap(":/images/user/identityinfo64.png"));
ui.headerFrame->setHeaderText(tr("PGP Key details"));
//ui._chat_CB->hide() ;
setAttribute(Qt::WA_DeleteOnClose, true);
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(applyDialog()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
connect(ui.make_friend_button, SIGNAL(clicked()), this, SLOT(makeFriend()));
connect(ui.denyFriendButton, SIGNAL(clicked()), this, SLOT(denyFriend()));
connect(ui.signKeyButton, SIGNAL(clicked()), this, SLOT(signGPGKey()));
//connect(ui.trusthelpButton, SIGNAL(clicked()), this, SLOT(showHelpDialog()));
//connect(ui._shouldAddSignatures_CB, SIGNAL(toggled(bool)), this, SLOT(loadInvitePage()));
connect(ui._shouldAddSignatures_CB_2, SIGNAL(toggled(bool)), this, SLOT(loadKeyPage()));
//ui.avatar->setFrameType(AvatarWidget::NORMAL_FRAME);
MainWindow *w = MainWindow::getInstance();
if (w) {
connect(this, SIGNAL(configChanged()), w->getPage(MainWindow::Network), SLOT(insertConnect()));
}
}
PGPKeyDialog::~PGPKeyDialog()
{
QMap<RsPgpId, PGPKeyDialog*>::iterator it = instances_pgp.find(pgpId);
if (it != instances_pgp.end())
instances_pgp.erase(it);
}
//void PGPKeyDialog::setServiceFlags()
//{
// ServicePermissionFlags flags(0) ;
//
// if( ui._direct_transfer_CB->isChecked()) flags = flags | RS_NODE_PERM_DIRECT_DL ;
// if( ui._allow_push_CB->isChecked()) flags = flags | RS_NODE_PERM_ALLOW_PUSH ;
//
// rsPeers->setServicePermissionFlags(pgpId,flags) ;
//}
void PGPKeyDialog::loadAll()
{
for(QMap<RsPgpId , PGPKeyDialog*>::iterator it = instances_pgp.begin(); it != instances_pgp.end(); ++it) it.value()->load();
}
void PGPKeyDialog::load()
{
RsPeerDetails detail;
if(!rsPeers->getGPGDetails(pgpId, detail))
{
QMessageBox::information(this,
tr("RetroShare"),
tr("Error : cannot get peer details."));
close();
return;
}
if(!rsPeers->isKeySupported(pgpId))
{
ui.make_friend_button->setEnabled(false) ;
ui.make_friend_button->setToolTip(tr("The supplied key algorithm is not supported by RetroShare\n(Only RSA keys are supported at the moment)")) ;
}
else
{
ui.make_friend_button->setEnabled(true) ;
ui.make_friend_button->setToolTip("") ;
}
//ui._direct_transfer_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_DIRECT_DL ) ;
//ui._allow_push_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_ALLOW_PUSH) ;
ui.name->setText(QString::fromUtf8(detail.name.c_str()));
//ui.peerid->setText(QString::fromStdString(detail.id.toStdString()));
//RetroShareLink link;
//link.createPerson(detail.gpg_id);
//ui.rsid->setText(QString::fromStdString(detail.gpg_id.toStdString())) ;
ui.pgpfingerprint->setText(misc::fingerPrintStyleSplit(QString::fromStdString(detail.fpr.toStdString())));
//ui.rsid->setToolTip(link.title());
//ui.avatar->setId(pgpId.toStdString(), true);
// ui.rsid->show();
// ui.peerid->hide();
// ui.label_id->hide();
// ui.label_rsid->show();
ui.pgpfingerprint->show();
ui.pgpfingerprint_label->show();
// ui.loc->hide();
// ui.label_loc->hide();
// ui.statusline->hide();
// ui.label_status->hide();
// ui.lastcontact->hide();
// ui.label_last_contact->hide();
// ui.version->hide();
// ui.label_version->hide();
// ui.groupBox_4->hide();
// ui.crypto_info->hide();
// ui.crypto_label->hide();
// ui.groupBox->hide();
// ui.tabWidget->hide();
if (detail.gpg_id == rsPeers->getGPGOwnId())
{
ui.make_friend_button->hide();
ui.signGPGKeyCheckBox->hide();
ui.signKeyButton->hide();
ui.denyFriendButton->hide();
ui.web_of_trust_label->hide();
ui.trustlevel_CB->hide();
ui.is_signing_me->hide();
ui.signersBox->setTitle(tr("This is your own PGP key, and it is signed by : "));
}
else
{
ui.web_of_trust_label->show();
ui.trustlevel_CB->show();
ui.is_signing_me->show();
ui.signersBox->setTitle(tr("This key is signed by : "));
if (detail.accept_connection)
{
ui.make_friend_button->hide();
ui.denyFriendButton->show();
ui.signGPGKeyCheckBox->hide();
//connection already accepted, propose to sign gpg key
if (!detail.ownsign) {
ui.signKeyButton->show();
} else {
ui.signKeyButton->hide();
}
}
else
{
ui.make_friend_button->show();
ui.denyFriendButton->hide();
ui.signKeyButton->hide();
if (!detail.ownsign) {
ui.signGPGKeyCheckBox->show();
ui.signGPGKeyCheckBox->setChecked(false);
} else {
ui.signGPGKeyCheckBox->hide();
}
}
//web of trust
ui.trustlevel_CB->setCurrentIndex(detail.trustLvl) ;
QString truststring = "<p>" ;
truststring += tr("The trust level is a way to express your own trust in this key. It is not used by the software nor shared, but can be useful to you in order to remember good/bad keys.") ;
truststring += "</p>" ;
truststring += "<p>" ;
switch(detail.trustLvl)
{
case RS_TRUST_LVL_ULTIMATE:
//trust is ultimate, it means it's one of our own keys
truststring += tr("Your trust in this peer is ultimate");
break ;
case RS_TRUST_LVL_FULL:
truststring += tr("Your trust in this peer is full.");
break ;
case RS_TRUST_LVL_MARGINAL:
truststring += tr("Your trust in this peer is marginal.");
break ;
case RS_TRUST_LVL_NEVER:
truststring += tr("Your trust in this peer is none.");
break ;
default:
truststring += tr("You havn't set a trust level for this key.");
break ;
}
truststring += "</p>" ;
ui.trustlevel_CB->setToolTip(truststring) ;
if (detail.hasSignedMe) {
ui.is_signing_me->setText(tr("This key has signed your own PGP key"));
ui.is_signing_me->show() ;
} else {
ui.is_signing_me->hide() ;
}
}
QString text;
RetroShareLink link ;
for(std::list<RsPgpId>::const_iterator it(detail.gpgSigners.begin());it!=detail.gpgSigners.end();++it) {
link.createPerson(*it);
if (link.valid()) {
text += link.toHtml() + "<BR>";
}
}
ui.signers->setHtml(text);
loadKeyPage() ;
}
void PGPKeyDialog::loadKeyPage()
{
RsPeerDetails detail;
if (!rsPeers->getGPGDetails(pgpId,detail))
{
QMessageBox::information(this,
tr("RetroShare"),
tr("Error : cannot get peer details."));
close();
return;
}
std::string pgp_key = rsPeers->getPGPKey(detail.gpg_id,ui._shouldAddSignatures_CB_2->isChecked()) ; // this needs to be a SSL id
ui.userCertificateText_2->setReadOnly(true);
ui.userCertificateText_2->setMinimumHeight(200);
ui.userCertificateText_2->setMinimumWidth(530);
QFont font("Courier New",10,50,false);
font.setStyleHint(QFont::TypeWriter,QFont::PreferMatch);
font.setStyle(QFont::StyleNormal);
ui.userCertificateText_2->setFont(font);
ui.userCertificateText_2->setText(QString::fromUtf8(pgp_key.c_str()));
QString helptext ;
helptext += tr("<p>This PGP key (ID=")+detail.gpg_id.toStdString().c_str()+")" + " authenticates one or more retroshare nodes.</p> ";
helptext += "<p>" ;
if(detail.accept_connection)
helptext += tr("You have chosen to accept connections from Retroshare nodes signed by this key.") ;
else
helptext += tr("You are currently not allowing connections from Retroshare nodes signed by this key.") ;
helptext += "</p>" ;
ui.userCertificateText_2->setToolTip(helptext) ;
}
void PGPKeyDialog::applyDialog()
{
std::cerr << "PGPKeyDialog::applyDialog() called" << std::endl ;
RsPeerDetails detail;
if (!rsPeers->getPeerDetails(peerId, detail))
{
if (!rsPeers->getGPGDetails(pgpId, detail)) {
QMessageBox::information(this,
tr("RetroShare"),
tr("Error : cannot get peer details."));
close();
return;
}
}
//check the GPG trustlvl
if(ui.trustlevel_CB->currentIndex() != detail.trustLvl)
rsPeers->trustGPGCertificate(pgpId, ui.trustlevel_CB->currentIndex());
//setServiceFlags() ;
loadAll();
close();
}
void PGPKeyDialog::makeFriend()
{
if (ui.signGPGKeyCheckBox->isChecked()) {
rsPeers->signGPGCertificate(pgpId);
}
rsPeers->addFriend(peerId, pgpId);
// setServiceFlags() ;
loadAll();
emit configChanged();
}
void PGPKeyDialog::denyFriend()
{
rsPeers->removeFriend(pgpId);
loadAll();
emit configChanged();
}
void PGPKeyDialog::signGPGKey()
{
if (!rsPeers->signGPGCertificate(pgpId)) {
QMessageBox::warning ( NULL,
tr("Signature Failure"),
tr("Maybe password is wrong"),
QMessageBox::Ok);
}
loadAll();
emit configChanged();
}
/** Displays the help browser and displays the most recently viewed help
* topic. */
void PGPKeyDialog::showHelpDialog()
{
showHelpDialog("trust");
}
/**< Shows the help browser and displays the given help <b>topic</b>. */
void PGPKeyDialog::showHelpDialog(const QString &topic)
{
HelpBrowser::showWindow(topic);
}

View File

@ -0,0 +1,88 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2006, crypton
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
#pragma once
#include <QDialog>
#include "ui_PGPKeyDialog.h"
#include <retroshare/rstypes.h>
class PGPKeyDialog : public QDialog
{
Q_OBJECT
public:
enum enumPage { PageDetails=0x0 };
template<class ID_CLASS> static void showIt(const ID_CLASS& id, enumPage page)
{
PGPKeyDialog *confdialog = instance(id);
switch (page) {
case PageDetails:
confdialog->ui.stabWidget->setCurrentIndex(0);
break;
}
confdialog->load();
confdialog->show();
confdialog->raise();
confdialog->activateWindow();
/* window will destroy itself! */
}
static void loadAll();
signals:
void configChanged();
private:
/** Default constructor */
PGPKeyDialog(const RsPeerId &id,const RsPgpId& pgp_id, QWidget *parent = 0, Qt::WindowFlags flags = 0);
/** Default destructor */
~PGPKeyDialog();
static PGPKeyDialog *instance(const RsPgpId &pgp_id);
void load();
private slots:
void applyDialog();
void makeFriend();
void denyFriend();
void signGPGKey();
void loadKeyPage();
//void setServiceFlags();
void showHelpDialog();
/** Called when a child window requests the given help <b>topic</b>. */
void showHelpDialog(const QString &topic);
private:
RsPeerId peerId;
RsPgpId pgpId;
/** Qt Designer generated object */
Ui::PGPKeyDialog ui;
};

View File

@ -0,0 +1,368 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PGPKeyDialog</class>
<widget class="QDialog" name="PGPKeyDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>861</width>
<height>668</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="HeaderFrame" name="headerFrame">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
</widget>
</item>
<item>
<widget class="QTabWidget" name="stabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>PGP Key info</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_name">
<property name="text">
<string>PGP name :</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="name">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="pgpfingerprint_label">
<property name="text">
<string>Fingerprint :</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="pgpfingerprint">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="web_of_trust_label">
<property name="text">
<string>Trust level:</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="trustlevel_CB">
<item>
<property name="text">
<string>Unset</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/security-low-off-48.png</normaloff>:/images/security-low-off-48.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Unknown</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/security-low-off-48.png</normaloff>:/images/security-low-off-48.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>No trust</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/security-low-48.png</normaloff>:/images/security-low-48.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Marginal</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/security-medium-48.png</normaloff>:/images/security-medium-48.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Full</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/security-high-48.png</normaloff>:/images/security-high-48.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Ultimate</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/security-high-48.png</normaloff>:/images/security-high-48.png</iconset>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="is_signing_me">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>This key has signed my own PGP key</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="signersBox">
<property name="title">
<string>Key signatures :</string>
</property>
<layout class="QVBoxLayout" name="_11">
<item>
<widget class="RSTextBrowser" name="signers"/>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="friendAndSignLayout">
<property name="margin">
<number>6</number>
</property>
<item>
<widget class="QToolButton" name="signKeyButton">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Signing a friend's key is a way to express your trust into this friend, to your other friends. Besides, only signed peers will receive information about your other trusted friends.&lt;/p&gt;
&lt;p align=&quot;justify&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Signing a key cannot be undone, so do it wisely.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Sign this PGP key</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/view-certificate-sign-48.png</normaloff>:/images/view-certificate-sign-48.png</iconset>
</property>
<property name="iconSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="signGPGKeyCheckBox">
<property name="text">
<string>Sign PGP key</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="denyFriendButton">
<property name="text">
<string>Deny connections</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/user/deny_user48.png</normaloff>:/images/user/deny_user48.png</iconset>
</property>
<property name="iconSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="make_friend_button">
<property name="text">
<string>Accept connections</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/user/add_user48.png</normaloff>:/images/user/add_user48.png</iconset>
</property>
<property name="iconSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="autoRepeat">
<bool>false</bool>
</property>
<property name="autoExclusive">
<bool>false</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
<property name="autoRaise">
<bool>false</bool>
</property>
<property name="arrowType">
<enum>Qt::NoArrow</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="widget">
<attribute name="title">
<string>ASCII format</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QTextEdit" name="userCertificateText_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="_shouldAddSignatures_CB_2">
<property name="text">
<string>Include signatures</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>HeaderFrame</class>
<extends>QFrame</extends>
<header>gui/common/HeaderFrame.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>RSTextBrowser</class>
<extends>QTextBrowser</extends>
<header>gui/common/RSTextBrowser.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../images.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>PGPKeyDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>PGPKeyDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -50,7 +50,7 @@
#include <QStyleOption>
#include <iostream>
#include <gui/connect/ConfCertDialog.h>
#include <gui/connect/PGPKeyDialog.h>
#include <retroshare/rspeers.h>
#include "edge.h"
@ -354,15 +354,15 @@ void Node::peerDetails()
#ifdef DEBUG_ELASTIC
std::cerr << "Calling peer details" << std::endl;
#endif
ConfCertDialog::showIt(_gpg_id, ConfCertDialog::PageDetails);
PGPKeyDialog::showIt(_gpg_id, PGPKeyDialog::PageDetails);
}
void Node::makeFriend()
{
ConfCertDialog::showIt(_gpg_id, ConfCertDialog::PageTrust);
PGPKeyDialog::showIt(_gpg_id, PGPKeyDialog::PageDetails);
}
void Node::denyFriend()
{
ConfCertDialog::showIt(_gpg_id, ConfCertDialog::PageTrust);
PGPKeyDialog::showIt(_gpg_id, PGPKeyDialog::PageDetails);
}
void Node::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)

View File

@ -29,6 +29,7 @@
#include "gui/msgs/MessageComposer.h"
#include "gui/common/StatusDefs.h"
#include "gui/connect/ConfCertDialog.h"
#include "gui/connect/PGPKeyDialog.h"
#include "gui/connect/ConnectFriendWizard.h"
#include "gui/common/AvatarDefs.h"
#include "util/DateTime.h"
@ -374,7 +375,7 @@ void SecurityItem::peerDetails()
/* then gpgid */
if (rsPeers->getGPGDetails(mGpgId, details))
{
ConfCertDialog::showIt(mGpgId, ConfCertDialog::PageDetails);
PGPKeyDialog::showIt(mGpgId, PGPKeyDialog::PageDetails);
}
}

View File

@ -406,6 +406,7 @@ HEADERS += rshare.h \
gui/chat/ChatUserNotify.h \
gui/chat/ChatLobbyUserNotify.h \
gui/connect/ConfCertDialog.h \
gui/connect/PGPKeyDialog.h \
gui/msgs/MessageInterface.h \
gui/msgs/MessageComposer.h \
gui/msgs/MessageWindow.h \
@ -590,6 +591,7 @@ FORMS += gui/StartDialog.ui \
gui/chat/CreateLobbyDialog.ui \
gui/ChatLobbyWidget.ui \
gui/connect/ConfCertDialog.ui \
gui/connect/PGPKeyDialog.ui \
gui/connect/ConnectFriendWizard.ui \
gui/connect/ConnectProgressDialog.ui \
gui/msgs/MessageComposer.ui \
@ -746,6 +748,7 @@ SOURCES += main.cpp \
gui/chat/ChatUserNotify.cpp \
gui/chat/ChatLobbyUserNotify.cpp \
gui/connect/ConfCertDialog.cpp \
gui/connect/PGPKeyDialog.cpp \
gui/msgs/MessageComposer.cpp \
gui/msgs/MessageWidget.cpp \
gui/msgs/MessageWindow.cpp \