added option to not include external IPs in preferences->node->certificate

This commit is contained in:
csoler 2018-10-20 17:31:52 +02:00
parent 395cf57ece
commit d97551aa3b
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
2 changed files with 25 additions and 20 deletions

View File

@ -31,6 +31,7 @@
#include "util/misc.h"
#include "util/DateTime.h"
#include <gui/RetroShareLink.h>
#include <gui/connect/ConfCertDialog.h>
#include <gui/profile/ProfileManager.h>
#include <gui/statistics/StatisticsWindow.h>
@ -47,6 +48,7 @@ CryptoPage::CryptoPage(QWidget * parent, Qt::WindowFlags flags)
// connect(ui.copykeyButton, SIGNAL(clicked()), this, SLOT(copyPublicKey()));
connect(ui.saveButton, SIGNAL(clicked()), this, SLOT(fileSaveAs()));
connect(ui._includeSignatures_CB, SIGNAL(toggled(bool)), this, SLOT(load()));
connect(ui._includeAllIPs_CB, SIGNAL(toggled(bool)), this, SLOT(load()));
connect(ui._copyLink_PB, SIGNAL(clicked()), this, SLOT(copyRSLink()));
connect(ui.showStats_PB, SIGNAL(clicked()), this, SLOT(showStats()));
@ -98,9 +100,13 @@ CryptoPage::load()
{
ui.certplainTextEdit->setPlainText(
QString::fromUtf8(
rsPeers->GetRetroshareInvite(
rsPeers->getOwnId(),
ui._includeSignatures_CB->isChecked() ).c_str() ) );
rsPeers->GetRetroshareInvite( rsPeers->getOwnId(), ui._includeSignatures_CB->isChecked(), ui._includeAllIPs_CB->isChecked() ).c_str()
) );
RsPeerDetails detail;
rsPeers->getPeerDetails(rsPeers->getOwnId(),detail);
ui.certplainTextEdit->setToolTip(ConfCertDialog::getCertificateDescription(detail, ui._includeSignatures_CB->isChecked(), ui._includeAllIPs_CB->isChecked() ));
}
void
CryptoPage::copyRSLink()

View File

@ -6,15 +6,15 @@
<rect>
<x>0</x>
<y>0</y>
<width>650</width>
<height>566</height>
<width>989</width>
<height>678</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
@ -426,6 +426,12 @@
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPlainTextEdit" name="certplainTextEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Courier New</family>
@ -455,22 +461,15 @@
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<widget class="QCheckBox" name="_includeAllIPs_CB">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;IP history is the list of IP you used accross time. Including this might help your friends reach you. This is optional for privacy reasons.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
<property name="text">
<string>Include IP history</string>
</property>
</spacer>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="_copyLink_PB">
<property name="text">
@ -496,7 +495,7 @@
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>