diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-03-27 00:27:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-03-27 00:30:25 +0100 |
| commit | 76b0568f28839e802382f41b99b0ed5eea6f5479 (patch) | |
| tree | baab36b72be10832f9730b38c527e1700641b0a8 | |
| parent | 59f99b9b81c13941bb663a33539087019d65ff07 (diff) | |
Make DKDM output panel tell everyone what the output method is and when it changes.
| -rw-r--r-- | src/wx/dkdm_output_panel.cc | 21 | ||||
| -rw-r--r-- | src/wx/dkdm_output_panel.h | 6 |
2 files changed, 25 insertions, 2 deletions
diff --git a/src/wx/dkdm_output_panel.cc b/src/wx/dkdm_output_panel.cc index f47639f35..66f6dab71 100644 --- a/src/wx/dkdm_output_panel.cc +++ b/src/wx/dkdm_output_panel.cc @@ -92,14 +92,22 @@ DKDMOutputPanel::DKDMOutputPanel(wxWindow* parent) table->Add(_email, 1, wxEXPAND); table->AddSpacer(0); - _write_to->bind(&DKDMOutputPanel::setup_sensitivity, this); - _email->bind(&DKDMOutputPanel::setup_sensitivity, this); + _write_to->bind(&DKDMOutputPanel::method_changed, this); + _email->bind(&DKDMOutputPanel::method_changed, this); SetSizer(table); } void +DKDMOutputPanel::method_changed() +{ + setup_sensitivity(); + MethodChanged(); +} + + +void DKDMOutputPanel::setup_sensitivity() { _folder->Enable(_write_to->GetValue()); @@ -197,3 +205,12 @@ DKDMOutputPanel::directory() const { return wx_to_std(_folder->GetPath()); } + + +bool +DKDMOutputPanel::method_selected() const +{ + return _write_to->GetValue() || _email->GetValue(); +} + + diff --git a/src/wx/dkdm_output_panel.h b/src/wx/dkdm_output_panel.h index 71a897c41..31f621830 100644 --- a/src/wx/dkdm_output_panel.h +++ b/src/wx/dkdm_output_panel.h @@ -54,7 +54,13 @@ public: std::function<bool (boost::filesystem::path)> confirm_overwrite ); + bool method_selected() const; + + boost::signals2::signal<void ()> MethodChanged; + private: + void method_changed(); + NameFormatEditor* _filename_format; CheckBox* _write_to; #ifdef DCPOMATIC_USE_OWN_PICKER |
