linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #04095
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2522: changes to connectivity settings
------------------------------------------------------------
revno: 2522
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Fri 2011-05-06 23:39:48 +0200
message:
changes to connectivity settings
modified:
changelog.txt
dcpp/ConnectivityManager.cpp
dcpp/ConnectivityManager.h
help/index.html
help/settings_connectivity.html
win32/ConnectivityManualPage.cpp
win32/ConnectivityPage.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'changelog.txt'
--- changelog.txt 2011-04-25 20:41:09 +0000
+++ changelog.txt 2011-05-06 21:39:48 +0000
@@ -1,7 +1,6 @@
* Fav users frame becomes users frame and shows all users
* Experimental implementation of KEYP ADC extension
* Display the name of the device MiniUPnP has bound to (poy)
-* More status bar icons
* Add NAT-PMP for port mappings as an alternative to UPnP (poy)
* Continue from the beginning after reaching the end of a file list when searching (poy)
* Report the progress of file list searches in the status bar (poy)
=== modified file 'dcpp/ConnectivityManager.cpp'
--- dcpp/ConnectivityManager.cpp 2011-04-13 19:16:51 +0000
+++ dcpp/ConnectivityManager.cpp 2011-05-06 21:39:48 +0000
@@ -54,6 +54,7 @@
return;
running = true;
+ status.clear();
fire(ConnectivityManagerListener::Started());
// restore connectivity settings to their default value.
@@ -151,8 +152,9 @@
void ConnectivityManager::log(const string& message) {
if(BOOLSETTING(AUTO_DETECT_CONNECTION)) {
- LogManager::getInstance()->message(_("Connectivity: ") + message);
- fire(ConnectivityManagerListener::Message(), message);
+ status = move(message);
+ LogManager::getInstance()->message(_("Connectivity: ") + status);
+ fire(ConnectivityManagerListener::Message(), status);
} else {
LogManager::getInstance()->message(message);
}
=== modified file 'dcpp/ConnectivityManager.h'
--- dcpp/ConnectivityManager.h 2011-04-13 19:16:51 +0000
+++ dcpp/ConnectivityManager.h 2011-05-06 21:39:48 +0000
@@ -50,6 +50,7 @@
void detectConnection();
void setup(bool settingsChanged);
bool isRunning() const { return running; }
+ const string& getStatus() { return status; }
private:
friend class Singleton<ConnectivityManager>;
@@ -67,6 +68,8 @@
bool autoDetected;
bool running;
+
+ string status;
};
} // namespace dcpp
=== modified file 'help/index.html'
--- help/index.html 2011-04-23 10:33:55 +0000
+++ help/index.html 2011-05-06 21:39:48 +0000
@@ -124,7 +124,7 @@
<li><placeholder><a href="faq_different_icons.html">What do the different user icons mean?</a></placeholder></li>
<li><placeholder><a href="faq_units.html">What do the units mean?</a></placeholder></li>
<li><placeholder><a href="faq_install.html">How do I install/uninstall/upgrade DC++?</a></placeholder></li>
-<li><placeholder><a href="faq_secret.html">What secret stuff are there?</a></placeholder></li>
+<li><placeholder><a href="faq_secret.html">What secret stuff is there?</a></placeholder></li>
<li><placeholder><a href="faq_plusplus_tag.html">What do the DC++ tags mean?</a></placeholder></li>
<li><placeholder><a href="faq_settings_files.html">DC++ settings files guide</a></placeholder></li>
</ul>
=== modified file 'help/settings_connectivity.html'
--- help/settings_connectivity.html 2011-04-11 20:39:22 +0000
+++ help/settings_connectivity.html 2011-05-06 21:39:48 +0000
@@ -6,35 +6,56 @@
<link type="text/css" rel="stylesheet" href="style.css"/>
</head>
<body>
-<h1>Connectivity</h1>
-<h2 id="autoconn">Automatic connectivity setup</h2>
-<p>
-Connectivity settings must be correctly configured for searches and downloads to work. In most
-cases, DC++ is able to detect the best connectivity settings by itself. When it can't (for example,
-when multiple network cards are available or when the network topology is too complicated), the
-various connectivity settings can still be manually adjusted from the "Manual configuration" page.
-</p>
-<dl style="margin-left: 40px;">
- <dt>Let DC++ determine the best connectivity settings</dt>
- <dd cshelp="IDH_SETTINGS_CONNECTIVITY_AUTODETECT">
- Select this to let DC++ determine the best connectivity settings on your behalf. This should work with
- the majority of network structures DC++ is generally used in. The success rate depends on
- operating system configuration and on the network topology.<br/>
- Note that when this option is active, <u>manual connectivity settings will be ignored</u>.
- <p>It is recommended to disable this option and to manually set up connectivity settings when the network topology is not easy for DC++ to figure out, such as:
- <ul>
- <li>When there is more than one physical network device (eg. network cards, 3G USB modems) plugged in the computer (the bind address will have to be fiddled with).</li>
- <li>In the presence of network tunneling, a <a href="http://en.wikipedia.org/wiki/Vpn" target="_blank" class="external">VPN</a> service or any other software that creates virtual network devices.</li>
- <li>When DC++ is only supposed to connect to local network hubs (eg. in a campus).</li>
- </ul>
- </p></dd>
- <dt>Detect now</dt>
- <dd cshelp="IDH_SETTINGS_CONNECTIVITY_DETECT_NOW">With this button, you can force DC++ to (re)detect the best connectivity settings. Details and the result of the operation will be shown in the "Detection log" box below.</dd>
- <dt>Detection log</dt>
- <dd cshelp="IDH_SETTINGS_CONNECTIVITY_DETECTION_LOG">This box contains the log and result of the last connectivity auto-detection started by clicking the "Detect now" button. It contains the detection steps, possible error messages and shows
- why a certain connection mode was chosen. This information is helpful in case of errors or when the result
- is other than expected. Detection messages appear in the System log as well; descriptions of the various
- messages are available in the <a href="window_system_log.html">list of System log messages</a>.</dd>
-</dl>
+ <h1>Connectivity</h1>
+
+ <h2 id="autoconn">Automatic connectivity setup</h2>
+ <p>
+ Connectivity settings must be correctly configured for searches and downloads to work. In most
+ cases, DC++ is able to detect the best connectivity settings by itself. When it can't (for
+ example, when multiple network cards are available or when the network topology is too
+ complicated), the various connectivity settings can still be manually adjusted from the
+ <placeholder><a href="settings_connectivity_manual.html">Manual configuration</a></placeholder>
+ page.
+ </p>
+
+ <dl style="margin-left: 40px;">
+
+ <dt>Let DC++ determine the best connectivity settings</dt>
+ <dd cshelp="IDH_SETTINGS_CONNECTIVITY_AUTODETECT">
+ Select this to let DC++ determine the best connectivity settings on your behalf. This
+ should work with the majority of network structures DC++ is generally used in. The success
+ rate depends on operating system configuration and on the network topology.<br/>
+ Note that when this option is active, <u>manual connectivity settings will be ignored</u>.
+ <p>It is recommended to disable this option and to manually set up connectivity settings
+ when the network topology is not easy for DC++ to figure out, such as:
+ <ul>
+ <li>When there is more than one physical network device (eg. network cards, 3G USB
+ modems) plugged in the computer (the bind address will have to be fiddled with).</li>
+ <li>In the presence of network tunneling, a
+ <a href="http://en.wikipedia.org/wiki/Vpn" target="_blank" class="external">VPN</a>
+ service or any other software that creates virtual network devices.</li>
+ <li>When DC++ is only supposed to connect to local network hubs (eg. in a campus).</li>
+ </ul>
+ </p>
+ </dd>
+
+ <dt>Detect now</dt>
+ <dd cshelp="IDH_SETTINGS_CONNECTIVITY_DETECT_NOW">
+ With this button, you can force DC++ to (re)detect the best connectivity settings. Details
+ and the result of the operation will be shown in the "Detection log" box below.
+ </dd>
+
+ <dt>Detection log</dt>
+ <dd cshelp="IDH_SETTINGS_CONNECTIVITY_DETECTION_LOG">
+ This box contains log messages of the last connectivity auto-detection. It contains the
+ detection steps, possible error messages and shows why a certain connection mode was
+ chosen. This information is helpful in case of errors or when the result is other than
+ expected. Detection messages appear in the
+ <placeholder><a href="window_system_log.html">System Log</a></placeholder> as well;
+ descriptions of the various messages are available in the
+ <a href="window_system_log.html">list of System log messages</a>.
+ </dd>
+
+ </dl>
</body>
</html>
=== modified file 'win32/ConnectivityManualPage.cpp'
--- win32/ConnectivityManualPage.cpp 2011-05-04 19:32:00 +0000
+++ win32/ConnectivityManualPage.cpp 2011-05-06 21:39:48 +0000
@@ -37,7 +37,7 @@
using dwt::RadioButton;
ConnectivityManualPage::ConnectivityManualPage(dwt::Widget* parent) :
-PropPage(parent, 8, 1),
+PropPage(parent, 5, 1),
autoGroup(0),
autoDetect(0),
directIn(0),
@@ -64,17 +64,23 @@
autoDetect->onClicked([this] { handleAutoClicked(); });
}
- directIn = grid->addChild(RadioButton::Seed(T_("My computer is directly connected to the Internet (no router)")));
- directIn->setHelpId(IDH_SETTINGS_CONNECTIVITY_DIRECT);
-
- upnp = grid->addChild(RadioButton::Seed(T_("Let DC++ configure my router (NAT-PMP / UPnP)")));
- upnp->setHelpId(IDH_SETTINGS_CONNECTIVITY_FIREWALL_UPNP);
-
- nat = grid->addChild(RadioButton::Seed(T_("Manual port forwarding (I have configured my router by myself)")));
- nat->setHelpId(IDH_SETTINGS_CONNECTIVITY_FIREWALL_NAT);
-
- passive = grid->addChild(RadioButton::Seed(T_("Passive mode (last resort - has serious limitations)")));
- passive->setHelpId(IDH_SETTINGS_CONNECTIVITY_FIREWALL_PASSIVE);
+ {
+ auto cur = grid->addChild(GroupBox::Seed())->addChild(Grid::Seed(4, 1));
+ cur->column(0).mode = GridInfo::FILL;
+ cur->setSpacing(grid->getSpacing());
+
+ directIn = cur->addChild(RadioButton::Seed(T_("My computer is directly connected to the Internet (no router)")));
+ directIn->setHelpId(IDH_SETTINGS_CONNECTIVITY_DIRECT);
+
+ upnp = cur->addChild(RadioButton::Seed(T_("Let DC++ configure my router (NAT-PMP / UPnP)")));
+ upnp->setHelpId(IDH_SETTINGS_CONNECTIVITY_FIREWALL_UPNP);
+
+ nat = cur->addChild(RadioButton::Seed(T_("Manual port forwarding (I have configured my router by myself)")));
+ nat->setHelpId(IDH_SETTINGS_CONNECTIVITY_FIREWALL_NAT);
+
+ passive = cur->addChild(RadioButton::Seed(T_("Passive mode (last resort - has serious limitations)")));
+ passive->setHelpId(IDH_SETTINGS_CONNECTIVITY_FIREWALL_PASSIVE);
+ }
{
auto group = grid->addChild(GroupBox::Seed(T_("External / WAN IP")));
@@ -93,13 +99,17 @@
{
auto cur = grid->addChild(Grid::Seed(1, 3));
- cur->column(0).mode = cur->column(1).mode = cur->column(2).mode = GridInfo::FILL;
- cur->setSpacing(10);
+ cur->setSpacing(grid->getSpacing());
auto addPortBox = [this, cur](const tstring& text, unsigned helpId) -> TextBoxPtr {
auto group = cur->addChild(GroupBox::Seed(str(TF_("%1% port") % text)));
group->setHelpId(helpId);
- return group->addChild(WinUtil::Seeds::Dialog::intTextBox);
+
+ auto boxGrid = group->addChild(Grid::Seed(1, 1));
+ boxGrid->column(0).size = 40;
+ boxGrid->column(0).mode = GridInfo::STATIC;
+
+ return boxGrid->addChild(WinUtil::Seeds::Dialog::intTextBox);
};
tcp = addPortBox(T_("Transfer"), IDH_SETTINGS_CONNECTIVITY_PORT_TCP);
=== modified file 'win32/ConnectivityPage.cpp'
--- win32/ConnectivityPage.cpp 2011-05-04 19:32:00 +0000
+++ win32/ConnectivityPage.cpp 2011-05-06 21:39:48 +0000
@@ -19,6 +19,7 @@
#include "stdafx.h"
#include "ConnectivityPage.h"
+#include <dcpp/format.h>
#include <dcpp/SettingsManager.h>
#include <dwt/widgets/Grid.h>
@@ -72,7 +73,14 @@
PropPage::read(items);
- handleAutoClicked();
+ if(BOOLSETTING(AUTO_DETECT_CONNECTION)) {
+ const auto& status = ConnectivityManager::getInstance()->getStatus();
+ if(!status.empty()) {
+ addLogLine(Text::toT(status));
+ }
+ } else {
+ addLogLine(T_("Automatic connectivity setup is currently disabled"));
+ }
ConnectivityManager::getInstance()->addListener(this);
}