From 2273ea4099eadb66796fb2bbadb1a45d5ee5589e Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 12 Jan 2010 23:16:18 +0000 Subject: [PATCH] - Use Alternating row colors in {Peers, trackers, Files} lists too (if enabled) --- src/GUI.cpp | 5 +++++ src/propertieswidget.h | 14 +++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/GUI.cpp b/src/GUI.cpp index 78248bc2c..ca8ed48f2 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -60,6 +60,8 @@ #include "speedlimitdlg.h" #include "preferences.h" #include "console_imp.h" +#include "trackerlist.h" +#include "peerlistwidget.h" #include "torrentpersistentdata.h" #include "transferlistfilterswidget.h" #include "propertieswidget.h" @@ -730,6 +732,9 @@ void GUI::loadPreferences(bool configure_session) { unsigned int new_refreshInterval = Preferences::getRefreshInterval(); transferList->setRefreshInterval(new_refreshInterval); transferList->setAlternatingRowColors(Preferences::useAlternatingRowColors()); + properties->getFilesList()->setAlternatingRowColors(Preferences::useAlternatingRowColors()); + properties->getTrackerList()->setAlternatingRowColors(Preferences::useAlternatingRowColors()); + properties->getPeerList()->setAlternatingRowColors(Preferences::useAlternatingRowColors()); // Queueing System if(Preferences::isQueueingSystemEnabled()) { if(!configure_session || !BTSession->isQueueingEnabled()) { diff --git a/src/propertieswidget.h b/src/propertieswidget.h index 31436676b..1e87588a6 100644 --- a/src/propertieswidget.h +++ b/src/propertieswidget.h @@ -70,6 +70,15 @@ private: DownloadedPiecesBar *downloaded_pieces; PieceAvailabilityBar *pieces_availability; +public: + PropertiesWidget(QWidget *parent, GUI* main_window, TransferListWidget *transferList, Bittorrent* BTSession); + ~PropertiesWidget(); + const QTorrentHandle& getCurrentTorrent() const; + Bittorrent* getBTSession() const; + TrackerList* getTrackerList() const { return trackerList; } + PeerListWidget* getPeerList() const { return peersList; } + QTreeView* getFilesList() const { return filesList; } + protected: QPushButton* getButtonFromIndex(int index); bool applyPriorities(); @@ -102,11 +111,6 @@ public slots: void reloadPreferences(); void openDoubleClickedFile(QModelIndex); -public: - PropertiesWidget(QWidget *parent, GUI* main_window, TransferListWidget *transferList, Bittorrent* BTSession); - ~PropertiesWidget(); - const QTorrentHandle& getCurrentTorrent() const; - Bittorrent* getBTSession() const; }; #endif // PROPERTIESWIDGET_H