Don't truncate job statuses in the command line interface, only in the GUI.
authorCarl Hetherington <cth@carlh.net>
Wed, 4 Feb 2015 09:20:28 +0000 (09:20 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 4 Feb 2015 09:20:28 +0000 (09:20 +0000)
src/lib/job.cc
src/wx/job_manager_view.cc

index 68aa6230abf150574c85a1b36084775b73c087f2..547b484a37affe06e01df7ecd940510f66c902f3 100644 (file)
@@ -332,11 +332,7 @@ Job::status () const
        } 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");
        }
index 783535a1243cf91627dff56be7687545ccd4298a..3593d2357be4d6ffc5160c02a31ffb6a1000436a 100644 (file)
@@ -108,9 +108,18 @@ private:
                }
        }
 
+       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));
@@ -121,7 +130,7 @@ private:
 
        void finished ()
        {
-               checked_set (_message, _job->status ());
+               update_status ();
                update_job_name ();
                
                if (!_job->finished_cancelled ()) {