Add option to enable ".unwanted" folder

PR #19926.
This commit is contained in:
Vladimir Golovnev 2023-11-13 14:25:27 +03:00 committed by GitHub
parent 9d6d3a30eb
commit 2a20764d39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 58 additions and 2 deletions

View file

@ -563,6 +563,7 @@ void OptionsDialog::loadDownloadsTabOptions()
m_ui->checkPreallocateAll->setChecked(session->isPreallocationEnabled());
m_ui->checkAppendqB->setChecked(session->isAppendExtensionEnabled());
m_ui->checkUnwantedFolder->setChecked(session->isUnwantedFolderEnabled());
m_ui->checkRecursiveDownload->setChecked(pref->isRecursiveDownloadEnabled());
m_ui->comboSavingMode->setCurrentIndex(!session->isAutoTMMDisabledByDefault());
@ -666,6 +667,7 @@ void OptionsDialog::loadDownloadsTabOptions()
connect(m_ui->checkPreallocateAll, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
connect(m_ui->checkAppendqB, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
connect(m_ui->checkUnwantedFolder, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
connect(m_ui->checkRecursiveDownload, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
connect(m_ui->comboSavingMode, qComboBoxCurrentIndexChanged, this, &ThisType::enableApplyButton);
@ -732,6 +734,7 @@ void OptionsDialog::saveDownloadsTabOptions() const
session->setPreallocationEnabled(preAllocateAllFiles());
session->setAppendExtensionEnabled(m_ui->checkAppendqB->isChecked());
session->setUnwantedFolderEnabled(m_ui->checkUnwantedFolder->isChecked());
pref->setRecursiveDownloadEnabled(m_ui->checkRecursiveDownload->isChecked());
session->setAutoTMMDisabledByDefault(m_ui->comboSavingMode->currentIndex() == 0);