Add a basic management dialogue for templates.
[dcpomatic.git] / src / wx / kdm_dialog.cc
index 253050ddf52de2444b85fa99cee26342c2cd4327..b5ebd1e968c79dd0e1d11406244e24d5414e3eb3 100644 (file)
@@ -55,7 +55,7 @@ KDMDialog::KDMDialog (wxWindow* parent, shared_ptr<const Film> film)
        wxBoxSizer* left = new wxBoxSizer (wxVERTICAL);
        wxBoxSizer* right = new wxBoxSizer (wxVERTICAL);
 
-       horizontal->Add (left, 1, wxEXPAND | wxRIGHT, DCPOMATIC_SIZER_X_GAP * 2);
+       horizontal->Add (left, 1, wxEXPAND | wxRIGHT, DCPOMATIC_SIZER_X_GAP * 4);
        horizontal->Add (right, 1, wxEXPAND);
 
        /* Font for sub-headings */
@@ -133,10 +133,10 @@ KDMDialog::make_clicked ()
                        _screens->screens(), _cpl->cpl(), _timing->from(), _timing->until(), _output->formulation()
                        );
 
-               NameFormat::Map name_values;
-               name_values["film_name"] = film->name();
-               name_values["from"] = dcp::LocalTime(_timing->from()).date() + " " + dcp::LocalTime(_timing->from()).time_of_day();
-               name_values["to"] = dcp::LocalTime(_timing->until()).date() + " " + dcp::LocalTime(_timing->until()).time_of_day();
+               dcp::NameFormat::Map name_values;
+               name_values['f'] = film->name();
+               name_values['b'] = dcp::LocalTime(_timing->from()).date() + " " + dcp::LocalTime(_timing->from()).time_of_day();
+               name_values['e'] = dcp::LocalTime(_timing->until()).date() + " " + dcp::LocalTime(_timing->until()).time_of_day();
 
                if (_output->write_to ()) {
                        ScreenKDM::write_files (
@@ -145,7 +145,9 @@ KDMDialog::make_clicked ()
                                _output->name_format(),
                                name_values
                                );
-               } else {
+               }
+
+               if (_output->email ()) {
                        JobManager::instance()->add (
                                shared_ptr<Job> (new SendKDMEmailJob (
                                                         CinemaKDMs::collect (screen_kdms),