X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fi18n_hook.cc;h=f6b9636227f4a33196cc7453c87708ce27a23674;hb=92933c13e9233149e4e80244d92da81b70072214;hp=b2cd6df8e7f5e1af60ff0179cb2673bac43422b1;hpb=674f59e307919856118d21aa03b53eb6fa82aeb0;p=dcpomatic.git diff --git a/src/wx/i18n_hook.cc b/src/wx/i18n_hook.cc index b2cd6df8e..f6b963622 100644 --- a/src/wx/i18n_hook.cc +++ b/src/wx/i18n_hook.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2018-2019 Carl Hetherington + Copyright (C) 2018-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,15 +18,21 @@ */ + #include "i18n_hook.h" #include "instant_i18n_dialog.h" #include "wx_util.h" #include "lib/cross.h" #include -#include +#include + using std::map; using std::string; +#if BOOST_VERSION >= 106100 +using namespace boost::placeholders; +#endif + map I18NHook::_translations; @@ -37,15 +43,16 @@ I18NHook::I18NHook (wxWindow* window, wxString original) _window->Bind (wxEVT_MIDDLE_DOWN, bind(&I18NHook::handle, this, _1)); } + void I18NHook::handle (wxMouseEvent& ev) { - InstantI18NDialog* d = new InstantI18NDialog (_window, get_text()); + auto d = new InstantI18NDialog (_window, get_text()); d->ShowModal(); set_text (d->get()); d->Destroy (); - wxWindow* w = _window; + auto w = _window; while (w) { if (w->GetContainingSizer()) { w->GetContainingSizer()->Layout();