mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Merge pull request #9995 from thalieht/rename-queue
Rename priority to queue in the context of torrents
This commit is contained in:
commit
75a2274b66
@ -116,7 +116,7 @@ namespace
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool readFile(const QString &path, QByteArray &buf);
|
bool readFile(const QString &path, QByteArray &buf);
|
||||||
bool loadTorrentResumeData(const QByteArray &data, CreateTorrentParams &torrentParams, int &prio, MagnetUri &magnetUri);
|
bool loadTorrentResumeData(const QByteArray &data, CreateTorrentParams &torrentParams, int &queuePos, MagnetUri &magnetUri);
|
||||||
|
|
||||||
void torrentQueuePositionUp(const lt::torrent_handle &handle);
|
void torrentQueuePositionUp(const lt::torrent_handle &handle);
|
||||||
void torrentQueuePositionDown(const lt::torrent_handle &handle);
|
void torrentQueuePositionDown(const lt::torrent_handle &handle);
|
||||||
@ -1698,20 +1698,20 @@ bool Session::cancelLoadMetadata(const InfoHash &hash)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Session::increaseTorrentsPriority(const QStringList &hashes)
|
void Session::increaseTorrentsQueuePos(const QStringList &hashes)
|
||||||
{
|
{
|
||||||
std::priority_queue<QPair<int, TorrentHandle *>,
|
std::priority_queue<QPair<int, TorrentHandle *>,
|
||||||
std::vector<QPair<int, TorrentHandle *>>,
|
std::vector<QPair<int, TorrentHandle *>>,
|
||||||
std::greater<QPair<int, TorrentHandle *>>> torrentQueue;
|
std::greater<QPair<int, TorrentHandle *>>> torrentQueue;
|
||||||
|
|
||||||
// Sort torrents by priority
|
// Sort torrents by queue position
|
||||||
for (const InfoHash infoHash : hashes) {
|
for (const InfoHash infoHash : hashes) {
|
||||||
TorrentHandle *const torrent = m_torrents.value(infoHash);
|
TorrentHandle *const torrent = m_torrents.value(infoHash);
|
||||||
if (torrent && !torrent->isSeed())
|
if (torrent && !torrent->isSeed())
|
||||||
torrentQueue.push(qMakePair(torrent->queuePosition(), torrent));
|
torrentQueue.push(qMakePair(torrent->queuePosition(), torrent));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Increase torrents priority (starting with the ones with highest priority)
|
// Increase torrents queue position (starting with the one in the highest queue position)
|
||||||
while (!torrentQueue.empty()) {
|
while (!torrentQueue.empty()) {
|
||||||
TorrentHandle *const torrent = torrentQueue.top().second;
|
TorrentHandle *const torrent = torrentQueue.top().second;
|
||||||
torrentQueuePositionUp(torrent->nativeHandle());
|
torrentQueuePositionUp(torrent->nativeHandle());
|
||||||
@ -1721,20 +1721,20 @@ void Session::increaseTorrentsPriority(const QStringList &hashes)
|
|||||||
saveTorrentsQueue();
|
saveTorrentsQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Session::decreaseTorrentsPriority(const QStringList &hashes)
|
void Session::decreaseTorrentsQueuePos(const QStringList &hashes)
|
||||||
{
|
{
|
||||||
std::priority_queue<QPair<int, TorrentHandle *>,
|
std::priority_queue<QPair<int, TorrentHandle *>,
|
||||||
std::vector<QPair<int, TorrentHandle *>>,
|
std::vector<QPair<int, TorrentHandle *>>,
|
||||||
std::less<QPair<int, TorrentHandle *>>> torrentQueue;
|
std::less<QPair<int, TorrentHandle *>>> torrentQueue;
|
||||||
|
|
||||||
// Sort torrents by priority
|
// Sort torrents by queue position
|
||||||
for (const InfoHash infoHash : hashes) {
|
for (const InfoHash infoHash : hashes) {
|
||||||
TorrentHandle *const torrent = m_torrents.value(infoHash);
|
TorrentHandle *const torrent = m_torrents.value(infoHash);
|
||||||
if (torrent && !torrent->isSeed())
|
if (torrent && !torrent->isSeed())
|
||||||
torrentQueue.push(qMakePair(torrent->queuePosition(), torrent));
|
torrentQueue.push(qMakePair(torrent->queuePosition(), torrent));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decrease torrents priority (starting with the ones with lowest priority)
|
// Decrease torrents queue position (starting with the one in the lowest queue position)
|
||||||
while (!torrentQueue.empty()) {
|
while (!torrentQueue.empty()) {
|
||||||
TorrentHandle *const torrent = torrentQueue.top().second;
|
TorrentHandle *const torrent = torrentQueue.top().second;
|
||||||
torrentQueuePositionDown(torrent->nativeHandle());
|
torrentQueuePositionDown(torrent->nativeHandle());
|
||||||
@ -1747,20 +1747,20 @@ void Session::decreaseTorrentsPriority(const QStringList &hashes)
|
|||||||
saveTorrentsQueue();
|
saveTorrentsQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Session::topTorrentsPriority(const QStringList &hashes)
|
void Session::topTorrentsQueuePos(const QStringList &hashes)
|
||||||
{
|
{
|
||||||
std::priority_queue<QPair<int, TorrentHandle *>,
|
std::priority_queue<QPair<int, TorrentHandle *>,
|
||||||
std::vector<QPair<int, TorrentHandle *>>,
|
std::vector<QPair<int, TorrentHandle *>>,
|
||||||
std::greater<QPair<int, TorrentHandle *>>> torrentQueue;
|
std::greater<QPair<int, TorrentHandle *>>> torrentQueue;
|
||||||
|
|
||||||
// Sort torrents by priority
|
// Sort torrents by queue position
|
||||||
for (const InfoHash infoHash : hashes) {
|
for (const InfoHash infoHash : hashes) {
|
||||||
TorrentHandle *const torrent = m_torrents.value(infoHash);
|
TorrentHandle *const torrent = m_torrents.value(infoHash);
|
||||||
if (torrent && !torrent->isSeed())
|
if (torrent && !torrent->isSeed())
|
||||||
torrentQueue.push(qMakePair(torrent->queuePosition(), torrent));
|
torrentQueue.push(qMakePair(torrent->queuePosition(), torrent));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Top torrents priority (starting with the ones with highest priority)
|
// Top torrents queue position (starting with the one in the highest queue position)
|
||||||
while (!torrentQueue.empty()) {
|
while (!torrentQueue.empty()) {
|
||||||
TorrentHandle *const torrent = torrentQueue.top().second;
|
TorrentHandle *const torrent = torrentQueue.top().second;
|
||||||
torrentQueuePositionTop(torrent->nativeHandle());
|
torrentQueuePositionTop(torrent->nativeHandle());
|
||||||
@ -1770,20 +1770,20 @@ void Session::topTorrentsPriority(const QStringList &hashes)
|
|||||||
saveTorrentsQueue();
|
saveTorrentsQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Session::bottomTorrentsPriority(const QStringList &hashes)
|
void Session::bottomTorrentsQueuePos(const QStringList &hashes)
|
||||||
{
|
{
|
||||||
std::priority_queue<QPair<int, TorrentHandle *>,
|
std::priority_queue<QPair<int, TorrentHandle *>,
|
||||||
std::vector<QPair<int, TorrentHandle *>>,
|
std::vector<QPair<int, TorrentHandle *>>,
|
||||||
std::less<QPair<int, TorrentHandle *>>> torrentQueue;
|
std::less<QPair<int, TorrentHandle *>>> torrentQueue;
|
||||||
|
|
||||||
// Sort torrents by priority
|
// Sort torrents by queue position
|
||||||
for (const InfoHash infoHash : hashes) {
|
for (const InfoHash infoHash : hashes) {
|
||||||
TorrentHandle *const torrent = m_torrents.value(infoHash);
|
TorrentHandle *const torrent = m_torrents.value(infoHash);
|
||||||
if (torrent && !torrent->isSeed())
|
if (torrent && !torrent->isSeed())
|
||||||
torrentQueue.push(qMakePair(torrent->queuePosition(), torrent));
|
torrentQueue.push(qMakePair(torrent->queuePosition(), torrent));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bottom torrents priority (starting with the ones with lowest priority)
|
// Bottom torrents queue position (starting with the one in the lowest queue position)
|
||||||
while (!torrentQueue.empty()) {
|
while (!torrentQueue.empty()) {
|
||||||
TorrentHandle *const torrent = torrentQueue.top().second;
|
TorrentHandle *const torrent = torrentQueue.top().second;
|
||||||
torrentQueuePositionBottom(torrent->nativeHandle());
|
torrentQueuePositionBottom(torrent->nativeHandle());
|
||||||
@ -4432,7 +4432,7 @@ namespace
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool loadTorrentResumeData(const QByteArray &data, CreateTorrentParams &torrentParams, int &prio, MagnetUri &magnetUri)
|
bool loadTorrentResumeData(const QByteArray &data, CreateTorrentParams &torrentParams, int &queuePos, MagnetUri &magnetUri)
|
||||||
{
|
{
|
||||||
torrentParams = CreateTorrentParams();
|
torrentParams = CreateTorrentParams();
|
||||||
torrentParams.restored = true;
|
torrentParams.restored = true;
|
||||||
@ -4476,7 +4476,7 @@ namespace
|
|||||||
torrentParams.firstLastPiecePriority = fast.dict_find_int_value("qBt-firstLastPiecePriority");
|
torrentParams.firstLastPiecePriority = fast.dict_find_int_value("qBt-firstLastPiecePriority");
|
||||||
torrentParams.sequential = fast.dict_find_int_value("qBt-sequential");
|
torrentParams.sequential = fast.dict_find_int_value("qBt-sequential");
|
||||||
|
|
||||||
prio = fast.dict_find_int_value("qBt-queuePosition");
|
queuePos = fast.dict_find_int_value("qBt-queuePosition");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -421,10 +421,10 @@ namespace BitTorrent
|
|||||||
bool cancelLoadMetadata(const InfoHash &hash);
|
bool cancelLoadMetadata(const InfoHash &hash);
|
||||||
|
|
||||||
void recursiveTorrentDownload(const InfoHash &hash);
|
void recursiveTorrentDownload(const InfoHash &hash);
|
||||||
void increaseTorrentsPriority(const QStringList &hashes);
|
void increaseTorrentsQueuePos(const QStringList &hashes);
|
||||||
void decreaseTorrentsPriority(const QStringList &hashes);
|
void decreaseTorrentsQueuePos(const QStringList &hashes);
|
||||||
void topTorrentsPriority(const QStringList &hashes);
|
void topTorrentsQueuePos(const QStringList &hashes);
|
||||||
void bottomTorrentsPriority(const QStringList &hashes);
|
void bottomTorrentsQueuePos(const QStringList &hashes);
|
||||||
|
|
||||||
// TorrentHandle interface
|
// TorrentHandle interface
|
||||||
void handleTorrentShareLimitChanged(TorrentHandle *const torrent);
|
void handleTorrentShareLimitChanged(TorrentHandle *const torrent);
|
||||||
|
@ -171,14 +171,14 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
m_ui->actionCreateTorrent->setIcon(GuiIconProvider::instance()->getIcon("document-edit"));
|
m_ui->actionCreateTorrent->setIcon(GuiIconProvider::instance()->getIcon("document-edit"));
|
||||||
m_ui->actionAbout->setIcon(GuiIconProvider::instance()->getIcon("help-about"));
|
m_ui->actionAbout->setIcon(GuiIconProvider::instance()->getIcon("help-about"));
|
||||||
m_ui->actionStatistics->setIcon(GuiIconProvider::instance()->getIcon("view-statistics"));
|
m_ui->actionStatistics->setIcon(GuiIconProvider::instance()->getIcon("view-statistics"));
|
||||||
m_ui->actionDecreasePriority->setIcon(GuiIconProvider::instance()->getIcon("go-down"));
|
m_ui->actionTopQueuePos->setIcon(GuiIconProvider::instance()->getIcon("go-top"));
|
||||||
m_ui->actionBottomPriority->setIcon(GuiIconProvider::instance()->getIcon("go-bottom"));
|
m_ui->actionIncreaseQueuePos->setIcon(GuiIconProvider::instance()->getIcon("go-up"));
|
||||||
|
m_ui->actionDecreaseQueuePos->setIcon(GuiIconProvider::instance()->getIcon("go-down"));
|
||||||
|
m_ui->actionBottomQueuePos->setIcon(GuiIconProvider::instance()->getIcon("go-bottom"));
|
||||||
m_ui->actionDelete->setIcon(GuiIconProvider::instance()->getIcon("list-remove"));
|
m_ui->actionDelete->setIcon(GuiIconProvider::instance()->getIcon("list-remove"));
|
||||||
m_ui->actionDocumentation->setIcon(GuiIconProvider::instance()->getIcon("help-contents"));
|
m_ui->actionDocumentation->setIcon(GuiIconProvider::instance()->getIcon("help-contents"));
|
||||||
m_ui->actionDonateMoney->setIcon(GuiIconProvider::instance()->getIcon("wallet-open"));
|
m_ui->actionDonateMoney->setIcon(GuiIconProvider::instance()->getIcon("wallet-open"));
|
||||||
m_ui->actionExit->setIcon(GuiIconProvider::instance()->getIcon("application-exit"));
|
m_ui->actionExit->setIcon(GuiIconProvider::instance()->getIcon("application-exit"));
|
||||||
m_ui->actionIncreasePriority->setIcon(GuiIconProvider::instance()->getIcon("go-up"));
|
|
||||||
m_ui->actionTopPriority->setIcon(GuiIconProvider::instance()->getIcon("go-top"));
|
|
||||||
m_ui->actionLock->setIcon(GuiIconProvider::instance()->getIcon("object-locked"));
|
m_ui->actionLock->setIcon(GuiIconProvider::instance()->getIcon("object-locked"));
|
||||||
m_ui->actionOptions->setIcon(GuiIconProvider::instance()->getIcon("configure", "preferences-system"));
|
m_ui->actionOptions->setIcon(GuiIconProvider::instance()->getIcon("configure", "preferences-system"));
|
||||||
m_ui->actionPause->setIcon(GuiIconProvider::instance()->getIcon("media-playback-pause"));
|
m_ui->actionPause->setIcon(GuiIconProvider::instance()->getIcon("media-playback-pause"));
|
||||||
@ -265,8 +265,8 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
|
|
||||||
m_ui->centralWidgetLayout->addWidget(m_tabs);
|
m_ui->centralWidgetLayout->addWidget(m_tabs);
|
||||||
|
|
||||||
m_prioSeparator = m_ui->toolBar->insertSeparator(m_ui->actionTopPriority);
|
m_queueSeparator = m_ui->toolBar->insertSeparator(m_ui->actionTopQueuePos);
|
||||||
m_prioSeparatorMenu = m_ui->menuEdit->insertSeparator(m_ui->actionTopPriority);
|
m_queueSeparatorMenu = m_ui->menuEdit->insertSeparator(m_ui->actionTopQueuePos);
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
for (QAction *action : asConst(m_ui->toolBar->actions())) {
|
for (QAction *action : asConst(m_ui->toolBar->actions())) {
|
||||||
@ -298,10 +298,10 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
connect(m_ui->actionPause, &QAction::triggered, m_transferListWidget, &TransferListWidget::pauseSelectedTorrents);
|
connect(m_ui->actionPause, &QAction::triggered, m_transferListWidget, &TransferListWidget::pauseSelectedTorrents);
|
||||||
connect(m_ui->actionPauseAll, &QAction::triggered, m_transferListWidget, &TransferListWidget::pauseAllTorrents);
|
connect(m_ui->actionPauseAll, &QAction::triggered, m_transferListWidget, &TransferListWidget::pauseAllTorrents);
|
||||||
connect(m_ui->actionDelete, &QAction::triggered, m_transferListWidget, &TransferListWidget::softDeleteSelectedTorrents);
|
connect(m_ui->actionDelete, &QAction::triggered, m_transferListWidget, &TransferListWidget::softDeleteSelectedTorrents);
|
||||||
connect(m_ui->actionTopPriority, &QAction::triggered, m_transferListWidget, &TransferListWidget::topPrioSelectedTorrents);
|
connect(m_ui->actionTopQueuePos, &QAction::triggered, m_transferListWidget, &TransferListWidget::topQueuePosSelectedTorrents);
|
||||||
connect(m_ui->actionIncreasePriority, &QAction::triggered, m_transferListWidget, &TransferListWidget::increasePrioSelectedTorrents);
|
connect(m_ui->actionIncreaseQueuePos, &QAction::triggered, m_transferListWidget, &TransferListWidget::increaseQueuePosSelectedTorrents);
|
||||||
connect(m_ui->actionDecreasePriority, &QAction::triggered, m_transferListWidget, &TransferListWidget::decreasePrioSelectedTorrents);
|
connect(m_ui->actionDecreaseQueuePos, &QAction::triggered, m_transferListWidget, &TransferListWidget::decreaseQueuePosSelectedTorrents);
|
||||||
connect(m_ui->actionBottomPriority, &QAction::triggered, m_transferListWidget, &TransferListWidget::bottomPrioSelectedTorrents);
|
connect(m_ui->actionBottomQueuePos, &QAction::triggered, m_transferListWidget, &TransferListWidget::bottomQueuePosSelectedTorrents);
|
||||||
#ifndef Q_OS_MAC
|
#ifndef Q_OS_MAC
|
||||||
connect(m_ui->actionToggleVisibility, &QAction::triggered, this, [this]() { toggleVisibility(); });
|
connect(m_ui->actionToggleVisibility, &QAction::triggered, this, [this]() { toggleVisibility(); });
|
||||||
#endif
|
#endif
|
||||||
@ -875,10 +875,10 @@ void MainWindow::createKeyboardShortcuts()
|
|||||||
m_ui->actionStartAll->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_S);
|
m_ui->actionStartAll->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_S);
|
||||||
m_ui->actionPause->setShortcut(Qt::CTRL + Qt::Key_P);
|
m_ui->actionPause->setShortcut(Qt::CTRL + Qt::Key_P);
|
||||||
m_ui->actionPauseAll->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_P);
|
m_ui->actionPauseAll->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_P);
|
||||||
m_ui->actionBottomPriority->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_Minus);
|
m_ui->actionBottomQueuePos->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_Minus);
|
||||||
m_ui->actionDecreasePriority->setShortcut(Qt::CTRL + Qt::Key_Minus);
|
m_ui->actionDecreaseQueuePos->setShortcut(Qt::CTRL + Qt::Key_Minus);
|
||||||
m_ui->actionIncreasePriority->setShortcut(Qt::CTRL + Qt::Key_Plus);
|
m_ui->actionIncreaseQueuePos->setShortcut(Qt::CTRL + Qt::Key_Plus);
|
||||||
m_ui->actionTopPriority->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_Plus);
|
m_ui->actionTopQueuePos->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_Plus);
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
m_ui->actionMinimize->setShortcut(Qt::CTRL + Qt::Key_M);
|
m_ui->actionMinimize->setShortcut(Qt::CTRL + Qt::Key_M);
|
||||||
addAction(m_ui->actionMinimize);
|
addAction(m_ui->actionMinimize);
|
||||||
@ -1466,29 +1466,29 @@ void MainWindow::loadPreferences(bool configureSession)
|
|||||||
|
|
||||||
// Queueing System
|
// Queueing System
|
||||||
if (BitTorrent::Session::instance()->isQueueingSystemEnabled()) {
|
if (BitTorrent::Session::instance()->isQueueingSystemEnabled()) {
|
||||||
if (!m_ui->actionDecreasePriority->isVisible()) {
|
if (!m_ui->actionDecreaseQueuePos->isVisible()) {
|
||||||
m_transferListWidget->hidePriorityColumn(false);
|
m_transferListWidget->hideQueuePosColumn(false);
|
||||||
m_ui->actionDecreasePriority->setVisible(true);
|
m_ui->actionDecreaseQueuePos->setVisible(true);
|
||||||
m_ui->actionIncreasePriority->setVisible(true);
|
m_ui->actionIncreaseQueuePos->setVisible(true);
|
||||||
m_ui->actionTopPriority->setVisible(true);
|
m_ui->actionTopQueuePos->setVisible(true);
|
||||||
m_ui->actionBottomPriority->setVisible(true);
|
m_ui->actionBottomQueuePos->setVisible(true);
|
||||||
#ifndef Q_OS_MAC
|
#ifndef Q_OS_MAC
|
||||||
m_prioSeparator->setVisible(true);
|
m_queueSeparator->setVisible(true);
|
||||||
#endif
|
#endif
|
||||||
m_prioSeparatorMenu->setVisible(true);
|
m_queueSeparatorMenu->setVisible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (m_ui->actionDecreasePriority->isVisible()) {
|
if (m_ui->actionDecreaseQueuePos->isVisible()) {
|
||||||
m_transferListWidget->hidePriorityColumn(true);
|
m_transferListWidget->hideQueuePosColumn(true);
|
||||||
m_ui->actionDecreasePriority->setVisible(false);
|
m_ui->actionDecreaseQueuePos->setVisible(false);
|
||||||
m_ui->actionIncreasePriority->setVisible(false);
|
m_ui->actionIncreaseQueuePos->setVisible(false);
|
||||||
m_ui->actionTopPriority->setVisible(false);
|
m_ui->actionTopQueuePos->setVisible(false);
|
||||||
m_ui->actionBottomPriority->setVisible(false);
|
m_ui->actionBottomQueuePos->setVisible(false);
|
||||||
#ifndef Q_OS_MAC
|
#ifndef Q_OS_MAC
|
||||||
m_prioSeparator->setVisible(false);
|
m_queueSeparator->setVisible(false);
|
||||||
#endif
|
#endif
|
||||||
m_prioSeparatorMenu->setVisible(false);
|
m_queueSeparatorMenu->setVisible(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,8 +243,8 @@ private:
|
|||||||
LineEdit *m_searchFilter;
|
LineEdit *m_searchFilter;
|
||||||
QAction *m_searchFilterAction;
|
QAction *m_searchFilterAction;
|
||||||
// Widgets
|
// Widgets
|
||||||
QAction *m_prioSeparator;
|
QAction *m_queueSeparator;
|
||||||
QAction *m_prioSeparatorMenu;
|
QAction *m_queueSeparatorMenu;
|
||||||
QSplitter *m_splitter;
|
QSplitter *m_splitter;
|
||||||
QPointer<SearchWidget> m_searchWidget;
|
QPointer<SearchWidget> m_searchWidget;
|
||||||
QPointer<RSSWidget> m_rssWidget;
|
QPointer<RSSWidget> m_rssWidget;
|
||||||
|
@ -48,10 +48,10 @@
|
|||||||
<addaction name="actionPauseAll"/>
|
<addaction name="actionPauseAll"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionDelete"/>
|
<addaction name="actionDelete"/>
|
||||||
<addaction name="actionTopPriority"/>
|
<addaction name="actionTopQueuePos"/>
|
||||||
<addaction name="actionIncreasePriority"/>
|
<addaction name="actionIncreaseQueuePos"/>
|
||||||
<addaction name="actionDecreasePriority"/>
|
<addaction name="actionDecreaseQueuePos"/>
|
||||||
<addaction name="actionBottomPriority"/>
|
<addaction name="actionBottomQueuePos"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuHelp">
|
<widget class="QMenu" name="menuHelp">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -153,10 +153,10 @@
|
|||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionStart"/>
|
<addaction name="actionStart"/>
|
||||||
<addaction name="actionPause"/>
|
<addaction name="actionPause"/>
|
||||||
<addaction name="actionTopPriority"/>
|
<addaction name="actionTopQueuePos"/>
|
||||||
<addaction name="actionIncreasePriority"/>
|
<addaction name="actionIncreaseQueuePos"/>
|
||||||
<addaction name="actionDecreasePriority"/>
|
<addaction name="actionDecreaseQueuePos"/>
|
||||||
<addaction name="actionBottomPriority"/>
|
<addaction name="actionBottomQueuePos"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionOptions"/>
|
<addaction name="actionOptions"/>
|
||||||
<addaction name="actionLock"/>
|
<addaction name="actionLock"/>
|
||||||
@ -248,33 +248,45 @@
|
|||||||
<string>Set Global Upload Limit...</string>
|
<string>Set Global Upload Limit...</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionBottomPriority">
|
<action name="actionBottomQueuePos">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Minimum Priority</string>
|
<string>Bottom of Queue</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Move to the bottom of the queue</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="visible">
|
<property name="visible">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionTopPriority">
|
<action name="actionTopQueuePos">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Top Priority</string>
|
<string>Top of Queue</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Move to the top of the queue</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="visible">
|
<property name="visible">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionDecreasePriority">
|
<action name="actionDecreaseQueuePos">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Decrease Priority</string>
|
<string>Move Down Queue</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Move down in the queue</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="visible">
|
<property name="visible">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionIncreasePriority">
|
<action name="actionIncreaseQueuePos">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Increase Priority</string>
|
<string>Move Up Queue</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Move up in the queue</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="visible">
|
<property name="visible">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -145,10 +145,10 @@ void TransferListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||||||
QItemDelegate::drawDisplay(painter, opt, opt.rect, str);
|
QItemDelegate::drawDisplay(painter, opt, opt.rect, str);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TransferListModel::TR_PRIORITY: {
|
case TransferListModel::TR_QUEUE_POSITION: {
|
||||||
const int priority = index.data().toInt();
|
const int queuePos = index.data().toInt();
|
||||||
opt.displayAlignment = Qt::AlignRight | Qt::AlignVCenter;
|
opt.displayAlignment = Qt::AlignRight | Qt::AlignVCenter;
|
||||||
if (priority > 0) {
|
if (queuePos > 0) {
|
||||||
QItemDelegate::paint(painter, opt, index);
|
QItemDelegate::paint(painter, opt, index);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -94,7 +94,7 @@ QVariant TransferListModel::headerData(int section, Qt::Orientation orientation,
|
|||||||
if (orientation == Qt::Horizontal) {
|
if (orientation == Qt::Horizontal) {
|
||||||
if (role == Qt::DisplayRole) {
|
if (role == Qt::DisplayRole) {
|
||||||
switch (section) {
|
switch (section) {
|
||||||
case TR_PRIORITY: return QChar('#');
|
case TR_QUEUE_POSITION: return QChar('#');
|
||||||
case TR_NAME: return tr("Name", "i.e: torrent name");
|
case TR_NAME: return tr("Name", "i.e: torrent name");
|
||||||
case TR_SIZE: return tr("Size", "i.e: torrent size");
|
case TR_SIZE: return tr("Size", "i.e: torrent size");
|
||||||
case TR_PROGRESS: return tr("Done", "% Done");
|
case TR_PROGRESS: return tr("Done", "% Done");
|
||||||
@ -147,7 +147,7 @@ QVariant TransferListModel::headerData(int section, Qt::Orientation orientation,
|
|||||||
case TR_DLLIMIT:
|
case TR_DLLIMIT:
|
||||||
case TR_RATIO_LIMIT:
|
case TR_RATIO_LIMIT:
|
||||||
case TR_RATIO:
|
case TR_RATIO:
|
||||||
case TR_PRIORITY:
|
case TR_QUEUE_POSITION:
|
||||||
case TR_LAST_ACTIVITY:
|
case TR_LAST_ACTIVITY:
|
||||||
return QVariant(Qt::AlignRight | Qt::AlignVCenter);
|
return QVariant(Qt::AlignRight | Qt::AlignVCenter);
|
||||||
default:
|
default:
|
||||||
@ -178,7 +178,7 @@ QVariant TransferListModel::data(const QModelIndex &index, int role) const
|
|||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case TR_NAME:
|
case TR_NAME:
|
||||||
return torrent->name();
|
return torrent->name();
|
||||||
case TR_PRIORITY:
|
case TR_QUEUE_POSITION:
|
||||||
return torrent->queuePosition();
|
return torrent->queuePosition();
|
||||||
case TR_SIZE:
|
case TR_SIZE:
|
||||||
return torrent->wantedSize();
|
return torrent->wantedSize();
|
||||||
|
@ -47,7 +47,7 @@ class TransferListModel : public QAbstractListModel
|
|||||||
public:
|
public:
|
||||||
enum Column
|
enum Column
|
||||||
{
|
{
|
||||||
TR_PRIORITY,
|
TR_QUEUE_POSITION,
|
||||||
TR_NAME,
|
TR_NAME,
|
||||||
TR_SIZE,
|
TR_SIZE,
|
||||||
TR_TOTAL_SIZE,
|
TR_TOTAL_SIZE,
|
||||||
|
@ -118,7 +118,7 @@ bool TransferListSortModel::lessThan(const QModelIndex &left, const QModelIndex
|
|||||||
return dateLessThan(sortColumn(), left, right, true);
|
return dateLessThan(sortColumn(), left, right, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
case TransferListModel::TR_PRIORITY: {
|
case TransferListModel::TR_QUEUE_POSITION: {
|
||||||
return lowerPositionThan(left, right);
|
return lowerPositionThan(left, right);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,10 +152,10 @@ bool TransferListSortModel::lessThan(const QModelIndex &left, const QModelIndex
|
|||||||
if (isActiveL != isActiveR)
|
if (isActiveL != isActiveR)
|
||||||
return isActiveL;
|
return isActiveL;
|
||||||
|
|
||||||
const int prioL = model->data(model->index(left.row(), TransferListModel::TR_PRIORITY)).toInt();
|
const int queuePosL = model->data(model->index(left.row(), TransferListModel::TR_QUEUE_POSITION)).toInt();
|
||||||
const int prioR = model->data(model->index(right.row(), TransferListModel::TR_PRIORITY)).toInt();
|
const int queuePosR = model->data(model->index(right.row(), TransferListModel::TR_QUEUE_POSITION)).toInt();
|
||||||
const bool isSeedingL = (prioL < 0);
|
const bool isSeedingL = (queuePosL < 0);
|
||||||
const bool isSeedingR = (prioR < 0);
|
const bool isSeedingR = (queuePosR < 0);
|
||||||
if (isSeedingL != isSeedingR) {
|
if (isSeedingL != isSeedingR) {
|
||||||
const bool isAscendingOrder = (sortOrder() == Qt::AscendingOrder);
|
const bool isAscendingOrder = (sortOrder() == Qt::AscendingOrder);
|
||||||
if (isSeedingL)
|
if (isSeedingL)
|
||||||
@ -172,7 +172,7 @@ bool TransferListSortModel::lessThan(const QModelIndex &left, const QModelIndex
|
|||||||
if (isSeedingL) // Both seeding
|
if (isSeedingL) // Both seeding
|
||||||
return dateLessThan(TransferListModel::TR_SEED_DATE, left, right, true);
|
return dateLessThan(TransferListModel::TR_SEED_DATE, left, right, true);
|
||||||
|
|
||||||
return (prioL < prioR);
|
return (queuePosL < queuePosR);
|
||||||
}
|
}
|
||||||
if (!isInvalidL && !isInvalidR) {
|
if (!isInvalidL && !isInvalidR) {
|
||||||
return (etaL < etaR);
|
return (etaL < etaR);
|
||||||
@ -214,9 +214,9 @@ bool TransferListSortModel::lowerPositionThan(const QModelIndex &left, const QMo
|
|||||||
{
|
{
|
||||||
const TransferListModel *model = qobject_cast<TransferListModel *>(sourceModel());
|
const TransferListModel *model = qobject_cast<TransferListModel *>(sourceModel());
|
||||||
|
|
||||||
// Sort according to TR_PRIORITY
|
// Sort according to TR_QUEUE_POSITION
|
||||||
const int queueL = model->data(model->index(left.row(), TransferListModel::TR_PRIORITY)).toInt();
|
const int queueL = model->data(model->index(left.row(), TransferListModel::TR_QUEUE_POSITION)).toInt();
|
||||||
const int queueR = model->data(model->index(right.row(), TransferListModel::TR_PRIORITY)).toInt();
|
const int queueR = model->data(model->index(right.row(), TransferListModel::TR_QUEUE_POSITION)).toInt();
|
||||||
if ((queueL > 0) || (queueR > 0)) {
|
if ((queueL > 0) || (queueR > 0)) {
|
||||||
if ((queueL > 0) && (queueR > 0))
|
if ((queueL > 0) && (queueR > 0))
|
||||||
return queueL < queueR;
|
return queueL < queueR;
|
||||||
|
@ -398,30 +398,30 @@ void TransferListWidget::deleteVisibleTorrents()
|
|||||||
BitTorrent::Session::instance()->deleteTorrent(torrent->hash(), deleteLocalFiles);
|
BitTorrent::Session::instance()->deleteTorrent(torrent->hash(), deleteLocalFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransferListWidget::increasePrioSelectedTorrents()
|
void TransferListWidget::increaseQueuePosSelectedTorrents()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
qDebug() << Q_FUNC_INFO;
|
||||||
if (m_mainWindow->currentTabWidget() == this)
|
if (m_mainWindow->currentTabWidget() == this)
|
||||||
BitTorrent::Session::instance()->increaseTorrentsPriority(extractHashes(getSelectedTorrents()));
|
BitTorrent::Session::instance()->increaseTorrentsQueuePos(extractHashes(getSelectedTorrents()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransferListWidget::decreasePrioSelectedTorrents()
|
void TransferListWidget::decreaseQueuePosSelectedTorrents()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
qDebug() << Q_FUNC_INFO;
|
||||||
if (m_mainWindow->currentTabWidget() == this)
|
if (m_mainWindow->currentTabWidget() == this)
|
||||||
BitTorrent::Session::instance()->decreaseTorrentsPriority(extractHashes(getSelectedTorrents()));
|
BitTorrent::Session::instance()->decreaseTorrentsQueuePos(extractHashes(getSelectedTorrents()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransferListWidget::topPrioSelectedTorrents()
|
void TransferListWidget::topQueuePosSelectedTorrents()
|
||||||
{
|
{
|
||||||
if (m_mainWindow->currentTabWidget() == this)
|
if (m_mainWindow->currentTabWidget() == this)
|
||||||
BitTorrent::Session::instance()->topTorrentsPriority(extractHashes(getSelectedTorrents()));
|
BitTorrent::Session::instance()->topTorrentsQueuePos(extractHashes(getSelectedTorrents()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransferListWidget::bottomPrioSelectedTorrents()
|
void TransferListWidget::bottomQueuePosSelectedTorrents()
|
||||||
{
|
{
|
||||||
if (m_mainWindow->currentTabWidget() == this)
|
if (m_mainWindow->currentTabWidget() == this)
|
||||||
BitTorrent::Session::instance()->bottomTorrentsPriority(extractHashes(getSelectedTorrents()));
|
BitTorrent::Session::instance()->bottomTorrentsQueuePos(extractHashes(getSelectedTorrents()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransferListWidget::copySelectedMagnetURIs() const
|
void TransferListWidget::copySelectedMagnetURIs() const
|
||||||
@ -451,12 +451,11 @@ void TransferListWidget::copySelectedHashes() const
|
|||||||
qApp->clipboard()->setText(torrentHashes.join('\n'));
|
qApp->clipboard()->setText(torrentHashes.join('\n'));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransferListWidget::hidePriorityColumn(bool hide)
|
void TransferListWidget::hideQueuePosColumn(bool hide)
|
||||||
{
|
{
|
||||||
qDebug("hidePriorityColumn(%d)", hide);
|
setColumnHidden(TransferListModel::TR_QUEUE_POSITION, hide);
|
||||||
setColumnHidden(TransferListModel::TR_PRIORITY, hide);
|
if (!hide && (columnWidth(TransferListModel::TR_QUEUE_POSITION) == 0))
|
||||||
if (!hide && !columnWidth(TransferListModel::TR_PRIORITY))
|
resizeColumnToContents(TransferListModel::TR_QUEUE_POSITION);
|
||||||
resizeColumnToContents(TransferListModel::TR_PRIORITY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransferListWidget::openSelectedTorrentsFolder() const
|
void TransferListWidget::openSelectedTorrentsFolder() const
|
||||||
@ -613,7 +612,7 @@ void TransferListWidget::displayDLHoSMenu(const QPoint&)
|
|||||||
menu->setTitle(tr("Column visibility"));
|
menu->setTitle(tr("Column visibility"));
|
||||||
|
|
||||||
for (int i = 0; i < m_listModel->columnCount(); ++i) {
|
for (int i = 0; i < m_listModel->columnCount(); ++i) {
|
||||||
if (!BitTorrent::Session::instance()->isQueueingSystemEnabled() && (i == TransferListModel::TR_PRIORITY))
|
if (!BitTorrent::Session::instance()->isQueueingSystemEnabled() && (i == TransferListModel::TR_QUEUE_POSITION))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
QAction *myAct = menu->addAction(m_listModel->headerData(i, Qt::Horizontal, Qt::DisplayRole).toString());
|
QAction *myAct = menu->addAction(m_listModel->headerData(i, Qt::Horizontal, Qt::DisplayRole).toString());
|
||||||
@ -831,14 +830,14 @@ void TransferListWidget::displayListMenu(const QPoint &)
|
|||||||
connect(actionSetDownloadLimit, &QAction::triggered, this, &TransferListWidget::setDlLimitSelectedTorrents);
|
connect(actionSetDownloadLimit, &QAction::triggered, this, &TransferListWidget::setDlLimitSelectedTorrents);
|
||||||
auto *actionOpenDestinationFolder = new QAction(GuiIconProvider::instance()->getIcon("inode-directory"), tr("Open destination folder"), listMenu);
|
auto *actionOpenDestinationFolder = new QAction(GuiIconProvider::instance()->getIcon("inode-directory"), tr("Open destination folder"), listMenu);
|
||||||
connect(actionOpenDestinationFolder, &QAction::triggered, this, &TransferListWidget::openSelectedTorrentsFolder);
|
connect(actionOpenDestinationFolder, &QAction::triggered, this, &TransferListWidget::openSelectedTorrentsFolder);
|
||||||
auto *actionIncreasePriority = new QAction(GuiIconProvider::instance()->getIcon("go-up"), tr("Move up", "i.e. move up in the queue"), listMenu);
|
auto *actionIncreaseQueuePos = new QAction(GuiIconProvider::instance()->getIcon("go-up"), tr("Move up", "i.e. move up in the queue"), listMenu);
|
||||||
connect(actionIncreasePriority, &QAction::triggered, this, &TransferListWidget::increasePrioSelectedTorrents);
|
connect(actionIncreaseQueuePos, &QAction::triggered, this, &TransferListWidget::increaseQueuePosSelectedTorrents);
|
||||||
auto *actionDecreasePriority = new QAction(GuiIconProvider::instance()->getIcon("go-down"), tr("Move down", "i.e. Move down in the queue"), listMenu);
|
auto *actionDecreaseQueuePos = new QAction(GuiIconProvider::instance()->getIcon("go-down"), tr("Move down", "i.e. Move down in the queue"), listMenu);
|
||||||
connect(actionDecreasePriority, &QAction::triggered, this, &TransferListWidget::decreasePrioSelectedTorrents);
|
connect(actionDecreaseQueuePos, &QAction::triggered, this, &TransferListWidget::decreaseQueuePosSelectedTorrents);
|
||||||
auto *actionTopPriority = new QAction(GuiIconProvider::instance()->getIcon("go-top"), tr("Move to top", "i.e. Move to top of the queue"), listMenu);
|
auto *actionTopQueuePos = new QAction(GuiIconProvider::instance()->getIcon("go-top"), tr("Move to top", "i.e. Move to top of the queue"), listMenu);
|
||||||
connect(actionTopPriority, &QAction::triggered, this, &TransferListWidget::topPrioSelectedTorrents);
|
connect(actionTopQueuePos, &QAction::triggered, this, &TransferListWidget::topQueuePosSelectedTorrents);
|
||||||
auto *actionBottomPriority = new QAction(GuiIconProvider::instance()->getIcon("go-bottom"), tr("Move to bottom", "i.e. Move to bottom of the queue"), listMenu);
|
auto *actionBottomQueuePos = new QAction(GuiIconProvider::instance()->getIcon("go-bottom"), tr("Move to bottom", "i.e. Move to bottom of the queue"), listMenu);
|
||||||
connect(actionBottomPriority, &QAction::triggered, this, &TransferListWidget::bottomPrioSelectedTorrents);
|
connect(actionBottomQueuePos, &QAction::triggered, this, &TransferListWidget::bottomQueuePosSelectedTorrents);
|
||||||
auto *actionSetTorrentPath = new QAction(GuiIconProvider::instance()->getIcon("inode-directory"), tr("Set location..."), listMenu);
|
auto *actionSetTorrentPath = new QAction(GuiIconProvider::instance()->getIcon("inode-directory"), tr("Set location..."), listMenu);
|
||||||
connect(actionSetTorrentPath, &QAction::triggered, this, &TransferListWidget::setSelectedTorrentsLocation);
|
connect(actionSetTorrentPath, &QAction::triggered, this, &TransferListWidget::setSelectedTorrentsLocation);
|
||||||
auto *actionForceRecheck = new QAction(GuiIconProvider::instance()->getIcon("document-edit-verify"), tr("Force recheck"), listMenu);
|
auto *actionForceRecheck = new QAction(GuiIconProvider::instance()->getIcon("document-edit-verify"), tr("Force recheck"), listMenu);
|
||||||
@ -1075,11 +1074,11 @@ void TransferListWidget::displayListMenu(const QPoint &)
|
|||||||
listMenu->addAction(actionOpenDestinationFolder);
|
listMenu->addAction(actionOpenDestinationFolder);
|
||||||
if (BitTorrent::Session::instance()->isQueueingSystemEnabled() && oneNotSeed) {
|
if (BitTorrent::Session::instance()->isQueueingSystemEnabled() && oneNotSeed) {
|
||||||
listMenu->addSeparator();
|
listMenu->addSeparator();
|
||||||
QMenu *prioMenu = listMenu->addMenu(tr("Priority"));
|
QMenu *queueMenu = listMenu->addMenu(tr("Queue"));
|
||||||
prioMenu->addAction(actionTopPriority);
|
queueMenu->addAction(actionTopQueuePos);
|
||||||
prioMenu->addAction(actionIncreasePriority);
|
queueMenu->addAction(actionIncreaseQueuePos);
|
||||||
prioMenu->addAction(actionDecreasePriority);
|
queueMenu->addAction(actionDecreaseQueuePos);
|
||||||
prioMenu->addAction(actionBottomPriority);
|
queueMenu->addAction(actionBottomQueuePos);
|
||||||
}
|
}
|
||||||
|
|
||||||
QMenu *copySubMenu = listMenu->addMenu(
|
QMenu *copySubMenu = listMenu->addMenu(
|
||||||
|
@ -71,10 +71,10 @@ public slots:
|
|||||||
void permDeleteSelectedTorrents();
|
void permDeleteSelectedTorrents();
|
||||||
void deleteSelectedTorrents(bool deleteLocalFiles);
|
void deleteSelectedTorrents(bool deleteLocalFiles);
|
||||||
void deleteVisibleTorrents();
|
void deleteVisibleTorrents();
|
||||||
void increasePrioSelectedTorrents();
|
void increaseQueuePosSelectedTorrents();
|
||||||
void decreasePrioSelectedTorrents();
|
void decreaseQueuePosSelectedTorrents();
|
||||||
void topPrioSelectedTorrents();
|
void topQueuePosSelectedTorrents();
|
||||||
void bottomPrioSelectedTorrents();
|
void bottomQueuePosSelectedTorrents();
|
||||||
void copySelectedMagnetURIs() const;
|
void copySelectedMagnetURIs() const;
|
||||||
void copySelectedNames() const;
|
void copySelectedNames() const;
|
||||||
void copySelectedHashes() const;
|
void copySelectedHashes() const;
|
||||||
@ -85,7 +85,7 @@ public slots:
|
|||||||
void setUpLimitSelectedTorrents();
|
void setUpLimitSelectedTorrents();
|
||||||
void setMaxRatioSelectedTorrents();
|
void setMaxRatioSelectedTorrents();
|
||||||
void previewSelectedTorrents();
|
void previewSelectedTorrents();
|
||||||
void hidePriorityColumn(bool hide);
|
void hideQueuePosColumn(bool hide);
|
||||||
void displayDLHoSMenu(const QPoint&);
|
void displayDLHoSMenu(const QPoint&);
|
||||||
void applyNameFilter(const QString &name);
|
void applyNameFilter(const QString &name);
|
||||||
void applyStatusFilter(int f);
|
void applyStatusFilter(int f);
|
||||||
|
@ -90,7 +90,7 @@ QVariantMap serialize(const BitTorrent::TorrentHandle &torrent)
|
|||||||
ret[KEY_TORRENT_PROGRESS] = torrent.progress();
|
ret[KEY_TORRENT_PROGRESS] = torrent.progress();
|
||||||
ret[KEY_TORRENT_DLSPEED] = torrent.downloadPayloadRate();
|
ret[KEY_TORRENT_DLSPEED] = torrent.downloadPayloadRate();
|
||||||
ret[KEY_TORRENT_UPSPEED] = torrent.uploadPayloadRate();
|
ret[KEY_TORRENT_UPSPEED] = torrent.uploadPayloadRate();
|
||||||
ret[KEY_TORRENT_PRIORITY] = static_cast<int>(torrent.queuePosition());
|
ret[KEY_TORRENT_QUEUE_POSITION] = static_cast<int>(torrent.queuePosition());
|
||||||
ret[KEY_TORRENT_SEEDS] = torrent.seedsCount();
|
ret[KEY_TORRENT_SEEDS] = torrent.seedsCount();
|
||||||
ret[KEY_TORRENT_NUM_COMPLETE] = torrent.totalSeedsCount();
|
ret[KEY_TORRENT_NUM_COMPLETE] = torrent.totalSeedsCount();
|
||||||
ret[KEY_TORRENT_LEECHS] = torrent.leechsCount();
|
ret[KEY_TORRENT_LEECHS] = torrent.leechsCount();
|
||||||
|
@ -43,7 +43,7 @@ const char KEY_TORRENT_SIZE[] = "size";
|
|||||||
const char KEY_TORRENT_PROGRESS[] = "progress";
|
const char KEY_TORRENT_PROGRESS[] = "progress";
|
||||||
const char KEY_TORRENT_DLSPEED[] = "dlspeed";
|
const char KEY_TORRENT_DLSPEED[] = "dlspeed";
|
||||||
const char KEY_TORRENT_UPSPEED[] = "upspeed";
|
const char KEY_TORRENT_UPSPEED[] = "upspeed";
|
||||||
const char KEY_TORRENT_PRIORITY[] = "priority";
|
const char KEY_TORRENT_QUEUE_POSITION[] = "priority";
|
||||||
const char KEY_TORRENT_SEEDS[] = "num_seeds";
|
const char KEY_TORRENT_SEEDS[] = "num_seeds";
|
||||||
const char KEY_TORRENT_NUM_COMPLETE[] = "num_complete";
|
const char KEY_TORRENT_NUM_COMPLETE[] = "num_complete";
|
||||||
const char KEY_TORRENT_LEECHS[] = "num_leechs";
|
const char KEY_TORRENT_LEECHS[] = "num_leechs";
|
||||||
|
@ -362,7 +362,7 @@ SyncController::~SyncController()
|
|||||||
// - "progress": Torrent progress
|
// - "progress": Torrent progress
|
||||||
// - "dlspeed": Torrent download speed
|
// - "dlspeed": Torrent download speed
|
||||||
// - "upspeed": Torrent upload speed
|
// - "upspeed": Torrent upload speed
|
||||||
// - "priority": Torrent priority (-1 if queuing is disabled)
|
// - "priority": Torrent queue position (-1 if queuing is disabled)
|
||||||
// - "num_seeds": Torrent seeds connected to
|
// - "num_seeds": Torrent seeds connected to
|
||||||
// - "num_complete": Torrent seeds in the swarm
|
// - "num_complete": Torrent seeds in the swarm
|
||||||
// - "num_leechs": Torrent leechers connected to
|
// - "num_leechs": Torrent leechers connected to
|
||||||
@ -399,7 +399,7 @@ SyncController::~SyncController()
|
|||||||
// - "up_info_data: bytes uploaded
|
// - "up_info_data: bytes uploaded
|
||||||
// - "up_info_speed: upload speed
|
// - "up_info_speed: upload speed
|
||||||
// - "up_rate_limit: upload speed limit
|
// - "up_rate_limit: upload speed limit
|
||||||
// - "queueing": priority system usage flag
|
// - "queueing": queue system usage flag
|
||||||
// - "refresh_interval": torrents table refresh interval
|
// - "refresh_interval": torrents table refresh interval
|
||||||
// - "free_space_on_disk": Free space on the default save path
|
// - "free_space_on_disk": Free space on the default save path
|
||||||
// GET param:
|
// GET param:
|
||||||
|
@ -207,7 +207,7 @@ namespace
|
|||||||
// - "progress": Torrent progress
|
// - "progress": Torrent progress
|
||||||
// - "dlspeed": Torrent download speed
|
// - "dlspeed": Torrent download speed
|
||||||
// - "upspeed": Torrent upload speed
|
// - "upspeed": Torrent upload speed
|
||||||
// - "priority": Torrent priority (-1 if queuing is disabled)
|
// - "priority": Torrent queue position (-1 if queuing is disabled)
|
||||||
// - "num_seeds": Torrent seeds connected to
|
// - "num_seeds": Torrent seeds connected to
|
||||||
// - "num_complete": Torrent seeds in the swarm
|
// - "num_complete": Torrent seeds in the swarm
|
||||||
// - "num_leechs": Torrent leechers connected to
|
// - "num_leechs": Torrent leechers connected to
|
||||||
@ -864,7 +864,7 @@ void TorrentsController::increasePrioAction()
|
|||||||
throw APIError(APIErrorType::Conflict, tr("Torrent queueing must be enabled"));
|
throw APIError(APIErrorType::Conflict, tr("Torrent queueing must be enabled"));
|
||||||
|
|
||||||
const QStringList hashes {params()["hashes"].split('|')};
|
const QStringList hashes {params()["hashes"].split('|')};
|
||||||
BitTorrent::Session::instance()->increaseTorrentsPriority(hashes);
|
BitTorrent::Session::instance()->increaseTorrentsQueuePos(hashes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TorrentsController::decreasePrioAction()
|
void TorrentsController::decreasePrioAction()
|
||||||
@ -875,7 +875,7 @@ void TorrentsController::decreasePrioAction()
|
|||||||
throw APIError(APIErrorType::Conflict, tr("Torrent queueing must be enabled"));
|
throw APIError(APIErrorType::Conflict, tr("Torrent queueing must be enabled"));
|
||||||
|
|
||||||
const QStringList hashes {params()["hashes"].split('|')};
|
const QStringList hashes {params()["hashes"].split('|')};
|
||||||
BitTorrent::Session::instance()->decreaseTorrentsPriority(hashes);
|
BitTorrent::Session::instance()->decreaseTorrentsQueuePos(hashes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TorrentsController::topPrioAction()
|
void TorrentsController::topPrioAction()
|
||||||
@ -886,7 +886,7 @@ void TorrentsController::topPrioAction()
|
|||||||
throw APIError(APIErrorType::Conflict, tr("Torrent queueing must be enabled"));
|
throw APIError(APIErrorType::Conflict, tr("Torrent queueing must be enabled"));
|
||||||
|
|
||||||
const QStringList hashes {params()["hashes"].split('|')};
|
const QStringList hashes {params()["hashes"].split('|')};
|
||||||
BitTorrent::Session::instance()->topTorrentsPriority(hashes);
|
BitTorrent::Session::instance()->topTorrentsQueuePos(hashes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TorrentsController::bottomPrioAction()
|
void TorrentsController::bottomPrioAction()
|
||||||
@ -897,7 +897,7 @@ void TorrentsController::bottomPrioAction()
|
|||||||
throw APIError(APIErrorType::Conflict, tr("Torrent queueing must be enabled"));
|
throw APIError(APIErrorType::Conflict, tr("Torrent queueing must be enabled"));
|
||||||
|
|
||||||
const QStringList hashes {params()["hashes"].split('|')};
|
const QStringList hashes {params()["hashes"].split('|')};
|
||||||
BitTorrent::Session::instance()->bottomTorrentsPriority(hashes);
|
BitTorrent::Session::instance()->bottomTorrentsQueuePos(hashes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TorrentsController::setLocationAction()
|
void TorrentsController::setLocationAction()
|
||||||
|
@ -29,25 +29,25 @@
|
|||||||
targets: '.categoriesFilterContextMenuTarget',
|
targets: '.categoriesFilterContextMenuTarget',
|
||||||
menu: 'categoriesFilterMenu',
|
menu: 'categoriesFilterMenu',
|
||||||
actions: {
|
actions: {
|
||||||
CreateCategory: function(element, ref) {
|
createCategory: function(element, ref) {
|
||||||
createCategoryFN();
|
createCategoryFN();
|
||||||
},
|
},
|
||||||
EditCategory: function(element, ref) {
|
editCategory: function(element, ref) {
|
||||||
editCategoryFN(element.id);
|
editCategoryFN(element.id);
|
||||||
},
|
},
|
||||||
DeleteCategory: function(element, ref) {
|
deleteCategory: function(element, ref) {
|
||||||
removeCategoryFN(element.id);
|
removeCategoryFN(element.id);
|
||||||
},
|
},
|
||||||
DeleteUnusedCategories: function(element, ref) {
|
deleteUnusedCategories: function(element, ref) {
|
||||||
deleteUnusedCategoriesFN();
|
deleteUnusedCategoriesFN();
|
||||||
},
|
},
|
||||||
StartTorrentsByCategory: function(element, ref) {
|
startTorrentsByCategory: function(element, ref) {
|
||||||
startTorrentsByCategoryFN(element.id);
|
startTorrentsByCategoryFN(element.id);
|
||||||
},
|
},
|
||||||
PauseTorrentsByCategory: function(element, ref) {
|
pauseTorrentsByCategory: function(element, ref) {
|
||||||
pauseTorrentsByCategoryFN(element.id);
|
pauseTorrentsByCategoryFN(element.id);
|
||||||
},
|
},
|
||||||
DeleteTorrentsByCategory: function(element, ref) {
|
deleteTorrentsByCategory: function(element, ref) {
|
||||||
deleteTorrentsByCategoryFN(element.id);
|
deleteTorrentsByCategoryFN(element.id);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -56,10 +56,10 @@
|
|||||||
<li class="divider"><a id="resumeLink"><img class="MyMenuIcon" alt="QBT_TR(Resume)QBT_TR[CONTEXT=MainWindow]" src="images/qbt-theme/media-playback-start.svg" width="16" height="16"/>QBT_TR(Resume)QBT_TR[CONTEXT=MainWindow]</a></li>
|
<li class="divider"><a id="resumeLink"><img class="MyMenuIcon" alt="QBT_TR(Resume)QBT_TR[CONTEXT=MainWindow]" src="images/qbt-theme/media-playback-start.svg" width="16" height="16"/>QBT_TR(Resume)QBT_TR[CONTEXT=MainWindow]</a></li>
|
||||||
<li><a id="pauseLink"><img class="MyMenuIcon" src="images/qbt-theme/media-playback-pause.svg" alt="QBT_TR(Pause)QBT_TR[CONTEXT=MainWindow]" width="16" height="16"/>QBT_TR(Pause)QBT_TR[CONTEXT=MainWindow]</a></li>
|
<li><a id="pauseLink"><img class="MyMenuIcon" src="images/qbt-theme/media-playback-pause.svg" alt="QBT_TR(Pause)QBT_TR[CONTEXT=MainWindow]" width="16" height="16"/>QBT_TR(Pause)QBT_TR[CONTEXT=MainWindow]</a></li>
|
||||||
<li class="divider"><a id="deleteLink"><img class="MyMenuIcon" src="images/qbt-theme/list-remove.svg" alt="QBT_TR(Delete)QBT_TR[CONTEXT=MainWindow]" width="16" height="16"/>QBT_TR(Delete)QBT_TR[CONTEXT=MainWindow]</a></li>
|
<li class="divider"><a id="deleteLink"><img class="MyMenuIcon" src="images/qbt-theme/list-remove.svg" alt="QBT_TR(Delete)QBT_TR[CONTEXT=MainWindow]" width="16" height="16"/>QBT_TR(Delete)QBT_TR[CONTEXT=MainWindow]</a></li>
|
||||||
<li id="topPrioItem" class="divider"><a id="topPrioLink"><img class="MyMenuIcon" src="images/qbt-theme/go-top.svg" alt="QBT_TR(Top Priority)QBT_TR[CONTEXT=MainWindow]" width="16" height="16"/>QBT_TR(Top Priority)QBT_TR[CONTEXT=MainWindow]</a></li>
|
<li id="topQueuePosItem" class="divider"><a id="topPrioLink"><img class="MyMenuIcon" src="images/qbt-theme/go-top.svg" alt="QBT_TR(Top of Queue)QBT_TR[CONTEXT=MainWindow]" width="16" height="16"/>QBT_TR(Top of Queue)QBT_TR[CONTEXT=MainWindow]</a></li>
|
||||||
<li id="increasePrioItem"><a id="increasePrioLink"><img class="MyMenuIcon" src="images/qbt-theme/go-up.svg" alt="QBT_TR(Increase Priority)QBT_TR[CONTEXT=MainWindow]" width="16" height="16"/>QBT_TR(Increase Priority)QBT_TR[CONTEXT=MainWindow]</a></li>
|
<li id="increaseQueuePosItem"><a id="increasePrioLink"><img class="MyMenuIcon" src="images/qbt-theme/go-up.svg" alt="QBT_TR(Move Up Queue)QBT_TR[CONTEXT=MainWindow]" width="16" height="16"/>QBT_TR(Move Up Queue)QBT_TR[CONTEXT=MainWindow]</a></li>
|
||||||
<li id="decreasePrioItem"><a id="decreasePrioLink"><img class="MyMenuIcon" src="images/qbt-theme/go-down.svg" alt="QBT_TR(Decrease Priority)QBT_TR[CONTEXT=MainWindow]" width="16" height="16"/>QBT_TR(Decrease Priority)QBT_TR[CONTEXT=MainWindow]</a></li>
|
<li id="decreaseQueuePosItem"><a id="decreasePrioLink"><img class="MyMenuIcon" src="images/qbt-theme/go-down.svg" alt="QBT_TR(Move Down Queue)QBT_TR[CONTEXT=MainWindow]" width="16" height="16"/>QBT_TRMove Down Queue)QBT_TR[CONTEXT=MainWindow]</a></li>
|
||||||
<li id="bottomPrioItem"><a id="bottomPrioLink"><img class="MyMenuIcon" src="images/qbt-theme/go-bottom.svg" alt="QBT_TR(Minimum Priority)QBT_TR[CONTEXT=MainWindow]" width="16" height="16"/>QBT_TR(Minimum Priority)QBT_TR[CONTEXT=MainWindow]</a></li>
|
<li id="bottomQueuePosItem"><a id="bottomPrioLink"><img class="MyMenuIcon" src="images/qbt-theme/go-bottom.svg" alt="QBT_TR(Bottom of Queue)QBT_TR[CONTEXT=MainWindow]" width="16" height="16"/>QBT_TR(Bottom of Queue)QBT_TR[CONTEXT=MainWindow]</a></li>
|
||||||
<li class="divider"><a id="recheckLink"><img class="MyMenuIcon" src="images/qbt-theme/document-edit-verify.svg" alt="QBT_TR(Force Recheck)QBT_TR[CONTEXT=TransferListWidget]" width="16" height="16"/>QBT_TR(Force recheck)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li class="divider"><a id="recheckLink"><img class="MyMenuIcon" src="images/qbt-theme/document-edit-verify.svg" alt="QBT_TR(Force Recheck)QBT_TR[CONTEXT=TransferListWidget]" width="16" height="16"/>QBT_TR(Force recheck)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@ -97,10 +97,10 @@
|
|||||||
<a id="resumeButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Resume)QBT_TR[CONTEXT=TransferListWidget]" src="images/qbt-theme/media-playback-start.svg" alt="QBT_TR(Resume)QBT_TR[CONTEXT=TransferListWidget]" width="24" height="24"/></a>
|
<a id="resumeButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Resume)QBT_TR[CONTEXT=TransferListWidget]" src="images/qbt-theme/media-playback-start.svg" alt="QBT_TR(Resume)QBT_TR[CONTEXT=TransferListWidget]" width="24" height="24"/></a>
|
||||||
<a id="pauseButton"><img class="mochaToolButton" title="QBT_TR(Pause)QBT_TR[CONTEXT=TransferListWidget]" src="images/qbt-theme/media-playback-pause.svg" alt="QBT_TR(Pause)QBT_TR[CONTEXT=TransferListWidget]" width="24" height="24"/></a>
|
<a id="pauseButton"><img class="mochaToolButton" title="QBT_TR(Pause)QBT_TR[CONTEXT=TransferListWidget]" src="images/qbt-theme/media-playback-pause.svg" alt="QBT_TR(Pause)QBT_TR[CONTEXT=TransferListWidget]" width="24" height="24"/></a>
|
||||||
<span id="queueingButtons">
|
<span id="queueingButtons">
|
||||||
<a id="topPrioButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Top Priority)QBT_TR[CONTEXT=MainWindow]" src="images/qbt-theme/go-top.svg" alt="QBT_TR(Top Priority)QBT_TR[CONTEXT=MainWindow]" width="24" height="24"/></a>
|
<a id="topPrioButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Move to the top of the queue)QBT_TR[CONTEXT=MainWindow]" src="images/qbt-theme/go-top.svg" alt="QBT_TR(Top of Queue)QBT_TR[CONTEXT=MainWindow]" width="24" height="24"/></a>
|
||||||
<a id="increasePrioButton"><img class="mochaToolButton" title="QBT_TR(Increase Priority)QBT_TR[CONTEXT=MainWindow]" src="images/qbt-theme/go-up.svg" alt="QBT_TR(Increase Priority)QBT_TR[CONTEXT=MainWindow]" width="24" height="24"/></a>
|
<a id="increasePrioButton"><img class="mochaToolButton" title="QBT_TR(Move up in the queue)QBT_TR[CONTEXT=MainWindow]" src="images/qbt-theme/go-up.svg" alt="QBT_TR(Move Up Queue)QBT_TR[CONTEXT=MainWindow]" width="24" height="24"/></a>
|
||||||
<a id="decreasePrioButton"><img class="mochaToolButton" title="QBT_TR(Decrease Priority)QBT_TR[CONTEXT=MainWindow]" src="images/qbt-theme/go-down.svg" alt="QBT_TR(Decrease Priority)QBT_TR[CONTEXT=MainWindow]" width="24" height="24"/></a>
|
<a id="decreasePrioButton"><img class="mochaToolButton" title="QBT_TR(Move down in the queue)QBT_TR[CONTEXT=MainWindow]" src="images/qbt-theme/go-down.svg" alt="QBT_TR(Move Down Queue)QBT_TR[CONTEXT=MainWindow]" width="24" height="24"/></a>
|
||||||
<a id="bottomPrioButton"><img class="mochaToolButton" title="QBT_TR(Minimum Priority)QBT_TR[CONTEXT=MainWindow]" src="images/qbt-theme/go-bottom.svg" alt="QBT_TR(Minimum Priority)QBT_TR[CONTEXT=MainWindow]" width="24" height="24"/></a>
|
<a id="bottomPrioButton"><img class="mochaToolButton" title="QBT_TR(Move to the bottom of the queue)QBT_TR[CONTEXT=MainWindow]" src="images/qbt-theme/go-bottom.svg" alt="QBT_TR(Bottom of Queue)QBT_TR[CONTEXT=MainWindow]" width="24" height="24"/></a>
|
||||||
</span>
|
</span>
|
||||||
<a id="preferencesButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Options)QBT_TR[CONTEXT=OptionsDialog]" src="images/qbt-theme/configure.svg" alt="QBT_TR(Options)QBT_TR[CONTEXT=OptionsDialog]" width="24" height="24"/></a>
|
<a id="preferencesButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Options)QBT_TR[CONTEXT=OptionsDialog]" src="images/qbt-theme/configure.svg" alt="QBT_TR(Options)QBT_TR[CONTEXT=OptionsDialog]" width="24" height="24"/></a>
|
||||||
<div id="mainWindowTabs" class="toolbarTabs">
|
<div id="mainWindowTabs" class="toolbarTabs">
|
||||||
@ -119,50 +119,50 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ul id="torrentsTableMenu" class="contextMenu">
|
<ul id="torrentsTableMenu" class="contextMenu">
|
||||||
<li><a href="#Start"><img src="images/qbt-theme/media-playback-start.svg" alt="QBT_TR(Resume)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Resume)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li><a href="#start"><img src="images/qbt-theme/media-playback-start.svg" alt="QBT_TR(Resume)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Resume)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li><a href="#Pause"><img src="images/qbt-theme/media-playback-pause.svg" alt="QBT_TR(Pause)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Pause)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li><a href="#pause"><img src="images/qbt-theme/media-playback-pause.svg" alt="QBT_TR(Pause)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Pause)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li><a href="#ForceStart"><img src="images/qbt-theme/media-seek-forward.svg" alt="QBT_TR(Force Resume)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Force Resume)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li><a href="#forceStart"><img src="images/qbt-theme/media-seek-forward.svg" alt="QBT_TR(Force Resume)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Force Resume)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li class="separator"><a href="#Delete"><img src="images/qbt-theme/list-remove.svg" alt="QBT_TR(Delete)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Delete)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li class="separator"><a href="#delete"><img src="images/qbt-theme/list-remove.svg" alt="QBT_TR(Delete)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Delete)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li class="separator">
|
<li class="separator">
|
||||||
<a href="#SetLocation"><img src="images/qbt-theme/inode-directory.svg" alt="QBT_TR(Set location...)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Set location...)QBT_TR[CONTEXT=TransferListWidget]</a>
|
<a href="#setLocation"><img src="images/qbt-theme/inode-directory.svg" alt="QBT_TR(Set location...)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Set location...)QBT_TR[CONTEXT=TransferListWidget]</a>
|
||||||
<a href="#Rename"><img src="images/qbt-theme/edit-rename.svg" alt="QBT_TR(Rename...)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Rename...)QBT_TR[CONTEXT=TransferListWidget]</a>
|
<a href="#rename"><img src="images/qbt-theme/edit-rename.svg" alt="QBT_TR(Rename...)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Rename...)QBT_TR[CONTEXT=TransferListWidget]</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#Category" class="arrow-right"><img src="images/qbt-theme/view-categories.svg" alt="QBT_TR(Category)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Category)QBT_TR[CONTEXT=TransferListWidget]</a>
|
<a href="#Category" class="arrow-right"><img src="images/qbt-theme/view-categories.svg" alt="QBT_TR(Category)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Category)QBT_TR[CONTEXT=TransferListWidget]</a>
|
||||||
<ul id="contextCategoryList" class="scrollableMenu"></ul>
|
<ul id="contextCategoryList" class="scrollableMenu"></ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#AutoTorrentManagement"><img src="images/qbt-theme/checked.svg" alt="QBT_TR(Automatic Torrent Management)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Automatic Torrent Management)QBT_TR[CONTEXT=TransferListWidget]</a>
|
<a href="#autoTorrentManagement"><img src="images/qbt-theme/checked.svg" alt="QBT_TR(Automatic Torrent Management)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Automatic Torrent Management)QBT_TR[CONTEXT=TransferListWidget]</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="separator"><a href="#DownloadLimit"><img src="images/qbt-theme/kt-set-max-download-speed.svg" alt="QBT_TR(Limit download rate...)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Limit download rate...)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li class="separator"><a href="#downloadLimit"><img src="images/qbt-theme/kt-set-max-download-speed.svg" alt="QBT_TR(Limit download rate...)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Limit download rate...)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li><a href="#UploadLimit"><img src="images/qbt-theme/kt-set-max-upload-speed.svg" alt="QBT_TR(Limit upload rate...)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Limit upload rate...)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li><a href="#uploadLimit"><img src="images/qbt-theme/kt-set-max-upload-speed.svg" alt="QBT_TR(Limit upload rate...)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Limit upload rate...)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li><a href="#ShareRatio"><img src="images/skin/ratio.svg" alt="QBT_TR(Limit share ratio...)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Limit share ratio...)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li><a href="#shareRatio"><img src="images/skin/ratio.svg" alt="QBT_TR(Limit share ratio...)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Limit share ratio...)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li><a href="#SuperSeeding"><img src="images/qbt-theme/checked.svg" alt="QBT_TR(Super seeding mode)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Super seeding mode)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li><a href="#superSeeding"><img src="images/qbt-theme/checked.svg" alt="QBT_TR(Super seeding mode)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Super seeding mode)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li class="separator"><a href="#SequentialDownload"><img src="images/qbt-theme/checked.svg" alt="QBT_TR(Download in sequential order)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Download in sequential order)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li class="separator"><a href="#sequentialDownload"><img src="images/qbt-theme/checked.svg" alt="QBT_TR(Download in sequential order)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Download in sequential order)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li><a href="#FirstLastPiecePrio"><img src="images/qbt-theme/checked.svg" alt="QBT_TR(Download first and last pieces first)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Download first and last pieces first)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li><a href="#firstLastPiecePrio"><img src="images/qbt-theme/checked.svg" alt="QBT_TR(Download first and last pieces first)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Download first and last pieces first)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li class="separator"><a href="#ForceRecheck"><img src="images/qbt-theme/document-edit-verify.svg" alt="QBT_TR(Force recheck)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Force recheck)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li class="separator"><a href="#forceRecheck"><img src="images/qbt-theme/document-edit-verify.svg" alt="QBT_TR(Force recheck)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Force recheck)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li><a href="#ForceReannounce"><img src="images/qbt-theme/document-edit-verify.svg" alt="QBT_TR(Force reannounce)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Force reannounce)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li><a href="#forceReannounce"><img src="images/qbt-theme/document-edit-verify.svg" alt="QBT_TR(Force reannounce)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Force reannounce)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li id="queueingMenuItems" class="separator">
|
<li id="queueingMenuItems" class="separator">
|
||||||
<a href="#priority" class="arrow-right"><span style="display: inline-block; width:16px"></span> QBT_TR(Priority)QBT_TR[CONTEXT=TransferListWidget]</a>
|
<a href="#queue" class="arrow-right"><span style="display: inline-block; width:16px"></span> QBT_TR(Queue)QBT_TR[CONTEXT=TransferListWidget]</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#prioTop"><img src="images/qbt-theme/go-top.svg" alt="QBT_TR(Move to top)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Move to top)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li><a href="#queueTop"><img src="images/qbt-theme/go-top.svg" alt="QBT_TR(Move to top)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Move to top)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li><a href="#prioUp"><img src="images/qbt-theme/go-up.svg" alt="QBT_TR(Move up)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Move up)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li><a href="#queueUp"><img src="images/qbt-theme/go-up.svg" alt="QBT_TR(Move up)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Move up)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li><a href="#prioDown"><img src="images/qbt-theme/go-down.svg" alt="QBT_TR(Move down)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Move down)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li><a href="#queueDown"><img src="images/qbt-theme/go-down.svg" alt="QBT_TR(Move down)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Move down)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li><a href="#prioBottom"><img src="images/qbt-theme/go-bottom.svg" alt="QBT_TR(Move to bottom)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Move to bottom)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li><a href="#queueBottom"><img src="images/qbt-theme/go-bottom.svg" alt="QBT_TR(Move to bottom)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Move to bottom)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="separator"><a href="#" id="CopyName" class="copyToClipboard"><img src="images/qbt-theme/edit-copy.svg" alt="QBT_TR(Copy name)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Copy name)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li class="separator"><a href="#" id="copyName" class="copyToClipboard"><img src="images/qbt-theme/edit-copy.svg" alt="QBT_TR(Copy name)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Copy name)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li><a href="#" id="CopyHash" class="copyToClipboard"><img src="images/qbt-theme/edit-copy.svg" alt="QBT_TR(Copy hash)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Copy hash)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li><a href="#" id="copyHash" class="copyToClipboard"><img src="images/qbt-theme/edit-copy.svg" alt="QBT_TR(Copy hash)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Copy hash)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
<li><a href="#" id="CopyMagnetLink" class="copyToClipboard"><img src="images/qbt-theme/kt-magnet.svg" alt="QBT_TR(Copy magnet link)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Copy magnet link)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
<li><a href="#" id="copyMagnetLink" class="copyToClipboard"><img src="images/qbt-theme/kt-magnet.svg" alt="QBT_TR(Copy magnet link)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Copy magnet link)QBT_TR[CONTEXT=TransferListWidget]</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul id="categoriesFilterMenu" class="contextMenu">
|
<ul id="categoriesFilterMenu" class="contextMenu">
|
||||||
<li><a href="#CreateCategory"><img src="images/qbt-theme/list-add.svg" alt="QBT_TR(Add category...)QBT_TR[CONTEXT=CategoryFilterWidget]"/> QBT_TR(Add category...)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
|
<li><a href="#createCategory"><img src="images/qbt-theme/list-add.svg" alt="QBT_TR(Add category...)QBT_TR[CONTEXT=CategoryFilterWidget]"/> QBT_TR(Add category...)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
|
||||||
<li><a href="#EditCategory"><img src="images/qbt-theme/document-edit.svg" alt="QBT_TR(Edit category...)QBT_TR[CONTEXT=CategoryFilterWidget]"/> QBT_TR(Edit category...)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
|
<li><a href="#editCategory"><img src="images/qbt-theme/document-edit.svg" alt="QBT_TR(Edit category...)QBT_TR[CONTEXT=CategoryFilterWidget]"/> QBT_TR(Edit category...)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
|
||||||
<li><a href="#DeleteCategory"><img src="images/qbt-theme/list-remove.svg" alt="QBT_TR(Remove category)QBT_TR[CONTEXT=CategoryFilterWidget]"/> QBT_TR(Remove category)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
|
<li><a href="#deleteCategory"><img src="images/qbt-theme/list-remove.svg" alt="QBT_TR(Remove category)QBT_TR[CONTEXT=CategoryFilterWidget]"/> QBT_TR(Remove category)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
|
||||||
<li><a href="#DeleteUnusedCategories"><img src="images/qbt-theme/list-remove.svg" alt="QBT_TR(Remove unused categories)QBT_TR[CONTEXT=CategoryFilterWidget]"/> QBT_TR(Remove unused categories)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
|
<li><a href="#deleteUnusedCategories"><img src="images/qbt-theme/list-remove.svg" alt="QBT_TR(Remove unused categories)QBT_TR[CONTEXT=CategoryFilterWidget]"/> QBT_TR(Remove unused categories)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
|
||||||
<li class="separator"><a href="#StartTorrentsByCategory"><img src="images/qbt-theme/media-playback-start.svg" alt="QBT_TR(Resume torrents)QBT_TR[CONTEXT=CategoryFilterWidget]"/> QBT_TR(Resume torrents)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
|
<li class="separator"><a href="#startTorrentsByCategory"><img src="images/qbt-theme/media-playback-start.svg" alt="QBT_TR(Resume torrents)QBT_TR[CONTEXT=CategoryFilterWidget]"/> QBT_TR(Resume torrents)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
|
||||||
<li><a href="#PauseTorrentsByCategory"><img src="images/qbt-theme/media-playback-pause.svg" alt="QBT_TR(Pause torrents)QBT_TR[CONTEXT=CategoryFilterWidget]"/> QBT_TR(Pause torrents)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
|
<li><a href="#pauseTorrentsByCategory"><img src="images/qbt-theme/media-playback-pause.svg" alt="QBT_TR(Pause torrents)QBT_TR[CONTEXT=CategoryFilterWidget]"/> QBT_TR(Pause torrents)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
|
||||||
<li><a href="#DeleteTorrentsByCategory"><img src="images/qbt-theme/edit-delete.svg" alt="QBT_TR(Delete torrents)QBT_TR[CONTEXT=CategoryFilterWidget]"/> QBT_TR(Delete torrents)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
|
<li><a href="#deleteTorrentsByCategory"><img src="images/qbt-theme/edit-delete.svg" alt="QBT_TR(Delete torrents)QBT_TR[CONTEXT=CategoryFilterWidget]"/> QBT_TR(Delete torrents)QBT_TR[CONTEXT=CategoryFilterWidget]</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul id="torrentTrackersMenu" class="contextMenu">
|
<ul id="torrentTrackersMenu" class="contextMenu">
|
||||||
<li><a href="#AddTracker"><img src="images/qbt-theme/list-add.svg" alt="QBT_TR(Add a new tracker...)QBT_TR[CONTEXT=TrackerListWidget]"/> QBT_TR(Add a new tracker...)QBT_TR[CONTEXT=TrackerListWidget]</a></li>
|
<li><a href="#AddTracker"><img src="images/qbt-theme/list-add.svg" alt="QBT_TR(Add a new tracker...)QBT_TR[CONTEXT=TrackerListWidget]"/> QBT_TR(Add a new tracker...)QBT_TR[CONTEXT=TrackerListWidget]</a></li>
|
||||||
|
@ -509,18 +509,18 @@ window.addEvent('load', function() {
|
|||||||
torrentsTable.columns['priority'].force_hide = !queueing_enabled;
|
torrentsTable.columns['priority'].force_hide = !queueing_enabled;
|
||||||
torrentsTable.updateColumn('priority');
|
torrentsTable.updateColumn('priority');
|
||||||
if (queueing_enabled) {
|
if (queueing_enabled) {
|
||||||
$('topPrioItem').removeClass('invisible');
|
$('topQueuePosItem').removeClass('invisible');
|
||||||
$('increasePrioItem').removeClass('invisible');
|
$('increaseQueuePosItem').removeClass('invisible');
|
||||||
$('decreasePrioItem').removeClass('invisible');
|
$('decreaseQueuePosItem').removeClass('invisible');
|
||||||
$('bottomPrioItem').removeClass('invisible');
|
$('bottomQueuePosItem').removeClass('invisible');
|
||||||
$('queueingButtons').removeClass('invisible');
|
$('queueingButtons').removeClass('invisible');
|
||||||
$('queueingMenuItems').removeClass('invisible');
|
$('queueingMenuItems').removeClass('invisible');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('topPrioItem').addClass('invisible');
|
$('topQueuePosItem').addClass('invisible');
|
||||||
$('increasePrioItem').addClass('invisible');
|
$('increaseQueuePosItem').addClass('invisible');
|
||||||
$('decreasePrioItem').addClass('invisible');
|
$('decreaseQueuePosItem').addClass('invisible');
|
||||||
$('bottomPrioItem').addClass('invisible');
|
$('bottomQueuePosItem').addClass('invisible');
|
||||||
$('queueingButtons').addClass('invisible');
|
$('queueingButtons').addClass('invisible');
|
||||||
$('queueingMenuItems').addClass('invisible');
|
$('queueingMenuItems').addClass('invisible');
|
||||||
}
|
}
|
||||||
@ -854,11 +854,11 @@ function setupCopyEventHandler() {
|
|||||||
clipboardEvent = new ClipboardJS('.copyToClipboard', {
|
clipboardEvent = new ClipboardJS('.copyToClipboard', {
|
||||||
text: function(trigger) {
|
text: function(trigger) {
|
||||||
switch (trigger.id) {
|
switch (trigger.id) {
|
||||||
case "CopyName":
|
case "copyName":
|
||||||
return copyNameFN();
|
return copyNameFN();
|
||||||
case "CopyMagnetLink":
|
case "copyMagnetLink":
|
||||||
return copyMagnetLinkFN();
|
return copyMagnetLinkFN();
|
||||||
case "CopyHash":
|
case "copyHash":
|
||||||
return copyHashFN();
|
return copyHashFN();
|
||||||
case "copyDescriptionPageUrl":
|
case "copyDescriptionPageUrl":
|
||||||
return copySearchTorrentUrl();
|
return copySearchTorrentUrl();
|
||||||
|
@ -334,53 +334,53 @@ var TorrentsTableContextMenu = new Class({
|
|||||||
show_f_l_piece_prio = false;
|
show_f_l_piece_prio = false;
|
||||||
|
|
||||||
if (all_are_downloaded) {
|
if (all_are_downloaded) {
|
||||||
this.hideItem('DownloadLimit');
|
this.hideItem('downloadLimit');
|
||||||
this.menu.getElement('a[href$=UploadLimit]').parentNode.addClass('separator');
|
this.menu.getElement('a[href$=uploadLimit]').parentNode.addClass('separator');
|
||||||
this.hideItem('SequentialDownload');
|
this.hideItem('sequentialDownload');
|
||||||
this.hideItem('FirstLastPiecePrio');
|
this.hideItem('firstLastPiecePrio');
|
||||||
this.showItem('SuperSeeding');
|
this.showItem('superSeeding');
|
||||||
this.setItemChecked('SuperSeeding', all_are_super_seeding);
|
this.setItemChecked('superSeeding', all_are_super_seeding);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!show_seq_dl && show_f_l_piece_prio)
|
if (!show_seq_dl && show_f_l_piece_prio)
|
||||||
this.menu.getElement('a[href$=FirstLastPiecePrio]').parentNode.addClass('separator');
|
this.menu.getElement('a[href$=firstLastPiecePrio]').parentNode.addClass('separator');
|
||||||
else
|
else
|
||||||
this.menu.getElement('a[href$=FirstLastPiecePrio]').parentNode.removeClass('separator');
|
this.menu.getElement('a[href$=firstLastPiecePrio]').parentNode.removeClass('separator');
|
||||||
|
|
||||||
if (show_seq_dl)
|
if (show_seq_dl)
|
||||||
this.showItem('SequentialDownload');
|
this.showItem('sequentialDownload');
|
||||||
else
|
else
|
||||||
this.hideItem('SequentialDownload');
|
this.hideItem('sequentialDownload');
|
||||||
|
|
||||||
if (show_f_l_piece_prio)
|
if (show_f_l_piece_prio)
|
||||||
this.showItem('FirstLastPiecePrio');
|
this.showItem('firstLastPiecePrio');
|
||||||
else
|
else
|
||||||
this.hideItem('FirstLastPiecePrio');
|
this.hideItem('firstLastPiecePrio');
|
||||||
|
|
||||||
this.setItemChecked('SequentialDownload', all_are_seq_dl);
|
this.setItemChecked('sequentialDownload', all_are_seq_dl);
|
||||||
this.setItemChecked('FirstLastPiecePrio', all_are_f_l_piece_prio);
|
this.setItemChecked('firstLastPiecePrio', all_are_f_l_piece_prio);
|
||||||
|
|
||||||
this.showItem('DownloadLimit');
|
this.showItem('downloadLimit');
|
||||||
this.menu.getElement('a[href$=UploadLimit]').parentNode.removeClass('separator');
|
this.menu.getElement('a[href$=uploadLimit]').parentNode.removeClass('separator');
|
||||||
this.hideItem('SuperSeeding');
|
this.hideItem('superSeeding');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.showItem('Start');
|
this.showItem('start');
|
||||||
this.showItem('Pause');
|
this.showItem('pause');
|
||||||
this.showItem('ForceStart');
|
this.showItem('forceStart');
|
||||||
if (all_are_paused)
|
if (all_are_paused)
|
||||||
this.hideItem('Pause');
|
this.hideItem('pause');
|
||||||
else if (all_are_force_start)
|
else if (all_are_force_start)
|
||||||
this.hideItem('ForceStart');
|
this.hideItem('forceStart');
|
||||||
else if (!there_are_paused && !there_are_force_start)
|
else if (!there_are_paused && !there_are_force_start)
|
||||||
this.hideItem('Start');
|
this.hideItem('start');
|
||||||
|
|
||||||
if (!all_are_auto_tmm && there_are_auto_tmm) {
|
if (!all_are_auto_tmm && there_are_auto_tmm) {
|
||||||
this.hideItem('AutoTorrentManagement');
|
this.hideItem('autoTorrentManagement');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.showItem('AutoTorrentManagement');
|
this.showItem('autoTorrentManagement');
|
||||||
this.setItemChecked('AutoTorrentManagement', all_are_auto_tmm);
|
this.setItemChecked('autoTorrentManagement', all_are_auto_tmm);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -421,12 +421,12 @@ var CategoriesFilterContextMenu = new Class({
|
|||||||
updateMenuItems: function() {
|
updateMenuItems: function() {
|
||||||
var id = this.options.element.id;
|
var id = this.options.element.id;
|
||||||
if ((id != CATEGORIES_ALL) && (id != CATEGORIES_UNCATEGORIZED)) {
|
if ((id != CATEGORIES_ALL) && (id != CATEGORIES_UNCATEGORIZED)) {
|
||||||
this.showItem('EditCategory');
|
this.showItem('editCategory');
|
||||||
this.showItem('DeleteCategory');
|
this.showItem('deleteCategory');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.hideItem('EditCategory');
|
this.hideItem('editCategory');
|
||||||
this.hideItem('DeleteCategory');
|
this.hideItem('deleteCategory');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -959,10 +959,10 @@ var TorrentsTable = new Class({
|
|||||||
|
|
||||||
// priority
|
// priority
|
||||||
this.columns['priority'].updateTd = function(td, row) {
|
this.columns['priority'].updateTd = function(td, row) {
|
||||||
const priority = this.getRowValue(row);
|
const queuePos = this.getRowValue(row);
|
||||||
const formattedPriority = (priority < 1) ? '*' : priority;
|
const formattedQueuePos = (queuePos < 1) ? '*' : queuePos;
|
||||||
td.set('html', formattedPriority);
|
td.set('html', formattedQueuePos);
|
||||||
td.set('title', formattedPriority);
|
td.set('title', formattedQueuePos);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.columns['priority'].compareRows = function(row1, row2) {
|
this.columns['priority'].compareRows = function(row1, row2) {
|
||||||
|
@ -93,7 +93,7 @@ var deleteTorrentsByCategoryFN = function() {};
|
|||||||
var copyNameFN = function() {};
|
var copyNameFN = function() {};
|
||||||
var copyMagnetLinkFN = function() {};
|
var copyMagnetLinkFN = function() {};
|
||||||
var copyHashFN = function() {};
|
var copyHashFN = function() {};
|
||||||
var setPriorityFN = function() {};
|
var setQueuePositionFN = function() {};
|
||||||
|
|
||||||
var initializeWindows = function() {
|
var initializeWindows = function() {
|
||||||
saveWindowSize = function(windowId) {
|
saveWindowSize = function(windowId) {
|
||||||
@ -742,11 +742,11 @@ var initializeWindows = function() {
|
|||||||
['decreasePrio', 'increasePrio', 'topPrio', 'bottomPrio'].each(function(item) {
|
['decreasePrio', 'increasePrio', 'topPrio', 'bottomPrio'].each(function(item) {
|
||||||
addClickEvent(item, function(e) {
|
addClickEvent(item, function(e) {
|
||||||
new Event(e).stop();
|
new Event(e).stop();
|
||||||
setPriorityFN(item);
|
setQueuePositionFN(item);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
setPriorityFN = function(cmd) {
|
setQueuePositionFN = function(cmd) {
|
||||||
var hashes = torrentsTable.selectedRowsIds();
|
var hashes = torrentsTable.selectedRowsIds();
|
||||||
if (hashes.length) {
|
if (hashes.length) {
|
||||||
new Request({
|
new Request({
|
||||||
|
@ -23,69 +23,69 @@
|
|||||||
targets: '.torrentsTableContextMenuTarget',
|
targets: '.torrentsTableContextMenuTarget',
|
||||||
menu: 'torrentsTableMenu',
|
menu: 'torrentsTableMenu',
|
||||||
actions: {
|
actions: {
|
||||||
Start: function(element, ref) {
|
start: function(element, ref) {
|
||||||
startFN();
|
startFN();
|
||||||
},
|
},
|
||||||
Pause: function(element, ref) {
|
pause: function(element, ref) {
|
||||||
pauseFN();
|
pauseFN();
|
||||||
},
|
},
|
||||||
ForceStart: function(element, ref) {
|
forceStart: function(element, ref) {
|
||||||
setForceStartFN();
|
setForceStartFN();
|
||||||
},
|
},
|
||||||
|
|
||||||
Delete: function(element, ref) {
|
delete: function(element, ref) {
|
||||||
deleteFN();
|
deleteFN();
|
||||||
},
|
},
|
||||||
|
|
||||||
SetLocation: function(element, ref) {
|
setLocation: function(element, ref) {
|
||||||
setLocationFN();
|
setLocationFN();
|
||||||
},
|
},
|
||||||
|
|
||||||
Rename: function(element, ref) {
|
rename: function(element, ref) {
|
||||||
renameFN();
|
renameFN();
|
||||||
},
|
},
|
||||||
prioTop: function(element, ref) {
|
queueTop: function(element, ref) {
|
||||||
setPriorityFN('topPrio');
|
setQueuePositionFN('topPrio');
|
||||||
},
|
},
|
||||||
prioUp: function(element, ref) {
|
queueUp: function(element, ref) {
|
||||||
setPriorityFN('increasePrio');
|
setQueuePositionFN('increasePrio');
|
||||||
},
|
},
|
||||||
prioDown: function(element, ref) {
|
queueDown: function(element, ref) {
|
||||||
setPriorityFN('decreasePrio');
|
setQueuePositionFN('decreasePrio');
|
||||||
},
|
},
|
||||||
prioBottom: function(element, ref) {
|
queueBottom: function(element, ref) {
|
||||||
setPriorityFN('bottomPrio');
|
setQueuePositionFN('bottomPrio');
|
||||||
},
|
},
|
||||||
|
|
||||||
DownloadLimit: function(element, ref) {
|
downloadLimit: function(element, ref) {
|
||||||
downloadLimitFN();
|
downloadLimitFN();
|
||||||
},
|
},
|
||||||
UploadLimit: function(element, ref) {
|
uploadLimit: function(element, ref) {
|
||||||
uploadLimitFN();
|
uploadLimitFN();
|
||||||
},
|
},
|
||||||
ShareRatio: function(element, ref) {
|
shareRatio: function(element, ref) {
|
||||||
shareRatioFN();
|
shareRatioFN();
|
||||||
},
|
},
|
||||||
|
|
||||||
SequentialDownload: function(element, ref) {
|
sequentialDownload: function(element, ref) {
|
||||||
toggleSequentialDownloadFN();
|
toggleSequentialDownloadFN();
|
||||||
},
|
},
|
||||||
FirstLastPiecePrio: function(element, ref) {
|
firstLastPiecePrio: function(element, ref) {
|
||||||
toggleFirstLastPiecePrioFN();
|
toggleFirstLastPiecePrioFN();
|
||||||
},
|
},
|
||||||
|
|
||||||
AutoTorrentManagement: function(element, ref) {
|
autoTorrentManagement: function(element, ref) {
|
||||||
autoTorrentManagementFN();
|
autoTorrentManagementFN();
|
||||||
},
|
},
|
||||||
ForceRecheck: function(element, ref) {
|
forceRecheck: function(element, ref) {
|
||||||
recheckFN();
|
recheckFN();
|
||||||
},
|
},
|
||||||
ForceReannounce: function(element, ref) {
|
forceReannounce: function(element, ref) {
|
||||||
reannounceFN();
|
reannounceFN();
|
||||||
},
|
},
|
||||||
|
|
||||||
SuperSeeding: function(element, ref) {
|
superSeeding: function(element, ref) {
|
||||||
setSuperSeedingFN(!ref.getItemChecked('SuperSeeding'));
|
setSuperSeedingFN(!ref.getItemChecked('superSeeding'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
offsets: {
|
offsets: {
|
||||||
|
Loading…
Reference in New Issue
Block a user