From ff26ea94f583e3489a3b932a47b4e4812b36be81 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Fri, 8 Aug 2008 13:17:26 +0000 Subject: [PATCH] - Queued torrents are now identified in Web UI - Improved transfer list update for queued torrents - Allow to show/hide top toolbar - top toolbar is now hidden as a default - Connection status is now displayed in status bar (bottom) - Removed "Disconnected" connection status (bad detection) - Added increase/decrease priority actions to Edit menu - Added keyboard shortcuts for increase/decrease priority actions --- Changelog | 5 ++- TODO | 46 +------------------- src/FinishedTorrents.cpp | 9 +++- src/GUI.cpp | 41 +++++++++++------- src/GUI.h | 2 + src/Icons/skin/connected.png | Bin 2312 -> 1412 bytes src/Icons/skin/disconnected.png | Bin 2035 -> 0 bytes src/Icons/skin/firewalled.png | Bin 2854 -> 1488 bytes src/MainWindow.ui | 2 + src/bittorrent.cpp | 10 +++-- src/bittorrent.h | 2 + src/download.ui | 73 +++++++++++++++++++++----------- src/downloadingTorrents.cpp | 10 +++++ src/eventmanager.cpp | 15 ++++--- src/eventmanager.h | 5 ++- src/httpserver.cpp | 2 +- src/icons.qrc | 1 - src/options.ui | 7 +++ src/options_imp.cpp | 7 +++ src/options_imp.h | 1 + src/seeding.ui | 16 +++++++ src/src.pro | 2 +- src/webui/scripts/client.js | 3 ++ 23 files changed, 159 insertions(+), 100 deletions(-) delete mode 100644 src/Icons/skin/disconnected.png diff --git a/Changelog b/Changelog index 1b2589d54..b946c06cd 100644 --- a/Changelog +++ b/Changelog @@ -4,8 +4,11 @@ - FEATURE: The number of DHT nodes is displayed - FEATURE: RSS can now be disabled from program preferences - BUGFIX: Disable ETA calculation when ETA column is hidden - - COSMETIC: Transfer speed, ratio and DHT nodes are displayed in status bar + - BUGFIX: Removed "disconnected" connection state, detection was far from perfect + - COSMETIC: Transfer speed, ratio, connection status and DHT nodes are displayed in status bar - COSMETIC: RSS Tab is now hidden as a default + - COSMETIC: Allow to hide or display top toolbar + - COSMETIC: Top toolbar is now hidden as a default * Fri Aug 01 2008 - Christophe Dumez - v1.1.0 - FEATURE: Web interface to control qbittorrent (Ishan Arora) diff --git a/TODO b/TODO index 4a7c90182..d3c183787 100644 --- a/TODO +++ b/TODO @@ -1,46 +1,4 @@ -// Easy -- Translations into as many languages as possible -- Use Launchpad/Rosetta for translations once it supports TS files - -// Intermediate -- Port on MacOS, Windows (and create an installer for Windows) - Slow progress -- Add some transparency (menus,...), improve look / usabilty -- Skins support? (contact Mateusz) - -// Harder -- Torrent scheduler ala µtorrent/Bitcomet - -// Waiting for libtorrent -- Allow to prioritize torrents (may code this in qBittorrent?) - -// Unsure -- Display the peers we are connected to for each torrent with infos (like flag, dl/up speeds, ...) -- Azureus spoofing to prevent ban from trackers? -- Option to shutdown computer when downloads are finished -- NAT checker/Tester -- Display hard drive space left? -- Make use of dbus on Linux for the single instance instead of socket communication? - (http://techbase.kde.org/Development/Tutorials/D-Bus/Accessing_Interfaces) -- When favicon can't be downloaded, try to parse the webpage for: - - * Be careful, the link can be relative -- Improve search plugin install (choose in a list taken from plugins.qbittorrent.org) -- support zipped torrents? (useful?) -- Allow to limit the number of downloading torrents simultaneously (other are paused until a download finishes) +See https://blueprints.launchpad.net/qbittorrent/ // in v1.2.0 -- Allow user to organize the downloads into categories/folders? - -// in v1.1.0 -- Stop calculating ETAs when ETA column is hidden --> See https://blueprints.launchpad.net/qbittorrent - -Translations updated: -- French -- Chinese -- Polish -- Portuguese -- Brazilian -- Slovak -- Swedish -- Romanian +- Split download and uploads in Web UI (Ishan Ahora) diff --git a/src/FinishedTorrents.cpp b/src/FinishedTorrents.cpp index fb6c7c3a4..6481e2129 100644 --- a/src/FinishedTorrents.cpp +++ b/src/FinishedTorrents.cpp @@ -64,8 +64,8 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par connect(finishedList, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedListMenu(const QPoint&))); finishedList->header()->setContextMenuPolicy(Qt::CustomContextMenu); connect(finishedList->header(), SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedHoSMenu(const QPoint&))); - connect(finishedList, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(notifyTorrentDoubleClicked(const QModelIndex&))); + connect(BTSession, SIGNAL(forceFinishedListUpdate()), this, SLOT(updateFinishedList())); actionDelete->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png"))); actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png"))); actionDelete_Permanently->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete_perm.png"))); @@ -74,6 +74,8 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par connect(actionPause, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionPause_triggered())); connect(actionStart, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionStart_triggered())); connect(actionDelete, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDelete_triggered())); + connect(actionIncreasePriority, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionIncreasePriority_triggered())); + connect(actionDecreasePriority, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDecreasePriority_triggered())); connect(actionPreview_file, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionPreview_file_triggered())); connect(actionDelete_Permanently, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDelete_Permanently_triggered())); connect(actionOpen_destination_folder, SIGNAL(triggered()), (GUI*)parent, SLOT(openDestinationFolder())); @@ -407,6 +409,11 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){ myFinishedListMenu.addSeparator(); myFinishedListMenu.addAction(actionOpen_destination_folder); myFinishedListMenu.addAction(actionTorrent_Properties); + if(BTSession->isQueueingEnabled()) { + myFinishedListMenu.addSeparator(); + myFinishedListMenu.addAction(actionIncreasePriority); + myFinishedListMenu.addAction(actionDecreasePriority); + } myFinishedListMenu.addSeparator(); myFinishedListMenu.addAction(actionBuy_it); diff --git a/src/GUI.cpp b/src/GUI.cpp index 2dab8429e..9a0de36cf 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -109,13 +109,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis actionSet_global_upload_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/seeding.png"))); actionSet_global_download_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/downloading.png"))); actionDocumentation->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/qb_question.png"))); - connecStatusLblIcon = new QLabel(); - connecStatusLblIcon->setFrameShape(QFrame::NoFrame); - connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/disconnected.png"))); - connecStatusLblIcon->setToolTip(QString::fromUtf8("")+tr("Connection status:")+QString::fromUtf8("
")+tr("Offline")+QString::fromUtf8("
")+tr("No peers found...")+QString::fromUtf8("")); - toolBar->addWidget(connecStatusLblIcon); prioSeparator = toolBar->insertSeparator(actionDecreasePriority); + prioSeparator2 = menu_Edit->insertSeparator(actionDecreasePriority); prioSeparator->setVisible(false); + prioSeparator2->setVisible(false); actionDelete_Permanently->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete_perm.png"))); actionTorrent_Properties->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/properties.png"))); actionCreate_torrent->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/new.png"))); @@ -209,6 +206,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis show(); } createKeyboardShortcuts(); + connecStatusLblIcon = new QLabel(); + connecStatusLblIcon->setFrameShape(QFrame::NoFrame); + connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/firewalled.png"))); + connecStatusLblIcon->setToolTip(QString::fromUtf8("")+tr("Connection status:")+QString::fromUtf8("
")+QString::fromUtf8("")+tr("No direct connections. This may indicate network configuration problems.")+QString::fromUtf8("")); dlSpeedLbl = new QLabel(tr("DL: %1 KiB/s").arg("0.0")); upSpeedLbl = new QLabel(tr("UP: %1 KiB/s").arg("0.0")); ratioLbl = new QLabel(tr("Ratio: %1").arg("1.0")); @@ -222,12 +223,17 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis statusSep3 = new QFrame(); statusSep3->setFixedWidth(1); statusSep3->setFrameStyle(QFrame::Box); + statusSep4 = new QFrame(); + statusSep4->setFixedWidth(1); + statusSep4->setFrameStyle(QFrame::Box); QMainWindow::statusBar()->addPermanentWidget(DHTLbl); QMainWindow::statusBar()->addPermanentWidget(statusSep1); - QMainWindow::statusBar()->addPermanentWidget(dlSpeedLbl); + QMainWindow::statusBar()->addPermanentWidget(connecStatusLblIcon); QMainWindow::statusBar()->addPermanentWidget(statusSep2); - QMainWindow::statusBar()->addPermanentWidget(upSpeedLbl); + QMainWindow::statusBar()->addPermanentWidget(dlSpeedLbl); QMainWindow::statusBar()->addPermanentWidget(statusSep3); + QMainWindow::statusBar()->addPermanentWidget(upSpeedLbl); + QMainWindow::statusBar()->addPermanentWidget(statusSep4); QMainWindow::statusBar()->addPermanentWidget(ratioLbl); qDebug("GUI Built"); } @@ -242,6 +248,7 @@ GUI::~GUI() { delete statusSep1; delete statusSep2; delete statusSep3; + delete statusSep4; if(rssWidget != 0) delete rssWidget; delete searchEngine; @@ -414,6 +421,8 @@ void GUI::createKeyboardShortcuts() { actionStart_All->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+Shift+S"))); actionPause->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+P"))); actionPause_All->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+Shift+P"))); + actionDecreasePriority->setShortcut(QKeySequence(QString::fromUtf8("Ctrl+-"))); + actionIncreasePriority->setShortcut(QKeySequence(QString::fromUtf8("Ctrl++"))); } // Keyboard shortcuts slots @@ -927,6 +936,11 @@ void GUI::configureSession(bool deleteOptions) { setWindowTitle(tr("qBittorrent %1", "e.g: qBittorrent v0.x").arg(QString::fromUtf8(VERSION))); } displaySpeedInTitle = new_displaySpeedInTitle; + if(options->isToolbarDisplayed()) { + toolBar->setVisible(true); + } else { + toolBar->setVisible(false); + } unsigned int new_refreshInterval = options->getRefreshInterval(); if(refreshInterval != new_refreshInterval) { refreshInterval = new_refreshInterval; @@ -1125,6 +1139,7 @@ void GUI::configureSession(bool deleteOptions) { actionDecreasePriority->setVisible(true); actionIncreasePriority->setVisible(true); prioSeparator->setVisible(true); + prioSeparator2->setVisible(true); toolBar->layout()->setSpacing(7); } int max_torrents = options->getMaxActiveTorrents(); @@ -1142,6 +1157,7 @@ void GUI::configureSession(bool deleteOptions) { actionDecreasePriority->setVisible(false); actionIncreasePriority->setVisible(false); prioSeparator->setVisible(false); + prioSeparator2->setVisible(false); toolBar->layout()->setSpacing(7); } } @@ -1464,15 +1480,8 @@ void GUI::checkConnectionStatus() { connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/connected.png"))); connecStatusLblIcon->setToolTip(QString::fromUtf8("")+tr("Connection Status:")+QString::fromUtf8("
")+tr("Online")); }else{ - if(sessionStatus.num_peers) { - // Firewalled ? - connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/firewalled.png"))); - connecStatusLblIcon->setToolTip(""+tr("Connection Status:")+QString::fromUtf8("
")+tr("Firewalled?", "i.e: Behind a firewall/router?")+QString::fromUtf8("
")+tr("No incoming connections...")+QString::fromUtf8("")); - }else{ - // Disconnected - connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/disconnected.png"))); - connecStatusLblIcon->setToolTip(QString::fromUtf8("")+tr("Connection status:")+QString::fromUtf8("
")+tr("Offline")+QString::fromUtf8("
")+tr("No peers found...")+QString::fromUtf8("")); - } + connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/firewalled.png"))); + connecStatusLblIcon->setToolTip(QString::fromUtf8("")+tr("Connection status:")+QString::fromUtf8("
")+QString::fromUtf8("")+tr("No direct connections. This may indicate network configuration problems.")+QString::fromUtf8("")); } } diff --git a/src/GUI.h b/src/GUI.h index e7cd99aee..2baaf2620 100644 --- a/src/GUI.h +++ b/src/GUI.h @@ -83,6 +83,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{ QFrame *statusSep1; QFrame *statusSep2; QFrame *statusSep3; + QFrame *statusSep4; // Keyboard shortcuts QShortcut *switchSearchShortcut; QShortcut *switchSearchShortcut2; @@ -90,6 +91,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{ QShortcut *switchUpShortcut; QShortcut *switchRSSShortcut; QAction *prioSeparator; + QAction *prioSeparator2; // Search SearchEngine *searchEngine; // RSS diff --git a/src/Icons/skin/connected.png b/src/Icons/skin/connected.png index 4343972e2013b4c1f6ae2900db0ef9943605068e..ea3473475e0814e10b365fad658e487b72c3d799 100644 GIT binary patch literal 1412 zcmV-~1$+95P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iOP( z5E>T$SaE+nYFa9mjPlIkX})u3Cy3 zsY101QhQ|yq~37FRsVtB^$vkh#SJ&`2hac#Bs3Pv1(cLTijec=#Kg5zS~u=~c)gz4 z9q*p=ac_zEKKst6kMjAvnVg)|;o)JGrvy{LE5HXL z@>(HNNG%ke=j_BHr}C#5&rSeP>s0wq^C4@sHSRUmX>=N0MgM*#Sop<9bH55~+t!01 z_^1C=v#$Ujdg7fwIWptDQ+bE86N`kYaL}*-N46M8x~{=vfMkQg7BUBK?~ktN>zw6exl?MVw@0;FB@9DKr4j&1H(@u~ z1r)(BJ5u3=@CA-{j`OFhf8<{7{>gZ>{e}-L36hb)k^kHLl5V%l>gp=pZkITY$>nkY zEH5u}*h}!lqmU_ZB72Q;+I=6IH1mRM~89@_BcQ+E|VDcn9@CoPaRp3rDj*)H&if zW@TlCTCK*`))uW+3u`U)dY!*~d5PP(J7~^fD~?{)(!+uSdQVLD72Q#ERtFnyAPmrM zx9RnI96NT5a=DC%@UQSXe#Xa&#aaamScM}2RZw>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W)QX-UW!*aZx21)iBK$r9i4>3)LZMsuu*C?&>i{mn zM`@~&r7$`=I<$K{Y*kdJRzsod(SCqiXIZ|CYV}osok!1%oZV(Tm;h8B0;xVY+{-mE;!t?3l}Ko z*)v)O@Wil|FXQx&V|zkw$pqoYF^gqq5a8XA0i49bMTBcPi_tByn6oDKn1lIwNJPEJ zbj`4N#>S1*-_}NdU%W_*pFX9P(2j$(77X5jdA|UG2`w4-XtI39rYNoenoo4NbCD!{ZWDwx1NfL@+z#8td48VZ2WoQ%~E8U z$m0q06c)bvEh*{oiMqPRo}L~)uYv>?L?6M<7h(dc-an{1nK;%)3%s*TQ96fIbrgYV zix-4MZdW<)jUd!~5bpPe`5C0%;kk`FBA6i^L>z^Mq0ovIY7LUaH|Nfk4-5=+`2GGt zly$GwY8^xZ^D}PDKO?XcbrN>=KRyT~ovUTO#j-vJ?OT>8re{K1S%M%zLxTR_Tzx5u z!3L*u+~@I7>Y_zKr^^*Uju@(_sQ43iZkIH*A31VF$;il1PM$oeHJtwmFaTaFXQa3N R<{|(9002ovPDHLkV1n5)vc&)Z diff --git a/src/Icons/skin/firewalled.png b/src/Icons/skin/firewalled.png index b8c2dadf582852cf337004a29dbbf6d15d11ba7f..09010eb5625b0b5a492559120531cefbdd148dba 100644 GIT binary patch literal 1488 zcmV;>1uy!EP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iOP( z5GNKDm4v$h00mG_>L(nm9HwiIb)lv`Jc#L@lC1 zMU|izv_j&p;-Y^WR|pUi7oh@G2nABLsiK55I7GEgoV6Wqyq~l4u`};`df{H2``oOzvT! zkydGhE50Xw`l=ouyhUgG@2uVWhj02_BdvaS>D*k>>~>qKY0p0T>@7~d{Mej5c%P_f zYta&hn-IT&U*5#nWsC!z576UpkQWc2y$vo==FJKI^1t=M#lK8nd-b1D=keE{uOfWM@ZQM3jpdAY8_}_LN?xp;2|9SQS_wW<#79Fa(@K|{X;ODh%3-yfh+_y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=i_=(h zS^gxtP7(_QBI(_K_R&+0WhVq*I!&K0e}G6;2h$Qb14E{t&{Ph46>FBPs+wyy30*-s zaepI168WZ|J}8 zzaXP_#Q|&v2?lmj7dwaXISztV%c+sJDXr5y-b`(`TlR~sAS7$+*sTnC%2rN!KUEXu#CW*akn4wDz?~zx3 zU0M6yv9w+vu_Q1N){Iba)6_vo^tfIZDZmT>qYC%UHjZPZroAF<5~)#`OcbuUX*ScQ zW1_DNGUtgITp&UT4j>ALJH>^k|3uEnT?6DUbH>(dM=rk6`rxnMMoAV-5x@={;4POE zhFF>}Ubhv(cA4b>%T@3*^)?MudYRIJ22{ey4T`3W<%l7jagKfQR9u>S^eru>mzgeZ z8{YRYUNyvn-}y^zXZd*a$+dIN?tr73P)Z;p442EA%B3vdOy-b&F2ng8m}b+mt@$|1 zxA`=R7vVZK5y!)-IC19R?)=5Kh*wuM*A0U}Xk~}7?ZU;M{8Dy*IK-E4AEVufM;plT zgr)*2kC~Ksd1*O$Fs7scl>y3hYAfHS)ecOrAgh!EQyqA&1~ui6pT1r^@y*{UK77k@ z#FmjN)@b~>xVpMi?FHf9I7;UWEIl^6^80U%bUr;SoSu_H!36q&s3Nx>%F8j#1HAaL zV&v53O6LtM(N@M4Qib1u1o5O~z$kVm + + diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 5582e2d0c..eeebd94c6 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -464,8 +464,10 @@ void bittorrent::updateUploadQueue() { } } } - if(change) - emit updateFinishedTorrentNumber(); + if(change) { + emit updateFinishedTorrentNumber(); + emit forceFinishedListUpdate(); + } } void bittorrent::updateDownloadQueue() { @@ -520,8 +522,10 @@ void bittorrent::updateDownloadQueue() { } } } - if(change) + if(change) { emit updateUnfinishedTorrentNumber(); + emit forceUnfinishedListUpdate(); + } } // Calculate the ETA using GASA diff --git a/src/bittorrent.h b/src/bittorrent.h index 6c96278b6..c78c090ac 100644 --- a/src/bittorrent.h +++ b/src/bittorrent.h @@ -212,6 +212,8 @@ class bittorrent : public QObject{ void UPnPSuccess(QString msg); void updateFinishedTorrentNumber(); void updateUnfinishedTorrentNumber(); + void forceUnfinishedListUpdate(); + void forceFinishedListUpdate(); }; #endif diff --git a/src/download.ui b/src/download.ui index 146f5bf91..e323b741d 100644 --- a/src/download.ui +++ b/src/download.ui @@ -18,7 +18,16 @@ 6 - + + 0 + + + 0 + + + 0 + + 0 @@ -63,14 +72,6 @@ 0 - - - 0 - 0 - 765 - 138 - - Log @@ -78,7 +79,16 @@ 6 - + + 9 + + + 9 + + + 9 + + 9 @@ -103,14 +113,6 @@ - - - 0 - 0 - 765 - 138 - - IP filter @@ -118,7 +120,16 @@ 6 - + + 9 + + + 9 + + + 9 + + 9 @@ -183,8 +194,7 @@ - - :/Icons/folder.png:/Icons/folder.png + :/Icons/folder.png Open destination folder @@ -232,8 +242,7 @@ - - :/Icons/money.png:/Icons/money.png + :/Icons/money.png Buy it @@ -244,8 +253,22 @@ Priority - tabBottom - + + + :/Icons/skin/increase.png + + + Increase priority + + + + + :/Icons/skin/decrease.png + + + Decrease priority + + diff --git a/src/downloadingTorrents.cpp b/src/downloadingTorrents.cpp index 9e489cc52..3003dc5d2 100644 --- a/src/downloadingTorrents.cpp +++ b/src/downloadingTorrents.cpp @@ -78,6 +78,7 @@ DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession) connect(BTSession, SIGNAL(urlSeedProblem(QString, QString)), this, SLOT(addUrlSeedError(QString, QString))); connect(BTSession, SIGNAL(UPnPError(QString)), this, SLOT(displayUPnPError(QString))); connect(BTSession, SIGNAL(UPnPSuccess(QString)), this, SLOT(displayUPnPSuccess(QString))); + connect(BTSession, SIGNAL(forceUnfinishedListUpdate()), this, SLOT(updateDlList())); // Load last columns width for download list if(!loadColWidthDLList()) { @@ -97,6 +98,8 @@ DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession) connect(actionPause, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionPause_triggered())); connect(actionStart, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionStart_triggered())); connect(actionDelete, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDelete_triggered())); + connect(actionIncreasePriority, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionIncreasePriority_triggered())); + connect(actionDecreasePriority, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDecreasePriority_triggered())); connect(actionPreview_file, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionPreview_file_triggered())); connect(actionDelete_Permanently, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDelete_Permanently_triggered())); connect(actionOpen_destination_folder, SIGNAL(triggered()), (GUI*)parent, SLOT(openDestinationFolder())); @@ -318,6 +321,11 @@ void DownloadingTorrents::displayDLListMenu(const QPoint& pos) { myDLLlistMenu.addSeparator(); myDLLlistMenu.addAction(actionOpen_destination_folder); myDLLlistMenu.addAction(actionTorrent_Properties); + if(BTSession->isQueueingEnabled()) { + myDLLlistMenu.addSeparator(); + myDLLlistMenu.addAction(actionIncreasePriority); + myDLLlistMenu.addAction(actionDecreasePriority); + } myDLLlistMenu.addSeparator(); myDLLlistMenu.addAction(actionBuy_it); // Call menu @@ -669,6 +677,7 @@ void DownloadingTorrents::addTorrent(QString hash) { } QTorrentHandle h = BTSession->getTorrentHandle(hash); int row = getRowFromHash(hash); + qDebug("DL: addTorrent(): %s, row: %d", (const char*)hash.toUtf8(), row); if(row != -1) return; row = DLListModel->rowCount(); // Adding torrent to download list @@ -856,6 +865,7 @@ void DownloadingTorrents::torrentAdded(QString path, QTorrentHandle& h, bool fas if(BTSession->isFinished(hash)) { return; } + if(getRowFromHash(hash) != -1) return; int row = DLListModel->rowCount(); // Adding torrent to download list DLListModel->insertRow(row); diff --git a/src/eventmanager.cpp b/src/eventmanager.cpp index 867b8115d..3177c41f0 100644 --- a/src/eventmanager.cpp +++ b/src/eventmanager.cpp @@ -20,11 +20,12 @@ #include "eventmanager.h" +#include "bittorrent.h" #include "json.h" #include -EventManager::EventManager(QObject *parent) - : QObject(parent) +EventManager::EventManager(QObject *parent, bittorrent *BTSession) + : QObject(parent), BTSession(BTSession) { revision = 0; } @@ -99,10 +100,12 @@ void EventManager::modifiedTorrent(QTorrentHandle h) QVariantMap event; QVariant v; - if(h.is_paused()) - v = QVariant("paused"); - else - { + if(h.is_paused()) { + if(BTSession->isDownloadQueued(hash) || BTSession->isUploadQueued(hash)) + v = QVariant("queued"); + else + v = QVariant("paused"); + } else { switch(h.state()) { case torrent_status::finished: diff --git a/src/eventmanager.h b/src/eventmanager.h index e85419c29..1d68fa59f 100644 --- a/src/eventmanager.h +++ b/src/eventmanager.h @@ -27,6 +27,8 @@ #include #include +struct bittorrent; + class EventManager : public QObject { Q_OBJECT @@ -34,12 +36,13 @@ class EventManager : public QObject ulong revision; QLinkedList > events; bool modify(QString hash, QString key, QVariant value); + bittorrent* BTSession; protected: void update(QVariantMap event); public: - EventManager(QObject *parent = 0); + EventManager(QObject *parent, bittorrent* BTSession); QVariant querySince(ulong r) const; bool isUpdated(ulong r) const; diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 38d7e650e..9c8e78611 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -30,7 +30,7 @@ HttpServer::HttpServer(bittorrent *BTSession, int msec, QObject* parent) : QTcpS base64 = QByteArray(":").toBase64(); connect(this, SIGNAL(newConnection()), this, SLOT(newHttpConnection())); HttpServer::BTSession = BTSession; - manager = new EventManager(this); + manager = new EventManager(this, BTSession); //add torrents QStringList list = BTSession->getUnfinishedTorrents() + BTSession->getFinishedTorrents(); QString hash; diff --git a/src/icons.qrc b/src/icons.qrc index 389ef6b80..f8fbb9fcf 100644 --- a/src/icons.qrc +++ b/src/icons.qrc @@ -79,7 +79,6 @@ Icons/skin/delete.png Icons/skin/delete_all.png Icons/skin/delete_perm.png - Icons/skin/disconnected.png Icons/skin/downloading.png Icons/skin/exit.png Icons/skin/firewalled.png diff --git a/src/options.ui b/src/options.ui index 7a214a9b4..6c5352d74 100644 --- a/src/options.ui +++ b/src/options.ui @@ -209,6 +209,13 @@ + + + + Display top toolbar + + + diff --git a/src/options_imp.cpp b/src/options_imp.cpp index 2b33c18d4..6fecda6f0 100644 --- a/src/options_imp.cpp +++ b/src/options_imp.cpp @@ -159,6 +159,7 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){ connect(checkMinimizeToSysTray, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(checkStartMinimized, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(checkSystrayBalloons, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkDisplayToolbar, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); // Downloads tab connect(textSavePath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); connect(checkPreallocateAll, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); @@ -278,6 +279,7 @@ void options_imp::saveOptions(){ settings.setValue(QString::fromUtf8("MinimizeToTray"), minimizeToTray()); settings.setValue(QString::fromUtf8("StartMinimized"), startMinimized()); settings.setValue(QString::fromUtf8("NotificationBaloons"), OSDEnabled()); + settings.setValue(QString::fromUtf8("ToolbarDisplayed"), isToolbarDisplayed()); // End General preferences settings.endGroup(); // Downloads preferences @@ -440,6 +442,7 @@ void options_imp::loadOptions(){ checkSpeedInTitle->setChecked(settings.value(QString::fromUtf8("SpeedInTitleBar"), false).toBool()); spinRefreshInterval->setValue(settings.value(QString::fromUtf8("RefreshInterval"), 1500).toInt()); checkNoSystray->setChecked(!settings.value(QString::fromUtf8("SystrayEnabled"), true).toBool()); + checkDisplayToolbar->setChecked(settings.value(QString::fromUtf8("ToolbarDisplayed"), false).toBool()); if(!systrayIntegration()) { disableSystrayOptions(); } else { @@ -1149,6 +1152,10 @@ QString options_imp::getFilter() const{ return textFilterPath->text(); } +bool options_imp::isToolbarDisplayed() const { + return checkDisplayToolbar->isChecked(); +} + // Web UI void options_imp::enableWebUi(bool checkBoxValue){ diff --git a/src/options_imp.h b/src/options_imp.h index bdc37f3df..855b6494b 100644 --- a/src/options_imp.h +++ b/src/options_imp.h @@ -66,6 +66,7 @@ class options_imp : public QDialog, private Ui::Dialog { bool closeToTray() const; bool startMinimized() const; bool OSDEnabled() const; + bool isToolbarDisplayed() const; // Downloads QString getSavePath() const; bool preAllocateAllFiles() const; diff --git a/src/seeding.ui b/src/seeding.ui index 776060e26..d2d8382b1 100644 --- a/src/seeding.ui +++ b/src/seeding.ui @@ -139,6 +139,22 @@ Priority + + + :/Icons/skin/increase.png + + + Increase priority + + + + + :/Icons/skin/decrease.png + + + Decrease priority + + diff --git a/src/src.pro b/src/src.pro index eafd7b955..54ce9190c 100644 --- a/src/src.pro +++ b/src/src.pro @@ -11,7 +11,7 @@ TARGET = qbittorrent CONFIG += qt thread x11 network # Update this VERSION for each release -DEFINES += VERSION=\\\"v1.2.0beta2\\\" +DEFINES += VERSION=\\\"v1.2.0beta3\\\" DEFINES += VERSION_MAJOR=1 DEFINES += VERSION_MINOR=2 DEFINES += VERSION_BUGFIX=0 diff --git a/src/webui/scripts/client.js b/src/webui/scripts/client.js index ddafdb675..0e6c43eae 100644 --- a/src/webui/scripts/client.js +++ b/src/webui/scripts/client.js @@ -79,6 +79,9 @@ window.addEvent('domready', function(){ case 'stalled': row[0] = ''; break; + case 'queued': + row[0] = ''; + break; } } if($defined(event.size)){