Browse Source

Slim down 'Downloads' page of options window.

adaptive-webui-19844
sledgehammer999 9 years ago
parent
commit
df22c5a914
  1. 398
      src/gui/options.ui
  2. 46
      src/gui/options_imp.cpp

398
src/gui/options.ui

@ -669,9 +669,9 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>-349</y>
<width>514</width> <width>470</width>
<height>1537</height> <height>926</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
@ -793,38 +793,31 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_25"> <layout class="QVBoxLayout" name="verticalLayout_25">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_70"> <layout class="QGridLayout" name="gridLayout_3">
<property name="spacing"> <item row="0" column="0">
<number>10</number>
</property>
<item>
<widget class="QLabel" name="label_40"> <widget class="QLabel" name="label_40">
<property name="text"> <property name="text">
<string>Default Saving Mode:</string> <string>Default Saving Mode:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_70">
<property name="spacing">
<number>10</number>
</property>
<item>
<widget class="QComboBox" name="comboSavingMode">
<item> <item>
<widget class="QRadioButton" name="radioBtnSimpleMode">
<property name="text"> <property name="text">
<string>Simple</string> <string>Manual</string>
</property> </property>
<property name="checked">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup_2</string>
</attribute>
</widget>
</item> </item>
<item> <item>
<widget class="QRadioButton" name="radioBtnAdvancedMode">
<property name="text"> <property name="text">
<string>Advanced</string> <string>Automatic (based on category)</string>
</property> </property>
<attribute name="buttonGroup"> </item>
<string notr="true">buttonGroup_2</string>
</attribute>
</widget> </widget>
</item> </item>
<item> <item>
@ -842,94 +835,72 @@
</item> </item>
</layout> </layout>
</item> </item>
<item> <item row="1" column="0">
<widget class="QGroupBox" name="groupDefaultSavePath"> <widget class="QLabel" name="labelTorrentCategoryChanged">
<property name="title"> <property name="text">
<string>Default Save Path</string> <string>When Torrent Category changed:</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_26">
<property name="bottomMargin">
<number>9</number>
</property> </property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_14">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_10"> <widget class="QComboBox" name="comboTorrentCategoryChanged">
<item> <item>
<widget class="QLineEdit" name="textSavePath"> <property name="text">
<property name="sizePolicy"> <string>Relocate torrent</string>
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
</item>
<item>
<property name="text"> <property name="text">
<string/> <string>Switch torrent to Simple Mode</string>
</property> </property>
</item>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QToolButton" name="browseSaveDirButton"> <spacer name="horizontalSpacer_17">
<property name="enabled"> <property name="orientation">
<bool>true</bool> <enum>Qt::Horizontal</enum>
</property>
<property name="minimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property> </property>
<property name="maximumSize"> <property name="sizeHint" stdset="0">
<size> <size>
<width>25</width> <width>40</width>
<height>27</height> <height>20</height>
</size> </size>
</property> </property>
<property name="text"> </spacer>
<string notr="true">...</string>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>
</layout> <item row="2" column="0">
<widget class="QLabel" name="labelCategoryDefaultPathChanged">
<property name="text">
<string>When Default Save Path changed:</string>
</property>
</widget> </widget>
</item> </item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_15">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_80"> <widget class="QComboBox" name="comboCategoryDefaultPathChanged">
<property name="spacing"> <property name="currentIndex">
<number>10</number> <number>1</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="labelEnableSubcategories">
<property name="text"> <property name="text">
<string>Enable Subcategories:</string> <string>Relocate affected torrents</string>
</property> </property>
</widget>
</item> </item>
<item> <item>
<widget class="QRadioButton" name="radioBtnEnableSubcategories">
<property name="text"> <property name="text">
<string>Yes</string> <string>Switch affected torrents to Simple Mode</string>
</property> </property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
</item> </item>
<item>
<widget class="QRadioButton" name="radioBtnDisableSubcategories">
<property name="text">
<string>No</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_17"> <spacer name="horizontalSpacer_18">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -943,113 +914,117 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="3" column="0">
<widget class="QLabel" name="labelCategoryChanged">
<property name="text">
<string>When Category changed:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_17">
<item> <item>
<widget class="QGroupBox" name="groupCategoryChanged"> <widget class="QComboBox" name="comboCategoryChanged">
<property name="title"> <property name="currentIndex">
<string>When Torrent Category changed</string> <number>1</number>
</property> </property>
<layout class="QFormLayout" name="formLayout_6"> <item>
<item row="0" column="0">
<widget class="QRadioButton" name="radioBtnRelocateOnCategoryChanged">
<property name="text"> <property name="text">
<string>Relocate torrent</string> <string>Relocate affected torrents</string>
</property> </property>
<property name="checked"> </item>
<bool>true</bool> <item>
<property name="text">
<string>Switch affected torrents to Simple Mode</string>
</property> </property>
</item>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item>
<widget class="QRadioButton" name="radioBtnDisableASMOnCategoryChanged"> <spacer name="horizontalSpacer_19">
<property name="text"> <property name="orientation">
<string>Switch torrent to Simple Mode</string> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="checked"> <property name="sizeHint" stdset="0">
<bool>false</bool> <size>
<width>40</width>
<height>20</height>
</size>
</property> </property>
</widget> </spacer>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="groupDefaultSavePathChanged"> <widget class="QCheckBox" name="checkUseSubcategories">
<property name="title">
<string>When Default Save Path changed</string>
</property>
<layout class="QFormLayout" name="formLayout_7">
<item row="0" column="0">
<widget class="QRadioButton" name="radioBtnRelocateOnDefaultSavePathChanged">
<property name="text"> <property name="text">
<string>Relocate affected torrents</string> <string>Use Subcategories</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item>
<widget class="QRadioButton" name="radioBtnDisableASMOnDefaultSavePathChanged"> <layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="labelSavePath">
<property name="text"> <property name="text">
<string>Switch affected torrents to Simple Mode</string> <string>Default Save Path:</string>
</property> </property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item> <item>
<widget class="QGroupBox" name="groupCategorySavePathChanged"> <widget class="QLineEdit" name="textSavePath">
<property name="title"> <property name="sizePolicy">
<string>When Category changed</string> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<layout class="QFormLayout" name="formLayout_8">
<item row="0" column="0">
<widget class="QRadioButton" name="radioBtnRelocateOnCategorySavePathChanged">
<property name="text"> <property name="text">
<string>Relocate affected torrents</string> <string/>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item>
<widget class="QRadioButton" name="radioBtnDisableASMOnCategorySavePathChanged"> <widget class="QToolButton" name="browseSaveDirButton">
<property name="text"> <property name="enabled">
<string>Switch affected torrents to Simple Mode</string>
</property>
<property name="checked">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="minimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>25</width>
<height>27</height>
</size>
</property>
<property name="text">
<string notr="true">...</string>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
<item> <item row="1" column="0">
<widget class="QCheckBox" name="checkPreallocateAll"> <widget class="QCheckBox" name="checkTempFolder">
<property name="text"> <property name="text">
<string>Pre-allocate disk space for all files</string> <string>Keep incomplete torrents in:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item> <item>
<widget class="QGroupBox" name="checkTempFolder">
<property name="title">
<string>Keep incomplete torrents in:</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<property name="bottomMargin">
<number>9</number>
</property>
<item row="0" column="0">
<widget class="QLineEdit" name="textTempPath"/> <widget class="QLineEdit" name="textTempPath"/>
</item> </item>
<item row="0" column="1"> <item>
<widget class="QToolButton" name="browseTempDirButton"> <widget class="QToolButton" name="browseTempDirButton">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -1075,40 +1050,20 @@
</widget> </widget>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
<item> <item row="2" column="0">
<widget class="QCheckBox" name="checkAppendqB"> <widget class="QCheckBox" name="checkExportDir">
<property name="text"> <property name="text">
<string>Append .!qB extension to incomplete files</string> <string>Copy .torrent files to:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_12">
<item> <item>
<widget class="QGroupBox" name="checkExportDir">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Copy .torrent files to:</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<property name="bottomMargin">
<number>9</number>
</property>
<item row="0" column="0">
<widget class="QLineEdit" name="textExportDir"/> <widget class="QLineEdit" name="textExportDir"/>
</item> </item>
<item row="0" column="1"> <item>
<widget class="QToolButton" name="browseExportDirButton"> <widget class="QToolButton" name="browseExportDirButton">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
@ -1128,36 +1083,20 @@
</widget> </widget>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
<item> <item row="3" column="0">
<widget class="QGroupBox" name="checkExportDirFin"> <widget class="QCheckBox" name="checkExportDirFin">
<property name="sizePolicy"> <property name="text">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="title">
<string>Copy .torrent files for finished downloads to:</string> <string>Copy .torrent files for finished downloads to:</string>
</property> </property>
<property name="checkable"> </widget>
<bool>true</bool> </item>
</property> <item row="3" column="1">
<property name="checked"> <layout class="QHBoxLayout" name="horizontalLayout_13">
<bool>false</bool> <item>
</property>
<layout class="QGridLayout" name="gridLayout_13">
<property name="bottomMargin">
<number>9</number>
</property>
<item row="0" column="0">
<widget class="QLineEdit" name="textExportDirFin"/> <widget class="QLineEdit" name="textExportDirFin"/>
</item> </item>
<item row="0" column="1"> <item>
<widget class="QToolButton" name="browseExportDirFinButton"> <widget class="QToolButton" name="browseExportDirFinButton">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
@ -1177,23 +1116,25 @@
</widget> </widget>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_5"> <widget class="QCheckBox" name="checkPreallocateAll">
<property name="orientation"> <property name="text">
<enum>Qt::Vertical</enum> <string>Pre-allocate disk space for all files</string>
</property> </property>
<property name="sizeHint" stdset="0"> </widget>
<size> </item>
<width>20</width> <item>
<height>40</height> <widget class="QCheckBox" name="checkAppendqB">
</size> <property name="text">
<string>Append .!qB extension to incomplete files</string>
</property> </property>
</spacer> </widget>
</item>
</layout>
</widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="groupBox_2"> <widget class="QGroupBox" name="groupBox_2">
@ -1201,9 +1142,6 @@
<string>Automatically add torrents from:</string> <string>Automatically add torrents from:</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_38"> <layout class="QVBoxLayout" name="verticalLayout_38">
<property name="bottomMargin">
<number>9</number>
</property>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_16"> <layout class="QHBoxLayout" name="horizontalLayout_16">
<item> <item>
@ -1293,9 +1231,12 @@
<property name="checked"> <property name="checked">
<bool>false</bool> <bool>false</bool>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_21"> <layout class="QVBoxLayout" name="verticalLayout_17">
<item> <item>
<layout class="QFormLayout" name="formLayout"> <layout class="QGridLayout" name="gridLayout_9">
<item row="0" column="1">
<widget class="QLineEdit" name="dest_email_txt"/>
</item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
<property name="text"> <property name="text">
@ -1303,9 +1244,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1">
<widget class="QLineEdit" name="dest_email_txt"/>
</item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
@ -1316,7 +1254,16 @@
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLineEdit" name="smtp_server_txt"/> <widget class="QLineEdit" name="smtp_server_txt"/>
</item> </item>
<item row="3" column="1"> </layout>
</item>
<item>
<widget class="QCheckBox" name="checkSmtpSSL">
<property name="text">
<string>This server requires a secure connection (SSL)</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupMailNotifAuth"> <widget class="QGroupBox" name="groupMailNotifAuth">
<property name="title"> <property name="title">
<string>Authentication</string> <string>Authentication</string>
@ -1355,16 +1302,11 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="2" column="1">
<widget class="QCheckBox" name="checkSmtpSSL">
<property name="text">
<string>This server requires a secure connection (SSL)</string>
</property>
</widget>
</item>
</layout>
</item>
</layout> </layout>
<zorder>gridLayoutWidget</zorder>
<zorder>label_2</zorder>
<zorder>checkSmtpSSL</zorder>
<zorder>groupMailNotifAuth</zorder>
</widget> </widget>
</item> </item>
<item> <item>
@ -3342,8 +3284,4 @@
</hints> </hints>
</connection> </connection>
</connections> </connections>
<buttongroups>
<buttongroup name="buttonGroup"/>
<buttongroup name="buttonGroup_2"/>
</buttongroups>
</ui> </ui>

46
src/gui/options_imp.cpp

@ -199,11 +199,11 @@ options_imp::options_imp(QWidget *parent)
connect(comboFileLogAgeType, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); connect(comboFileLogAgeType, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton()));
// Downloads tab // Downloads tab
connect(textSavePath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); connect(textSavePath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
connect(radioBtnEnableSubcategories, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(checkUseSubcategories, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(radioBtnAdvancedMode, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(comboSavingMode, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton()));
connect(radioBtnRelocateOnCategoryChanged, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(comboTorrentCategoryChanged, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton()));
connect(radioBtnRelocateOnCategorySavePathChanged, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(comboCategoryDefaultPathChanged, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton()));
connect(radioBtnRelocateOnDefaultSavePathChanged, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(comboCategoryChanged, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton()));
connect(textTempPath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); connect(textTempPath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
connect(checkAppendqB, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(checkAppendqB, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(checkPreallocateAll, 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(deleteTorrentBox, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(deleteCancelledTorrentBox, 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)), 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)), 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(textExportDir, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
connect(textExportDirFin, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); connect(textExportDirFin, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
connect(actionTorrentDlOnDblClBox, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); connect(actionTorrentDlOnDblClBox, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton()));
connect(actionTorrentFnOnDblClBox, 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)), 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(addScanFolderButton, SIGNAL(clicked()), this, SLOT(enableApplyButton()));
connect(removeScanFolderButton, SIGNAL(clicked()), this, SLOT(enableApplyButton())); connect(removeScanFolderButton, SIGNAL(clicked()), this, SLOT(enableApplyButton()));
connect(groupMailNotification, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(groupMailNotification, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
@ -489,11 +495,11 @@ void options_imp::saveOptions()
// Downloads preferences // Downloads preferences
session->setDefaultSavePath(Utils::Fs::expandPathAbs(textSavePath->text())); session->setDefaultSavePath(Utils::Fs::expandPathAbs(textSavePath->text()));
session->setSubcategoriesEnabled(radioBtnEnableSubcategories->isChecked()); session->setSubcategoriesEnabled(checkUseSubcategories->isChecked());
session->setASMDisabledByDefault(radioBtnSimpleMode->isChecked()); session->setASMDisabledByDefault(comboSavingMode->currentIndex() == 0);
session->setDisableASMWhenCategoryChanged(radioBtnDisableASMOnCategoryChanged->isChecked()); session->setDisableASMWhenCategoryChanged(comboTorrentCategoryChanged->currentIndex() == 1);
session->setDisableASMWhenCategorySavePathChanged(radioBtnDisableASMOnCategorySavePathChanged->isChecked()); session->setDisableASMWhenCategorySavePathChanged(comboCategoryChanged->currentIndex() == 1);
session->setDisableASMWhenDefaultSavePathChanged(radioBtnDisableASMOnDefaultSavePathChanged->isChecked()); session->setDisableASMWhenDefaultSavePathChanged(comboCategoryDefaultPathChanged->currentIndex() == 1);
session->setTempPathEnabled(checkTempFolder->isChecked()); session->setTempPathEnabled(checkTempFolder->isChecked());
session->setTempPath(Utils::Fs::expandPathAbs(textTempPath->text())); session->setTempPath(Utils::Fs::expandPathAbs(textTempPath->text()));
pref->useIncompleteFilesExtension(checkAppendqB->isChecked()); pref->useIncompleteFilesExtension(checkAppendqB->isChecked());
@ -703,12 +709,14 @@ void options_imp::loadOptions()
deleteCancelledTorrentBox->setChecked(autoDeleteMode == TorrentFileGuard::Always); deleteCancelledTorrentBox->setChecked(autoDeleteMode == TorrentFileGuard::Always);
textSavePath->setText(Utils::Fs::toNativePath(session->defaultSavePath())); textSavePath->setText(Utils::Fs::toNativePath(session->defaultSavePath()));
(session->isSubcategoriesEnabled() ? radioBtnEnableSubcategories : radioBtnDisableSubcategories)->setChecked(true); checkUseSubcategories->setChecked(session->isSubcategoriesEnabled());
(session->isASMDisabledByDefault() ? radioBtnSimpleMode : radioBtnAdvancedMode)->setChecked(true); comboSavingMode->setCurrentIndex(!session->isASMDisabledByDefault());
(session->isDisableASMWhenCategoryChanged() ? radioBtnDisableASMOnCategoryChanged : radioBtnRelocateOnCategoryChanged)->setChecked(true); comboTorrentCategoryChanged->setCurrentIndex(session->isDisableASMWhenCategoryChanged());
(session->isDisableASMWhenCategorySavePathChanged() ? radioBtnDisableASMOnCategorySavePathChanged : radioBtnRelocateOnCategorySavePathChanged)->setChecked(true); comboCategoryChanged->setCurrentIndex(session->isDisableASMWhenCategorySavePathChanged());
(session->isDisableASMWhenDefaultSavePathChanged() ? radioBtnDisableASMOnDefaultSavePathChanged : radioBtnRelocateOnDefaultSavePathChanged)->setChecked(true); comboCategoryDefaultPathChanged->setCurrentIndex(session->isDisableASMWhenDefaultSavePathChanged());
checkTempFolder->setChecked(session->isTempPathEnabled()); checkTempFolder->setChecked(session->isTempPathEnabled());
textTempPath->setEnabled(checkTempFolder->isChecked());
browseTempDirButton->setEnabled(checkTempFolder->isChecked());
textTempPath->setText(Utils::Fs::toNativePath(session->tempPath())); textTempPath->setText(Utils::Fs::toNativePath(session->tempPath()));
checkAppendqB->setChecked(pref->useIncompleteFilesExtension()); checkAppendqB->setChecked(pref->useIncompleteFilesExtension());
checkPreallocateAll->setChecked(pref->preAllocateAllFiles()); checkPreallocateAll->setChecked(pref->preAllocateAllFiles());
@ -717,10 +725,14 @@ void options_imp::loadOptions()
if (strValue.isEmpty()) { if (strValue.isEmpty()) {
// Disable // Disable
checkExportDir->setChecked(false); checkExportDir->setChecked(false);
textExportDir->setEnabled(false);
browseExportDirButton->setEnabled(false);
} }
else { else {
// Enable // Enable
checkExportDir->setChecked(true); checkExportDir->setChecked(true);
textExportDir->setEnabled(true);
browseExportDirButton->setEnabled(true);
textExportDir->setText(strValue); textExportDir->setText(strValue);
} }
@ -728,10 +740,14 @@ void options_imp::loadOptions()
if (strValue.isEmpty()) { if (strValue.isEmpty()) {
// Disable // Disable
checkExportDirFin->setChecked(false); checkExportDirFin->setChecked(false);
textExportDirFin->setEnabled(false);
browseExportDirFinButton->setEnabled(false);
} }
else { else {
// Enable // Enable
checkExportDirFin->setChecked(true); checkExportDirFin->setChecked(true);
textExportDirFin->setEnabled(true);
browseExportDirFinButton->setEnabled(true);
textExportDirFin->setText(strValue); textExportDirFin->setText(strValue);
} }

Loading…
Cancel
Save