Merge pull request #7446 from Chocobo1/utpOnly

Add uTP only mode option
This commit is contained in:
sledgehammer999 2017-09-19 01:45:58 +03:00 committed by GitHub
commit b9e233601d
7 changed files with 137 additions and 72 deletions

View file

@ -36,6 +36,7 @@
#include "app/application.h"
#include "base/bittorrent/session.h"
#include "base/preferences.h"
#include "base/unicodestrings.h"
#include "gui/mainwindow.h"
enum AdvSettingsCols
@ -345,7 +346,7 @@ void AdvancedSettings::loadAdvancedSettings()
// uTP-TCP mixed mode
comboUtpMixedMode.addItems({"Prefer TCP", "Peer proportional (throttles TCP)"});
comboUtpMixedMode.setCurrentIndex(static_cast<int>(session->utpMixedMode()));
addRow(UTP_MIX_MODE, tr("uTP-TCP mixed mode algorithm"), &comboUtpMixedMode);
addRow(UTP_MIX_MODE, tr("%1-TCP mixed mode algorithm", "uTP-TCP mixed mode algorithm").arg(C_UTP), &comboUtpMixedMode);
// multiple connections per IP
cbMultiConnectionsPerIp.setChecked(session->multiConnectionsPerIpEnabled());
addRow(MULTI_CONNECTIONS_PER_IP, tr("Allow multiple connections from the same IP address"), &cbMultiConnectionsPerIp);