diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-12-17 01:40:51 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-12-17 01:40:51 +0100 |
| commit | 235483a91d4160f4b9b2e53f1a7d5c4cb5b27925 (patch) | |
| tree | 6735b612a8d03988600b02fc186306459c07ff01 /src/wx/extra_kdm_email_dialog.cc | |
| parent | 6e8f8563f4e4e6ff04b632aff8d6ae95de945649 (diff) | |
Refactor EditableList to take a new pair of functors for new/edit operations.
In the future this will allow more intricate text displays in
EditableLists.
Diffstat (limited to 'src/wx/extra_kdm_email_dialog.cc')
| -rw-r--r-- | src/wx/extra_kdm_email_dialog.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/wx/extra_kdm_email_dialog.cc b/src/wx/extra_kdm_email_dialog.cc index de11825f4..c427b286d 100644 --- a/src/wx/extra_kdm_email_dialog.cc +++ b/src/wx/extra_kdm_email_dialog.cc @@ -45,10 +45,16 @@ ExtraKDMEmailDialog::ExtraKDMEmailDialog (wxWindow* parent, vector<string> email vector<EditableListColumn> columns; columns.push_back (EditableListColumn(_("Address"), 500, true)); - _email_list = new EditableList<string, EmailDialog> ( - this, columns, bind(&ExtraKDMEmailDialog::get, this), bind(&ExtraKDMEmailDialog::set, this, _1), [](string s, int) { - return s; - }, EditableListTitle::INVISIBLE, EditableListButton::NEW | EditableListButton::EDIT | EditableListButton::REMOVE + _email_list = new EditableList<string>( + this, + columns, + bind(&ExtraKDMEmailDialog::get, this), + bind(&ExtraKDMEmailDialog::set, this, _1), + EditableList<string>::add_with_dialog<EmailDialog>, + EditableList<string>::edit_with_dialog<EmailDialog>, + [](string s, int) { return s; }, + EditableListTitle::INVISIBLE, + EditableListButton::NEW | EditableListButton::EDIT | EditableListButton::REMOVE ); sizer->Add (_email_list, wxGBPosition(r, 0), wxGBSpan(1, 2), wxEXPAND); |
