Fixed up Email Invite Text...

* Unified Text Source.
 * Added "Cut Below Here" line



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4883 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2012-02-03 20:38:45 +00:00
parent 014ad9b5c2
commit a1806bb04f
3 changed files with 45 additions and 19 deletions

View File

@ -255,13 +255,22 @@ void GetStartedDialog::inviteFriends()
std::ostringstream out;
out << GetInviteText();
out << std::endl;
out << GetCutBelowText() << std::endl;
out << std::endl;
out << cert;
out << std::endl;
sendMail("", tr("Retroshare Invitation").toStdString(), out.str());
}
QString trstr;
std::string GetStartedDialog::GetInviteText()
{
std::ostringstream out;
QString trstr;
trstr = tr("Your friend has installed Retroshare, and would like you to try it out.");
out << trstr.toStdString() << std::endl;
out << std::endl;
@ -270,25 +279,35 @@ void GetStartedDialog::inviteFriends()
out << std::endl;
trstr = tr("Retroshare is a private Friend-2-Friend sharing network.");
out << trstr.toStdString() << std::endl;
trstr = tr("It has an many features, including built-in chat, messaging, ");
trstr = tr("It has many features, including built-in chat, messaging, ");
out << trstr.toStdString() << std::endl;
trstr = tr("forums and channels, all of which are as secure as the file-sharing.");
out << trstr.toStdString() << std::endl;
out << std::endl;
out << std::endl;
trstr = tr("Below is your friends ID Certificate. Cut and paste this into your Retroshare client");
trstr = tr("Here is your friends ID Certificate.");
out << trstr.toStdString() << std::endl;
trstr = tr("and send them your ID Certificate to enable the secure connection");
trstr = tr("Cut and paste the text below into your Retroshare client");
out << trstr.toStdString() << std::endl;
trstr = tr("and send them your ID Certificate to get securely connected.");
out << trstr.toStdString() << std::endl;
out << std::endl;
out << cert;
out << std::endl;
sendMail("", tr("Retroshare Invitation").toStdString(), out.str());
std::string finaltext = out.str();
return finaltext;
}
std::string GetStartedDialog::GetCutBelowText()
{
QString trstr;
trstr = tr("Cut Below Here");
std::string text = trstr.toStdString() + " <-------------------------------------------------------------------------------------";
return text;
}
void GetStartedDialog::emailSubscribe()
{
std::ostringstream out;

View File

@ -28,6 +28,7 @@
#include <QTimer>
class GetStartedDialog : public MainPage
{
Q_OBJECT
@ -38,6 +39,11 @@ class GetStartedDialog : public MainPage
/** Default Destructor */
~GetStartedDialog();
// Single Point for (English) Text of the Invitation.
// This is used by other classes.
static std::string GetInviteText();
static std::string GetCutBelowText();
/*** signals: ***/
protected:

View File

@ -23,6 +23,8 @@
#include "gui/common/PeerDefs.h"
#include "gui/common/GroupDefs.h"
#include "gui/GetStartedDialog.h"
#include <retroshare/rspeers.h> //for rsPeers variable
#include <retroshare/rsiface.h>
@ -1279,7 +1281,7 @@ EmailPage::EmailPage(QWidget *parent) : QWizardPage(parent) {
subjectLabel = new QLabel(tr("Subject:" ) );
subjectEdit = new QLineEdit;
subjectEdit->setText(tr("Friend invites you to check out RetroShare"));
subjectEdit->setText(tr("RetroShare Invitation"));
registerField("subjectEdit*", subjectEdit);
emailhbox2Layout = new QHBoxLayout;
@ -1293,11 +1295,8 @@ EmailPage::EmailPage(QWidget *parent) : QWizardPage(parent) {
inviteTextEdit = new QTextEdit;
inviteTextEdit->setReadOnly(true);
inviteTextEdit->setHtml(tr("Friend uses RetroShare to communicate securely, and invites you to join him to share files together. <br>"
"RetroShare is free and using it is safe: it contains no viruses, no spyware, no adware and it can easily be uninstalled. <br>"
"For more information, see our website http://retroshare.sourceforge.net/ "
"or download the software here http://retroshare.sourceforge.net/downloads.html. <br>"
"See you soon on RetroShare!"));
inviteTextEdit->setPlainText(QString::fromUtf8(GetStartedDialog::GetInviteText().c_str()));
emailvboxLayout = new QVBoxLayout;
emailvboxLayout->addLayout(emailhbox2Layout);
@ -1329,6 +1328,8 @@ bool EmailPage::validatePage()
if (mailaddresses.isEmpty() == false)
{
QString body = inviteTextEdit->toPlainText();
body += "\n" + QString::fromUtf8(GetStartedDialog::GetCutBelowText().c_str());
body += "\n\n" + QString::fromUtf8(rsPeers->GetRetroshareInvite(false).c_str());
sendMail (mailaddresses, subjectEdit->text(), body);