diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-03-14 00:09:09 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-03-14 00:17:52 +0100 |
| commit | fa413e203b864571ca00ec937088b87793f312df (patch) | |
| tree | fe885bdc1be87ff9589e8410c4800a598f1f3855 /src/wx/kdm_output_panel.cc | |
| parent | 93845c89294ee65756752c179a3fd8511793b1a2 (diff) | |
Remember the state of the write to/email checkboxes in the KDM creator across runs (#2213).
Diffstat (limited to 'src/wx/kdm_output_panel.cc')
| -rw-r--r-- | src/wx/kdm_output_panel.cc | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/wx/kdm_output_panel.cc b/src/wx/kdm_output_panel.cc index 33b9cb4f0..7b739720f 100644 --- a/src/wx/kdm_output_panel.cc +++ b/src/wx/kdm_output_panel.cc @@ -154,10 +154,11 @@ KDMOutputPanel::KDMOutputPanel (wxWindow* parent) break; } - _write_to->SetValue (true); + _write_to->SetValue (Config::instance()->write_kdms_to_disk()); + _email->SetValue (Config::instance()->email_kdms()); - _write_to->Bind (wxEVT_CHECKBOX, boost::bind (&KDMOutputPanel::setup_sensitivity, this)); - _email->Bind (wxEVT_CHECKBOX, boost::bind (&KDMOutputPanel::setup_sensitivity, this)); + _write_to->Bind (wxEVT_CHECKBOX, boost::bind (&KDMOutputPanel::write_to_changed, this)); + _email->Bind (wxEVT_CHECKBOX, boost::bind (&KDMOutputPanel::email_changed, 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)); @@ -168,6 +169,22 @@ KDMOutputPanel::KDMOutputPanel (wxWindow* parent) void +KDMOutputPanel::write_to_changed () +{ + Config::instance()->set_write_kdms_to_disk(_write_to->GetValue()); + setup_sensitivity (); +} + + +void +KDMOutputPanel::email_changed () +{ + Config::instance()->set_email_kdms(_email->GetValue()); + setup_sensitivity (); +} + + +void KDMOutputPanel::setup_sensitivity () { bool const write = _write_to->GetValue (); |
