BUGFIX: The user can disable permanently recursive torrent download

This commit is contained in:
Christophe Dumez 2010-06-14 17:46:33 +00:00
parent f699ee1363
commit 80d76ae038
3 changed files with 23 additions and 1 deletions

View file

@ -428,8 +428,19 @@ void GUI::balloonClicked() {
}
void GUI::askRecursiveTorrentDownloadConfirmation(QTorrentHandle &h) {
if(QMessageBox::question(this, tr("Recursive download confirmation"), tr("The torrent %1 contains torrent files, do you want to proceed with their download?").arg(h.name()), QMessageBox::Yes|QMessageBox::No) == QMessageBox::Yes) {
if(Preferences::recursiveDownloadDisabled()) return;
QMessageBox confirmBox(QMessageBox::Question, tr("Recursive download confirmation"), tr("The torrent %1 contains torrent files, do you want to proceed with their download?").arg(h.name()));
QPushButton *yes = confirmBox.addButton(tr("Yes"), QMessageBox::YesRole);
/*QPushButton *no = */confirmBox.addButton(tr("No"), QMessageBox::NoRole);
QPushButton *never = confirmBox.addButton(tr("Never"), QMessageBox::NoRole);
confirmBox.exec();
if(confirmBox.clickedButton() == 0) return;
if(confirmBox.clickedButton() == yes) {
BTSession->recursiveTorrentDownload(h);
return;
}
if(confirmBox.clickedButton() == never) {
Preferences::disableRecursiveDownload();
}
}