diff --git a/src/gui/options.ui b/src/gui/options.ui index 0182c4917..e68408f24 100644 --- a/src/gui/options.ui +++ b/src/gui/options.ui @@ -669,9 +669,9 @@ 0 - 0 - 514 - 1537 + -349 + 470 + 926 @@ -793,237 +793,332 @@ - - - 10 - - + + Default Saving Mode: - - - - Simple - - - true + + + + 10 - - buttonGroup_2 - - + + + + + Manual + + + + + Automatic (based on category) + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - + + - Advanced + When Torrent Category changed: - - buttonGroup_2 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Default Save Path - - - - 9 - - - - - - - - 0 - 0 - + + + + + + + Relocate torrent + + - + Switch torrent to Simple Mode - - - - - - true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + When Default Save Path changed: + + + + + + + + + 1 + + + + Relocate affected torrents - - - 22 - 22 - + + + + Switch affected torrents to Simple Mode - - - 25 - 27 - + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + When Category changed: + + + + + + + + + 1 + + + + Relocate affected torrents + + - ... + Switch affected torrents to Simple Mode - - - - - - + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + - - - 10 + + + Use Subcategories - - + + + + + + - Enable Subcategories: + Default Save Path: - - + + + + + + + 0 + 0 + + + + + + + + + + + true + + + + 22 + 22 + + + + + 25 + 27 + + + + ... + + + + + + + - Yes + Keep incomplete torrents in: - - buttonGroup - - - + + + + + + + + + + 25 + 27 + + + + + 22 + 22 + + + + + 25 + 27 + + + + ... + + + + + + + - No + Copy .torrent files to: - - true - - - buttonGroup - - - - - Qt::Horizontal - - - - 40 - 20 - + + + + + + + + + + 22 + 22 + + + + + 25 + 27 + + + + ... + + + + + + + + + Copy .torrent files for finished downloads to: - + + + + + + + + + + + + 22 + 22 + + + + + 25 + 27 + + + + ... + + + + - - - - When Torrent Category changed - - - - - - Relocate torrent - - - true - - - - - - - Switch torrent to Simple Mode - - - false - - - - - - - - - - When Default Save Path changed - - - - - - Relocate affected torrents - - - - - - - Switch affected torrents to Simple Mode - - - true - - - - - - - - - - When Category changed - - - - - - Relocate affected torrents - - - - - - - Switch affected torrents to Simple Mode - - - true - - - - - - @@ -1031,52 +1126,6 @@ - - - - Keep incomplete torrents in: - - - true - - - false - - - - 9 - - - - - - - - - 25 - 27 - - - - - 22 - 22 - - - - - 25 - 27 - - - - ... - - - - - - @@ -1084,126 +1133,15 @@ - - - - - 0 - 0 - - - - Copy .torrent files to: - - - true - - - false - - - - 9 - - - - - - - - - 22 - 22 - - - - - 25 - 27 - - - - ... - - - - - - - - - - - 0 - 0 - - - - Qt::StrongFocus - - - Copy .torrent files for finished downloads to: - - - true - - - false - - - - 9 - - - - - - - - - 22 - 22 - - - - - 25 - 27 - - - - ... - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - Automatically add torrents from: - - 9 - @@ -1293,9 +1231,12 @@ false - + - + + + + @@ -1303,9 +1244,6 @@ - - - @@ -1316,55 +1254,59 @@ - - - - Authentication - - - true - - - false - - - - - - Username: - - - - - - - - - - Password: - - - - - - - QLineEdit::Password - - - - - - - - - - This server requires a secure connection (SSL) - - - + + + + This server requires a secure connection (SSL) + + + + + + + Authentication + + + true + + + false + + + + + + Username: + + + + + + + + + + Password: + + + + + + + QLineEdit::Password + + + + + + + gridLayoutWidget + label_2 + checkSmtpSSL + groupMailNotifAuth @@ -3342,8 +3284,4 @@ - - - - diff --git a/src/gui/options_imp.cpp b/src/gui/options_imp.cpp index 947ece91a..a8b722470 100644 --- a/src/gui/options_imp.cpp +++ b/src/gui/options_imp.cpp @@ -199,11 +199,11 @@ options_imp::options_imp(QWidget *parent) connect(comboFileLogAgeType, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); // Downloads tab connect(textSavePath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); - connect(radioBtnEnableSubcategories, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); - connect(radioBtnAdvancedMode, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); - connect(radioBtnRelocateOnCategoryChanged, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); - connect(radioBtnRelocateOnCategorySavePathChanged, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); - connect(radioBtnRelocateOnDefaultSavePathChanged, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); + connect(checkUseSubcategories, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); + connect(comboSavingMode, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); + connect(comboTorrentCategoryChanged, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); + connect(comboCategoryDefaultPathChanged, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); + connect(comboCategoryChanged, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); connect(textTempPath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); connect(checkAppendqB, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(checkPreallocateAll, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); @@ -213,12 +213,18 @@ options_imp::options_imp(QWidget *parent) connect(deleteTorrentBox, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(deleteCancelledTorrentBox, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(checkExportDir, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); + connect(checkExportDir, SIGNAL(toggled(bool)), textExportDir, SLOT(setEnabled(bool))); + connect(checkExportDir, SIGNAL(toggled(bool)), browseExportDirButton, SLOT(setEnabled(bool))); connect(checkExportDirFin, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); + connect(checkExportDirFin, SIGNAL(toggled(bool)), textExportDirFin, SLOT(setEnabled(bool))); + connect(checkExportDirFin, SIGNAL(toggled(bool)), browseExportDirFinButton, SLOT(setEnabled(bool))); connect(textExportDir, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); connect(textExportDirFin, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); connect(actionTorrentDlOnDblClBox, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); connect(actionTorrentFnOnDblClBox, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); connect(checkTempFolder, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); + connect(checkTempFolder, SIGNAL(toggled(bool)), textTempPath, SLOT(setEnabled(bool))); + connect(checkTempFolder, SIGNAL(toggled(bool)), browseTempDirButton, SLOT(setEnabled(bool))); connect(addScanFolderButton, SIGNAL(clicked()), this, SLOT(enableApplyButton())); connect(removeScanFolderButton, SIGNAL(clicked()), this, SLOT(enableApplyButton())); connect(groupMailNotification, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); @@ -489,11 +495,11 @@ void options_imp::saveOptions() // Downloads preferences session->setDefaultSavePath(Utils::Fs::expandPathAbs(textSavePath->text())); - session->setSubcategoriesEnabled(radioBtnEnableSubcategories->isChecked()); - session->setASMDisabledByDefault(radioBtnSimpleMode->isChecked()); - session->setDisableASMWhenCategoryChanged(radioBtnDisableASMOnCategoryChanged->isChecked()); - session->setDisableASMWhenCategorySavePathChanged(radioBtnDisableASMOnCategorySavePathChanged->isChecked()); - session->setDisableASMWhenDefaultSavePathChanged(radioBtnDisableASMOnDefaultSavePathChanged->isChecked()); + session->setSubcategoriesEnabled(checkUseSubcategories->isChecked()); + session->setASMDisabledByDefault(comboSavingMode->currentIndex() == 0); + session->setDisableASMWhenCategoryChanged(comboTorrentCategoryChanged->currentIndex() == 1); + session->setDisableASMWhenCategorySavePathChanged(comboCategoryChanged->currentIndex() == 1); + session->setDisableASMWhenDefaultSavePathChanged(comboCategoryDefaultPathChanged->currentIndex() == 1); session->setTempPathEnabled(checkTempFolder->isChecked()); session->setTempPath(Utils::Fs::expandPathAbs(textTempPath->text())); pref->useIncompleteFilesExtension(checkAppendqB->isChecked()); @@ -703,12 +709,14 @@ void options_imp::loadOptions() deleteCancelledTorrentBox->setChecked(autoDeleteMode == TorrentFileGuard::Always); textSavePath->setText(Utils::Fs::toNativePath(session->defaultSavePath())); - (session->isSubcategoriesEnabled() ? radioBtnEnableSubcategories : radioBtnDisableSubcategories)->setChecked(true); - (session->isASMDisabledByDefault() ? radioBtnSimpleMode : radioBtnAdvancedMode)->setChecked(true); - (session->isDisableASMWhenCategoryChanged() ? radioBtnDisableASMOnCategoryChanged : radioBtnRelocateOnCategoryChanged)->setChecked(true); - (session->isDisableASMWhenCategorySavePathChanged() ? radioBtnDisableASMOnCategorySavePathChanged : radioBtnRelocateOnCategorySavePathChanged)->setChecked(true); - (session->isDisableASMWhenDefaultSavePathChanged() ? radioBtnDisableASMOnDefaultSavePathChanged : radioBtnRelocateOnDefaultSavePathChanged)->setChecked(true); + checkUseSubcategories->setChecked(session->isSubcategoriesEnabled()); + comboSavingMode->setCurrentIndex(!session->isASMDisabledByDefault()); + comboTorrentCategoryChanged->setCurrentIndex(session->isDisableASMWhenCategoryChanged()); + comboCategoryChanged->setCurrentIndex(session->isDisableASMWhenCategorySavePathChanged()); + comboCategoryDefaultPathChanged->setCurrentIndex(session->isDisableASMWhenDefaultSavePathChanged()); checkTempFolder->setChecked(session->isTempPathEnabled()); + textTempPath->setEnabled(checkTempFolder->isChecked()); + browseTempDirButton->setEnabled(checkTempFolder->isChecked()); textTempPath->setText(Utils::Fs::toNativePath(session->tempPath())); checkAppendqB->setChecked(pref->useIncompleteFilesExtension()); checkPreallocateAll->setChecked(pref->preAllocateAllFiles()); @@ -717,10 +725,14 @@ void options_imp::loadOptions() if (strValue.isEmpty()) { // Disable checkExportDir->setChecked(false); + textExportDir->setEnabled(false); + browseExportDirButton->setEnabled(false); } else { // Enable checkExportDir->setChecked(true); + textExportDir->setEnabled(true); + browseExportDirButton->setEnabled(true); textExportDir->setText(strValue); } @@ -728,10 +740,14 @@ void options_imp::loadOptions() if (strValue.isEmpty()) { // Disable checkExportDirFin->setChecked(false); + textExportDirFin->setEnabled(false); + browseExportDirFinButton->setEnabled(false); } else { // Enable checkExportDirFin->setChecked(true); + textExportDirFin->setEnabled(true); + browseExportDirFinButton->setEnabled(true); textExportDirFin->setText(strValue); }