make peer details work for GPG key in the network view gui

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2010 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2010-01-13 21:11:02 +00:00
parent 77b3c0afd0
commit 41600dc3cf
13 changed files with 472 additions and 486 deletions

View file

@ -25,6 +25,7 @@
#include "rsiface/rsdisc.h"
#include <QTime>
#include <QtGui>
ConfCertDialog *ConfCertDialog::instance()
{
@ -46,7 +47,7 @@ ConfCertDialog::ConfCertDialog(QWidget *parent, Qt::WFlags flags)
connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applyDialog()));
connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(closeinfodlg()));
connect(ui._makeFriendPB, SIGNAL(clicked()), this, SLOT(makeFriend()));
connect(ui.sign_button, SIGNAL(clicked()), this, SLOT(makeFriend()));
ui.applyButton->setToolTip(tr("Apply and Close"));
@ -93,42 +94,60 @@ void ConfCertDialog::loadId(std::string id)
void ConfCertDialog::loadDialog()
{
isPGPId = false;
RsPeerDetails detail;
if (!rsPeers->getPeerDetails(mId, detail))
{
/* fail */
return;
}
isPGPId = true;
if (!rsPeers->getPGPDetails(mId, detail)) {
QMessageBox::information(this,
tr("RetroShare"),
tr("Error : cannot get peer details."));
this->close();
}
}
ui.name->setText(QString::fromStdString(detail.name));
ui.orgloc->setText(QString::fromStdString(detail.org));
ui.country->setText(QString::fromStdString(detail.location));
ui.peerid->setText(QString::fromStdString(detail.id));
// Dont Show a timestamp in RS calculate the day
QDateTime date = QDateTime::fromTime_t(detail.lastConnect);
QString stime = date.toString(Qt::LocalDate);
ui.lastcontact-> setText(stime);
if (!isPGPId) {
ui.orgloc->setText(QString::fromStdString(detail.org));
ui.country->setText(QString::fromStdString(detail.location));
// Dont Show a timestamp in RS calculate the day
QDateTime date = QDateTime::fromTime_t(detail.lastConnect);
QString stime = date.toString(Qt::LocalDate);
ui.lastcontact-> setText(stime);
/* set retroshare version */
std::map<std::string, std::string>::iterator vit;
std::map<std::string, std::string> versions;
bool retv = rsDisc->getDiscVersions(versions);
if (retv && versions.end() != (vit = versions.find(detail.id)))
{
ui.version->setText(QString::fromStdString(vit->second));
}
/* set retroshare version */
std::map<std::string, std::string>::iterator vit;
std::map<std::string, std::string> versions;
bool retv = rsDisc->getDiscVersions(versions);
if (retv && versions.end() != (vit = versions.find(detail.id)))
{
ui.version->setText(QString::fromStdString(vit->second));
}
/* set local address */
ui.localAddress->setText(QString::fromStdString(detail.localAddr));
ui.localPort -> setValue(detail.localPort);
/* set the server address */
ui.extAddress->setText(QString::fromStdString(detail.extAddr));
ui.extPort -> setValue(detail.extPort);
/* set local address */
ui.localAddress->setText(QString::fromStdString(detail.localAddr));
ui.localPort -> setValue(detail.localPort);
/* set the server address */
ui.extAddress->setText(QString::fromStdString(detail.extAddr));
ui.extPort -> setValue(detail.extPort);
ui.ipAddressList->clear();
for(std::list<std::string>::const_iterator it(detail.ipAddressList.begin());it!=detail.ipAddressList.end();++it)
ui.ipAddressList->addItem(QString::fromStdString(*it));
ui.ipAddressList->clear();
for(std::list<std::string>::const_iterator it(detail.ipAddressList.begin());it!=detail.ipAddressList.end();++it)
ui.ipAddressList->addItem(QString::fromStdString(*it));
} else {
ui.orgloc->hide();
ui.label_11->hide();
ui.country->hide();
ui.label_8->hide();
ui.lastcontact->hide();
ui.label_7->hide();
ui.version->hide();
ui.label_3->hide();
ui.groupBox->hide();
}
/* set the url for DNS access (OLD) */
//ui.extName->setText(QString::fromStdString(""));
@ -143,17 +162,37 @@ void ConfCertDialog::loadDialog()
//ui.trustLvl->setText(QString::fromStdString(RsPeerTrustString(detail.trustLvl)));
ui._peerTrustsMeCB->setChecked(rsPeers->isOnline(detail.id) || rsPeers->isTrustingMe(detail.id)) ;
ui._peerTrustsMeCB->setEnabled(false);
ui.signBox->setChecked(detail.ownsign) ;
ui.signBox->setEnabled(!detail.ownsign) ;
if (detail.ownsign) {
ui.sign_button->hide();
ui.signed_already_label->show();
} else {
ui.sign_button->show();
ui.signed_already_label->hide();
}
ui._peerAcceptedCB->setChecked(detail.state & RS_PEER_STATE_FRIEND) ;
ui._peerAcceptedCB->setEnabled(detail.ownsign) ;
bool hasSignedMe = false;
RsPeerDetails ownGPGDetails ;
rsPeers->getPGPDetails(rsPeers->getPGPOwnId(), ownGPGDetails);
std::list<std::string>::iterator signersIt;
for(signersIt = ownGPGDetails.gpgSigners.begin(); signersIt != ownGPGDetails.gpgSigners.end() ; ++signersIt) {
if (*signersIt == detail.id) {
hasSignedMe = true;
break;
}
}
if (hasSignedMe) {
ui.is_signing_me->setText(tr("Peer has acepted me as a friend and did not signed my GPG key"));
} else {
ui.is_signing_me->setText(tr("Peer has not acepted me as a friend and did not signed my GPG key"));
}
ui.signers->clear() ;
for(std::list<std::string>::const_iterator it(detail.signers.begin());it!=detail.signers.end();++it)
ui.signers->append(QString::fromStdString(*it)) ;
ui.signers->clear() ;
for(std::list<std::string>::const_iterator it(detail.gpgSigners.begin());it!=detail.gpgSigners.end();++it) {
RsPeerDetails signerDetail;
if (rsPeers->getPGPDetails(*it, signerDetail)) {
ui.signers->append(QString::fromStdString(signerDetail.name));
}
}
}
@ -172,8 +211,6 @@ void ConfCertDialog::applyDialog()
bool localChanged = false;
bool extChanged = false;
bool fwChanged = false;
bool signChanged = false;
bool trustChanged = false;
/* set local address */
if ((detail.localAddr != ui.localAddress->text().toStdString()) || (detail.localPort != ui.localPort -> value()))
@ -182,14 +219,6 @@ void ConfCertDialog::applyDialog()
if ((detail.extAddr != ui.extAddress->text().toStdString()) || (detail.extPort != ui.extPort -> value()))
extChanged = true;
if (detail.ownsign)
{
if (ui._peerAcceptedCB->isChecked() != ((detail.state & RS_PEER_STATE_FRIEND) > 0))
trustChanged = true;
}
else if (ui.signBox->isChecked())
signChanged = true;
/* now we can action the changes */
if (localChanged)
rsPeers->setLocalAddress(mId, ui.localAddress->text().toStdString(), ui.localPort->value());
@ -197,61 +226,18 @@ void ConfCertDialog::applyDialog()
if (extChanged)
rsPeers->setExtAddress(mId,ui.extAddress->text().toStdString(), ui.extPort->value());
#if 0
if (fwChanged)
rsicontrol -> FriendSetFirewall(mId, ui.chkFirewall->isChecked(),
ui.chkForwarded->isChecked());
#endif
if (signChanged)
{
std::cerr << "Signature changed. Signing certificate" << mId << std::endl ;
rsPeers->SignCertificate(mId);
}
if (trustChanged)
{
std::cerr << "Acceptance changed. Authing ceAuthrtificate" << mId << std::endl ;
if(ui._peerAcceptedCB->isChecked())
rsPeers->AuthCertificate(mId, "");
else
rsPeers->removeFriend(mId);
}
/* reload now */
loadDialog();
/* close the Dialog after the Changes applied */
closeinfodlg();
if(trustChanged || signChanged || localChanged || extChanged)
if(localChanged || extChanged)
emit configChanged() ;
}
void ConfCertDialog::makeFriend()
{
ui.signBox->setChecked(true) ;
ui._peerAcceptedCB->setChecked(true) ;
// rsPeers->TrustCertificate(mId, ui.trustBox->isChecked());
// rsPeers->SignCertificate(mId);
rsPeers->SignGPGCertificate(mId);
loadDialog();
}
#if 0
void ConfCertDialog::setInfo(std::string name,
std::string trust,
std::string org,
std::string loc,
std::string country,
std::string signers)
{
ui.name->setText(QString::fromStdString(name));
ui.trustLvl->setText(QString::fromStdString(trust));
ui.orgloc->setText(QString::fromStdString(org + loc));
//ui.loc->setText(QString::fromStdString(loc));
//ui.country->setText(QString::fromStdString(country));
//ui.signers->setText(QString::fromStdString(signers));
}
#endif

View file

@ -76,6 +76,7 @@ private:
void loadDialog();
std::string mId;
bool isPGPId;
/** Qt Designer generated object */
Ui::ConfCertDialog ui;

View file

@ -1,372 +1,359 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ConfCertDialog</class>
<widget class="QDialog" name="ConfCertDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>506</width>
<height>474</height>
</rect>
</property>
<property name="windowTitle">
<string>Peer Details</string>
</property>
<property name="windowIcon">
<iconset resource="../images.qrc">
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QTabWidget" name="stabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/peerdetails_16x16.png</normaloff>:/images/peerdetails_16x16.png</iconset>
</attribute>
<attribute name="title">
<string>Details</string>
</attribute>
<layout class="QGridLayout">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Peer Info</string>
</property>
<layout class="QGridLayout" name="_2">
<item row="0" column="0">
<widget class="QLabel" name="label_10">
<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_11">
<property name="text">
<string>Org / Loc:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="orgloc">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Country/State:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="country">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Peer ID</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="peerid">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Last Contact</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="lastcontact">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="version">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Version</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Peer Address</string>
</property>
<layout class="QVBoxLayout" name="_3">
<item>
<layout class="QHBoxLayout" name="_4">
<item>
<layout class="QVBoxLayout" name="_5">
<item>
<widget class="QLabel" name="label">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Local Address:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>External Address:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="_6">
<item>
<widget class="QLineEdit" name="localAddress"/>
</item>
<item>
<widget class="QLineEdit" name="extAddress"/>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="_7">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>Port:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Port:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="_8">
<item>
<widget class="QSpinBox" name="localPort">
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>7812</number>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="extPort">
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>7812</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>Addresses list</string>
</property>
</widget>
</item>
<item>
<widget class="QListWidget" name="ipAddressList"/>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>47</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</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="QGroupBox" name="groupBox_3">
<property name="title">
<string>Trust Settings</string>
</property>
<layout class="QVBoxLayout" name="_10">
<item>
<widget class="QCheckBox" name="signBox">
<property name="toolTip">
<string comment="Once signed, you cannot unsign a certificate, only deny connexions."/>
</property>
<property name="text">
<string>Sign this certificate</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="_peerAcceptedCB">
<property name="text">
<string>Accept connexions from this peer</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="_peerTrustsMeCB">
<property name="toolTip">
<string/>
</property>
<property name="text">
<string>Peer has signed my certficate</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Certificate signers</string>
</property>
<layout class="QVBoxLayout" name="_11">
<item>
<widget class="QTextBrowser" name="signers"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QPushButton" name="_makeFriendPB">
<property name="text">
<string>Make friend (Sign certificate and accept)</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>451</width>
<height>131</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
<item row="1" column="0">
<layout class="QGridLayout" name="_12">
<item row="0" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>311</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="applyButton">
<property name="text">
<string>OK</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ConfCertDialog</class>
<widget class="QDialog" name="ConfCertDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>506</width>
<height>523</height>
</rect>
</property>
<property name="windowTitle">
<string>Peer Details</string>
</property>
<property name="windowIcon">
<iconset resource="../images.qrc">
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QTabWidget" name="stabWidget">
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/peerdetails_16x16.png</normaloff>:/images/peerdetails_16x16.png</iconset>
</attribute>
<attribute name="title">
<string>Details</string>
</attribute>
<layout class="QGridLayout">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Peer Info</string>
</property>
<layout class="QGridLayout" name="_2">
<item row="0" column="0">
<widget class="QLabel" name="label_10">
<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_11">
<property name="text">
<string>Org / Loc:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="orgloc">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Country/State:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="country">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Peer ID</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="peerid">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Last Contact</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="lastcontact">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="version">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Version</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Peer Address</string>
</property>
<layout class="QVBoxLayout" name="_3">
<item>
<layout class="QHBoxLayout" name="_4">
<item>
<layout class="QVBoxLayout" name="_5">
<item>
<widget class="QLabel" name="label">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Local Address:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>External Address:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="_6">
<item>
<widget class="QLineEdit" name="localAddress"/>
</item>
<item>
<widget class="QLineEdit" name="extAddress"/>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="_7">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>Port:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Port:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="_8">
<item>
<widget class="QSpinBox" name="localPort">
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>7812</number>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="extPort">
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>7812</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>Addresses list</string>
</property>
</widget>
</item>
<item>
<widget class="QListWidget" name="ipAddressList"/>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>47</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</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="QGroupBox" name="groupBox_3">
<property name="title">
<string>Key signing settings</string>
</property>
<layout class="QVBoxLayout" name="_10">
<item>
<widget class="QLabel" name="is_signing_me">
<property name="text">
<string>Peer has signed my GPG key</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Peer key is already signed by :</string>
</property>
<layout class="QVBoxLayout" name="_11">
<item>
<widget class="QTextBrowser" name="signers"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="signed_already_label">
<property name="text">
<string>Peer is already a friend of me (his GPG key is signed by me)</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="sign_button">
<property name="text">
<string>Make friend (Sign his GPG key)</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>451</width>
<height>131</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
<item row="1" column="0">
<layout class="QGridLayout" name="_12">
<item row="0" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>311</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="applyButton">
<property name="text">
<string>OK</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>

View file

@ -130,7 +130,7 @@ void ConnectDialog::authAttempt()
/* well lets do it ! */
std::cerr << "Attempting AuthCode:" << authCode << std::endl;
rsPeers->AuthCertificate(authId, authCode);
//rsPeers->AuthCertificate(authId, authCode);
rsPeers->addFriend(authId);
rsicontrol->getNotify().notifyListChange(NOTIFY_LIST_NEIGHBOURS,1) ;
@ -166,7 +166,7 @@ bool ConnectDialog::loadPeer(std::string id)
std::ostringstream out;
std::list<std::string>::iterator it;
for(it = detail.signers.begin(); it != detail.signers.end(); it++)
for(it = detail.gpgSigners.begin(); it != detail.gpgSigners.end(); it++)
{
out << rsPeers->getPeerName(*it) << " <" << *it << ">";
out << std::endl;

View file

@ -97,7 +97,7 @@ ConnectFriendWizard::accept()
std::string authId = field("idField").toString().toStdString();
std::string authCode = field("authCode").toString().toStdString();
rsPeers->AuthCertificate(authId, authCode );
//rsPeers->AuthCertificate(authId, authCode );
rsPeers->addFriend(authId);
//let's check if there is ip adresses in the wizard.
@ -485,7 +485,7 @@ void FofPage::updatePeersList(int e)
std::set<std::string> common_friends ;
for(std::list<std::string>::const_iterator it2(details.signers.begin());it2!=details.signers.end();++it2)
for(std::list<std::string>::const_iterator it2(details.gpgSigners.begin());it2!=details.gpgSigners.end();++it2)
if(my_friends_names.find(*it2) != my_friends_names.end() && *it2 != details.name)
common_friends.insert(*it2) ;
@ -565,7 +565,7 @@ void FofPage::signAllSelectedUsers()
if(it->first->isChecked())
{
std::cerr << "Making friend with " << it->second << std::endl ;
rsPeers->AuthCertificate(it->second, "");
//rsPeers->AuthCertificate(it->second, "");
rsPeers->addFriend(it->second);
}
@ -868,7 +868,7 @@ ConclusionPage::initializePage()
QString ts;
std::list<std::string>::iterator it;
for(it = detail.signers.begin(); it != detail.signers.end(); it++)
for(it = detail.gpgSigners.begin(); it != detail.gpgSigners.end(); it++)
{
ts.append(QString::fromStdString( rsPeers->getPeerName(*it) ));
ts.append( "<" ) ;