From 32d3ed2144c901d5f9eed7f76b982638468ae155 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 27 Jun 2010 21:07:12 +0000 Subject: [PATCH] PeX status is now correctly reported --- Changelog | 2 ++ src/bittorrent.cpp | 4 ++++ src/bittorrent.h | 1 + src/trackerlist.cpp | 5 ++++- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 4164909ea..8a635dc18 100644 --- a/Changelog +++ b/Changelog @@ -14,8 +14,10 @@ - FEATURE: Search engine can now be disabled - FEATURE: Torrents can be automatically paused once they reach a given ratio - FEATURE: Several files can now be disabled at once + - FEATURE: Added "Select All/None" buttons to files list - BUGFIX: Hide seeding torrents files priorities in Web UI - BUGFIX: The user can disable permanently recursive torrent download + - BUGFIX: Peer Exchange status is now correctly reported - COSMETIC: Display peers country name in tooltip - COSMETIC: Display number of torrents in transfers tab label - COSMETIC: Simplified program preferences diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index d56d68b8a..087c03706 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -210,6 +210,10 @@ ScanFoldersModel* Bittorrent::getScanFoldersModel() const { return m_scanFolders; } +bool Bittorrent::isPexEnabled() const { + return PeXEnabled; +} + void Bittorrent::processBigRatios() { if(ratio_limit <= 0) return; qDebug("Process big ratios..."); diff --git a/src/bittorrent.h b/src/bittorrent.h index 190c10a85..b3e5e1de5 100644 --- a/src/bittorrent.h +++ b/src/bittorrent.h @@ -118,6 +118,7 @@ public: bool useTemporaryFolder() const; QString getDefaultSavePath() const; ScanFoldersModel* getScanFoldersModel() const; + bool isPexEnabled() const; #if LIBTORRENT_VERSION_MINOR < 15 void saveDHTEntry(); #endif diff --git a/src/trackerlist.cpp b/src/trackerlist.cpp index a823f68c0..db918213b 100644 --- a/src/trackerlist.cpp +++ b/src/trackerlist.cpp @@ -210,7 +210,10 @@ void TrackerList::loadStickyItems(const QTorrentHandle &h) { dht_item->setText(COL_MSG, tr("This torrent is private")); } // Load PeX Information - pex_item->setText(COL_STATUS, tr("Working")); + if(properties->getBTSession()->isPexEnabled()) + pex_item->setText(COL_STATUS, tr("Working")); + else + pex_item->setText(COL_STATUS, tr("Disabled")); pex_item->setText(COL_PEERS, QString::number(nb_pex)); // Load LSD Information if(properties->getBTSession()->isLSDEnabled())