From 1b0de21b5270cdb8aa8e90e45c2ebb0159e95d3c Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 24 Jan 2011 16:50:23 +0000 Subject: [PATCH] Make sure the progress is not 100% unless the file is complete --- Changelog | 3 +++ src/properties/proplistdelegate.h | 4 ++++ src/webui/html/prop-files.html | 2 ++ 3 files changed, 9 insertions(+) diff --git a/Changelog b/Changelog index 56ac0cf58..ae6dd948f 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,6 @@ +* Unreleased - Christophe Dumez - v2.6.5 + - BUGFIX: Make sure the progress is not 100% unless the file is complete + * Sun Jan 23 2011 - Christophe Dumez - v2.6.4 - BUGFIX: Added unicode support to email notification - BUGFIX: Improved compatibility with various SMTP servers diff --git a/src/properties/proplistdelegate.h b/src/properties/proplistdelegate.h index a47d87f90..75906b8ff 100644 --- a/src/properties/proplistdelegate.h +++ b/src/properties/proplistdelegate.h @@ -77,6 +77,10 @@ public: QStyleOptionProgressBarV2 newopt; float progress = index.data().toDouble()*100.; newopt.rect = opt.rect; + // We don't want to display 100% unless + // the torrent is really complete + if(progress > 99.94 && progress < 100.) + progress = 99.9; newopt.text = QString(QByteArray::number(progress, 'f', 1))+QString::fromUtf8("%"); newopt.progress = (int)progress; newopt.maximum = 100; diff --git a/src/webui/html/prop-files.html b/src/webui/html/prop-files.html index d62c6c447..70db2bc37 100644 --- a/src/webui/html/prop-files.html +++ b/src/webui/html/prop-files.html @@ -285,6 +285,8 @@ var createPriorityCombo = function(id, selected_prio) { row[1] = file.name; row[2] = file.size; row[3] = (file.progress*100).round(1); + if(row[3] == 100.0 && file.progress < 1.0) + row[3] = 99.9 row[4] = file.priority; fTable.insertRow(i, row); i++;