mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
commit
56b31a0e23
@ -236,7 +236,7 @@ void GetStartedDialog::inviteFriends()
|
||||
{
|
||||
RsAutoUpdatePage::lockAllEvents();
|
||||
|
||||
cert = rsPeers->GetRetroshareInvite();
|
||||
cert = rsPeers->GetRetroshareInvite(RsPeerId(),false,false);
|
||||
|
||||
RsAutoUpdatePage::unlockAllEvents() ;
|
||||
}
|
||||
|
@ -565,7 +565,7 @@ RetroShareLink RetroShareLink::createCertificate(const RsPeerId& ssl_id)
|
||||
} else {
|
||||
|
||||
link._type = TYPE_CERTIFICATE;
|
||||
link._radix = QString::fromUtf8(rsPeers->GetRetroshareInvite(ssl_id,false).c_str());
|
||||
link._radix = QString::fromUtf8(rsPeers->GetRetroshareInvite(ssl_id,false,false).c_str());
|
||||
link._name = QString::fromUtf8(detail.name.c_str());
|
||||
link._location = QString::fromUtf8(detail.location.c_str());
|
||||
link._radix.replace("\n","");
|
||||
|
@ -1903,7 +1903,7 @@ bool FriendList::exportFriendlist(QString &fileName)
|
||||
if (!rsPeers->getPeerDetails(*list_iter, detailSSL))
|
||||
continue;
|
||||
|
||||
std::string certificate = rsPeers->GetRetroshareInvite(detailSSL.id, true);
|
||||
std::string certificate = rsPeers->GetRetroshareInvite(detailSSL.id, true,true);
|
||||
// remove \n from certificate
|
||||
certificate.erase(std::remove(certificate.begin(), certificate.end(), '\n'), certificate.end());
|
||||
|
||||
|
@ -94,6 +94,7 @@ 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._shouldAddSignatures_CB, SIGNAL(toggled(bool)), this, SLOT(loadInvitePage()));
|
||||
connect(ui._includeIPHistory_CB, SIGNAL(toggled(bool)), this, SLOT(loadInvitePage()));
|
||||
|
||||
ui.avatar->setFrameType(AvatarWidget::NORMAL_FRAME);
|
||||
|
||||
@ -270,9 +271,14 @@ void ConfCertDialog::loadInvitePage()
|
||||
// ui.userCertificateText_2->setFont(font);
|
||||
// ui.userCertificateText_2->setText(QString::fromUtf8(pgp_key.c_str()));
|
||||
|
||||
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(),
|
||||
ui._includeIPHistory_CB->isChecked()
|
||||
) ;
|
||||
|
||||
QString infotext = getCertificateDescription(detail,ui._shouldAddSignatures_CB->isChecked(),true); // true, because default parameter in GetRetroshareInvite is true
|
||||
QString infotext = getCertificateDescription(detail,ui._shouldAddSignatures_CB->isChecked(),
|
||||
ui._includeIPHistory_CB->isChecked()
|
||||
);
|
||||
|
||||
ui.userCertificateText->setToolTip(infotext) ;
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1104</width>
|
||||
<height>1086</height>
|
||||
<height>1120</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -69,7 +69,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="stabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="icon">
|
||||
@ -389,6 +389,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="_includeIPHistory_CB">
|
||||
<property name="text">
|
||||
<string>Include IP history</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
@ -414,12 +421,6 @@
|
||||
</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>
|
||||
@ -431,6 +432,12 @@
|
||||
<header>gui/common/AvatarWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>HeaderFrame</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>gui/common/HeaderFrame.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
|
@ -127,10 +127,13 @@ void GxsIdChooser::setDefaultId(const RsGxsId &defId)
|
||||
static void loadPrivateIdsCallback(GxsIdDetailsType type, const RsIdentityDetails &details, QObject *object, const QVariant &/*data*/)
|
||||
{
|
||||
GxsIdChooser *chooser = dynamic_cast<GxsIdChooser*>(object);
|
||||
if (!chooser) {
|
||||
|
||||
if (!chooser)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int current_index = chooser->currentIndex();
|
||||
|
||||
QString current_id = (current_index >= 0)? chooser->itemData(current_index).toString() : "" ;
|
||||
|
||||
// this prevents the objects that depend on what's in the combo-box to activate and
|
||||
// perform any change.Only user-changes should cause this.
|
||||
@ -186,6 +189,16 @@ static void loadPrivateIdsCallback(GxsIdDetailsType type, const RsIdentityDetail
|
||||
|
||||
chooser->model()->sort(0);
|
||||
|
||||
// now restore the current item. Problem is, we cannot use the ID position because it may have changed.
|
||||
|
||||
if(!current_id.isNull())
|
||||
for(int indx=0;indx<chooser->count();++indx)
|
||||
if(chooser->itemData(indx).toString() == current_id)
|
||||
{
|
||||
chooser->setCurrentIndex(indx);
|
||||
break;
|
||||
}
|
||||
|
||||
chooser->blockSignals(false) ;
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ void ProfileWidget::statusmessagedlg()
|
||||
|
||||
void ProfileWidget::copyCert()
|
||||
{
|
||||
std::string cert = rsPeers->GetRetroshareInvite();
|
||||
std::string cert = rsPeers->GetRetroshareInvite(RsPeerId(),false,false);
|
||||
if (cert.empty()) {
|
||||
QMessageBox::information(this, tr("RetroShare"),
|
||||
tr("Sorry, create certificate failed"),
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1216</width>
|
||||
<height>1107</height>
|
||||
<height>1127</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
@ -231,7 +231,7 @@
|
||||
<item>
|
||||
<widget class="QGroupBox" name="chatLobbyGBox">
|
||||
<property name="title">
|
||||
<string>Chat Lobby</string>
|
||||
<string>Chat Rooms</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="chatLobbyGBoxVLayout">
|
||||
<item>
|
||||
@ -244,7 +244,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="defIDLabel">
|
||||
<property name="text">
|
||||
<string>Default identity for chat lobbies:</string>
|
||||
<string>Default identity for chat rooms:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -866,11 +866,11 @@
|
||||
<enum>QTabWidget::North</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="publicTab">
|
||||
<attribute name="title">
|
||||
<string>Group chat</string>
|
||||
<string>Chat rooms</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
|
@ -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()
|
||||
|
@ -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><html><head/><body><p>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.</p></body></html></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>
|
||||
|
Loading…
Reference in New Issue
Block a user