Fixing build against wxWidgets 3.0

The wxString saga continues. wxWidgets 3.0 don't have the wxString::FromUTF8(const std::string&) overload, we must use the GUI::from_u8 helper
Also wxWidgets 3.0 don't allow to disable wxString->const char* conversion, so calling show_info(wxWindow*, wxString, const char*) was ambiguous
Several includes moved around
This commit is contained in:
Lukas Matena 2020-03-04 09:24:13 +01:00
parent a87ba5d6a6
commit eb3b65d8af
15 changed files with 28 additions and 22 deletions
src/slic3r/GUI

View file

@ -422,14 +422,14 @@ void ConfigWizardPage::append_spacer(int space)
// Wizard pages
PageWelcome::PageWelcome(ConfigWizard *parent)
: ConfigWizardPage(parent, wxString::FromUTF8((boost::format(
: ConfigWizardPage(parent, from_u8((boost::format(
#ifdef __APPLE__
_utf8(L("Welcome to the %s Configuration Assistant"))
#else
_utf8(L("Welcome to the %s Configuration Wizard"))
#endif
) % SLIC3R_APP_NAME).str()), _(L("Welcome")))
, welcome_text(append_text(wxString::FromUTF8((boost::format(
, welcome_text(append_text(from_u8((boost::format(
_utf8(L("Hello, welcome to %s! This %s helps you with the initial configuration; just a few settings and you will be ready to print.")))
% SLIC3R_APP_NAME
% _utf8(ConfigWizard::name())).str())
@ -478,7 +478,7 @@ PagePrinters::PagePrinters(ConfigWizard *parent,
continue;
}
const auto picker_title = family.empty() ? wxString() : wxString::FromUTF8((boost::format(_utf8(L("%s Family"))) % family).str());
const auto picker_title = family.empty() ? wxString() : from_u8((boost::format(_utf8(L("%s Family"))) % family).str());
auto *picker = new PrinterPicker(this, vendor, picker_title, MAX_COLS, *appconfig, filter);
picker->Bind(EVT_PRINTER_PICK, [this, appconfig](const PrinterPickerEvent &evt) {