projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
C++11 tidying.
[dcpomatic.git]
/
src
/
wx
/
i18n_hook.cc
diff --git
a/src/wx/i18n_hook.cc
b/src/wx/i18n_hook.cc
index 827e81bc94612b0d547fa6e874f60878ce77a47d..f6b9636227f4a33196cc7453c87708ce27a23674 100644
(file)
--- a/
src/wx/i18n_hook.cc
+++ b/
src/wx/i18n_hook.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2018-20
19
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2018-20
21
Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
@@
-18,6
+18,7
@@
*/
*/
+
#include "i18n_hook.h"
#include "instant_i18n_dialog.h"
#include "wx_util.h"
#include "i18n_hook.h"
#include "instant_i18n_dialog.h"
#include "wx_util.h"
@@
-25,6
+26,7
@@
#include <wx/wx.h>
#include <boost/bind/bind.hpp>
#include <wx/wx.h>
#include <boost/bind/bind.hpp>
+
using std::map;
using std::string;
#if BOOST_VERSION >= 106100
using std::map;
using std::string;
#if BOOST_VERSION >= 106100
@@
-41,15
+43,16
@@
I18NHook::I18NHook (wxWindow* window, wxString original)
_window->Bind (wxEVT_MIDDLE_DOWN, bind(&I18NHook::handle, this, _1));
}
_window->Bind (wxEVT_MIDDLE_DOWN, bind(&I18NHook::handle, this, _1));
}
+
void
I18NHook::handle (wxMouseEvent& ev)
{
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 ();
d->ShowModal();
set_text (d->get());
d->Destroy ();
-
wxWindow*
w = _window;
+
auto
w = _window;
while (w) {
if (w->GetContainingSizer()) {
w->GetContainingSizer()->Layout();
while (w) {
if (w->GetContainingSizer()) {
w->GetContainingSizer()->Layout();