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

View file

@ -219,10 +219,10 @@ void BonjourDialog::on_timer(wxTimerEvent &)
if (timer_state > 0) {
const std::string dots(timer_state, '.');
label->SetLabel(wxString::FromUTF8((boost::format("%1% %2%") % search_str % dots).str()));
label->SetLabel(GUI::from_u8((boost::format("%1% %2%") % search_str % dots).str()));
timer_state = (timer_state) % 3 + 1;
} else {
label->SetLabel(wxString::FromUTF8((boost::format("%1%: %2%") % search_str % (_utf8(L("Finished"))+".")).str()));
label->SetLabel(GUI::from_u8((boost::format("%1%: %2%") % search_str % (_utf8(L("Finished"))+".")).str()));
timer->Stop();
}
}