+ _pause = new Button (panel, _("Pause"));
+ _pause->Bind (wxEVT_BUTTON, boost::bind(&DOMFrame::pause, this));
+ buttons->Add (_pause, 1, wxALL, 6);
+ _resume = new Button (panel, _("Resume"));
+ _resume->Bind (wxEVT_BUTTON, boost::bind(&DOMFrame::resume, this));
+ buttons->Add (_resume, 1, wxALL, 6);
+
+ setup_sensitivity ();
+
+ _sizer->Add (buttons, 0, wxALL, 6);
+
+ panel->SetSizer (_sizer);
+
+ Bind (wxEVT_CLOSE_WINDOW, boost::bind (&DOMFrame::close, this, _1));
+ Bind (wxEVT_SIZE, boost::bind (&DOMFrame::sized, this, _1));
+ }
+
+ void setup_sensitivity ()
+ {
+ _pause->Enable (!JobManager::instance()->paused());
+ _resume->Enable (JobManager::instance()->paused());
+ }
+
+ void pause ()
+ {
+ JobManager::instance()->pause ();
+ setup_sensitivity ();
+ }
+
+ void resume ()
+ {
+ JobManager::instance()->resume ();
+ setup_sensitivity ();
+ }
+
+ void start_job (boost::filesystem::path path)
+ {
+ try {
+ shared_ptr<Film> film (new Film (path));
+ film->read_metadata ();
+
+ double total_required;
+ double available;
+ bool can_hard_link;
+
+ film->should_be_enough_disk_space (total_required, available, can_hard_link);
+
+ set<shared_ptr<const Film> > films;