mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-21 23:40:26 -04:00
Fix ConfCertDialog and PGPKeyDialog
This commit is contained in:
parent
5dc2602b39
commit
8251277d77
6 changed files with 206 additions and 208 deletions
|
@ -45,8 +45,8 @@
|
||||||
#include "util/DateTime.h"
|
#include "util/DateTime.h"
|
||||||
#include "util/misc.h"
|
#include "util/misc.h"
|
||||||
|
|
||||||
static QMap<RsPeerId, ConfCertDialog*> instances_ssl;
|
QMap<RsPeerId, ConfCertDialog*> ConfCertDialog::instances_ssl;
|
||||||
static QMap<RsPgpId, ConfCertDialog*> instances_pgp;
|
QMap<RsPgpId, ConfCertDialog*> ConfCertDialog::instances_pgp;
|
||||||
|
|
||||||
ConfCertDialog *ConfCertDialog::instance(const RsPeerId& peer_id)
|
ConfCertDialog *ConfCertDialog::instance(const RsPeerId& peer_id)
|
||||||
{
|
{
|
||||||
|
@ -142,7 +142,7 @@ void ConfCertDialog::load()
|
||||||
//ui.pgpfingerprint->setText(QString::fromUtf8(detail.name.c_str()));
|
//ui.pgpfingerprint->setText(QString::fromUtf8(detail.name.c_str()));
|
||||||
ui.peerid->setText(QString::fromStdString(detail.id.toStdString()));
|
ui.peerid->setText(QString::fromStdString(detail.id.toStdString()));
|
||||||
|
|
||||||
nameAndLocation = QString("%1 (%2)").arg(QString::fromUtf8(detail.name.c_str())).arg(QString::fromUtf8(detail.location.c_str()));
|
nameAndLocation = QString("%1 (%2)").arg(QString::fromUtf8(detail.name.c_str()), QString::fromUtf8(detail.location.c_str()));
|
||||||
|
|
||||||
ui.headerFrame->setHeaderText(nameAndLocation);
|
ui.headerFrame->setHeaderText(nameAndLocation);
|
||||||
|
|
||||||
|
@ -234,16 +234,16 @@ void ConfCertDialog::load()
|
||||||
ui.label_version->show();
|
ui.label_version->show();
|
||||||
|
|
||||||
//ui.groupBox->show();
|
//ui.groupBox->show();
|
||||||
ui.groupBox_4->show();
|
ui.detail_GBox->show();
|
||||||
//ui.tabWidget->show();
|
//ui.tabWidget->show();
|
||||||
//ui.rsid->hide();
|
//ui.rsid->hide();
|
||||||
//ui.label_rsid->hide();
|
//ui.label_rsid->hide();
|
||||||
ui.pgpfingerprint->show();
|
ui.pgpfingerprint->show();
|
||||||
//ui.pgpfingerprint_label->show();
|
//ui.pgpfingerprint_label->show();
|
||||||
|
|
||||||
ui.stabWidget->setTabEnabled(2,true) ;
|
ui.stabWidget->setTabEnabled(PageDetails,true) ;
|
||||||
ui.stabWidget->setTabEnabled(3,true) ;
|
ui.stabWidget->setTabEnabled(PageTrust,true) ;
|
||||||
ui.stabWidget->setTabEnabled(4,true) ;
|
ui.stabWidget->setTabEnabled(PageCertificate,true) ;
|
||||||
|
|
||||||
loadInvitePage() ;
|
loadInvitePage() ;
|
||||||
}
|
}
|
||||||
|
@ -263,17 +263,6 @@ void ConfCertDialog::loadInvitePage()
|
||||||
|
|
||||||
ui._shouldAddSignatures_CB->setEnabled(detail.gpgSigners.size() > 1) ;
|
ui._shouldAddSignatures_CB->setEnabled(detail.gpgSigners.size() > 1) ;
|
||||||
|
|
||||||
// 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()));
|
|
||||||
|
|
||||||
std::string invite ;
|
std::string invite ;
|
||||||
RetroshareInviteFlags flags = RetroshareInviteFlags::DNS | RetroshareInviteFlags::CURRENT_IP | RetroshareInviteFlags::RADIX_FORMAT;
|
RetroshareInviteFlags flags = RetroshareInviteFlags::DNS | RetroshareInviteFlags::CURRENT_IP | RetroshareInviteFlags::RADIX_FORMAT;
|
||||||
|
|
||||||
|
@ -283,7 +272,7 @@ void ConfCertDialog::loadInvitePage()
|
||||||
if(ui._shortFormat_CB->isChecked())
|
if(ui._shortFormat_CB->isChecked())
|
||||||
{
|
{
|
||||||
rsPeers->getShortInvite(invite,detail.id,flags);
|
rsPeers->getShortInvite(invite,detail.id,flags);
|
||||||
ui.stabWidget->setTabText(2, tr("Retroshare ID"));
|
ui.stabWidget->setTabText(PageCertificate, tr("Retroshare ID"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -291,7 +280,7 @@ void ConfCertDialog::loadInvitePage()
|
||||||
flags |= RetroshareInviteFlags::PGP_SIGNATURES;
|
flags |= RetroshareInviteFlags::PGP_SIGNATURES;
|
||||||
|
|
||||||
invite = rsPeers->GetRetroshareInvite(detail.id, flags ) ;
|
invite = rsPeers->GetRetroshareInvite(detail.id, flags ) ;
|
||||||
ui.stabWidget->setTabText(1, tr("Retroshare Certificate"));
|
ui.stabWidget->setTabText(PageCertificate, tr("Retroshare Certificate"));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString infotext = getCertificateDescription(detail,ui._shouldAddSignatures_CB->isChecked(),ui._shortFormat_CB->isChecked(), ui._includeIPHistory_CB->isChecked() );
|
QString infotext = getCertificateDescription(detail,ui._shouldAddSignatures_CB->isChecked(),ui._shortFormat_CB->isChecked(), ui._includeIPHistory_CB->isChecked() );
|
||||||
|
|
|
@ -32,7 +32,8 @@ class ConfCertDialog : public QDialog
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum enumPage { PageDetails, PageTrust, PageCertificate };
|
|
||||||
|
enum enumPage { PageDetails = 0, PageTrust = 1, PageCertificate = 2 };
|
||||||
|
|
||||||
template<class ID_CLASS> static void showIt(const ID_CLASS& id, enumPage page)
|
template<class ID_CLASS> static void showIt(const ID_CLASS& id, enumPage page)
|
||||||
{
|
{
|
||||||
|
@ -40,13 +41,13 @@ public:
|
||||||
|
|
||||||
switch (page) {
|
switch (page) {
|
||||||
case PageDetails:
|
case PageDetails:
|
||||||
confdialog->ui.stabWidget->setCurrentIndex(0);
|
confdialog->ui.stabWidget->setCurrentIndex(PageDetails);
|
||||||
break;
|
break;
|
||||||
case PageTrust:
|
case PageTrust:
|
||||||
confdialog->ui.stabWidget->setCurrentIndex(1);
|
confdialog->ui.stabWidget->setCurrentIndex(PageTrust);
|
||||||
break;
|
break;
|
||||||
case PageCertificate:
|
case PageCertificate:
|
||||||
confdialog->ui.stabWidget->setCurrentIndex(2);
|
confdialog->ui.stabWidget->setCurrentIndex(PageCertificate);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +66,7 @@ signals:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** Default constructor */
|
/** Default constructor */
|
||||||
ConfCertDialog(const RsPeerId &id,const RsPgpId& pgp_id, QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
ConfCertDialog(const RsPeerId &id,const RsPgpId& pgp_id, QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||||
/** Default destructor */
|
/** Default destructor */
|
||||||
~ConfCertDialog();
|
~ConfCertDialog();
|
||||||
|
|
||||||
|
@ -88,6 +89,9 @@ private:
|
||||||
|
|
||||||
QString nameAndLocation;
|
QString nameAndLocation;
|
||||||
|
|
||||||
|
static QMap<RsPeerId, ConfCertDialog*> instances_ssl;
|
||||||
|
static QMap<RsPgpId, ConfCertDialog*> instances_pgp;
|
||||||
|
|
||||||
/** Qt Designer generated object */
|
/** Qt Designer generated object */
|
||||||
Ui::ConfCertDialog ui;
|
Ui::ConfCertDialog ui;
|
||||||
};
|
};
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<iconset resource="../images.qrc">
|
<iconset resource="../images.qrc">
|
||||||
<normaloff>:/images/logo/logo_16.png</normaloff>:/images/logo/logo_16.png</iconset>
|
<normaloff>:/images/logo/logo_16.png</normaloff>:/images/logo/logo_16.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
<layout class="QGridLayout" name="ConfCertDialog_GL">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -54,9 +54,9 @@
|
||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
<layout class="QGridLayout" name="frame_GL">
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<layout class="QGridLayout" name="_12">
|
<layout class="QGridLayout" name="buttons_GL">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="standardButtons">
|
<property name="standardButtons">
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab">
|
<widget class="QWidget" name="detail_Tab">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="../images.qrc">
|
<iconset resource="../images.qrc">
|
||||||
<normaloff>:/images/info16.png</normaloff>:/images/info16.png</iconset>
|
<normaloff>:/images/info16.png</normaloff>:/images/info16.png</iconset>
|
||||||
|
@ -85,15 +85,15 @@
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Details</string>
|
<string>Details</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="detail_Tab_VL">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="detail_Tab_Top_HL">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_4">
|
<widget class="QGroupBox" name="detail_GBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Node info:</string>
|
<string>Node info:</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="detail_Tab_Left_GL">
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QLineEdit" name="statusline">
|
<widget class="QLineEdit" name="statusline">
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
|
@ -184,7 +184,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="crypto_label">
|
<widget class="QLabel" name="label_crypto">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Encryption</string>
|
<string>Encryption</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -211,7 +211,7 @@
|
||||||
<widget class="QLineEdit" name="statusmessage"/>
|
<widget class="QLineEdit" name="statusmessage"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="7" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_status_message">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Status message:</string>
|
<string>Status message:</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -221,7 +221,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="detail_Tab_Right_VL">
|
||||||
<item>
|
<item>
|
||||||
<widget class="AvatarWidget" name="avatar">
|
<widget class="AvatarWidget" name="avatar">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_5">
|
<spacer name="detail_Tab_Right_VL_Spacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@ -256,7 +256,7 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="detail_Tab_VSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@ -270,19 +270,19 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tab_2">
|
<widget class="QWidget" name="connectivity_Tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Connectivity</string>
|
<string>Connectivity</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
<layout class="QVBoxLayout" name="connectivity_Tab_VL">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="currentAdd_GBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Current address:</string>
|
<string>Current address:</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QVBoxLayout" name="currentAdd_GBox_VL">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout_12">
|
<layout class="QGridLayout" name="currentAdd_GL">
|
||||||
<item row="1" column="3">
|
<item row="1" column="3">
|
||||||
<widget class="QSpinBox" name="localPort">
|
<widget class="QSpinBox" name="localPort">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
|
@ -365,11 +365,11 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="knownAdd_GBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>List of known addresses:</string>
|
<string>List of known addresses:</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
<layout class="QVBoxLayout" name="knownAdd_GBox_VL">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="ipAddressList">
|
<widget class="QListWidget" name="ipAddressList">
|
||||||
<property name="contextMenuPolicy">
|
<property name="contextMenuPolicy">
|
||||||
|
@ -385,16 +385,16 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tab_4">
|
<widget class="QWidget" name="rs_cert_Tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Retroshare Certificate</string>
|
<string>Retroshare Certificate</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="rs_cert_Tab_VL">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextEdit" name="userCertificateText"/>
|
<widget class="QTextEdit" name="userCertificateText"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="rs_cert_CB_HL">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="_shouldAddSignatures_CB">
|
<widget class="QCheckBox" name="_shouldAddSignatures_CB">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -417,7 +417,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_2">
|
<spacer name="rs_cert_CB_HL_HSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#include "util/DateTime.h"
|
#include "util/DateTime.h"
|
||||||
#include "util/misc.h"
|
#include "util/misc.h"
|
||||||
|
|
||||||
static QMap<RsPgpId, PGPKeyDialog*> instances_pgp;
|
QMap<RsPgpId, PGPKeyDialog*> PGPKeyDialog::instances_pgp;
|
||||||
|
|
||||||
PGPKeyDialog *PGPKeyDialog::instance(const RsPgpId& pgp_id)
|
PGPKeyDialog *PGPKeyDialog::instance(const RsPgpId& pgp_id)
|
||||||
{
|
{
|
||||||
|
@ -148,9 +148,6 @@ void PGPKeyDialog::load()
|
||||||
ui.name->setText(QString::fromUtf8(detail.name.c_str()));
|
ui.name->setText(QString::fromUtf8(detail.name.c_str()));
|
||||||
ui.pgpfingerprint->setText(misc::fingerPrintStyleSplit(QString::fromStdString(detail.fpr.toStdString())));
|
ui.pgpfingerprint->setText(misc::fingerPrintStyleSplit(QString::fromStdString(detail.fpr.toStdString())));
|
||||||
|
|
||||||
ui.pgpfingerprint->show();
|
|
||||||
ui.pgpfingerprint_label->show();
|
|
||||||
|
|
||||||
ui._direct_transfer_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_DIRECT_DL ) ;
|
ui._direct_transfer_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_DIRECT_DL ) ;
|
||||||
//Add warning to direct source checkbox depends general setting.
|
//Add warning to direct source checkbox depends general setting.
|
||||||
switch (rsFiles->filePermDirectDL())
|
switch (rsFiles->filePermDirectDL())
|
||||||
|
@ -183,7 +180,7 @@ void PGPKeyDialog::load()
|
||||||
ui.signKeyButton->hide();
|
ui.signKeyButton->hide();
|
||||||
ui.denyFriendButton->hide();
|
ui.denyFriendButton->hide();
|
||||||
|
|
||||||
ui.web_of_trust_label->hide();
|
ui.label_trustlevel->hide();
|
||||||
ui.trustlevel_CB->hide();
|
ui.trustlevel_CB->hide();
|
||||||
|
|
||||||
ui.is_signing_me->hide();
|
ui.is_signing_me->hide();
|
||||||
|
@ -192,7 +189,7 @@ void PGPKeyDialog::load()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui.web_of_trust_label->show();
|
ui.label_trustlevel->show();
|
||||||
ui.trustlevel_CB->show();
|
ui.trustlevel_CB->show();
|
||||||
ui.is_signing_me->show();
|
ui.is_signing_me->show();
|
||||||
ui.signersLabel->setText(tr("This key is signed by :")+" ");
|
ui.signersLabel->setText(tr("This key is signed by :")+" ");
|
||||||
|
@ -279,14 +276,14 @@ void PGPKeyDialog::loadKeyPage()
|
||||||
|
|
||||||
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->setReadOnly(true);
|
||||||
ui.userCertificateText_2->setMinimumHeight(200);
|
ui.userCertificateText->setMinimumHeight(200);
|
||||||
ui.userCertificateText_2->setMinimumWidth(530);
|
ui.userCertificateText->setMinimumWidth(530);
|
||||||
QFont font("Courier New",10,50,false);
|
QFont font("Courier New",10,50,false);
|
||||||
font.setStyleHint(QFont::TypeWriter,QFont::PreferMatch);
|
font.setStyleHint(QFont::TypeWriter,QFont::PreferMatch);
|
||||||
font.setStyle(QFont::StyleNormal);
|
font.setStyle(QFont::StyleNormal);
|
||||||
ui.userCertificateText_2->setFont(font);
|
ui.userCertificateText->setFont(font);
|
||||||
ui.userCertificateText_2->setText(QString::fromUtf8(pgp_key.c_str()));
|
ui.userCertificateText->setText(QString::fromUtf8(pgp_key.c_str()));
|
||||||
|
|
||||||
QString helptext ;
|
QString helptext ;
|
||||||
helptext += tr("<p>This PGP key (ID=")+detail.gpg_id.toStdString().c_str()+")" + " authenticates one or more retroshare nodes.</p> ";
|
helptext += tr("<p>This PGP key (ID=")+detail.gpg_id.toStdString().c_str()+")" + " authenticates one or more retroshare nodes.</p> ";
|
||||||
|
@ -299,7 +296,7 @@ void PGPKeyDialog::loadKeyPage()
|
||||||
|
|
||||||
helptext += "</p>" ;
|
helptext += "</p>" ;
|
||||||
|
|
||||||
ui.userCertificateText_2->setToolTip(helptext) ;
|
ui.userCertificateText->setToolTip(helptext) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PGPKeyDialog::applyDialog()
|
void PGPKeyDialog::applyDialog()
|
||||||
|
|
|
@ -30,7 +30,7 @@ class PGPKeyDialog : public QDialog
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum enumPage { PageDetails=0x0 };
|
enum enumPage { PageDetails = 0, PageKey = 1, PageOption = 2};
|
||||||
|
|
||||||
template<class ID_CLASS> static void showIt(const ID_CLASS& id, enumPage page)
|
template<class ID_CLASS> static void showIt(const ID_CLASS& id, enumPage page)
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,13 @@ public:
|
||||||
|
|
||||||
switch (page) {
|
switch (page) {
|
||||||
case PageDetails:
|
case PageDetails:
|
||||||
confdialog->ui.stabWidget->setCurrentIndex(0);
|
confdialog->ui.stabWidget->setCurrentIndex(PageDetails);
|
||||||
|
break;
|
||||||
|
case PageKey:
|
||||||
|
confdialog->ui.stabWidget->setCurrentIndex(PageKey);
|
||||||
|
break;
|
||||||
|
case PageOption:
|
||||||
|
confdialog->ui.stabWidget->setCurrentIndex(PageOption);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +62,7 @@ signals:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** Default constructor */
|
/** Default constructor */
|
||||||
PGPKeyDialog(const RsPeerId &id,const RsPgpId& pgp_id, QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
PGPKeyDialog(const RsPeerId &id,const RsPgpId& pgp_id, QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||||
/** Default destructor */
|
/** Default destructor */
|
||||||
~PGPKeyDialog();
|
~PGPKeyDialog();
|
||||||
|
|
||||||
|
@ -80,6 +86,8 @@ private:
|
||||||
RsPeerId peerId;
|
RsPeerId peerId;
|
||||||
RsPgpId pgpId;
|
RsPgpId pgpId;
|
||||||
|
|
||||||
|
static QMap<RsPgpId, PGPKeyDialog*> instances_pgp;
|
||||||
|
|
||||||
/** Qt Designer generated object */
|
/** Qt Designer generated object */
|
||||||
Ui::PGPKeyDialog ui;
|
Ui::PGPKeyDialog ui;
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Retroshare profile</string>
|
<string>Retroshare profile</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
<layout class="QGridLayout" name="PGPKeyDialog_GL">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="frame_GL">
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -56,11 +56,11 @@
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab">
|
<widget class="QWidget" name="info_Tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Profile info</string>
|
<string>Profile info</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="info_Tab_GL">
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -68,9 +68,9 @@
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="info_Top_HL">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="info_Top_GL">
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLineEdit" name="name">
|
<widget class="QLineEdit" name="name">
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="pgpfingerprint_label">
|
<widget class="QLabel" name="label_pgpfingerprint">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Fingerprint :</string>
|
<string>Fingerprint :</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -164,7 +164,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="web_of_trust_label">
|
<widget class="QLabel" name="label_trustlevel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Trust level:</string>
|
<string>Trust level:</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -174,14 +174,14 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="label_signKey">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Keysigning:</string>
|
<string>Keysigning:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QHBoxLayout" name="signKey_HL">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="signKeyButton">
|
<widget class="QToolButton" name="signKeyButton">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
@ -206,7 +206,7 @@ p, li { white-space: pre-wrap; }
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_2">
|
<spacer name="signKey_HSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@ -239,7 +239,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="friendAndSign_HSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@ -312,7 +312,7 @@ p, li { white-space: pre-wrap; }
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="signer_VL">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="signersLabel">
|
<widget class="QLabel" name="signersLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -350,13 +350,13 @@ p, li { white-space: pre-wrap; }
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="widget">
|
<widget class="QWidget" name="key_Tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>PGP key</string>
|
<string>PGP key</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="key_Tab_VL">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_userCert">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Below is the node's profile key in PGP ASCII format. It identifies all nodes of the same profile. A "Retroshare certificate" that you can exchange in order to make friends, is in the the "details" of each separate node.</string>
|
<string>Below is the node's profile key in PGP ASCII format. It identifies all nodes of the same profile. A "Retroshare certificate" that you can exchange in order to make friends, is in the the "details" of each separate node.</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -366,7 +366,7 @@ p, li { white-space: pre-wrap; }
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextEdit" name="userCertificateText_2">
|
<widget class="QTextEdit" name="userCertificateText">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -376,7 +376,7 @@ p, li { white-space: pre-wrap; }
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="key_HL">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="_shouldAddSignatures_CB_2">
|
<widget class="QCheckBox" name="_shouldAddSignatures_CB_2">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
@ -391,13 +391,13 @@ p, li { white-space: pre-wrap; }
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tab_2">
|
<widget class="QWidget" name="option_Tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Options</string>
|
<string>Options</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
<layout class="QVBoxLayout" name="option_Tab_VL">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_option_Tab">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>These options apply to all nodes of the profile:</string>
|
<string>These options apply to all nodes of the profile:</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -434,11 +434,11 @@ p, li { white-space: pre-wrap; }
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="option_Speed_HL">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
<layout class="QVBoxLayout" name="option_Speed_Left_VL">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label_maxUploadSpeed">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Max upload speed (0=unlimited)</string>
|
<string>Max upload speed (0=unlimited)</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -448,7 +448,7 @@ p, li { white-space: pre-wrap; }
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_maxDownloadSpeed">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Max download speed (0=unlimited)</string>
|
<string>Max download speed (0=unlimited)</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -460,7 +460,7 @@ p, li { white-space: pre-wrap; }
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QVBoxLayout" name="option_Speed_Right_VL">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="maxUploadSpeed_SB">
|
<widget class="QSpinBox" name="maxUploadSpeed_SB">
|
||||||
<property name="suffix">
|
<property name="suffix">
|
||||||
|
@ -486,7 +486,7 @@ p, li { white-space: pre-wrap; }
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_4">
|
<spacer name="option_Tab_VSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@ -518,17 +518,17 @@ p, li { white-space: pre-wrap; }
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>RSTextBrowser</class>
|
||||||
|
<extends>QTextBrowser</extends>
|
||||||
|
<header>gui/common/RSTextBrowser.h</header>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>HeaderFrame</class>
|
<class>HeaderFrame</class>
|
||||||
<extends>QFrame</extends>
|
<extends>QFrame</extends>
|
||||||
<header>gui/common/HeaderFrame.h</header>
|
<header>gui/common/HeaderFrame.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>RSTextBrowser</class>
|
|
||||||
<extends>QTextBrowser</extends>
|
|
||||||
<header>gui/common/RSTextBrowser.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue