diff --git a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp index e71750ac0..7ea64e7b5 100755 --- a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp +++ b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp @@ -80,9 +80,6 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) : mTitleFontSize = 0; // Standard mTitleFontWeight = 0; // Standard - - // (csoler) I'm hiding this, since it is not needed anymore with the new Home page. - ui->userFrame->hide(); // ui->userFileFrame->hide(); // in homepage dropmenu now @@ -138,7 +135,6 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) : } else { - ui->userFrame->hide(); // certificates page - top half with own cert and it's functions ui->cp_Frame->hide(); // Advanced options - key sign, whitelist, direct source ... AdvancedVisible=false; ui->trustLabel->hide(); @@ -302,6 +298,7 @@ void ConnectFriendWizard::setCertificate(const QString &certificate, bool friend ui->requestinfolabel->show(); setTitleText(ui->ConclusionPage, tr("Friend request")); ui->ConclusionPage->setSubTitle(tr("Details about the request")); + setButtonText(QWizard::FinishButton , tr("Accept")); } } } @@ -326,6 +323,7 @@ void ConnectFriendWizard::setCertificate(const QString &certificate, bool friend ui->requestinfolabel->show(); setTitleText(ui->ConclusionPage, tr("Friend request")); ui->ConclusionPage->setSubTitle(tr("Details about the request")); + setButtonText(QWizard::FinishButton , tr("Accept")); } } } @@ -351,10 +349,11 @@ void ConnectFriendWizard::setGpgId(const RsPgpId &gpgId, const RsPeerId &sslId, //setStartId(friendRequest ? Page_FriendRequest : Page_Conclusion); setStartId(Page_Conclusion); if (friendRequest){ - ui->cp_Label->show(); - ui->requestinfolabel->show(); - setTitleText(ui->ConclusionPage,tr("Friend request")); - ui->ConclusionPage->setSubTitle(tr("Details about the request")); + ui->cp_Label->show(); + ui->requestinfolabel->show(); + setTitleText(ui->ConclusionPage,tr("Friend request")); + ui->ConclusionPage->setSubTitle(tr("Details about the request")); + setButtonText(QWizard::FinishButton , tr("Accept")); } } @@ -383,14 +382,9 @@ void ConnectFriendWizard::initializePage(int id) { switch ((Page) id) { case Page_Text: - connect(ui->userCertHelpButton, SIGNAL( clicked()), this, SLOT(showHelpUserCert())); - connect(ui->userCertIncludeSignaturesButton, SIGNAL(clicked()), this, SLOT(toggleSignatureState())); - connect(ui->userCertOldFormatButton, SIGNAL(clicked()), this, SLOT(toggleFormatState())); - connect(ui->userCertCopyButton, SIGNAL(clicked()), this, SLOT(copyCert())); + connect(ui->userCertPasteButton, SIGNAL(clicked()), this, SLOT(pasteCert())); connect(ui->userCertOpenButton, SIGNAL(clicked()), this, SLOT(openCert())); - connect(ui->userCertSaveButton, SIGNAL(clicked()), this, SLOT(saveCert())); - connect(ui->userCertMailButton, SIGNAL(clicked()), this, SLOT(runEmailClient())); connect(ui->friendCertEdit, SIGNAL(textChanged()), this, SLOT(friendCertChanged())); cleanfriendCertTimer = new QTimer(this); @@ -398,13 +392,6 @@ void ConnectFriendWizard::initializePage(int id) cleanfriendCertTimer->setInterval(1000); // 1 second connect(cleanfriendCertTimer, SIGNAL(timeout()), this, SLOT(cleanFriendCert())); - ui->userCertOldFormatButton->setChecked(false); - ui->userCertOldFormatButton->hide() ; - - toggleFormatState(true); - toggleSignatureState(false); - updateOwnCert(); - cleanFriendCert(); break; @@ -780,52 +767,6 @@ void ConnectFriendWizard::accept() //============================= TextPage ===================================== -void ConnectFriendWizard::updateOwnCert() -{ - std::string invite = rsPeers->GetRetroshareInvite( rsPeers->getOwnId(), - ui->userCertIncludeSignaturesButton->isChecked() ); - - std::cerr << "TextPage() getting Invite: " << invite << std::endl; - - ui->userCertEdit->setPlainText(QString::fromUtf8(invite.c_str())); -} - -void ConnectFriendWizard::toggleFormatState(bool doUpdate) -{ - if (ui->userCertOldFormatButton->isChecked()) - { - ui->userCertOldFormatButton->setToolTip(tr("Use new certificate format (safer, more robust)")); - ui->userCertOldFormatButton->setIcon(QIcon(":/images/ledoff1.png")) ; - } - else - { - ui->userCertOldFormatButton->setToolTip(tr("Use old (backward compatible) certificate format")); - ui->userCertOldFormatButton->setIcon(QIcon(":/images/ledon1.png")) ; - } - - if (doUpdate) { - updateOwnCert(); - } -} - -void ConnectFriendWizard::toggleSignatureState(bool doUpdate) -{ - if (ui->userCertIncludeSignaturesButton->isChecked()) { - ui->userCertIncludeSignaturesButton->setToolTip(tr("Remove signatures")); - } else { - ui->userCertIncludeSignaturesButton->setToolTip(tr("Include signatures")); - } - - if (doUpdate) { - updateOwnCert(); - } -} - -void ConnectFriendWizard::runEmailClient() -{ - sendMail("", tr("RetroShare Invite"), ui->userCertEdit->toPlainText()); -} - void ConnectFriendWizard::friendCertChanged() { ui->TextPage->setComplete(false); @@ -893,18 +834,6 @@ void ConnectFriendWizard::cleanFriendCert() ui->TextPage->setComplete(certValid); } -void ConnectFriendWizard::showHelpUserCert() -{ - QMessageBox::information(this, tr("Connect Friend Help"), tr("You can copy this text and send it to your friend via email or some other way")); -} - -void ConnectFriendWizard::copyCert() -{ - QClipboard *clipboard = QApplication::clipboard(); - clipboard->setText(ui->userCertEdit->toPlainText()); - QMessageBox::information(this, "RetroShare", tr("Your Cert is copied to Clipboard, paste and send it to your friend via email or some other way")); -} - void ConnectFriendWizard::pasteCert() { QClipboard *clipboard = QApplication::clipboard(); @@ -927,23 +856,6 @@ void ConnectFriendWizard::openCert() } } -void ConnectFriendWizard::saveCert() -{ - QString fileName = QFileDialog::getSaveFileName(this, tr("Save as..."), "", tr("RetroShare Certificate (*.rsc );;All Files (*)")); - if (fileName.isEmpty()) - return; - - QFile file(fileName); - if (!file.open(QFile::WriteOnly)) - return; - - //Todo: move save to file to p3Peers::SaveCertificateToFile - - QTextStream ts(&file); - ts.setCodec(QTextCodec::codecForName("UTF-8")); - ts << ui->userCertEdit->document()->toPlainText(); -} - #ifdef TO_BE_REMOVED //========================== CertificatePage ================================= diff --git a/retroshare-gui/src/gui/connect/ConnectFriendWizard.h b/retroshare-gui/src/gui/connect/ConnectFriendWizard.h index 5951fd7c2..f740da676 100755 --- a/retroshare-gui/src/gui/connect/ConnectFriendWizard.h +++ b/retroshare-gui/src/gui/connect/ConnectFriendWizard.h @@ -78,16 +78,9 @@ protected: private slots: /* TextPage */ - void updateOwnCert(); - void toggleSignatureState(bool doUpdate = true); - void toggleFormatState(bool doUpdate = true); - void runEmailClient(); void runEmailClient2(); - void showHelpUserCert(); - void copyCert(); void pasteCert(); void openCert(); - void saveCert(); void friendCertChanged(); void cleanFriendCert(); diff --git a/retroshare-gui/src/gui/connect/ConnectFriendWizard.ui b/retroshare-gui/src/gui/connect/ConnectFriendWizard.ui index 1c097627e..a950d3ceb 100644 --- a/retroshare-gui/src/gui/connect/ConnectFriendWizard.ui +++ b/retroshare-gui/src/gui/connect/ConnectFriendWizard.ui @@ -7,7 +7,7 @@ 0 0 600 - 500 + 437 @@ -28,192 +28,6 @@ ConnectFriendWizard::Page_Text - - - - - - - - - - 20 - 20 - - - - Qt::NoFocus - - - - :/images/info16.png:/images/info16.png - - - true - - - - - - - - 20 - 20 - - - - Qt::NoFocus - - - Include signatures - - - - :/images/gpgp_key_generate.png:/images/gpgp_key_generate.png - - - true - - - true - - - - - - - - 20 - 20 - - - - Qt::NoFocus - - - Copy your Cert to Clipboard - - - - :/images/copyrslink.png:/images/copyrslink.png - - - true - - - - - - - - 20 - 20 - - - - Qt::NoFocus - - - Save your Cert into a File - - - - :/images/document_save.png:/images/document_save.png - - - true - - - - - - - - 20 - 20 - - - - Qt::NoFocus - - - Run Email program - - - - :/images/mail_send.png:/images/mail_send.png - - - true - - - - - - - - 20 - 20 - - - - Qt::NoFocus - - - - :/images/ledon1.png:/images/ledon1.png - - - true - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Courier New - - - - QPlainTextEdit::NoWrap - - - true - - - 80 - - - - - - - The text below is your Retroshare ID. You have to provide it to your friend - - - - - - @@ -938,7 +752,7 @@ QFrame::Box - To accept the Friend Request, click the Finish button. + To accept the Friend Request, click the Accept button. 2 diff --git a/retroshare-gui/src/gui/qss/stylesheet/Standard.qss b/retroshare-gui/src/gui/qss/stylesheet/Standard.qss index 05670f863..60c1c332f 100644 --- a/retroshare-gui/src/gui/qss/stylesheet/Standard.qss +++ b/retroshare-gui/src/gui/qss/stylesheet/Standard.qss @@ -319,13 +319,13 @@ GenCertDialog > QFrame#headerFrame > QLabel#headerLabel { /* ConnectFriendWizard */ ConnectFriendWizard QWizardPage#ConclusionPage > QGroupBox#peerDetailsFrame { - border: 2px solid #CCCCCC; + border: 2px solid #039bd5; border-radius:6px; background: white; padding: 12 12px; } -ConnectFriendWizard QLabel#fr_label, QLabel#requestinfolabel +ConnectFriendWizard QLabel#fr_label, QLabel#requestinfolabel, QLabel#cp_Label { border: 1px solid #DCDC41; border-radius: 6px; @@ -333,6 +333,15 @@ ConnectFriendWizard QLabel#fr_label, QLabel#requestinfolabel background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFD7, stop:1 #FFFFB2); } +ConnectFriendWizard QGroupBox::title#peerDetailsFrame +{ + padding: 4 12px; + background: transparent; + padding: 4 12px; + background: #039bd5; + color: white; +} + /* Toaster */ ChatToaster > QFrame#windowFrame,