No-op: remove all trailing whitespace.
[dcpomatic.git] / src / lib / job_manager.cc
index 2b727b0aaa43985942674f07d4f881051369236b..f31a00a18b33f0bce674f0406b06197f8fbea691 100644 (file)
@@ -26,7 +26,6 @@
 #include "job_manager.h"
 #include "job.h"
 #include "cross.h"
-#include "ui_signaller.h"
 
 using std::string;
 using std::list;
@@ -41,7 +40,7 @@ JobManager::JobManager ()
        , _last_active_jobs (false)
        , _scheduler (new boost::thread (boost::bind (&JobManager::scheduler, this)))
 {
-       
+
 }
 
 JobManager::~JobManager ()
@@ -64,10 +63,8 @@ JobManager::add (shared_ptr<Job> j)
                _jobs.push_back (j);
        }
 
-       if (ui_signaller) {
-               ui_signaller->emit (boost::bind (boost::ref (JobAdded), weak_ptr<Job> (j)));
-       }
-       
+       emit (boost::bind (boost::ref (JobAdded), weak_ptr<Job> (j)));
+
        return j;
 }
 
@@ -101,7 +98,7 @@ JobManager::errors () const
        }
 
        return false;
-}      
+}
 
 void
 JobManager::scheduler ()
@@ -115,21 +112,21 @@ JobManager::scheduler ()
                        if (_terminate) {
                                return;
                        }
-                       
+
                        for (list<shared_ptr<Job> >::iterator i = _jobs.begin(); i != _jobs.end(); ++i) {
 
                                if (!(*i)->finished ()) {
                                        active_jobs = true;
                                }
-                               
+
                                if ((*i)->running ()) {
                                        /* Something is already happening */
                                        break;
                                }
-                               
+
                                if ((*i)->is_new()) {
                                        (*i)->start ();
-                                       
+
                                        /* Only start one job at once */
                                        break;
                                }
@@ -138,9 +135,7 @@ JobManager::scheduler ()
 
                if (active_jobs != _last_active_jobs) {
                        _last_active_jobs = active_jobs;
-                       if (ui_signaller) {
-                               ui_signaller->emit (boost::bind (boost::ref (ActiveJobsChanged), active_jobs));
-                       }
+                       emit (boost::bind (boost::ref (ActiveJobsChanged), active_jobs));
                }
 
                dcpomatic_sleep (1);