From 30d328774f647eb231e592081ba24040ba53db0d Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 10 Apr 2007 10:50:34 +0000 Subject: [PATCH] - Fixed compiling error in finishedTorrents.cpp - Added icons for bandwidth allocation actions --- src/FinishedTorrents.cpp | 9 +++++---- src/GUI.cpp | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/FinishedTorrents.cpp b/src/FinishedTorrents.cpp index 66dc24b64..c4d2cdc4c 100644 --- a/src/FinishedTorrents.cpp +++ b/src/FinishedTorrents.cpp @@ -22,6 +22,7 @@ #include "misc.h" #include "GUI.h" #include "properties_imp.h" +#include "allocationDlg.h" #include #include @@ -49,7 +50,7 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession){ actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png"))); actionDelete_Permanently->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete_perm.png"))); actionTorrent_Properties->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/properties.png"))); - // TODO: Set icons for upload limit + actionSet_upload_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/seeding.png"))); connect(actionDelete, SIGNAL(triggered()), (GUI*)parent, SLOT(deleteSelection())); connect(actionPreview_file, SIGNAL(triggered()), (GUI*)parent, SLOT(previewFileSelection())); connect(actionDelete_Permanently, SIGNAL(triggered()), (GUI*)parent, SLOT(deletePermanently())); @@ -106,16 +107,16 @@ void FinishedTorrents::setRowColor(int row, const QString& color){ } void FinishedTorrents::on_actionSet_upload_limit_triggered(){ - QModelIndexList selectedIndexes = downloadList->selectionModel()->selectedIndexes(); + QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes(); QModelIndex index; QStringList hashes; foreach(index, selectedIndexes){ if(index.column() == NAME){ // Get the file hash - hashes << DLListModel->data(DLListModel->index(index.row(), HASH)).toString(); + hashes << finishedListModel->data(finishedListModel->index(index.row(), HASH)).toString(); } } - new BandwidthAllocationDialog(this, true, &BTSession, hashes); + new BandwidthAllocationDialog(this, true, BTSession, hashes); } void FinishedTorrents::updateFinishedList(){ diff --git a/src/GUI.cpp b/src/GUI.cpp index 393373e0a..680dbc6ed 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -98,7 +98,8 @@ 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 + actionSet_upload_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/seeding.png"))); + actionSet_download_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/downloading.png"))); // actionDocumentation->setIcon(QIcon(QString::fromUtf8(":/Icons/help.png"))); connecStatusLblIcon = new QLabel(); connecStatusLblIcon->setFrameShape(QFrame::NoFrame);