summaryrefslogtreecommitdiff
path: root/src/wx/fonts_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-08-09 02:02:20 +0200
committerCarl Hetherington <cth@carlh.net>2024-09-03 17:02:24 +0200
commit5527bdb269e355ca95aa91fe3907bfef0ef17ff4 (patch)
tree5dd2fc2e81cf193c9712606f43f1e13e1a6e46bf /src/wx/fonts_dialog.cc
parenta27964bd1794bb6a843873a0eaf3faa2c5cc317a (diff)
Remove some implicit conversions between wxString and std::string.
Diffstat (limited to 'src/wx/fonts_dialog.cc')
-rw-r--r--src/wx/fonts_dialog.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wx/fonts_dialog.cc b/src/wx/fonts_dialog.cc
index 2fecdc086..b54841c68 100644
--- a/src/wx/fonts_dialog.cc
+++ b/src/wx/fonts_dialog.cc
@@ -120,7 +120,7 @@ FontsDialog::setup ()
_fonts->SetItem(n, 0, id);
_fonts->SetItemData(n, i->id().empty());
if (i->file()) {
- _fonts->SetItem(n, 1, i->file()->filename().string());
+ _fonts->SetItem(n, 1, std_to_wx(i->file()->filename().string()));
}
++n;
}
@@ -172,16 +172,16 @@ FontsDialog::set_from_file_clicked ()
/* The wxFD_CHANGE_DIR here prevents a `could not set working directory' error 123 on Windows when using
non-Latin filenames or paths.
*/
- wxString default_dir = "";
+ wxString default_dir;
#ifdef DCPOMATIC_LINUX
if (dcp::filesystem::exists("/usr/share/fonts/truetype")) {
- default_dir = "/usr/share/fonts/truetype";
+ default_dir = char_to_wx("/usr/share/fonts/truetype");
} else {
- default_dir = "/usr/share/fonts";
+ default_dir = char_to_wx("/usr/share/fonts");
}
#endif
#ifdef DCPOMATIC_OSX
- default_dir = "/System/Library/Fonts";
+ default_dir = char_to_wx("/System/Library/Fonts");
#endif
auto d = make_wx<wxFileDialog>(this, _("Choose a font file"), default_dir, wxT(""), wxT("*.ttf;*.otf;*.ttc"), wxFD_CHANGE_DIR);