diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-08-09 02:17:04 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-09-03 17:02:24 +0200 |
| commit | bee00c5c4d015b69b770c699ff0bbcd72815fa13 (patch) | |
| tree | 71eda94797125eb2294b892ddc236d769b70635f /src/wx/wx_util.cc | |
| parent | 6c5cd3e54f7a63ca89a824944b3c87236815764b (diff) | |
Make context_translation take a char array.
Diffstat (limited to 'src/wx/wx_util.cc')
| -rw-r--r-- | src/wx/wx_util.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index 7f16760e0..481ff9447 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -554,10 +554,11 @@ wx_get (wxSpinCtrlDouble* w) * @return translation, or String if no translation is available. */ wxString -context_translation (wxString s) +context_translation(char const* s) { - auto t = wxGetTranslation (s); - if (t == s) { + auto wx_s = char_to_wx(s); + auto t = wxGetTranslation(wx_s); + if (t == wx_s) { /* No translation; strip the context */ int c = t.Find (wxT ("|")); if (c != wxNOT_FOUND) { @@ -619,7 +620,7 @@ maybe_show_splash () { /* This wxMemoryDC must be destroyed before bitmap can be used elsewhere */ wxMemoryDC dc(bitmap); - auto const version = wxString::Format("%s (%s)", dcpomatic_version, dcpomatic_git_commit); + auto const version = wxString::Format(char_to_wx("%s (%s)"), std_to_wx(dcpomatic_version), std_to_wx(dcpomatic_git_commit)); auto screen_size = dc.GetSize(); auto text_size = dc.GetTextExtent(version); dc.DrawText(version, (screen_size.GetWidth() - text_size.GetWidth()) / 2, 236); |
