1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-22 12:34:19 +00:00

Remember torrent import dialog geometry and position

This commit is contained in:
Christophe Dumez 2010-12-04 10:10:05 +00:00
parent f1ca4f40af
commit a39c7f52cf
2 changed files with 18 additions and 0 deletions

View File

@ -49,10 +49,12 @@ TorrentImportDlg::TorrentImportDlg(QWidget *parent) :
#if LIBTORRENT_VERSION_MINOR < 15
ui->checkSkipCheck->setVisible(false);
#endif
loadSettings();
}
TorrentImportDlg::~TorrentImportDlg()
{
saveSettings();
delete ui;
}
@ -277,3 +279,15 @@ bool TorrentImportDlg::skipFileChecking() const
return ui->checkSkipCheck->isChecked();
}
#endif
void TorrentImportDlg::loadSettings()
{
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
settings.setValue("TorrentImportDlg/dimensions", saveGeometry());
}
void TorrentImportDlg::saveSettings()
{
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
restoreGeometry(settings.value("TorrentImportDlg/dimensions").toByteArray());
}

View File

@ -69,6 +69,10 @@ private slots:
void on_importBtn_clicked();
private:
void loadSettings();
void saveSettings();
private:
Ui::TorrentImportDlg *ui;
boost::intrusive_ptr<libtorrent::torrent_info> t;