diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-08-10 00:41:52 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-09-03 17:02:24 +0200 |
| commit | c97de27f9c5364b6f126016c5e1f31a76d5ce565 (patch) | |
| tree | f29bd3c22e60f9abdfbe46f145279d9af7aa7256 /src/tools | |
| parent | 5ed17cd197aa743922da18e2a5753f746d38122e (diff) | |
Remove use of wxT in favour of char_to_wx().
The wxWidgets docs advise against its use these days.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic.cc | 16 | ||||
| -rw-r--r-- | src/tools/dcpomatic_batch.cc | 2 | ||||
| -rw-r--r-- | src/tools/dcpomatic_combiner.cc | 2 | ||||
| -rw-r--r-- | src/tools/dcpomatic_disk.cc | 8 | ||||
| -rw-r--r-- | src/tools/dcpomatic_editor.cc | 2 | ||||
| -rw-r--r-- | src/tools/dcpomatic_kdm.cc | 4 | ||||
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 6 | ||||
| -rw-r--r-- | src/tools/dcpomatic_playlist.cc | 2 | ||||
| -rw-r--r-- | src/tools/dcpomatic_server.cc | 4 |
9 files changed, 23 insertions, 23 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index a2e44280c..e80bfc333 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -777,7 +777,7 @@ private: void tools_export_preferences () { FileDialog dialog( - this, _("Specify ZIP file"), wxT("ZIP files (*.zip)|*.zip"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, "Preferences", string("dcpomatic_config.zip") + this, _("Specify ZIP file"), char_to_wx("ZIP files (*.zip)|*.zip"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, "Preferences", string("dcpomatic_config.zip") ); if (dialog.ShowModal() == wxID_OK) { @@ -797,7 +797,7 @@ private: void tools_import_preferences() { - FileDialog dialog(this, _("Specify ZIP file"), wxT("ZIP files (*.zip)|*.zip"), wxFD_OPEN, "Preferences"); + FileDialog dialog(this, _("Specify ZIP file"), char_to_wx("ZIP files (*.zip)|*.zip"), wxFD_OPEN, "Preferences"); if (!dialog.show()) { return; @@ -1774,18 +1774,18 @@ private: void OnInitCmdLine (wxCmdLineParser& parser) override { parser.SetDesc (command_line_description); - parser.SetSwitchChars (wxT ("-")); + parser.SetSwitchChars(char_to_wx("-")); } bool OnCmdLineParsed (wxCmdLineParser& parser) override { - if (parser.Found (wxT("version"))) { + if (parser.Found(char_to_wx("version"))) { cout << "dcpomatic version " << dcpomatic_version << " " << dcpomatic_git_commit << "\n"; exit (EXIT_SUCCESS); } if (parser.GetParamCount() > 0) { - if (parser.Found (wxT ("new"))) { + if (parser.Found(char_to_wx("new"))) { _film_to_create = wx_to_std (parser.GetParam (0)); } else { _film_to_load = wx_to_std (parser.GetParam (0)); @@ -1793,17 +1793,17 @@ private: } wxString content; - if (parser.Found (wxT ("content"), &content)) { + if (parser.Found(char_to_wx("content"), &content)) { _content_to_add = wx_to_std (content); } wxString dcp; - if (parser.Found (wxT ("dcp"), &dcp)) { + if (parser.Found(char_to_wx("dcp"), &dcp)) { _dcp_to_add = wx_to_std (dcp); } wxString config; - if (parser.Found (wxT("config"), &config)) { + if (parser.Found(char_to_wx("config"), &config)) { State::override_path = wx_to_std (config); } diff --git a/src/tools/dcpomatic_batch.cc b/src/tools/dcpomatic_batch.cc index 51d700d20..379a3c074 100644 --- a/src/tools/dcpomatic_batch.cc +++ b/src/tools/dcpomatic_batch.cc @@ -516,7 +516,7 @@ class App : public wxApp void OnInitCmdLine (wxCmdLineParser& parser) override { parser.SetDesc (command_line_description); - parser.SetSwitchChars (wxT ("-")); + parser.SetSwitchChars(char_to_wx("-")); } bool OnCmdLineParsed (wxCmdLineParser& parser) override diff --git a/src/tools/dcpomatic_combiner.cc b/src/tools/dcpomatic_combiner.cc index 49ada2580..890f01ad0 100644 --- a/src/tools/dcpomatic_combiner.cc +++ b/src/tools/dcpomatic_combiner.cc @@ -117,7 +117,7 @@ public: output->AddGrowableCol (1, 1); add_label_to_sizer (output, overall_panel, _("Annotation text"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL); - _annotation_text = new wxTextCtrl (overall_panel, wxID_ANY, wxT("")); + _annotation_text = new wxTextCtrl(overall_panel, wxID_ANY, {}); output->Add (_annotation_text, 1, wxEXPAND); add_label_to_sizer (output, overall_panel, _("Output DCP folder"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL); diff --git a/src/tools/dcpomatic_disk.cc b/src/tools/dcpomatic_disk.cc index 235677461..076cf295b 100644 --- a/src/tools/dcpomatic_disk.cc +++ b/src/tools/dcpomatic_disk.cc @@ -81,7 +81,7 @@ class DirDialogWrapper : public wxDirDialog { public: DirDialogWrapper (wxWindow* parent) - : wxDirDialog (parent, _("Choose a DCP folder"), wxT(""), wxDD_DIR_MUST_EXIST) + : wxDirDialog (parent, _("Choose a DCP folder"), {}, wxDD_DIR_MUST_EXIST) { } @@ -530,15 +530,15 @@ public: void OnInitCmdLine (wxCmdLineParser& parser) override { parser.SetDesc (command_line_description); - parser.SetSwitchChars (wxT ("-")); + parser.SetSwitchChars(char_to_wx("-")); } bool OnCmdLineParsed (wxCmdLineParser& parser) override { - _skip_alpha_check = parser.Found(wxT("sure")); + _skip_alpha_check = parser.Found(char_to_wx("sure")); wxString dcp; - if (parser.Found(wxT("dcp"), &dcp)) { + if (parser.Found(char_to_wx("dcp"), &dcp)) { _dcp_to_write = wx_to_std (dcp); } diff --git a/src/tools/dcpomatic_editor.cc b/src/tools/dcpomatic_editor.cc index a42517ffc..3ca314355 100644 --- a/src/tools/dcpomatic_editor.cc +++ b/src/tools/dcpomatic_editor.cc @@ -507,7 +507,7 @@ private: void OnInitCmdLine (wxCmdLineParser& parser) override { parser.SetDesc (command_line_description); - parser.SetSwitchChars (wxT ("-")); + parser.SetSwitchChars(char_to_wx("-")); } bool OnCmdLineParsed (wxCmdLineParser& parser) override diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc index 909c4e281..64c7ca7e3 100644 --- a/src/tools/dcpomatic_kdm.cc +++ b/src/tools/dcpomatic_kdm.cc @@ -575,7 +575,7 @@ private: void add_dkdm_clicked () { - FileDialog dialog(this, _("Select DKDM file"), wxT("XML files|*.xml|All files|*.*"), wxFD_MULTIPLE, "AddDKDMPath"); + FileDialog dialog(this, _("Select DKDM file"), char_to_wx("XML files|*.xml|All files|*.*"), wxFD_MULTIPLE, "AddDKDMPath"); if (!dialog.show()) { return; } @@ -789,7 +789,7 @@ private: } wxFileDialog dialog( - this, _("Select DKDM File"), wxEmptyString, wxEmptyString, wxT("XML files (*.xml)|*.xml"), + this, _("Select DKDM File"), wxEmptyString, wxEmptyString, char_to_wx("XML files (*.xml)|*.xml"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 424c3917c..2b4ba41db 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -742,7 +742,7 @@ private: void file_add_kdm () { - FileDialog dialog(this, _("Select KDM"), wxT("XML files|*.xml|All files|*.*"), wxFD_MULTIPLE, "AddKDMPath"); + FileDialog dialog(this, _("Select KDM"), char_to_wx("XML files|*.xml|All files|*.*"), wxFD_MULTIPLE, "AddKDMPath"); if (dialog.show()) { DCPOMATIC_ASSERT (_film); @@ -905,7 +905,7 @@ private: _viewer.set_pad_black(_mode != Config::PLAYER_MODE_WINDOW); if (_mode == Config::PLAYER_MODE_DUAL) { - _dual_screen = new wxFrame (this, wxID_ANY, wxT("")); + _dual_screen = new wxFrame(this, wxID_ANY, {}); _dual_screen->SetBackgroundColour (wxColour(0, 0, 0)); _dual_screen->ShowFullScreen (true); _viewer.panel()->Reparent(_dual_screen); @@ -1342,7 +1342,7 @@ private: void OnInitCmdLine (wxCmdLineParser& parser) override { parser.SetDesc (command_line_description); - parser.SetSwitchChars (wxT ("-")); + parser.SetSwitchChars(char_to_wx("-")); } bool OnCmdLineParsed (wxCmdLineParser& parser) override diff --git a/src/tools/dcpomatic_playlist.cc b/src/tools/dcpomatic_playlist.cc index 5900467ef..7798c3278 100644 --- a/src/tools/dcpomatic_playlist.cc +++ b/src/tools/dcpomatic_playlist.cc @@ -375,7 +375,7 @@ public: } _name->SetValue (std_to_wx(_playlist->name())); } else { - _name->SetValue (wxT("")); + _name->SetValue({}); } setup_sensitivity (); } diff --git a/src/tools/dcpomatic_server.cc b/src/tools/dcpomatic_server.cc index 3a3894dae..5747e89af 100644 --- a/src/tools/dcpomatic_server.cc +++ b/src/tools/dcpomatic_server.cc @@ -167,14 +167,14 @@ public: auto state_sizer = new wxFlexGridSizer (2, DCPOMATIC_SIZER_GAP, DCPOMATIC_SIZER_GAP); add_label_to_sizer (state_sizer, this, _("Frames per second"), true); - _fps = new StaticText (this, wxT("")); + _fps = new StaticText(this, {}); state_sizer->Add (_fps); auto log_sizer = new wxFlexGridSizer (1, DCPOMATIC_SIZER_GAP, DCPOMATIC_SIZER_GAP); log_sizer->AddGrowableCol (0, 1); wxClientDC dc (this); - wxSize size = dc.GetTextExtent (wxT ("This is the length of the file label it should be quite long")); + wxSize size = dc.GetTextExtent(char_to_wx("This is the length of the file label it should be quite long")); int const height = (size.GetHeight() + 2) * log_lines; SetSize (700, height + DCPOMATIC_SIZER_GAP * 2); |
