mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-13 01:57:07 -07:00
Use of system icon theme can now be disabled
This commit is contained in:
parent
5dfca9c685
commit
83ff66e0b1
27 changed files with 329 additions and 151 deletions
|
@ -58,6 +58,7 @@
|
|||
#include "deletionconfirmationdlg.h"
|
||||
#include "propertieswidget.h"
|
||||
#include "qinisettings.h"
|
||||
#include "iconprovider.h"
|
||||
|
||||
using namespace libtorrent;
|
||||
|
||||
|
@ -617,31 +618,31 @@ void TransferListWidget::removeLabelFromRows(QString label) {
|
|||
|
||||
void TransferListWidget::displayListMenu(const QPoint&) {
|
||||
// Create actions
|
||||
QAction actionStart(misc::getIcon("media-playback-start"), tr("Resume", "Resume/start the torrent"), 0);
|
||||
QAction actionStart(IconProvider::instance()->getIcon("media-playback-start"), tr("Resume", "Resume/start the torrent"), 0);
|
||||
connect(&actionStart, SIGNAL(triggered()), this, SLOT(startSelectedTorrents()));
|
||||
QAction actionPause(misc::getIcon("media-playback-pause"), tr("Pause", "Pause the torrent"), 0);
|
||||
QAction actionPause(IconProvider::instance()->getIcon("media-playback-pause"), tr("Pause", "Pause the torrent"), 0);
|
||||
connect(&actionPause, SIGNAL(triggered()), this, SLOT(pauseSelectedTorrents()));
|
||||
QAction actionDelete(misc::getIcon("edit-delete"), tr("Delete", "Delete the torrent"), 0);
|
||||
QAction actionDelete(IconProvider::instance()->getIcon("edit-delete"), tr("Delete", "Delete the torrent"), 0);
|
||||
connect(&actionDelete, SIGNAL(triggered()), this, SLOT(deleteSelectedTorrents()));
|
||||
QAction actionPreview_file(misc::getIcon("view-preview"), tr("Preview file..."), 0);
|
||||
QAction actionPreview_file(IconProvider::instance()->getIcon("view-preview"), tr("Preview file..."), 0);
|
||||
connect(&actionPreview_file, SIGNAL(triggered()), this, SLOT(previewSelectedTorrents()));
|
||||
QAction actionSet_upload_limit(QIcon(QString::fromUtf8(":/Icons/skin/seeding.png")), tr("Limit upload rate..."), 0);
|
||||
connect(&actionSet_upload_limit, SIGNAL(triggered()), this, SLOT(setUpLimitSelectedTorrents()));
|
||||
QAction actionSet_download_limit(QIcon(QString::fromUtf8(":/Icons/skin/download.png")), tr("Limit download rate..."), 0);
|
||||
connect(&actionSet_download_limit, SIGNAL(triggered()), this, SLOT(setDlLimitSelectedTorrents()));
|
||||
QAction actionOpen_destination_folder(misc::getIcon("inode-directory"), tr("Open destination folder"), 0);
|
||||
QAction actionOpen_destination_folder(IconProvider::instance()->getIcon("inode-directory"), tr("Open destination folder"), 0);
|
||||
connect(&actionOpen_destination_folder, SIGNAL(triggered()), this, SLOT(openSelectedTorrentsFolder()));
|
||||
QAction actionIncreasePriority(misc::getIcon("go-up"), tr("Move up", "i.e. move up in the queue"), 0);
|
||||
QAction actionIncreasePriority(IconProvider::instance()->getIcon("go-up"), tr("Move up", "i.e. move up in the queue"), 0);
|
||||
connect(&actionIncreasePriority, SIGNAL(triggered()), this, SLOT(increasePrioSelectedTorrents()));
|
||||
QAction actionDecreasePriority(misc::getIcon("go-down"), tr("Move down", "i.e. Move down in the queue"), 0);
|
||||
QAction actionDecreasePriority(IconProvider::instance()->getIcon("go-down"), tr("Move down", "i.e. Move down in the queue"), 0);
|
||||
connect(&actionDecreasePriority, SIGNAL(triggered()), this, SLOT(decreasePrioSelectedTorrents()));
|
||||
QAction actionTopPriority(misc::getIcon("go-top"), tr("Move to top", "i.e. Move to top of the queue"), 0);
|
||||
QAction actionTopPriority(IconProvider::instance()->getIcon("go-top"), tr("Move to top", "i.e. Move to top of the queue"), 0);
|
||||
connect(&actionTopPriority, SIGNAL(triggered()), this, SLOT(topPrioSelectedTorrents()));
|
||||
QAction actionBottomPriority(misc::getIcon("go-bottom"), tr("Move to bottom", "i.e. Move to bottom of the queue"), 0);
|
||||
QAction actionBottomPriority(IconProvider::instance()->getIcon("go-bottom"), tr("Move to bottom", "i.e. Move to bottom of the queue"), 0);
|
||||
connect(&actionBottomPriority, SIGNAL(triggered()), this, SLOT(bottomPrioSelectedTorrents()));
|
||||
QAction actionSetTorrentPath(misc::getIcon("inode-directory"), tr("Set location..."), 0);
|
||||
QAction actionSetTorrentPath(IconProvider::instance()->getIcon("inode-directory"), tr("Set location..."), 0);
|
||||
connect(&actionSetTorrentPath, SIGNAL(triggered()), this, SLOT(setSelectedTorrentsLocation()));
|
||||
QAction actionForce_recheck(misc::getIcon("document-edit-verify"), tr("Force recheck"), 0);
|
||||
QAction actionForce_recheck(IconProvider::instance()->getIcon("document-edit-verify"), tr("Force recheck"), 0);
|
||||
connect(&actionForce_recheck, SIGNAL(triggered()), this, SLOT(recheckSelectedTorrents()));
|
||||
QAction actionCopy_magnet_link(QIcon(":/Icons/magnet.png"), tr("Copy magnet link"), 0);
|
||||
connect(&actionCopy_magnet_link, SIGNAL(triggered()), this, SLOT(copySelectedMagnetURIs()));
|
||||
|
@ -650,7 +651,7 @@ void TransferListWidget::displayListMenu(const QPoint&) {
|
|||
actionSuper_seeding_mode.setCheckable(true);
|
||||
connect(&actionSuper_seeding_mode, SIGNAL(triggered()), this, SLOT(toggleSelectedTorrentsSuperSeeding()));
|
||||
#endif
|
||||
QAction actionRename(misc::getIcon("edit-rename"), tr("Rename..."), 0);
|
||||
QAction actionRename(IconProvider::instance()->getIcon("edit-rename"), tr("Rename..."), 0);
|
||||
connect(&actionRename, SIGNAL(triggered()), this, SLOT(renameSelectedTorrent()));
|
||||
QAction actionSequential_download(tr("Download in sequential order"), 0);
|
||||
actionSequential_download.setCheckable(true);
|
||||
|
@ -737,12 +738,12 @@ void TransferListWidget::displayListMenu(const QPoint&) {
|
|||
QStringList customLabels = getCustomLabels();
|
||||
customLabels.sort();
|
||||
QList<QAction*> labelActions;
|
||||
QMenu *labelMenu = listMenu.addMenu(misc::getIcon("view-categories"), tr("Label"));
|
||||
labelActions << labelMenu->addAction(misc::getIcon("list-add"), tr("New...", "New label..."));
|
||||
labelActions << labelMenu->addAction(misc::getIcon("edit-clear"), tr("Reset", "Reset label"));
|
||||
QMenu *labelMenu = listMenu.addMenu(IconProvider::instance()->getIcon("view-categories"), tr("Label"));
|
||||
labelActions << labelMenu->addAction(IconProvider::instance()->getIcon("list-add"), tr("New...", "New label..."));
|
||||
labelActions << labelMenu->addAction(IconProvider::instance()->getIcon("edit-clear"), tr("Reset", "Reset label"));
|
||||
labelMenu->addSeparator();
|
||||
foreach(const QString &label, customLabels) {
|
||||
labelActions << labelMenu->addAction(misc::getIcon("inode-directory"), label);
|
||||
labelActions << labelMenu->addAction(IconProvider::instance()->getIcon("inode-directory"), label);
|
||||
}
|
||||
listMenu.addSeparator();
|
||||
if(one_not_seed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue