diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-05-06 00:55:18 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-06-03 22:26:16 +0200 |
| commit | cacb0750b9e6efbefa5ffa33a0df9552db5483db (patch) | |
| tree | 98deb6fb61004f9c1dadca65bf3f74c3a15929ad /src/wx/kdm_output_panel.cc | |
| parent | 2bdee4f8e7712c50125b296a50c967101e619f94 (diff) | |
Allow sending KDMs to more emails (#2244).
Diffstat (limited to 'src/wx/kdm_output_panel.cc')
| -rw-r--r-- | src/wx/kdm_output_panel.cc | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/src/wx/kdm_output_panel.cc b/src/wx/kdm_output_panel.cc index 98f408135..75971c14b 100644 --- a/src/wx/kdm_output_panel.cc +++ b/src/wx/kdm_output_panel.cc @@ -22,6 +22,7 @@ #include "check_box.h" #include "confirm_kdm_email_dialog.h" #include "dcpomatic_button.h" +#include "extra_kdm_email_dialog.h" #include "kdm_advanced_dialog.h" #include "kdm_choice.h" #include "kdm_output_panel.h" @@ -50,6 +51,7 @@ using std::exception; using std::function; using std::list; using std::make_pair; +using std::make_shared; using std::pair; using std::shared_ptr; using std::string; @@ -135,7 +137,8 @@ KDMOutputPanel::KDMOutputPanel (wxWindow* parent) _email = new CheckBox (this, _("Send by email")); table->Add (_email, 1, wxEXPAND); - table->AddSpacer (0); + auto add_email_addresses = new wxButton(this, wxID_ANY, _("Set additional email addresses...")); + table->Add (add_email_addresses); switch (Config::instance()->last_kdm_write_type().get_value_or(Config::KDM_WRITE_FLAT)) { case Config::KDM_WRITE_FLAT: @@ -154,6 +157,7 @@ KDMOutputPanel::KDMOutputPanel (wxWindow* parent) _write_to->Bind (wxEVT_CHECKBOX, boost::bind (&KDMOutputPanel::write_to_changed, this)); _email->Bind (wxEVT_CHECKBOX, boost::bind (&KDMOutputPanel::email_changed, this)); + add_email_addresses->Bind (wxEVT_BUTTON, boost::bind(&KDMOutputPanel::add_email_addresses_clicked, this)); _write_flat->Bind (wxEVT_RADIOBUTTON, boost::bind (&KDMOutputPanel::kdm_write_type_changed, this)); _write_folder->Bind (wxEVT_RADIOBUTTON, boost::bind (&KDMOutputPanel::kdm_write_type_changed, this)); _write_zip->Bind (wxEVT_RADIOBUTTON, boost::bind (&KDMOutputPanel::kdm_write_type_changed, this)); @@ -301,13 +305,12 @@ KDMOutputPanel::make ( } if (_email->GetValue ()) { - job.reset ( - new SendKDMEmailJob ( - cinema_kdms, - _container_name_format->get(), - _filename_format->get(), - name - ) + job = make_shared<SendKDMEmailJob>( + cinema_kdms, + _container_name_format->get(), + _filename_format->get(), + name, + _extra_addresses ); } @@ -335,3 +338,15 @@ KDMOutputPanel::directory () const { return wx_to_std (_folder->GetPath ()); } + + +void +KDMOutputPanel::add_email_addresses_clicked () +{ + auto dialog = new ExtraKDMEmailDialog (this, _extra_addresses); + if (dialog->ShowModal() == wxID_OK) { + _extra_addresses = dialog->get(); + } + dialog->Destroy(); +} + |
