X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fi18n_hook.cc;h=eb6e61d5fb2bb19768d344c23008cd71a9061b1d;hb=60a864b0b9985f9e84db7028d5b9a523ecfde522;hp=827e81bc94612b0d547fa6e874f60878ce77a47d;hpb=bd7f4bbde17d2087ba4c4bddf6439b3df869b1db;p=dcpomatic.git diff --git a/src/wx/i18n_hook.cc b/src/wx/i18n_hook.cc index 827e81bc9..eb6e61d5f 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,13 +18,18 @@ */ + #include "i18n_hook.h" #include "instant_i18n_dialog.h" #include "wx_util.h" #include "lib/cross.h" +#include +LIBDCP_DISABLE_WARNINGS #include +LIBDCP_ENABLE_WARNINGS #include + using std::map; using std::string; #if BOOST_VERSION >= 106100 @@ -41,15 +46,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();