Pulse the progress bar 'automatically' if we haven't had a progress update for a...
[dcpomatic.git] / src / wx / job_view.cc
index 2754948ae609c0c2283f903714946649f180d673..77620142473af4a6d0823da4c283d2ffefbad0d9 100644 (file)
@@ -103,8 +103,11 @@ JobView::setup ()
 void
 JobView::maybe_pulse ()
 {
-       if (_gauge && _job->running() && !_job->progress()) {
-               _gauge->Pulse ();
+       if (_gauge && _job->running()) {
+               auto elapsed = _job->seconds_since_last_progress_update();
+               if (!_job->progress() || !elapsed || *elapsed > 2) {
+                       _gauge->Pulse ();
+               }
        }
 }
 
@@ -151,7 +154,7 @@ JobView::finished ()
        }
 
        if (_job->message()) {
-               MessageDialog* d = new MessageDialog (_parent, _job->name(), _job->message().get());
+               auto d = new MessageDialog (_parent, std_to_wx(_job->name()), std_to_wx(_job->message().get()));
                d->ShowModal ();
                d->Destroy ();
        }