mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 07:46:17 -07:00
- Kept on working on bandwidth allocation per torrent
- Fixed a crash in search engine when systray integration was disabled
This commit is contained in:
parent
3933d78da2
commit
30aa59f582
7 changed files with 35 additions and 24 deletions
11
src/GUI.cpp
11
src/GUI.cpp
|
@ -54,12 +54,14 @@
|
|||
GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){
|
||||
setupUi(this);
|
||||
setWindowTitle(tr("qBittorrent %1", "e.g: qBittorrent v0.x").arg(VERSION));
|
||||
QSettings settings("qBittorrent", "qBittorrent");
|
||||
systrayIntegration = settings.value("Options/Misc/Behaviour/SystrayIntegration", true).toBool();
|
||||
// Finished torrents tab
|
||||
finishedTorrentTab = new FinishedTorrents(this, &BTSession);
|
||||
tabs->addTab(finishedTorrentTab, tr("Finished"));
|
||||
tabs->setTabIcon(1, QIcon(QString::fromUtf8(":/Icons/skin/seeding.png")));
|
||||
// Search engine tab
|
||||
searchEngine = new SearchEngine(&BTSession, myTrayIcon);
|
||||
searchEngine = new SearchEngine(&BTSession, myTrayIcon, systrayIntegration);
|
||||
tabs->addTab(searchEngine, tr("Search"));
|
||||
tabs->setTabIcon(2, QIcon(QString::fromUtf8(":/Icons/skin/search.png")));
|
||||
// RSS tab
|
||||
|
@ -87,6 +89,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){
|
|||
actionStart_All->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play_all.png")));
|
||||
actionClearLog->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png")));
|
||||
actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png")));
|
||||
//TODO: set icons for Upload/Download limit actions
|
||||
// actionDocumentation->setIcon(QIcon(QString::fromUtf8(":/Icons/help.png")));
|
||||
connecStatusLblIcon = new QLabel();
|
||||
connecStatusLblIcon->setFrameShape(QFrame::NoFrame);
|
||||
|
@ -157,8 +160,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){
|
|||
connect(infoBar, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayInfoBarMenu(const QPoint&)));
|
||||
// Create tray icon
|
||||
if (QSystemTrayIcon::isSystemTrayAvailable()){
|
||||
QSettings settings("qBittorrent", "qBittorrent");
|
||||
systrayIntegration = settings.value("Options/Misc/Behaviour/SystrayIntegration", true).toBool();
|
||||
if(systrayIntegration){
|
||||
createTrayIcon();
|
||||
}
|
||||
|
@ -295,6 +296,10 @@ void GUI::togglePausedState(const QModelIndex& index){
|
|||
}
|
||||
}
|
||||
|
||||
// void GUI::on_actionSet_download_limit_triggered(){
|
||||
// new BandwidthAllocationDialog(this,
|
||||
// }
|
||||
|
||||
void GUI::on_actionPreview_file_triggered(){
|
||||
if(tabs->currentIndex() > 1) return;
|
||||
bool inDownloadList = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue