X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Frecipient_dialog.cc;h=f6e0b2cfc60928d28c09cb6e483c4ee6852b6fed;hb=7861a2f4fe15952d43323a64284afd71427d09f4;hp=1d36046ddad2cce697dde6c14c49774c068de429;hpb=5d9de49a60c70dac3213ef8de040fcfe8bfc58aa;p=dcpomatic.git diff --git a/src/wx/recipient_dialog.cc b/src/wx/recipient_dialog.cc index 1d36046dd..f6e0b2cfc 100644 --- a/src/wx/recipient_dialog.cc +++ b/src/wx/recipient_dialog.cc @@ -18,30 +18,34 @@ */ + +#include "dcpomatic_button.h" +#include "download_certificate_dialog.h" #include "recipient_dialog.h" -#include "wx_util.h" -#include "file_dialog_wrapper.h" #include "static_text.h" -#include "download_certificate_dialog.h" #include "table_dialog.h" -#include "dcpomatic_button.h" +#include "wx_util.h" #include "lib/compose.hpp" #include "lib/util.h" #include #include -#include "lib/warnings.h" -DCPOMATIC_DISABLE_WARNINGS +#include +LIBDCP_DISABLE_WARNINGS #include #include -DCPOMATIC_ENABLE_WARNINGS +LIBDCP_ENABLE_WARNINGS #include -using std::string; + using std::cout; -using std::vector; using std::list; -using boost::optional; +using std::string; +using std::vector; using boost::bind; +using boost::optional; +#if BOOST_VERSION >= 106100 +using namespace boost::placeholders; +#endif static string @@ -57,7 +61,7 @@ RecipientDialog::RecipientDialog ( : wxDialog (parent, wxID_ANY, title) , _recipient (recipient) { - wxBoxSizer* overall_sizer = new wxBoxSizer (wxVERTICAL); + auto overall_sizer = new wxBoxSizer (wxVERTICAL); SetSizer (overall_sizer); _sizer = new wxGridBagSizer (DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); @@ -93,14 +97,14 @@ RecipientDialog::RecipientDialog ( ++r; wxClientDC dc (this); - wxFont font = _name->GetFont (); + auto font = _name->GetFont (); font.SetFamily (wxFONTFAMILY_TELETYPE); dc.SetFont (font); - wxSize size = dc.GetTextExtent (wxT ("1234567890123456789012345678")); - size.SetHeight (-1); + auto size = dc.GetTextExtent(wxT("1234567890123456789012345678")); + size.SetHeight (-1); add_label_to_sizer (_sizer, this, _("Recipient certificate"), true, wxGBPosition (r, 0)); - wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL); + auto s = new wxBoxSizer (wxHORIZONTAL); _recipient_thumbprint = new StaticText (this, wxT (""), wxDefaultPosition, size); _recipient_thumbprint->SetFont (font); set_recipient (recipient); @@ -118,7 +122,7 @@ RecipientDialog::RecipientDialog ( overall_sizer->Add (_sizer, 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER); - wxSizer* buttons = CreateSeparatedButtonSizer (wxOK | wxCANCEL); + auto buttons = CreateSeparatedButtonSizer (wxOK | wxCANCEL); if (buttons) { overall_sizer->Add (buttons, wxSizerFlags().Expand().DoubleBorder()); } @@ -182,7 +186,7 @@ RecipientDialog::load_recipient (boost::filesystem::path file) void RecipientDialog::get_recipient_from_file () { - wxFileDialog* d = new wxFileDialog (this, _("Select Certificate File")); + auto d = new wxFileDialog (this, _("Select Certificate File")); if (d->ShowModal () == wxID_OK) { load_recipient (boost::filesystem::path (wx_to_std (d->GetPath ()))); } @@ -195,7 +199,7 @@ RecipientDialog::get_recipient_from_file () void RecipientDialog::setup_sensitivity () { - wxButton* ok = dynamic_cast (FindWindowById (wxID_OK, this)); + auto ok = dynamic_cast (FindWindowById (wxID_OK, this)); if (ok) { ok->Enable (static_cast(_recipient) && !_name->GetValue().IsEmpty()); }