diff --git a/retroshare-gui/src/gui/GetStartedDialog.ui b/retroshare-gui/src/gui/GetStartedDialog.ui
index ac3e01ba4..3ebe464ae 100644
--- a/retroshare-gui/src/gui/GetStartedDialog.ui
+++ b/retroshare-gui/src/gui/GetStartedDialog.ui
@@ -528,7 +528,7 @@
0
- -241
+ 0
666
746
@@ -738,11 +738,12 @@ p, li { white-space: pre-wrap; }
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Be Online at the same time, and Retroshare will automatically connect you!</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Your client needs to find the Retroshare Network before it can make connections.</span></p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">This can take up to 30 minutes the first time, so please have some patience.</span></p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">The number at the bottom of the GUI indicates the number of Retroshare peers you have found.</span></p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">This takes 5-30 minutes the first time you startup Retroshare</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">If you don't connect, check your News Feed (on the Friends Tab).</span></p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">If your friend rejected your connection - you will be notified here.</span></p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">The DHT indicator (in the Status Bar) turnsGreen when it can make connections.</span></p>
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">After a couple of minutes, the NAT indicator (also in the Status Bar) switch to Yellow or Green.</span></p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">If it remains Red, then you have a Nasty Firewall, that Retroshare struggles to connect through.</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Look in the Further Help section for more advice about connecting.</span></p></body></html>
@@ -812,7 +813,7 @@ p, li { white-space: pre-wrap; }
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">This will speed up connections and allow more people to connect with you </span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">The easiest way to do this is by enabling UPnP on your Wireless Box or Router.</span></p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">As each router is different. Google "Upnp setup [ YOUR ROUTER TYPE ]" for instructions.</span></p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">As each router is different, you need to find out your Router Model and Google for instructions.</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">If none of this makes sense, don't worry about it Retroshare will still work.</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p>
diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp
index bd18305e3..f29d10ad1 100644
--- a/retroshare-gui/src/gui/MainWindow.cpp
+++ b/retroshare-gui/src/gui/MainWindow.cpp
@@ -33,6 +33,8 @@
#endif
#include
+#include
+
#include "rshare.h"
#include "MainWindow.h"
#include "MessengerWindow.h"
@@ -192,6 +194,17 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
setWindowTitle(tr("RetroShare %1 a secure decentralised communication platform").arg(retroshareVersion()) + " - " + nameAndLocation);
+
+ /* WORK OUT IF WE"RE IN ADVANCED MODE OR NOT */
+ bool advancedMode = false;
+ std::string advsetting;
+ if (rsConfig->getConfigurationOption(RS_CONFIG_ADVANCED, advsetting) && (advsetting == "YES"))
+ {
+ advancedMode = true;
+ }
+
+
+
/* add url handler for RetroShare links */
QDesktopServices::setUrlHandler(RSLINK_SCHEME, this, "linkActivated");
@@ -294,8 +307,12 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
#ifdef GETSTARTED_GUI
MainPage *getStartedPage = NULL;
- ui.stackPages->add(getStartedPage = new GetStartedDialog(ui.stackPages),
+
+ if (!advancedMode)
+ {
+ ui.stackPages->add(getStartedPage = new GetStartedDialog(ui.stackPages),
createPageAction(QIcon(IMG_HELP), tr("Getting Started"), grp));
+ }
#endif
diff --git a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp
index bac876dc4..ac665ad64 100755
--- a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp
+++ b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp
@@ -356,11 +356,13 @@ void TextPage::updateOwnCert()
static void sendMail (std::string sAddress, std::string sSubject, std::string sBody)
{
+#ifdef Q_WS_WIN
/* search and replace the end of lines with: "%0D%0A" */
size_t loc;
while ((loc = sBody.find("\n")) != sBody.npos) {
sBody.replace(loc, 1, "%0D%0A");
}
+#endif
std::string mailstr = "mailto:" + sAddress;
mailstr += "?subject=" + sSubject;
diff --git a/retroshare-gui/src/gui/settings/GeneralPage.cpp b/retroshare-gui/src/gui/settings/GeneralPage.cpp
index ffea345d1..0852809ec 100755
--- a/retroshare-gui/src/gui/settings/GeneralPage.cpp
+++ b/retroshare-gui/src/gui/settings/GeneralPage.cpp
@@ -21,7 +21,9 @@
#include
#include
-#include
+#include "retroshare/rsinit.h"
+#include "retroshare/rsconfig.h"
+
#include "GeneralPage.h"
#include
#include
@@ -66,6 +68,17 @@ bool GeneralPage::save(QString &errmsg)
RsInit::setAutoLogin(ui.autoLogin->isChecked());
+ if (ui.checkAdvanced->isChecked())
+ {
+ std::string opt("YES");
+ rsConfig->setConfigurationOption(RS_CONFIG_ADVANCED, opt);
+ }
+ else
+ {
+ std::string opt("NO");
+ rsConfig->setConfigurationOption(RS_CONFIG_ADVANCED, opt);
+ }
+
return true;
}
@@ -88,4 +101,13 @@ void GeneralPage::load()
ui.spinBox->setValue(Settings->getMaxTimeBeforeIdle());
ui.autoLogin->setChecked(RsInit::getAutoLogin());
+
+ bool advancedmode = false;
+ std::string advsetting;
+ if (rsConfig->getConfigurationOption(RS_CONFIG_ADVANCED, advsetting) && (advsetting == "YES"))
+ {
+ advancedmode = true;
+ }
+ ui.checkAdvanced->setChecked(advancedmode);
+
}
diff --git a/retroshare-gui/src/gui/settings/GeneralPage.ui b/retroshare-gui/src/gui/settings/GeneralPage.ui
index 2d677f9bc..9e5252b25 100755
--- a/retroshare-gui/src/gui/settings/GeneralPage.ui
+++ b/retroshare-gui/src/gui/settings/GeneralPage.ui
@@ -6,8 +6,8 @@
0
0
- 413
- 314
+ 362
+ 400
@@ -499,8 +499,8 @@
Qt::NoContextMenu
-
- -
+
+
-
Startup
@@ -553,7 +553,23 @@
- -
+
-
+
+
+ For Advanced Users
+
+
+
-
+
+
+ Enable Advanced Mode (Restart Required)
+
+
+
+
+
+
+ -
Misc
@@ -593,20 +609,7 @@
- -
-
-
- Qt::Vertical
-
-
-
- 178
- 95
-
-
-
-
- -
+
-
Idle
@@ -635,6 +638,19 @@
+ -
+
+
+ Qt::Vertical
+
+
+
+ 178
+ 95
+
+
+
+
diff --git a/retroshare-gui/src/gui/settings/ServerPage.cpp b/retroshare-gui/src/gui/settings/ServerPage.cpp
index ed1c30847..72499c012 100755
--- a/retroshare-gui/src/gui/settings/ServerPage.cpp
+++ b/retroshare-gui/src/gui/settings/ServerPage.cpp
@@ -116,7 +116,7 @@ void ServerPage::load()
/* set net mode */
int netIndex = 0;
- switch(detail.tryNetMode)
+ switch(detail.netMode)
{
case RS_NETMODE_EXT:
netIndex = 2;
@@ -267,7 +267,7 @@ void ServerPage::saveAddresses()
break;
}
- if (detail.tryNetMode != netMode)
+ if (detail.netMode != netMode)
rsPeers->setNetworkMode(ownId, netMode);
uint32_t visState = 0;
diff --git a/retroshare-gui/src/gui/statusbar/dhtstatus.cpp b/retroshare-gui/src/gui/statusbar/dhtstatus.cpp
index 2c508b194..f22177bad 100644
--- a/retroshare-gui/src/gui/statusbar/dhtstatus.cpp
+++ b/retroshare-gui/src/gui/statusbar/dhtstatus.cpp
@@ -67,35 +67,72 @@ DHTStatus::DHTStatus(QWidget *parent)
void DHTStatus::getDHTStatus()
{
- rsiface->lockData(); /* Lock Interface */
+ rsiface->lockData(); /* Lock Interface */
- /* now the extra bit .... switch on check boxes */
- const RsConfig &config = rsiface->getConfig();
+ /* now the extra bit .... switch on check boxes */
+ const RsConfig &config = rsiface->getConfig();
- if (config.netDhtOk)
- {
- dhtstatusLabel->setPixmap(QPixmap(":/images/greenled.png"));
- dhtstatusLabel->setToolTip(tr("DHT On"));
+ if (!(config.DHTActive))
+ {
+ // GRAY.
+ dhtstatusLabel->setPixmap(QPixmap(":/images/grayled.png"));
+ dhtstatusLabel->setToolTip(tr("DHT Off"));
+
+ spaceLabel->setVisible(false);
+ dhtnetworkLabel->setVisible(false);
+ dhtnetworksizeLabel->setVisible(false);
+
+ dhtnetworksizeLabel->setText("");
+ dhtnetworksizeLabel->setToolTip("");
+ }
+ else
+ {
+ if (config.netDhtOk)
+ {
+#define MIN_RS_NET_SIZE 10
+ // YELLOW or GREEN.
+ if (config.netDhtRsNetSize < MIN_RS_NET_SIZE)
+ {
+ dhtstatusLabel->setPixmap(QPixmap(":/images/yellowled.png"));
+ dhtstatusLabel->setToolTip(tr("DHT Searching for Retroshare Peers"));
+
+ spaceLabel->setVisible(true);
+ dhtnetworkLabel->setVisible(true);
+ dhtnetworksizeLabel->setVisible(true);
+
+ dhtnetworksizeLabel->setText(QString("%1 (%2)").arg(misc::userFriendlyUnit(config.netDhtRsNetSize, 1)).arg(misc::userFriendlyUnit(config.netDhtNetSize, 1)));
+ dhtnetworksizeLabel->setToolTip(tr("RetroShare users in DHT (Total DHT users)") );
+ }
+ else
+ {
+ dhtstatusLabel->setPixmap(QPixmap(":/images/greenled.png"));
+ dhtstatusLabel->setToolTip(tr("DHT Good"));
+
+ spaceLabel->setVisible(true);
+ dhtnetworkLabel->setVisible(true);
+ dhtnetworksizeLabel->setVisible(true);
+
+ dhtnetworksizeLabel->setText(QString("%1 (%2)").arg(misc::userFriendlyUnit(config.netDhtRsNetSize, 1)).arg(misc::userFriendlyUnit(config.netDhtNetSize, 1)));
+ dhtnetworksizeLabel->setToolTip(tr("RetroShare users in DHT (Total DHT users)") );
+ }
+
+
- spaceLabel->setVisible(true);
- dhtnetworkLabel->setVisible(true);
- dhtnetworksizeLabel->setVisible(true);
+ }
+ else
+ {
+ // RED - some issue.
+ dhtstatusLabel->setPixmap(QPixmap(":/images/redled.png"));
+ dhtstatusLabel->setToolTip(tr("DHT Error"));
+
+ spaceLabel->setVisible(false);
+ dhtnetworkLabel->setVisible(false);
+ dhtnetworksizeLabel->setVisible(false);
+
+ dhtnetworksizeLabel->setText("");
+ dhtnetworksizeLabel->setToolTip("");
+ }
+ }
+ rsiface->unlockData(); /* UnLock Interface */
- dhtnetworksizeLabel->setText(QString("%1 (%2)").arg(misc::userFriendlyUnit(config.netDhtRsNetSize, 1)).arg(misc::userFriendlyUnit(config.netDhtNetSize, 1)));
- dhtnetworksizeLabel->setToolTip(tr("RetroShare users in DHT (Total DHT users)") );
- }
- else
- {
- dhtstatusLabel->setPixmap(QPixmap(":/images/redled.png"));
- dhtstatusLabel->setToolTip(tr("DHT Off"));
-
- spaceLabel->setVisible(false);
- dhtnetworkLabel->setVisible(false);
- dhtnetworksizeLabel->setVisible(false);
-
- dhtnetworksizeLabel->setText("");
- dhtnetworksizeLabel->setToolTip("");
- }
-
- rsiface->unlockData(); /* UnLock Interface */
}
diff --git a/retroshare-gui/src/gui/statusbar/natstatus.cpp b/retroshare-gui/src/gui/statusbar/natstatus.cpp
index 9e1b10e8b..97c4dcc69 100644
--- a/retroshare-gui/src/gui/statusbar/natstatus.cpp
+++ b/retroshare-gui/src/gui/statusbar/natstatus.cpp
@@ -24,7 +24,8 @@
#include "natstatus.h"
-#include
+#include "retroshare/rsiface.h"
+#include "retroshare/rsconfig.h"
NATStatus::NATStatus(QWidget *parent)
: QWidget(parent)
@@ -49,6 +50,81 @@ NATStatus::NATStatus(QWidget *parent)
void NATStatus::getNATStatus()
{
+ uint32_t netState = rsConfig -> getNetState();
+
+ switch(netState)
+ {
+ default:
+ case RSNET_NETSTATE_BAD_UNKNOWN:
+ {
+ iconLabel->setPixmap(QPixmap(":/images/yellowled.png"));
+ iconLabel->setToolTip(tr("Network Status Unknown"));
+ }
+ break;
+
+ case RSNET_NETSTATE_BAD_OFFLINE:
+ {
+ iconLabel->setPixmap(QPixmap(":/images/grayled.png"));
+ iconLabel->setToolTip(tr("Offline"));
+ }
+ break;
+
+// BAD. (RED)
+ case RSNET_NETSTATE_BAD_NATSYM:
+ {
+ iconLabel->setPixmap(QPixmap(":/images/redled.png"));
+ iconLabel->setToolTip(tr("Nasty Firewall"));
+ }
+ break;
+
+ case RSNET_NETSTATE_BAD_NODHT_NAT:
+ {
+ iconLabel->setPixmap(QPixmap(":/images/redled.png"));
+ iconLabel->setToolTip(tr("DHT Disabled and Firewalled"));
+ }
+ break;
+
+
+// CAUTION. (ORANGE)
+ case RSNET_NETSTATE_WARNING_RESTART:
+ {
+ iconLabel->setPixmap(QPixmap(":/images/yellowled.png"));
+ iconLabel->setToolTip(tr("Network Restarting"));
+ }
+ break;
+
+ case RSNET_NETSTATE_WARNING_NATTED:
+ {
+ iconLabel->setPixmap(QPixmap(":/images/yellowled.png"));
+ iconLabel->setToolTip(tr("Behind Firewall"));
+ }
+ break;
+
+ case RSNET_NETSTATE_WARNING_NODHT:
+ {
+ iconLabel->setPixmap(QPixmap(":/images/yellowled.png"));
+ iconLabel->setToolTip(tr("DHT Disabled"));
+ }
+ break;
+
+// GOOD (GREEN)
+ case RSNET_NETSTATE_GOOD:
+ {
+ iconLabel->setPixmap(QPixmap(":/images/greenled.png"));
+ iconLabel->setToolTip(tr("OK | RetroShare Server"));
+ }
+ break;
+ }
+}
+
+#if 0
+
+void NATStatus::getNATStatus()
+{
+ uint32_t netMode = rsConfig -> getNetworkMode();
+ uint32_t natType = rsConfig -> getNatTypeMode();
+ uint32_t natHole = rsConfig -> getNatHoleMode();
+
rsiface->lockData(); /* Lock Interface */
/* now the extra bit .... switch on check boxes */
@@ -111,3 +187,5 @@ void NATStatus::getNATStatus()
rsiface->unlockData(); /* UnLock Interface */
}
+
+#endif