Browse Source

Priority actions should work only if the tab is displayed

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
b2f98bd059
  1. 10
      src/httpconnection.cpp
  2. 4
      src/transferlistwidget.cpp

10
src/httpconnection.cpp

@ -500,6 +500,16 @@ void HttpConnection::respondCommand(QString command) @@ -500,6 +500,16 @@ void HttpConnection::respondCommand(QString command)
if(h.is_valid()) h.queue_position_down();
return;
}
if(command == "topPrio") {
QTorrentHandle h = BTSession->getTorrentHandle(parser.post("hash"));
if(h.is_valid()) h.queue_position_top();
return;
}
if(command == "bottomPrio") {
QTorrentHandle h = BTSession->getTorrentHandle(parser.post("hash"));
if(h.is_valid()) h.queue_position_bottom();
return;
}
if(command == "recheck"){
recheckTorrent(parser.post("hash"));
return;

4
src/transferlistwidget.cpp

@ -742,8 +742,8 @@ void TransferListWidget::decreasePrioSelectedTorrents() { @@ -742,8 +742,8 @@ void TransferListWidget::decreasePrioSelectedTorrents() {
refreshList();
}
// FIXME: Should work only if the tab is displayed
void TransferListWidget::topPrioSelectedTorrents() {
if(main_window->getCurrentTabWidget() != this) return;
const QStringList hashes = getSelectedTorrentsHashes();
foreach(const QString &hash, hashes) {
QTorrentHandle h = BTSession->getTorrentHandle(hash);
@ -754,8 +754,8 @@ void TransferListWidget::topPrioSelectedTorrents() { @@ -754,8 +754,8 @@ void TransferListWidget::topPrioSelectedTorrents() {
refreshList();
}
// FIXME: Should work only if the tab is displayed
void TransferListWidget::bottomPrioSelectedTorrents() {
if(main_window->getCurrentTabWidget() != this) return;
const QStringList hashes = getSelectedTorrentsHashes();
foreach(const QString &hash, hashes) {
QTorrentHandle h = BTSession->getTorrentHandle(hash);

Loading…
Cancel
Save