Browse Source

Add links to libtorrent documentation

adaptive-webui-19844
Chocobo1 4 years ago
parent
commit
8d768bda31
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 24
      src/gui/advancedsettings.cpp
  2. 12
      src/webui/www/private/views/preferences.html

24
src/gui/advancedsettings.cpp

@ -534,12 +534,16 @@ void AdvancedSettings::loadAdvancedSettings()
m_spinBoxOutgoingPortsMin.setMinimum(0); m_spinBoxOutgoingPortsMin.setMinimum(0);
m_spinBoxOutgoingPortsMin.setMaximum(65535); m_spinBoxOutgoingPortsMin.setMaximum(65535);
m_spinBoxOutgoingPortsMin.setValue(session->outgoingPortsMin()); m_spinBoxOutgoingPortsMin.setValue(session->outgoingPortsMin());
addRow(OUTGOING_PORT_MIN, tr("Outgoing ports (Min) [0: Disabled]"), &m_spinBoxOutgoingPortsMin); addRow(OUTGOING_PORT_MIN, (tr("Outgoing ports (Min) [0: Disabled]")
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#outgoing_port", "(?)"))
, &m_spinBoxOutgoingPortsMin);
// Outgoing port Min // Outgoing port Min
m_spinBoxOutgoingPortsMax.setMinimum(0); m_spinBoxOutgoingPortsMax.setMinimum(0);
m_spinBoxOutgoingPortsMax.setMaximum(65535); m_spinBoxOutgoingPortsMax.setMaximum(65535);
m_spinBoxOutgoingPortsMax.setValue(session->outgoingPortsMax()); m_spinBoxOutgoingPortsMax.setValue(session->outgoingPortsMax());
addRow(OUTGOING_PORT_MAX, tr("Outgoing ports (Max) [0: Disabled]"), &m_spinBoxOutgoingPortsMax); addRow(OUTGOING_PORT_MAX, (tr("Outgoing ports (Max) [0: Disabled]")
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#outgoing_port", "(?)"))
, &m_spinBoxOutgoingPortsMax);
#if (LIBTORRENT_VERSION_NUM >= 10206) #if (LIBTORRENT_VERSION_NUM >= 10206)
// UPnP lease duration // UPnP lease duration
m_spinBoxUPnPLeaseDuration.setMinimum(0); m_spinBoxUPnPLeaseDuration.setMinimum(0);
@ -557,7 +561,9 @@ void AdvancedSettings::loadAdvancedSettings()
, &m_comboBoxUtpMixedMode); , &m_comboBoxUtpMixedMode);
// multiple connections per IP // multiple connections per IP
m_checkBoxMultiConnectionsPerIp.setChecked(session->multiConnectionsPerIpEnabled()); m_checkBoxMultiConnectionsPerIp.setChecked(session->multiConnectionsPerIpEnabled());
addRow(MULTI_CONNECTIONS_PER_IP, tr("Allow multiple connections from the same IP address"), &m_checkBoxMultiConnectionsPerIp); addRow(MULTI_CONNECTIONS_PER_IP, (tr("Allow multiple connections from the same IP address")
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#allow_multiple_connections_per_ip", "(?)"))
, &m_checkBoxMultiConnectionsPerIp);
#ifdef HAS_HTTPS_TRACKER_VALIDATION #ifdef HAS_HTTPS_TRACKER_VALIDATION
// Validate HTTPS tracker certificate // Validate HTTPS tracker certificate
m_checkBoxValidateHTTPSTrackerCertificate.setChecked(session->validateHTTPSTrackerCertificate()); m_checkBoxValidateHTTPSTrackerCertificate.setChecked(session->validateHTTPSTrackerCertificate());
@ -612,7 +618,9 @@ void AdvancedSettings::loadAdvancedSettings()
addRow(NETWORK_IFACE_ADDRESS, tr("Optional IP address to bind to"), &m_comboBoxInterfaceAddress); addRow(NETWORK_IFACE_ADDRESS, tr("Optional IP address to bind to"), &m_comboBoxInterfaceAddress);
// Announce IP // Announce IP
m_lineEditAnnounceIP.setText(session->announceIP()); m_lineEditAnnounceIP.setText(session->announceIP());
addRow(ANNOUNCE_IP, tr("IP Address to report to trackers (requires restart)"), &m_lineEditAnnounceIP); addRow(ANNOUNCE_IP, (tr("IP Address to report to trackers (requires restart)")
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#announce_ip", "(?)"))
, &m_lineEditAnnounceIP);
#if (LIBTORRENT_VERSION_NUM >= 10207) #if (LIBTORRENT_VERSION_NUM >= 10207)
// Max concurrent HTTP announces // Max concurrent HTTP announces
m_spinBoxMaxConcurrentHTTPAnnounces.setMaximum(std::numeric_limits<int>::max()); m_spinBoxMaxConcurrentHTTPAnnounces.setMaximum(std::numeric_limits<int>::max());
@ -672,11 +680,15 @@ void AdvancedSettings::loadAdvancedSettings()
// Announce to all trackers in a tier // Announce to all trackers in a tier
m_checkBoxAnnounceAllTrackers.setChecked(session->announceToAllTrackers()); m_checkBoxAnnounceAllTrackers.setChecked(session->announceToAllTrackers());
addRow(ANNOUNCE_ALL_TRACKERS, tr("Always announce to all trackers in a tier"), &m_checkBoxAnnounceAllTrackers); addRow(ANNOUNCE_ALL_TRACKERS, (tr("Always announce to all trackers in a tier")
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#announce_to_all_trackers", "(?)"))
, &m_checkBoxAnnounceAllTrackers);
// Announce to all tiers // Announce to all tiers
m_checkBoxAnnounceAllTiers.setChecked(session->announceToAllTiers()); m_checkBoxAnnounceAllTiers.setChecked(session->announceToAllTiers());
addRow(ANNOUNCE_ALL_TIERS, tr("Always announce to all tiers"), &m_checkBoxAnnounceAllTiers); addRow(ANNOUNCE_ALL_TIERS, (tr("Always announce to all tiers")
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#announce_to_all_tiers", "(?)"))
, &m_checkBoxAnnounceAllTiers);
m_spinBoxPeerTurnover.setMinimum(0); m_spinBoxPeerTurnover.setMinimum(0);
m_spinBoxPeerTurnover.setMaximum(100); m_spinBoxPeerTurnover.setMaximum(100);

12
src/webui/www/private/views/preferences.html

@ -1050,7 +1050,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<label for="outgoingPortsMin">QBT_TR(Outgoing ports (Min) [0: Disabled]:)QBT_TR[CONTEXT=OptionsDialog]</label> <label for="outgoingPortsMin">QBT_TR(Outgoing ports (Min) [0: Disabled]:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#outgoing_port" target="_blank">(?)</a></label>
</td> </td>
<td> <td>
<input type="text" id="outgoingPortsMin" style="width: 15em;" /> <input type="text" id="outgoingPortsMin" style="width: 15em;" />
@ -1058,7 +1058,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<label for="outgoingPortsMax">QBT_TR(Outgoing ports (Max) [0: Disabled]:)QBT_TR[CONTEXT=OptionsDialog]</label> <label for="outgoingPortsMax">QBT_TR(Outgoing ports (Max) [0: Disabled]:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#outgoing_port" target="_blank">(?)</a></label>
</td> </td>
<td> <td>
<input type="text" id="outgoingPortsMax" style="width: 15em;" /> <input type="text" id="outgoingPortsMax" style="width: 15em;" />
@ -1085,7 +1085,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<label for="allowMultipleConnectionsFromTheSameIPAddress">QBT_TR(Allow multiple connections from the same IP address:)QBT_TR[CONTEXT=OptionsDialog]</label> <label for="allowMultipleConnectionsFromTheSameIPAddress">QBT_TR(Allow multiple connections from the same IP address:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#allow_multiple_connections_per_ip" target="_blank">(?)</a></label>
</td> </td>
<td> <td>
<input type="checkbox" id="allowMultipleConnectionsFromTheSameIPAddress" /> <input type="checkbox" id="allowMultipleConnectionsFromTheSameIPAddress" />
@ -1148,7 +1148,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<label for="announceAllTrackers">QBT_TR(Always announce to all trackers in a tier:)QBT_TR[CONTEXT=OptionsDialog]</label> <label for="announceAllTrackers">QBT_TR(Always announce to all trackers in a tier:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#announce_to_all_trackers" target="_blank">(?)</a></label>
</td> </td>
<td> <td>
<input type="checkbox" id="announceAllTrackers" /> <input type="checkbox" id="announceAllTrackers" />
@ -1156,7 +1156,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<label for="announceAllTiers">QBT_TR(Always announce to all tiers:)QBT_TR[CONTEXT=OptionsDialog]</label> <label for="announceAllTiers">QBT_TR(Always announce to all tiers:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#announce_to_all_tiers" target="_blank">(?)</a></label>
</td> </td>
<td> <td>
<input type="checkbox" id="announceAllTiers" /> <input type="checkbox" id="announceAllTiers" />
@ -1164,7 +1164,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<label for="announceIP">QBT_TR(IP Address to report to trackers (requires restart):)QBT_TR[CONTEXT=OptionsDialog]</label> <label for="announceIP">QBT_TR(IP Address to report to trackers (requires restart):)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#announce_ip" target="_blank">(?)</a></label>
</td> </td>
<td> <td>
<input type="text" id="announceIP" style="width: 15em;" /> <input type="text" id="announceIP" style="width: 15em;" />

Loading…
Cancel
Save