} else if (finished_ok ()) {
s << String::compose (_("OK (ran for %1)"), seconds_to_hms (_ran_for));
} else if (finished_in_error ()) {
- string es = error_summary ();
- if (es.length() > 25) {
- es = es.substr (0, 25) + "...";
- }
- s << String::compose (_("Error (%1)"), es);
+ s << String::compose (_("Error (%1)"), error_summary ());
} else if (finished_cancelled ()) {
s << _("Cancelled");
}
}
}
+ void update_status ()
+ {
+ string s = _job->status ();
+ if (s.length() > 25) {
+ s = s.substr (0, 25) + "...";
+ }
+ checked_set (_message, s);
+ }
+
void progress ()
{
- checked_set (_message, _job->status ());
+ update_status ();
update_job_name ();
if (_job->progress ()) {
_gauge->SetValue (min (100.0f, _job->progress().get() * 100));
void finished ()
{
- checked_set (_message, _job->status ());
+ update_status ();
update_job_name ();
if (!_job->finished_cancelled ()) {