mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Merge pull request #3332 from ngosang/addtrackers2
Automatically add trackers to new downloads. Closes #262
This commit is contained in:
@@ -2273,6 +2273,37 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="checkEnableAddTrackers">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Automatically add these trackers to new downloads:</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_16">
|
||||
<item row="0" column="0">
|
||||
<widget class="QPlainTextEdit" name="textTrackers">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_8">
|
||||
<property name="orientation">
|
||||
|
||||
@@ -249,6 +249,8 @@ options_imp::options_imp(QWidget *parent)
|
||||
connect(spinMaxActiveUploads, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton()));
|
||||
connect(spinMaxActiveTorrents, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton()));
|
||||
connect(checkIgnoreSlowTorrentsForQueueing, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
connect(checkEnableAddTrackers, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
connect(textTrackers, SIGNAL(textChanged()), this, SLOT(enableApplyButton()));
|
||||
#ifndef DISABLE_WEBUI
|
||||
// Web UI tab
|
||||
connect(checkWebUi, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
@@ -468,6 +470,8 @@ void options_imp::saveOptions()
|
||||
pref->setLSDEnabled(isLSDEnabled());
|
||||
pref->setEncryptionSetting(getEncryptionSetting());
|
||||
pref->enableAnonymousMode(checkAnonymousMode->isChecked());
|
||||
pref->setAddTrackersEnabled(checkEnableAddTrackers->isChecked());
|
||||
pref->setTrackersList(textTrackers->toPlainText());
|
||||
pref->setGlobalMaxRatio(getMaxRatio());
|
||||
pref->setMaxRatioAction(static_cast<MaxRatioAction>(comboRatioLimitAct->currentIndex()));
|
||||
// End Bittorrent preferences
|
||||
@@ -783,6 +787,8 @@ void options_imp::loadOptions()
|
||||
checkLSD->setChecked(pref->isLSDEnabled());
|
||||
comboEncryption->setCurrentIndex(pref->getEncryptionSetting());
|
||||
checkAnonymousMode->setChecked(pref->isAnonymousModeEnabled());
|
||||
checkEnableAddTrackers->setChecked(pref->isAddTrackersEnabled());
|
||||
textTrackers->setPlainText(pref->getTrackersList());
|
||||
|
||||
checkEnableQueueing->setChecked(pref->isQueueingSystemEnabled());
|
||||
spinMaxActiveDownloads->setValue(pref->getMaxActiveDownloads());
|
||||
|
||||
Reference in New Issue
Block a user