2011-07-11 14:53:14 -04:00
|
|
|
/****************************************************************
|
|
|
|
* RetroShare is distributed under the following license:
|
|
|
|
*
|
|
|
|
* Copyright (C) 2011, drbob
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
****************************************************************/
|
|
|
|
|
|
|
|
#include "gui/GetStartedDialog.h"
|
2011-07-30 08:41:28 -04:00
|
|
|
#include "gui/connect/ConnectFriendWizard.h"
|
|
|
|
#include "retroshare/rspeers.h"
|
|
|
|
#include "retroshare/rsdisc.h"
|
2011-07-11 14:53:14 -04:00
|
|
|
#include "retroshare/rsconfig.h"
|
2011-07-30 08:41:28 -04:00
|
|
|
|
2012-02-19 10:03:07 -05:00
|
|
|
#include "retroshare-gui/RsAutoUpdatePage.h"
|
2015-03-08 09:31:44 -04:00
|
|
|
#include "rshare.h"
|
2011-07-11 14:53:14 -04:00
|
|
|
|
2011-07-30 08:41:28 -04:00
|
|
|
#include <QDesktopServices>
|
|
|
|
|
2011-07-11 14:53:14 -04:00
|
|
|
#include <iostream>
|
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
#define URL_FAQ "http://retroshare.sourceforge.net/wiki/index.php/Frequently_Asked_Questions"
|
2018-10-05 20:46:09 -04:00
|
|
|
#define URL_FORUM "https://github.com/RetroShare/RetroShare/issues"
|
|
|
|
#define URL_WEBSITE "http://retroshare.net"
|
|
|
|
#define URL_DOWNLOAD "http://retroshare.net/downloads.html"
|
2012-02-03 19:55:55 -05:00
|
|
|
|
|
|
|
#define EMAIL_SUBSCRIBE "lists@retroshare.org"
|
|
|
|
|
2011-07-11 14:53:14 -04:00
|
|
|
/** Constructor */
|
|
|
|
GetStartedDialog::GetStartedDialog(QWidget *parent)
|
|
|
|
: MainPage(parent)
|
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
/* Invoke the Qt Designer generated object setup routine */
|
|
|
|
ui.setupUi(this);
|
2011-07-11 14:53:14 -04:00
|
|
|
|
2011-07-30 08:41:28 -04:00
|
|
|
mTimer = NULL;
|
|
|
|
mInviteTimer = NULL;
|
|
|
|
|
2011-07-11 14:53:14 -04:00
|
|
|
/* we use a flag to setup the GettingStarted Flags, so that RS has a bit of time to initialise itself
|
|
|
|
*/
|
|
|
|
|
|
|
|
mFirstShow = true;
|
|
|
|
|
|
|
|
connect(ui.inviteCheckBox, SIGNAL(stateChanged( int )), this, SLOT(tickInviteChanged()));
|
|
|
|
connect(ui.addCheckBox, SIGNAL(stateChanged( int )), this, SLOT(tickAddChanged()));
|
|
|
|
connect(ui.connectCheckBox, SIGNAL(stateChanged( int )), this, SLOT(tickConnectChanged()));
|
|
|
|
connect(ui.firewallCheckBox, SIGNAL(stateChanged( int )), this, SLOT(tickFirewallChanged()));
|
|
|
|
|
2011-07-30 08:41:28 -04:00
|
|
|
connect(ui.pushButton_InviteFriends, SIGNAL(clicked( bool )), this, SLOT(inviteFriends()));
|
|
|
|
connect(ui.pushButton_AddFriend, SIGNAL(clicked( bool )), this, SLOT(addFriends()));
|
|
|
|
|
|
|
|
connect(ui.pushButton_FAQ, SIGNAL(clicked( bool )), this, SLOT(OpenFAQ()));
|
|
|
|
connect(ui.pushButton_Forums, SIGNAL(clicked( bool )), this, SLOT(OpenForums()));
|
|
|
|
connect(ui.pushButton_Website, SIGNAL(clicked( bool )), this, SLOT(OpenWebsite()));
|
|
|
|
connect(ui.pushButton_EmailFeedback, SIGNAL(clicked( bool )), this, SLOT(emailFeedback()));
|
|
|
|
connect(ui.pushButton_EmailSupport, SIGNAL(clicked( bool )), this, SLOT(emailSupport()));
|
2011-07-11 14:53:14 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
GetStartedDialog::~GetStartedDialog()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void GetStartedDialog::changeEvent(QEvent *e)
|
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
switch (e->type()) {
|
|
|
|
case QEvent::LanguageChange:
|
|
|
|
ui.retranslateUi(this);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2011-07-11 14:53:14 -04:00
|
|
|
}
|
|
|
|
|
2011-08-12 10:06:29 -04:00
|
|
|
void GetStartedDialog::showEvent ( QShowEvent * /*event*/ )
|
2011-07-11 14:53:14 -04:00
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
/* do nothing if locked, or not visible */
|
|
|
|
if (RsAutoUpdatePage::eventsLocked() == true)
|
|
|
|
{
|
|
|
|
std::cerr << "GetStartedDialog::showEvent() events Are Locked" << std::endl;
|
|
|
|
return;
|
|
|
|
}
|
2011-07-11 14:53:14 -04:00
|
|
|
|
|
|
|
if ((mFirstShow) && (rsConfig))
|
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
RsAutoUpdatePage::lockAllEvents();
|
2011-07-11 14:53:14 -04:00
|
|
|
|
|
|
|
updateFromUserLevel();
|
|
|
|
mFirstShow = false;
|
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
RsAutoUpdatePage::unlockAllEvents() ;
|
2011-07-11 14:53:14 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void GetStartedDialog::updateFromUserLevel()
|
|
|
|
{
|
|
|
|
uint32_t userLevel = RSCONFIG_USER_LEVEL_NEW;
|
|
|
|
userLevel = rsConfig->getUserLevel();
|
|
|
|
|
|
|
|
ui.inviteCheckBox->setChecked(false);
|
|
|
|
ui.addCheckBox->setChecked(false);
|
|
|
|
ui.connectCheckBox->setChecked(false);
|
|
|
|
ui.firewallCheckBox->setChecked(false);
|
|
|
|
|
|
|
|
switch(userLevel)
|
|
|
|
{
|
|
|
|
// FALLS THROUGH EVERYWHERE.
|
|
|
|
case RSCONFIG_USER_LEVEL_POWER:
|
|
|
|
case RSCONFIG_USER_LEVEL_OVERRIDE:
|
|
|
|
ui.firewallCheckBox->setChecked(true);
|
2017-07-15 07:10:41 -04:00
|
|
|
/* fallthrough */
|
2011-07-11 14:53:14 -04:00
|
|
|
case RSCONFIG_USER_LEVEL_CASUAL:
|
|
|
|
ui.connectCheckBox->setChecked(true);
|
2017-07-15 07:10:41 -04:00
|
|
|
/* fallthrough */
|
2011-07-11 14:53:14 -04:00
|
|
|
case RSCONFIG_USER_LEVEL_BASIC:
|
|
|
|
ui.addCheckBox->setChecked(true);
|
|
|
|
ui.inviteCheckBox->setChecked(true);
|
|
|
|
|
|
|
|
default:
|
|
|
|
case RSCONFIG_USER_LEVEL_NEW:
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* will this auto trigger changes? */
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void GetStartedDialog::tickInviteChanged()
|
|
|
|
{
|
|
|
|
if (ui.inviteCheckBox->isChecked())
|
|
|
|
{
|
|
|
|
ui.inviteTextBrowser->setVisible(false);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ui.inviteTextBrowser->setVisible(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void GetStartedDialog::tickAddChanged()
|
|
|
|
{
|
|
|
|
if (ui.addCheckBox->isChecked())
|
|
|
|
{
|
|
|
|
ui.addTextBrowser->setVisible(false);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ui.addTextBrowser->setVisible(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void GetStartedDialog::tickConnectChanged()
|
|
|
|
{
|
|
|
|
if (ui.connectCheckBox->isChecked())
|
|
|
|
{
|
|
|
|
ui.connectTextBrowser->setVisible(false);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ui.connectTextBrowser->setVisible(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void GetStartedDialog::tickFirewallChanged()
|
|
|
|
{
|
|
|
|
if (ui.firewallCheckBox->isChecked())
|
|
|
|
{
|
|
|
|
ui.firewallTextBrowser->setVisible(false);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ui.firewallTextBrowser->setVisible(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
static void sendMail(const QString &address, const QString &subject, QString body)
|
2011-07-30 08:41:28 -04:00
|
|
|
{
|
|
|
|
/* Only under windows do we need to do this! */
|
2015-08-29 15:31:01 -04:00
|
|
|
#ifdef Q_OS_WIN
|
2012-02-03 19:55:55 -05:00
|
|
|
/* search and replace the end of lines with: "%0D%0A" */
|
|
|
|
body.replace("\n", "%0D%0A");
|
2011-07-30 08:41:28 -04:00
|
|
|
#endif
|
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
QString mailstr = "mailto:" + address;
|
|
|
|
mailstr += "?subject=" + subject;
|
|
|
|
mailstr += "&body=" + body;
|
2011-07-30 08:41:28 -04:00
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
std::cerr << "MAIL STRING:" << mailstr.toStdString() << std::endl;
|
2011-07-30 08:41:28 -04:00
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
/* pass the url directly to QDesktopServices::openUrl */
|
|
|
|
QDesktopServices::openUrl(QUrl(mailstr));
|
2011-07-30 08:41:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void GetStartedDialog::addFriends()
|
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
ConnectFriendWizard connwiz(this);
|
2011-07-30 08:41:28 -04:00
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
connwiz.show();
|
|
|
|
connwiz.next();
|
|
|
|
connwiz.exec();
|
2011-07-30 08:41:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void GetStartedDialog::inviteFriends()
|
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
if (RsAutoUpdatePage::eventsLocked() == true)
|
2011-07-30 08:41:28 -04:00
|
|
|
{
|
|
|
|
std::cerr << "GetStartedDialog::inviteFriends() EventsLocked... waiting";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
|
|
|
|
if (!mInviteTimer)
|
|
|
|
{
|
|
|
|
mInviteTimer = new QTimer(this);
|
2012-02-03 19:55:55 -05:00
|
|
|
mInviteTimer->connect(mTimer, SIGNAL(timeout()), this, SLOT(inviteFriends()));
|
|
|
|
mInviteTimer->setInterval(100); /* 1/10 second */
|
|
|
|
mInviteTimer->setSingleShot(true);
|
2011-07-30 08:41:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
mInviteTimer->start();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string cert;
|
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
RsAutoUpdatePage::lockAllEvents();
|
2011-07-30 08:41:28 -04:00
|
|
|
|
2018-10-20 11:48:36 -04:00
|
|
|
cert = rsPeers->GetRetroshareInvite(RsPeerId(),false,false);
|
2011-07-30 08:41:28 -04:00
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
RsAutoUpdatePage::unlockAllEvents() ;
|
2011-07-30 08:41:28 -04:00
|
|
|
}
|
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
QString text = QString("%1\n%2\n\n%3\n").arg(GetInviteText()).arg(GetCutBelowText()).arg(QString::fromUtf8(cert.c_str()));
|
2012-02-02 19:15:49 -05:00
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
sendMail("", tr("RetroShare Invitation"), text);
|
2012-02-03 15:38:45 -05:00
|
|
|
}
|
2012-02-02 19:15:49 -05:00
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
QString GetStartedDialog::GetInviteText()
|
2012-02-03 15:38:45 -05:00
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
QString text = tr("Your friend has installed RetroShare, and would like you to try it out.") + "\n";
|
|
|
|
text += "\n";
|
|
|
|
text += tr("You can get RetroShare here: %1").arg(URL_DOWNLOAD) + "\n";
|
|
|
|
text += "\n";
|
|
|
|
text += tr("RetroShare is a private Friend-2-Friend sharing network.") + "\n";
|
2015-06-12 04:27:26 -04:00
|
|
|
text += tr("It has many features, including built-in chat, messaging,") + "\n";
|
2012-02-03 19:55:55 -05:00
|
|
|
text += tr("forums and channels, all of which are as secure as the file-sharing.") + "\n";
|
|
|
|
text += "\n";
|
|
|
|
text += "\n";
|
|
|
|
text += tr("Here is your friends ID Certificate.") + "\n";
|
|
|
|
text += tr("Cut and paste the text below into your RetroShare client") + "\n";
|
|
|
|
text += tr("and send them your ID Certificate to get securely connected.") + "\n";
|
2011-07-30 08:41:28 -04:00
|
|
|
|
2012-02-03 15:38:45 -05:00
|
|
|
return text;
|
2011-07-30 08:41:28 -04:00
|
|
|
}
|
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
QString GetStartedDialog::GetCutBelowText()
|
|
|
|
{
|
|
|
|
return QString("%1 <-------------------------------------------------------------------------------------").arg(tr("Cut Below Here"));
|
|
|
|
}
|
2012-02-03 15:38:45 -05:00
|
|
|
|
2011-07-30 08:41:28 -04:00
|
|
|
void GetStartedDialog::emailSubscribe()
|
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
// when translation is needed, replace QString by tr
|
|
|
|
QString text = QString("Please let me know when RetroShare has a new release, or exciting news") + "\n";
|
|
|
|
text += "\n";
|
2015-06-12 04:27:26 -04:00
|
|
|
text += QString("Furthermore, I'd like to say ...") + "\n";
|
2012-02-03 19:55:55 -05:00
|
|
|
text += "\n";
|
|
|
|
|
|
|
|
sendMail(EMAIL_SUBSCRIBE, "Subscribe", text);
|
2011-07-30 08:41:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GetStartedDialog::emailUnsubscribe()
|
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
// when translation is needed, replace QString by tr
|
|
|
|
QString text = QString("I am no longer interested in RetroShare News.") + "\n";
|
|
|
|
text += QString("Please remove me from the Mailing List") + "\n";
|
2011-07-30 08:41:28 -04:00
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
sendMail(EMAIL_SUBSCRIBE, "Unsubscribe", text);
|
2011-07-30 08:41:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void GetStartedDialog::emailFeedback()
|
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
// when translation is needed, replace QString by tr
|
|
|
|
QString text = QString("Dear RetroShare Developers") + "\n";
|
|
|
|
text += "\n";
|
|
|
|
text += QString("I've tried out RetroShare and would like provide feedback:") + "\n";
|
|
|
|
text += "\n";
|
|
|
|
text += QString("To make RetroShare more user friendly, please [ what do you think? ] ") + "\n";
|
|
|
|
text += QString("The best feature of RetroShare is [ what do you think? ] ") + "\n";
|
|
|
|
text += QString("and the biggest missing feature is [ what do you think? ] ") + "\n";
|
|
|
|
text += "\n";
|
|
|
|
text += QString("Furthermore, I'd like to say ... ") + "\n";
|
|
|
|
text += "\n";
|
|
|
|
|
|
|
|
sendMail("feedback@retroshare.org", tr("RetroShare Feedback"), text);
|
2011-07-30 08:41:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void GetStartedDialog::emailSupport()
|
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
if (RsAutoUpdatePage::eventsLocked() == true)
|
2011-07-30 08:41:28 -04:00
|
|
|
{
|
|
|
|
std::cerr << "GetStartedDialog::emailSupport() EventsLocked... waiting";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
|
|
|
|
if (!mTimer)
|
|
|
|
{
|
|
|
|
mTimer = new QTimer(this);
|
2012-02-03 19:55:55 -05:00
|
|
|
mTimer->connect(mTimer, SIGNAL(timeout()), this, SLOT(emailSupport()));
|
|
|
|
mTimer->setInterval(100); /* 1/10 second */
|
|
|
|
mTimer->setSingleShot(true);
|
2011-07-30 08:41:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
mTimer->start();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t userLevel;
|
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
RsAutoUpdatePage::lockAllEvents();
|
2011-07-30 08:41:28 -04:00
|
|
|
|
|
|
|
userLevel = rsConfig->getUserLevel();
|
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
RsAutoUpdatePage::unlockAllEvents() ;
|
2011-07-30 08:41:28 -04:00
|
|
|
}
|
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
// when translation is needed, replace QString by tr
|
|
|
|
QString text = QString("Hello") + "\n";
|
|
|
|
text += "\n";
|
2011-07-30 08:41:28 -04:00
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
QString sysVersion;
|
2011-07-30 08:41:28 -04:00
|
|
|
|
|
|
|
#ifdef __APPLE__
|
|
|
|
|
2015-08-29 15:31:01 -04:00
|
|
|
#ifdef Q_OS_MAC
|
2011-07-30 08:41:28 -04:00
|
|
|
switch(QSysInfo::MacintoshVersion)
|
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::MV_9:
|
|
|
|
sysVersion = "Mac OS 9";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::MV_10_0:
|
|
|
|
sysVersion = "Mac OSX 10.0";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::MV_10_1:
|
|
|
|
sysVersion = "Mac OSX 10.1";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::MV_10_2:
|
|
|
|
sysVersion = "Mac OSX 10.2";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::MV_10_3:
|
|
|
|
sysVersion = "Mac OSX 10.3";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::MV_10_4:
|
|
|
|
sysVersion = "Mac OSX 10.4";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::MV_10_5:
|
|
|
|
sysVersion = "Mac OSX 10.5";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::MV_10_6:
|
|
|
|
sysVersion = "Mac OSX 10.6";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
// case QSysInfo::MV_10_7:
|
|
|
|
// sysVersion = "Mac OSX 10.7";
|
2011-07-30 08:41:28 -04:00
|
|
|
// break;
|
2012-02-03 19:55:55 -05:00
|
|
|
default:
|
|
|
|
sysVersion = "Mac Unknown";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
#else
|
2012-02-03 19:55:55 -05:00
|
|
|
sysVersion = "OSX Unknown";
|
2011-07-30 08:41:28 -04:00
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#if defined(_WIN32) || defined(__MINGW32__)
|
2012-02-03 19:55:55 -05:00
|
|
|
// Windows
|
2015-08-29 15:31:01 -04:00
|
|
|
#ifdef Q_OS_WIN
|
2011-07-30 08:41:28 -04:00
|
|
|
switch(QSysInfo::windowsVersion())
|
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::WV_32s:
|
|
|
|
sysVersion = "Windows 2.1";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::WV_95:
|
|
|
|
sysVersion = "Windows 95";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::WV_98:
|
|
|
|
sysVersion = "Windows 98";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::WV_Me:
|
|
|
|
sysVersion = "Windows Me";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::WV_NT:
|
|
|
|
sysVersion = "Windows NT";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::WV_2000:
|
|
|
|
sysVersion = "Windows 2000";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::WV_XP:
|
|
|
|
sysVersion = "Windows XP";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::WV_2003:
|
|
|
|
sysVersion = "Windows 2003";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
case QSysInfo::WV_VISTA:
|
|
|
|
sysVersion = "Windows Vista";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2011-07-31 13:47:29 -04:00
|
|
|
case QSysInfo::WV_WINDOWS7:
|
2012-02-03 19:55:55 -05:00
|
|
|
sysVersion = "Windows 7";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
2012-02-03 19:55:55 -05:00
|
|
|
default:
|
|
|
|
sysVersion = "Windows";
|
2011-07-30 08:41:28 -04:00
|
|
|
break;
|
|
|
|
}
|
2012-02-03 19:55:55 -05:00
|
|
|
#else
|
|
|
|
sysVersion = "Windows Unknown";
|
|
|
|
#endif
|
2011-07-30 08:41:28 -04:00
|
|
|
#else
|
|
|
|
// Linux
|
2012-02-03 19:55:55 -05:00
|
|
|
sysVersion = "Linux";
|
2011-07-30 08:41:28 -04:00
|
|
|
#endif
|
|
|
|
#endif
|
2015-03-08 09:31:44 -04:00
|
|
|
text += QString("My RetroShare Configuration is: (%1, %2, 0x60%3)").arg(Rshare::retroshareVersion(true)).arg(sysVersion).arg(userLevel) + "\n";
|
2012-02-03 19:55:55 -05:00
|
|
|
text += "\n";
|
2011-07-30 08:41:28 -04:00
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
text += QString("I am having trouble with RetroShare.");
|
|
|
|
text += QString(" Can you help me with....") + "\n";
|
|
|
|
text += "\n";
|
2011-07-30 08:41:28 -04:00
|
|
|
|
2012-02-03 19:55:55 -05:00
|
|
|
sendMail("support@retroshare.org", tr("RetroShare Support"), text);
|
2011-07-30 08:41:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void GetStartedDialog::OpenFAQ()
|
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
/* pass the url directly to QDesktopServices::openUrl */
|
|
|
|
QDesktopServices::openUrl(QUrl(URL_FAQ));
|
2011-07-30 08:41:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void GetStartedDialog::OpenForums()
|
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
/* pass the url directly to QDesktopServices::openUrl */
|
|
|
|
QDesktopServices::openUrl(QUrl(URL_FORUM));
|
2011-07-30 08:41:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void GetStartedDialog::OpenWebsite()
|
|
|
|
{
|
2012-02-03 19:55:55 -05:00
|
|
|
/* pass the url directly to QDesktopServices::openUrl */
|
|
|
|
QDesktopServices::openUrl(QUrl(URL_WEBSITE));
|
2011-07-30 08:41:28 -04:00
|
|
|
}
|