Fixed few more encoding issues
All uncovered after disabling unsafe wxString conversions
This commit is contained in:
parent
a877147afd
commit
91cabe5832
4 changed files with 9 additions and 9 deletions
|
@ -219,7 +219,7 @@ void BackgroundSlicingProcess::thread_proc()
|
|||
wxString errmsg = wxString::Format(_(L("%s has encountered an error. It was likely caused by running out of memory. "
|
||||
"If you are sure you have enough RAM on your system, this may also be a bug and we would "
|
||||
"be glad if you reported it.")), SLIC3R_APP_NAME);
|
||||
error = errmsg.ToStdString() + "\n\n" + std::string(ex.what());
|
||||
error = std::string(errmsg.ToUTF8()) + "\n\n" + std::string(ex.what());
|
||||
} catch (std::exception &ex) {
|
||||
error = ex.what();
|
||||
} catch (...) {
|
||||
|
|
|
@ -162,7 +162,7 @@ void ConfigSnapshotDialog::on_dpi_changed(const wxRect &suggested_rect)
|
|||
|
||||
void ConfigSnapshotDialog::onLinkClicked(wxHtmlLinkEvent &event)
|
||||
{
|
||||
m_snapshot_to_activate = event.GetLinkInfo().GetHref();
|
||||
m_snapshot_to_activate = event.GetLinkInfo().GetHref().ToUTF8();
|
||||
this->EndModal(wxID_CLOSE);
|
||||
}
|
||||
|
||||
|
|
|
@ -322,7 +322,7 @@ PresetBitmapComboBox(parent, wxSize(15 * wxGetApp().em_unit(), -1)),
|
|||
dialog.CenterOnParent();
|
||||
if (dialog.ShowModal() == wxID_OK)
|
||||
{
|
||||
colors->values[extruder_idx] = dialog.GetColourData().GetColour().GetAsString(wxC2S_HTML_SYNTAX);
|
||||
colors->values[extruder_idx] = dialog.GetColourData().GetColour().GetAsString(wxC2S_HTML_SYNTAX).ToStdString();
|
||||
|
||||
DynamicPrintConfig cfg_new = *cfg;
|
||||
cfg_new.set_key_value("extruder_colour", colors);
|
||||
|
@ -3077,7 +3077,7 @@ unsigned int Plater::priv::update_background_process(bool force_validation, bool
|
|||
GUI::show_error(this->q, _(err));
|
||||
} else {
|
||||
// Show the error message once the main window gets activated.
|
||||
this->delayed_error_message = _(err);
|
||||
this->delayed_error_message = _(err).ToUTF8();
|
||||
}
|
||||
return_state |= UPDATE_BACKGROUND_PROCESS_INVALID;
|
||||
}
|
||||
|
|
|
@ -49,14 +49,14 @@ Tab::Tab(wxNotebook* parent, const wxString& title, Preset::Type type) :
|
|||
m_compatible_printers.type = Preset::TYPE_PRINTER;
|
||||
m_compatible_printers.key_list = "compatible_printers";
|
||||
m_compatible_printers.key_condition = "compatible_printers_condition";
|
||||
m_compatible_printers.dialog_title = _(L("Compatible printers"));
|
||||
m_compatible_printers.dialog_label = _(L("Select the printers this profile is compatible with."));
|
||||
m_compatible_printers.dialog_title = _(L("Compatible printers")).ToUTF8();
|
||||
m_compatible_printers.dialog_label = _(L("Select the printers this profile is compatible with.")).ToUTF8();
|
||||
|
||||
m_compatible_prints.type = Preset::TYPE_PRINT;
|
||||
m_compatible_prints.key_list = "compatible_prints";
|
||||
m_compatible_prints.key_condition = "compatible_prints_condition";
|
||||
m_compatible_prints.dialog_title = _(L("Compatible print profiles"));
|
||||
m_compatible_prints.dialog_label = _(L("Select the print profiles this profile is compatible with."));
|
||||
m_compatible_prints.dialog_title = _(L("Compatible print profiles")).ToUTF8();
|
||||
m_compatible_prints.dialog_label = _(L("Select the print profiles this profile is compatible with.")).ToUTF8();
|
||||
|
||||
wxGetApp().tabs_list.push_back(this);
|
||||
|
||||
|
@ -3032,7 +3032,7 @@ void Tab::save_preset(std::string name /*= ""*/)
|
|||
const Preset &preset = m_presets->get_selected_preset();
|
||||
auto default_name = preset.is_default ? "Untitled" :
|
||||
// preset.is_system ? (boost::format(_utf8(L("%1% - Copy"))) % preset.name).str() :
|
||||
preset.is_system ? (boost::format(_CTX_utf8(L_CONTEXT("%1% - Copy", "PresetName"), "PresetName")) % preset.name).str() :
|
||||
preset.is_system ? (boost::format(_CTX_utf8(L_CONTEXT("%1% - Copy", "PresetName"), "PresetName").ToUTF8()) % preset.name).str() :
|
||||
preset.name;
|
||||
|
||||
bool have_extention = boost::iends_with(default_name, ".ini");
|
||||
|
|
Loading…
Add table
Reference in a new issue