- Added priority buttons

This commit is contained in:
Christophe Dumez 2008-07-14 20:01:21 +00:00
parent 600308aaa1
commit ca118697e9
4 changed files with 69 additions and 32 deletions

View file

@ -1227,6 +1227,45 @@ void GUI::on_actionPause_All_triggered() {
}
}
void GUI::on_actionIncreasePriority_triggered() {
bool inDownloadList = true;
if(tabs->currentIndex() > 1) return;
if(tabs->currentIndex() == 1)
inDownloadList = false;
if(!inDownloadList)
return;
QStringList hashes;
if(inDownloadList) {
hashes = downloadingTorrentTab->getSelectedTorrents();
} else {
hashes = finishedTorrentTab->getSelectedTorrents();
}
foreach(QString hash, hashes) {
BTSession->increaseDlTorrentPriority(hash);
downloadingTorrentTab->updateDlList();
}
}
void GUI::on_actionDecreasePriority_triggered() {
bool inDownloadList = true;
if(tabs->currentIndex() > 1) return;
if(tabs->currentIndex() == 1)
inDownloadList = false;
if(!inDownloadList)
return;
QStringList hashes;
if(inDownloadList) {
hashes = downloadingTorrentTab->getSelectedTorrents();
} else {
hashes = finishedTorrentTab->getSelectedTorrents();
}
QString hash;
foreach(QString hash, hashes) {
BTSession->decreaseDlTorrentPriority(hash);
downloadingTorrentTab->updateDlList();
}
}
// pause selected items in the list
void GUI::on_actionPause_triggered() {
bool inDownloadList = true;