diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-08-17 00:21:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-08-17 00:21:26 +0100 |
| commit | 55861a0b4ad4270f80b8d1ae10230cf2ebb25735 (patch) | |
| tree | bc637b891ffce5070ee6b807796d0e7e839bc8fa /src | |
| parent | fdcce9bdc44b246151ffe1aa6250f456e41d9c3d (diff) | |
Make KDM output options checkboxes rather than radios (part of #848).
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/kdm_dialog.cc | 6 | ||||
| -rw-r--r-- | src/wx/kdm_output_panel.cc | 10 | ||||
| -rw-r--r-- | src/wx/kdm_output_panel.h | 5 |
3 files changed, 15 insertions, 6 deletions
diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc index ef7912ee3..b5ebd1e96 100644 --- a/src/wx/kdm_dialog.cc +++ b/src/wx/kdm_dialog.cc @@ -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 */ @@ -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), diff --git a/src/wx/kdm_output_panel.cc b/src/wx/kdm_output_panel.cc index 4130e4938..88ead96e2 100644 --- a/src/wx/kdm_output_panel.cc +++ b/src/wx/kdm_output_panel.cc @@ -71,7 +71,7 @@ KDMOutputPanel::KDMOutputPanel (wxWindow* parent, bool interop) _filename_format = new NameFormatEditor (this, Config::instance()->kdm_filename_format(), titles, ex, ".xml"); table->Add (_filename_format->panel(), 1, wxEXPAND); - _write_to = new wxRadioButton (this, wxID_ANY, _("Write to")); + _write_to = new wxCheckBox (this, wxID_ANY, _("Write to")); table->Add (_write_to, 1, wxEXPAND); #ifdef DCPOMATIC_USE_OWN_PICKER @@ -84,7 +84,7 @@ KDMOutputPanel::KDMOutputPanel (wxWindow* parent, bool interop) table->Add (_folder, 1, wxEXPAND); - _email = new wxRadioButton (this, wxID_ANY, _("Send by email")); + _email = new wxCheckBox (this, wxID_ANY, _("Send by email")); table->Add (_email, 1, wxEXPAND); table->AddSpacer (0); @@ -114,6 +114,12 @@ KDMOutputPanel::write_to () const return _write_to->GetValue (); } +bool +KDMOutputPanel::email () const +{ + return _email->GetValue (); +} + dcp::Formulation KDMOutputPanel::formulation () const { diff --git a/src/wx/kdm_output_panel.h b/src/wx/kdm_output_panel.h index efc9c0c93..98e2622a9 100644 --- a/src/wx/kdm_output_panel.h +++ b/src/wx/kdm_output_panel.h @@ -34,6 +34,7 @@ public: boost::filesystem::path directory () const; bool write_to () const; + bool email () const; dcp::Formulation formulation () const; dcp::NameFormat name_format () const; @@ -43,11 +44,11 @@ public: private: wxChoice* _type; NameFormatEditor* _filename_format; - wxRadioButton* _write_to; + wxCheckBox* _write_to; #ifdef DCPOMATIC_USE_OWN_PICKER DirPickerCtrl* _folder; #else wxDirPickerCtrl* _folder; #endif - wxRadioButton* _email; + wxCheckBox* _email; }; |
