#include "lib/util.h"
#include <dcp/exceptions.h>
#include <dcp/certificate_chain.h>
-#include "lib/warnings.h"
-DCPOMATIC_DISABLE_WARNINGS
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
#include <wx/filepicker.h>
#include <wx/validate.h>
-DCPOMATIC_ENABLE_WARNINGS
+LIBDCP_ENABLE_WARNINGS
#include <iostream>
using std::cout;
-using std::list;
using std::string;
using std::vector;
using boost::bind;
RecipientDialog::RecipientDialog (
- wxWindow* parent, wxString title, string name, string notes, list<string> emails, int utc_offset_hour, int utc_offset_minute, optional<dcp::Certificate> recipient
+ wxWindow* parent, wxString title, string name, string notes, vector<string> emails, int utc_offset_hour, int utc_offset_minute, optional<dcp::Certificate> recipient
)
: wxDialog (parent, wxID_ANY, title)
, _recipient (recipient)
vector<EditableListColumn> columns;
columns.push_back (EditableListColumn(_("Address")));
_email_list = new EditableList<string, EmailDialog> (
- this, columns, bind(&RecipientDialog::get_emails, this), bind(&RecipientDialog::set_emails, this, _1), bind(&column, _1)
+ this, columns, bind(&RecipientDialog::get_emails, this), bind(&RecipientDialog::set_emails, this, _1), bind(&column, _1),
+ EditableListTitle::VISIBLE,
+ EditableListButton::NEW | EditableListButton::EDIT | EditableListButton::REMOVE
);
_sizer->Add (_email_list, wxGBPosition (r, 0), wxGBSpan (1, 2), wxEXPAND);
void
RecipientDialog::get_recipient_from_file ()
{
- auto d = new wxFileDialog (this, _("Select Certificate File"));
+ auto d = make_wx<wxFileDialog>(this, _("Select Certificate File"));
if (d->ShowModal () == wxID_OK) {
load_recipient (boost::filesystem::path (wx_to_std (d->GetPath ())));
}
- d->Destroy ();
setup_sensitivity ();
}
}
-list<string>
+vector<string>
RecipientDialog::emails () const
{
- list<string> e;
- copy (_emails.begin(), _emails.end(), back_inserter(e));
- return e;
+ return _emails;
}