mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-28 10:32:22 -04:00
Removed automatic cleaning of the certificate in p3Peers::loadDetailsFromStringCert.
Added new button in ConnectFriendWizard for cleaning the certificate. Fixed cleaning: - added blank line after the armor header - moved the checksum to a new line Recompile of the GUI needed. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4134 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1bef23042f
commit
8f0793f071
7 changed files with 192 additions and 84 deletions
|
@ -228,11 +228,9 @@ TextPage::TextPage(QWidget *parent)
|
|||
std::string invite = rsPeers->GetRetroshareInvite();
|
||||
|
||||
userCertEdit->setReadOnly(true);
|
||||
userCertEdit->setMinimumHeight(200);
|
||||
userCertEdit->setMinimumWidth(530);
|
||||
QFont font("Courier New",10,50,false);
|
||||
font.setStyleHint(QFont::TypeWriter,QFont::PreferMatch);
|
||||
font.setStyle(QFont::StyleNormal);
|
||||
font.setStyleHint(QFont::TypeWriter,QFont::PreferMatch);
|
||||
font.setStyle(QFont::StyleNormal);
|
||||
userCertEdit->setFont(font);
|
||||
userCertEdit->setText(QString::fromStdString(invite));
|
||||
|
||||
|
@ -292,12 +290,27 @@ TextPage::TextPage(QWidget *parent)
|
|||
//font.setWeight(75);
|
||||
friendCertEdit->setFont(font);
|
||||
|
||||
friendCertCleanButton = new QPushButton;
|
||||
friendCertCleanButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
friendCertCleanButton->setFixedSize(20,20);
|
||||
friendCertCleanButton->setFlat(true);
|
||||
friendCertCleanButton->setIcon( QIcon(":images/accepted16.png") );
|
||||
friendCertCleanButton->setToolTip(tr("Clean certificate"));
|
||||
connect (friendCertCleanButton, SIGNAL(clicked()), this, SLOT(cleanFriendCert()));
|
||||
|
||||
friendCertButtonsLayout = new QVBoxLayout();
|
||||
friendCertButtonsLayout->addWidget(friendCertCleanButton);
|
||||
|
||||
friendCertLayout = new QHBoxLayout();
|
||||
friendCertLayout->addWidget(friendCertEdit);
|
||||
friendCertLayout->addLayout(friendCertButtonsLayout);
|
||||
|
||||
//=== add all widgets to one layout
|
||||
textPageLayout = new QVBoxLayout();
|
||||
textPageLayout->addWidget(userCertLabel);
|
||||
textPageLayout->addLayout(userCertLayout);
|
||||
textPageLayout->addWidget(friendCertLabel);
|
||||
textPageLayout->addWidget(friendCertEdit);
|
||||
textPageLayout->addLayout(friendCertLayout);
|
||||
//
|
||||
setLayout(textPageLayout);
|
||||
}
|
||||
|
@ -329,6 +342,16 @@ TextPage::runEmailClient()
|
|||
sendMail ("", tr("RetroShare Invite").toStdString(), userCertEdit->toPlainText().toStdString());
|
||||
}
|
||||
|
||||
void TextPage::cleanFriendCert()
|
||||
{
|
||||
std::string cert = friendCertEdit->toPlainText().toStdString();
|
||||
std::string cleanCert;
|
||||
|
||||
if (rsPeers->cleanCertificate(cert, cleanCert)) {
|
||||
friendCertEdit->setText(QString::fromStdString(cleanCert));
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
//============================================================================
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue