Implement an option to disable confirmation of torrent recheck

This commit is contained in:
Oleh Prypin 2015-07-08 23:29:31 +03:00
parent 647140c7c7
commit 7474c05209
4 changed files with 22 additions and 4 deletions

View file

@ -478,8 +478,10 @@ void TransferListWidget::setMaxRatioSelectedTorrents()
void TransferListWidget::recheckSelectedTorrents()
{
QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Recheck confirmation"), tr("Are you sure you want to recheck the selected torrent(s)?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
if (ret != QMessageBox::Yes) return;
if (Preferences::instance()->confirmTorrentRecheck()) {
QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Recheck confirmation"), tr("Are you sure you want to recheck the selected torrent(s)?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
if (ret != QMessageBox::Yes) return;
}
foreach (BitTorrent::TorrentHandle *const torrent, getSelectedTorrents())
torrent->forceRecheck();