From 27a71ba12380723e30aa8b44bd55eff9e783efd0 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 14 Jul 2008 22:05:13 +0000 Subject: [PATCH] - Increase/decrease priority buttons should now work for finishedTab too --- src/GUI.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/GUI.cpp b/src/GUI.cpp index 87c12d705..ce1cd0b58 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -1239,8 +1239,6 @@ void GUI::on_actionIncreasePriority_triggered() { if(tabs->currentIndex() > 1) return; if(tabs->currentIndex() == 1) inDownloadList = false; - if(!inDownloadList) - return; QStringList hashes; if(inDownloadList) { hashes = downloadingTorrentTab->getSelectedTorrents(); @@ -1248,8 +1246,13 @@ void GUI::on_actionIncreasePriority_triggered() { hashes = finishedTorrentTab->getSelectedTorrents(); } foreach(QString hash, hashes) { - BTSession->increaseDlTorrentPriority(hash); - downloadingTorrentTab->updateDlList(); + if(inDownloadList) { + BTSession->increaseDlTorrentPriority(hash); + downloadingTorrentTab->updateDlList(); + } else { + BTSession->increaseUpTorrentPriority(hash); + finishedTorrentTab->updateFinishedList(); + } } } @@ -1258,8 +1261,6 @@ void GUI::on_actionDecreasePriority_triggered() { if(tabs->currentIndex() > 1) return; if(tabs->currentIndex() == 1) inDownloadList = false; - if(!inDownloadList) - return; QStringList hashes; if(inDownloadList) { hashes = downloadingTorrentTab->getSelectedTorrents(); @@ -1268,8 +1269,13 @@ void GUI::on_actionDecreasePriority_triggered() { } QString hash; foreach(QString hash, hashes) { - BTSession->decreaseDlTorrentPriority(hash); - downloadingTorrentTab->updateDlList(); + if(inDownloadList) { + BTSession->decreaseDlTorrentPriority(hash); + downloadingTorrentTab->updateDlList(); + } else { + BTSession->decreaseUpTorrentPriority(hash); + finishedTorrentTab->updateFinishedList(); + } } }