Merge pull request #3226 from ngosang/webui_dhtport

[Web UI] Remove DHT port setting. Closes #3225
This commit is contained in:
sledgehammer999 2015-06-18 23:37:53 +03:00
commit 75fecf9645
2 changed files with 0 additions and 21 deletions

View file

@ -71,8 +71,6 @@ static const char *__TRANSLATIONS__[] = {
QT_TRANSLATE_NOOP("HttpServer", "Apply"),
QT_TRANSLATE_NOOP("HttpServer", "Add"),
QT_TRANSLATE_NOOP("HttpServer", "Upload Torrents"),
QT_TRANSLATE_NOOP("HttpServer", "Use a different port for DHT and BitTorrent"),
QT_TRANSLATE_NOOP("HttpServer", "DHT port:"),
QT_TRANSLATE_NOOP("HttpServer", "All"),
QT_TRANSLATE_NOOP("HttpServer", "Downloading"),
QT_TRANSLATE_NOOP("HttpServer", "Seeding"),

View file

@ -115,10 +115,6 @@
<legend>QBT_TR(Privacy)QBT_TR</legend>
<input type="checkbox" id="dht_checkbox"/>
<label for="dht_checkbox">QBT_TR(Enable DHT (decentralized network) to find more peers)QBT_TR</label><br/>
<input type="checkbox" id="DHTPortDiffThanBT_checkbox" onclick="updateDHTPortSettings();"/>
<label for="DHTPortDiffThanBT_checkbox">QBT_TR(Use a different port for DHT and BitTorrent)QBT_TR</label><br/>
<label for="DHTPort_txt" style="margin-left: 20px;">QBT_TR(DHT port:)QBT_TR</label>
<input type="text" id="DHTPort_txt" value="6881"/><br/>
<input type="checkbox" id="pex_checkbox"/>
<label for="pex_checkbox">QBT_TR(Enable Peer Exchange (PeX) to find more peers)QBT_TR</label><br/>
<input type="checkbox" id="lsd_checkbox"/>
@ -381,7 +377,6 @@
toggleAnonymousMode = function() {
if($('anonymous_mode_checkbox').getProperty('checked')) {
$('dht_checkbox').setProperty('disabled', true);
$('DHTPortDiffThanBT_checkbox').setProperty('disabled', true);
$('dht_checkbox').setProperty('checked', false);
$('lsd_checkbox').setProperty('disabled', true);
$('lsd_checkbox').setProperty('checked', false);
@ -389,7 +384,6 @@ toggleAnonymousMode = function() {
$('upnp_checkbox').setProperty('checked', false);
} else {
$('dht_checkbox').setProperty('disabled', false);
$('DHTPortDiffThanBT_checkbox').setProperty('disabled', false);
$('lsd_checkbox').setProperty('disabled', false);
$('upnp_checkbox').setProperty('disabled', false);
}
@ -549,14 +543,6 @@ updateFilterSettings = function() {
}
}
updateDHTPortSettings = function() {
if($('DHTPortDiffThanBT_checkbox').getProperty('checked')) {
$('DHTPort_txt').setProperty('disabled', false);
} else {
$('DHTPort_txt').setProperty('disabled', true);
}
}
updatePeerProxySettings = function() {
if($('peer_proxy_type_select').getProperty('value') != "none") {
$('peer_proxy_host_text').setProperty('disabled', false);
@ -743,9 +729,6 @@ loadPreferences = function() {
updateMaxUploadsPerTorrentEnabled();
// Bittorrent
$('dht_checkbox').setProperty('checked', pref.dht);
$('DHTPortDiffThanBT_checkbox').setProperty('checked', !pref.dhtSameAsBT);
$('DHTPort_txt').setProperty('value', pref.dht_port);
updateDHTPortSettings();
$('pex_checkbox').setProperty('checked', pref.pex);
$('lsd_checkbox').setProperty('checked', pref.lsd);
var encryption = pref.encryption.toInt();
@ -960,8 +943,6 @@ applyPreferences = function() {
}
// Bittorrent
settings.set('dht', $('dht_checkbox').getProperty('checked'));
settings.set('dhtSameAsBT', !$('DHTPortDiffThanBT_checkbox').getProperty('checked'));
settings.set('dht_port', $('DHTPort_txt').getProperty('value').toInt());
settings.set('pex', $('pex_checkbox').getProperty('checked'));
settings.set('lsd', $('lsd_checkbox').getProperty('checked'));
settings.set('encryption', $('encryption_select').getSelected()[0].getProperty('value'));