Make KDM output options checkboxes rather than radios (part of #848).
authorCarl Hetherington <cth@carlh.net>
Tue, 16 Aug 2016 23:21:26 +0000 (00:21 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 16 Aug 2016 23:21:26 +0000 (00:21 +0100)
src/wx/kdm_dialog.cc
src/wx/kdm_output_panel.cc
src/wx/kdm_output_panel.h

index ef7912ee3c2adf2133672779aba63148d751209c..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 */
@@ -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),
index 4130e4938b1c4e486657f4441b4811e278fcd2ed..88ead96e2c713ecb87965cf00632612fdc749c19 100644 (file)
@@ -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
 {
index efc9c0c9307e578d5d34cfcecfcb32415bff13d7..98e2622a9b77b00809b5a5e98b9bbc705f22b084 100644 (file)
@@ -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;
 };