From ee594400dcd6b3f5ad40d892b01be659d2ff56c5 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 11 Apr 2007 20:50:41 +0000 Subject: [PATCH] - Fixed togglepausedstate() on double click in download list --- src/GUI.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/GUI.cpp b/src/GUI.cpp index b30c099de..73fa73014 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -292,8 +292,20 @@ void GUI::togglePausedState(const QModelIndex& index){ QString fileHash = DLListModel->data(DLListModel->index(row, HASH)).toString(); if(BTSession.isPaused(fileHash)){ BTSession.resumeTorrent(fileHash); + DLListModel->setData(DLListModel->index(row, STATUS), QVariant(tr("Connecting..."))); + setInfoBar(tr("'%1' resumed.", "e.g: xxx.avi resumed.").arg(QString(BTSession.getTorrentHandle(fileHash).name().c_str()))); + DLListModel->setData(DLListModel->index(row, NAME), QVariant(QIcon(":/Icons/skin/connecting.png")), Qt::DecorationRole); + setRowColor(row, "grey"); }else{ BTSession.pauseTorrent(fileHash); + DLListModel->setData(DLListModel->index(row, DLSPEED), QVariant((double)0.0)); + DLListModel->setData(DLListModel->index(row, UPSPEED), QVariant((double)0.0)); + DLListModel->setData(DLListModel->index(row, STATUS), QVariant(tr("Paused"))); + DLListModel->setData(DLListModel->index(row, ETA), QVariant((qlonglong)-1)); + setInfoBar(tr("'%1' paused.", "xxx.avi paused.").arg(QString(BTSession.getTorrentHandle(fileHash).name().c_str()))); + DLListModel->setData(DLListModel->index(row, NAME), QIcon(":/Icons/skin/paused.png"), Qt::DecorationRole); + DLListModel->setData(DLListModel->index(row, SEEDSLEECH), QVariant("0/0")); + setRowColor(row, "red"); } }