From: Carl Hetherington Date: Tue, 12 Feb 2013 23:27:32 +0000 (+0000) Subject: Never say 100% when not finished (part of #44). X-Git-Tag: v2.0.48~1337^2~671 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=ba079aaab20805d743c49f7a43bf6ce0170db231;p=dcpomatic.git Never say 100% when not finished (part of #44). --- diff --git a/src/lib/job.cc b/src/lib/job.cc index 2ddcf5335..dd034bf0c 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -267,11 +267,17 @@ Job::status () const int const t = elapsed_time (); int const r = remaining_time (); + int pc = rint (p * 100); + if (pc == 100) { + /* 100% makes it sound like we've finished when we haven't */ + pc = 99; + } + stringstream s; if (!finished () && p >= 0 && t > 10 && r > 0) { - s << rint (p * 100) << "%; " << seconds_to_approximate_hms (r) << " remaining"; + s << pc << "%; " << seconds_to_approximate_hms (r) << " remaining"; } else if (!finished () && (t <= 10 || r == 0)) { - s << rint (p * 100) << "%"; + s << pc << "%"; } else if (finished_ok ()) { s << "OK (ran for " << seconds_to_hms (_ran_for) << ")"; } else if (finished_in_error ()) {