mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 04:54:18 +00:00
Now qbt remembers the last used folder. Fixes #799697. ver2
This commit is contained in:
parent
a82ccd8e95
commit
7c29e613f0
@ -155,7 +155,6 @@ options_imp::options_imp(QWidget *parent):
|
||||
connect(textSavePath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
|
||||
connect(textTempPath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
|
||||
connect(checkAppendLabel, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
connect(checkLastLocation, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
connect(checkAppendqB, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
connect(checkPreallocateAll, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
connect(checkAdditionDialog, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
@ -392,7 +391,6 @@ void options_imp::saveOptions(){
|
||||
#endif
|
||||
pref.setTempPath(temp_path);
|
||||
pref.setAppendTorrentLabel(checkAppendLabel->isChecked());
|
||||
pref.setRememberLastLocation(checkLastLocation->isChecked());
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
pref.useIncompleteFilesExtension(checkAppendqB->isChecked());
|
||||
#endif
|
||||
@ -570,7 +568,6 @@ void options_imp::loadOptions(){
|
||||
#endif
|
||||
textTempPath->setText(temp_path);
|
||||
checkAppendLabel->setChecked(pref.appendTorrentLabel());
|
||||
checkLastLocation->setChecked(pref.rememberLastLocation());
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
checkAppendqB->setChecked(pref.useIncompleteFilesExtension());
|
||||
#endif
|
||||
|
@ -88,6 +88,7 @@ torrentAdditionDialog::torrentAdditionDialog(QWidget *parent) :
|
||||
savePathTxt->setInsertPolicy(QComboBox::InsertAtCurrent);
|
||||
//torrentContentList->header()->setResizeMode(0, QHeaderView::Stretch);
|
||||
QString lastLocation = pref.lastLocationPath();
|
||||
checkLastFolder->setChecked(pref.rememberLastLocation());
|
||||
//lastLocation will always have '/' as separator since it is saved in
|
||||
//::on_OkButton_clicked() after the conversion is done.
|
||||
if (pref.rememberLastLocation() && !lastLocation.isEmpty() && QFile(lastLocation).exists())
|
||||
@ -700,7 +701,9 @@ void torrentAdditionDialog::on_OkButton_clicked(){
|
||||
//Save last location path
|
||||
{//limit the scope of pref
|
||||
Preferences pref;
|
||||
if (pref.rememberLastLocation())
|
||||
bool isChecked = checkLastFolder->isChecked();
|
||||
if (pref.rememberLastLocation() != isChecked) pref.setRememberLastLocation(isChecked);
|
||||
if (pref.rememberLastLocation() && save_path != pref.lastLocationPath())
|
||||
pref.setLastLocationPath(save_path);
|
||||
}
|
||||
// save filtered files
|
||||
|
@ -190,6 +190,12 @@
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
@ -217,6 +223,12 @@
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
@ -238,6 +250,12 @@
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
@ -263,6 +281,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkLastFolder">
|
||||
<property name="text">
|
||||
<string>Remember last used folder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
|
Loading…
x
Reference in New Issue
Block a user