diff --git a/libretroshare b/libretroshare
index c1feae8b9..5a6f09ee1 160000
--- a/libretroshare
+++ b/libretroshare
@@ -1 +1 @@
-Subproject commit c1feae8b9144adaae8cf4d6c8a441bf41a6d7a95
+Subproject commit 5a6f09ee11a34f1c52b5be3f0a440f185b9b2a89
diff --git a/retroshare-gui/src/gui/FriendServerControl.cpp b/retroshare-gui/src/gui/FriendServerControl.cpp
index 3cc029ecd..5842516ed 100644
--- a/retroshare-gui/src/gui/FriendServerControl.cpp
+++ b/retroshare-gui/src/gui/FriendServerControl.cpp
@@ -44,6 +44,8 @@ FriendServerControl::FriendServerControl(QWidget *parent)
/* Invoke the Qt Designer generated object setup routine */
setupUi(this);
+ friendServerOnOff_CB->setEnabled(false); // until FS is connected.
+
if(!rsFriendServer)
{
setEnabled(false);
@@ -78,7 +80,7 @@ FriendServerControl::FriendServerControl(QWidget *parent)
QObject::connect(friendServerOnOff_CB,SIGNAL(toggled(bool)),this,SLOT(onOnOffClick(bool)));
QObject::connect(torServerFriendsToRequest_SB,SIGNAL(valueChanged(int)),this,SLOT(onFriendsToRequestChanged(int)));
- QObject::connect(torServerAddress_LE,SIGNAL(textChanged(const QString&)),this,SLOT(onOnionAddressEdit(const QString&)));
+ QObject::connect(torServerAddress_LE,SIGNAL(editingFinished()),this,SLOT(onOnionAddressEdit()));
QObject::connect(torServerPort_SB,SIGNAL(valueChanged(int)),this,SLOT(onOnionPortEdit(int)));
QObject::connect(mConnectionCheckTimer,SIGNAL(timeout()),this,SLOT(checkServerAddress()));
@@ -128,7 +130,7 @@ void FriendServerControl::onOnionPortEdit(int)
}
}
-void FriendServerControl::onOnionAddressEdit(const QString&)
+void FriendServerControl::onOnionAddressEdit()
{
// Setup timer to auto-check the friend server address
mConnectionCheckTimer->stop();
@@ -170,11 +172,15 @@ void FriendServerControl::updateFriendServerStatusIcon(bool ok)
{
torServerStatus_LB->setToolTip(tr("Friend server is currently reachable.")) ;
mCheckingServerMovie->setFileName(ICON_STATUS_OK);
+ friendServerOnOff_CB->setEnabled(true);
}
else
{
+ rsFriendServer->stopServer();
torServerStatus_LB->setToolTip(tr("The proxy is not enabled or broken.\nAre all services up and running fine??\nAlso check your ports!")) ;
mCheckingServerMovie->setFileName(ICON_STATUS_UNKNOWN);
+ friendServerOnOff_CB->setChecked(false);
+ friendServerOnOff_CB->setEnabled(false);
}
mCheckingServerMovie->start();
}
diff --git a/retroshare-gui/src/gui/FriendServerControl.h b/retroshare-gui/src/gui/FriendServerControl.h
index 465c5d1ec..832c67f39 100644
--- a/retroshare-gui/src/gui/FriendServerControl.h
+++ b/retroshare-gui/src/gui/FriendServerControl.h
@@ -35,7 +35,7 @@ public:
protected slots:
void onOnOffClick(bool b);
- void onOnionAddressEdit(const QString&);
+ void onOnionAddressEdit();
void onOnionPortEdit(int);
void onNbFriendsToRequestsChanged(int n);
void checkServerAddress();
diff --git a/retroshare-gui/src/gui/FriendServerControl.ui b/retroshare-gui/src/gui/FriendServerControl.ui
index 2ac69969b..4eed774ad 100644
--- a/retroshare-gui/src/gui/FriendServerControl.ui
+++ b/retroshare-gui/src/gui/FriendServerControl.ui
@@ -11,89 +11,8 @@
- -
-
-
-
-
-
- On/Off
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- Qt::NoFocus
-
-
-
- :/icons/help_64.png:/icons/help_64.png
-
-
- true
-
-
- false
-
-
- true
-
-
-
-
-
-
-
-
-
-
- Friends to request:
-
-
-
- -
-
-
- 1
-
-
- 15
-
-
- 5
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
- -
-
-
@@ -112,9 +31,6 @@
<html><head/><body><p>Enter here the onion address of the Friend Server that was given to you. The address will be automatically checked after you enter it and a green bullet will appear if the server is online.</p></body></html>
-
- .onion
-
Onion address of the friend server
@@ -150,8 +66,47 @@
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Maximum
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Qt::NoFocus
+
+
+
+ :/icons/help_64.png:/icons/help_64.png
+
+
+ true
+
+
+ false
+
+
+ true
+
+
+
+ -
+
+
-
-
@@ -180,21 +135,60 @@
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
+ -
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+
-
+
+
+ On/Off
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 302
+ 26
+
+
+
+
+ -
+
+
+ Friends to request:
+
+
+
+ -
+
+
+ 1
+
+
+ 15
+
+
+ 5
+
+
+
+
+
+
-
@@ -211,7 +205,7 @@
-
+
diff --git a/retroshare-gui/src/gui/FriendsDialog.cpp b/retroshare-gui/src/gui/FriendsDialog.cpp
index 5df97121a..532a87f4a 100644
--- a/retroshare-gui/src/gui/FriendsDialog.cpp
+++ b/retroshare-gui/src/gui/FriendsDialog.cpp
@@ -27,6 +27,7 @@
#include
#include
+#include
#include "chat/ChatUserNotify.h"
#include "connect/ConnectFriendWizard.h"
@@ -92,7 +93,8 @@ FriendsDialog::FriendsDialog(QWidget *parent) : MainPage(parent)
ui.tabWidget->setTabPosition(QTabWidget::North);
#ifdef RS_EMBEDED_FRIEND_SERVER
- ui.tabWidget->addTab(friendServerControl = new FriendServerControl(),QIcon(IMAGE_PEERS), tr("Friend Server"));
+ if(RsAccounts::isTorAuto())
+ ui.tabWidget->addTab(friendServerControl = new FriendServerControl(),QIcon(IMAGE_PEERS), tr("Friend Server"));
#endif
ui.tabWidget->addTab(networkView = new NetworkView(),QIcon(IMAGE_NETWORK2), tr("Network graph"));
ui.tabWidget->addTab(networkDialog = new NetworkDialog(),QIcon(IMAGE_PEERS), tr("Keyring"));
@@ -123,9 +125,8 @@ FriendsDialog::FriendsDialog(QWidget *parent) : MainPage(parent)
// add self nick and Avatar to Friends.
RsPeerDetails pd ;
- if (rsPeers->getPeerDetails(rsPeers->getOwnId(),pd)) {
+ if (rsPeers->getPeerDetails(rsPeers->getOwnId(),pd))
ui.nicknameLabel->setText(QString::fromUtf8(pd.name.c_str()) + " (" + QString::fromUtf8(pd.location.c_str())+")");
- }
int H = misc::getFontSizeFactor("HelpButton").height();
QString hlp_str = tr(
@@ -258,13 +259,9 @@ void FriendsDialog::loadmypersonalstatus()
QString statustring = QString::fromUtf8(rsMsgs->getCustomStateString().c_str());
if (statustring.isEmpty())
- {
ui.mypersonalstatusLabel->setText(tr("Set your status message here."));
- }
else
- {
ui.mypersonalstatusLabel->setText(statustring);
- }
}
void FriendsDialog::clearChatNotify()
@@ -281,13 +278,11 @@ void FriendsDialog::statusmessage()
/*static*/ bool FriendsDialog::isGroupChatActive()
{
FriendsDialog *friendsDialog = dynamic_cast(MainWindow::getPage(MainWindow::Friends));
- if (!friendsDialog) {
+ if (!friendsDialog)
return false;
- }
- if (friendsDialog->ui.tabWidget->currentWidget() == friendsDialog->ui.groupChatTab) {
+ if (friendsDialog->ui.tabWidget->currentWidget() == friendsDialog->ui.groupChatTab)
return true;
- }
return false;
}
diff --git a/retroshare-gui/src/gui/HomePage.cpp b/retroshare-gui/src/gui/HomePage.cpp
index ef6982e22..327c8e44f 100644
--- a/retroshare-gui/src/gui/HomePage.cpp
+++ b/retroshare-gui/src/gui/HomePage.cpp
@@ -136,6 +136,7 @@ void HomePage::handleEvent(std::shared_ptr e)
{
case RsNetworkEventCode::LOCAL_IP_UPDATED: // [fallthrough]
case RsNetworkEventCode::EXTERNAL_IP_UPDATED: // [fallthrough]
+ case RsNetworkEventCode::DNS_UPDATED: // [fallthrough]
RsQThreadUtils::postToObject( [=]()
{
updateCertificate();
@@ -213,7 +214,7 @@ void HomePage::updateOwnCert()
}
QString invite ;
- RetroshareInviteFlags invite_flags = RetroshareInviteFlags::CURRENT_IP;
+ RetroshareInviteFlags invite_flags = RetroshareInviteFlags::CURRENT_IP | RetroshareInviteFlags::DNS;
if(mIncludeAllIPs)
invite_flags |= RetroshareInviteFlags::FULL_IP_HISTORY;
diff --git a/retroshare-gui/src/gui/settings/ServerPage.cpp b/retroshare-gui/src/gui/settings/ServerPage.cpp
index 8addc4349..f840f90a6 100755
--- a/retroshare-gui/src/gui/settings/ServerPage.cpp
+++ b/retroshare-gui/src/gui/settings/ServerPage.cpp
@@ -205,9 +205,9 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
connect(ui.discComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(saveAddresses()));
connect(ui.netModeComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(saveAddresses()));
- connect(ui.localAddress, SIGNAL(textChanged(QString)),this,SLOT(saveAddresses()));
- connect(ui.extAddress, SIGNAL(textChanged(QString)),this,SLOT(saveAddresses()));
- connect(ui.dynDNS, SIGNAL(textChanged(QString)),this,SLOT(saveAddresses()));
+ connect(ui.localAddress, SIGNAL(editingFinished()),this,SLOT(saveAddresses()));
+ connect(ui.extAddress, SIGNAL(editingFinished()),this,SLOT(saveAddresses()));
+ connect(ui.dynDNS, SIGNAL(editingFinished()),this,SLOT(saveAddresses()));
connect(ui.tabWidget, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));
connect(ui.hiddenpage_proxyAddress_tor, SIGNAL(editingFinished()),this,SLOT(saveAddresses()));