ENH: do not add L prefix to empty string

Change-Id: I0fc7f57baf256452645be497020d75ffaf9c20f4
This commit is contained in:
Arthur 2022-12-01 10:35:06 +08:00 committed by Lane.Wei
parent 45de1d8368
commit 4419703f41
17 changed files with 38 additions and 38 deletions

View File

@ -411,14 +411,14 @@ void PrintConfigDef::init_common_params()
def = this->add("printhost_user", coString);
def->label = L("User");
// def->tooltip = L("");
// def->tooltip = "";
def->mode = comAdvanced;
def->cli = ConfigOptionDef::nocli;
def->set_default_value(new ConfigOptionString(""));
def = this->add("printhost_password", coString);
def->label = L("Password");
// def->tooltip = L("");
// def->tooltip = "";
def->mode = comAdvanced;
def->cli = ConfigOptionDef::nocli;
def->set_default_value(new ConfigOptionString(""));
@ -440,7 +440,7 @@ void PrintConfigDef::init_common_params()
def = this->add("printhost_authorization_type", coEnum);
def->label = L("Authorization Type");
// def->tooltip = L("");
// def->tooltip = "";
def->enum_keys_map = &ConfigOptionEnum<AuthorizationType>::get_enum_values();
def->enum_values.push_back("key");
def->enum_values.push_back("user");
@ -630,7 +630,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Force cooling fan to be specific speed when overhang degree of printed part exceeds this value. "
"Expressed as percentage which indicides how much width of the line without support from lower layer. "
"0% means forcing cooling for all outer wall no matter how much overhang degree");
def->sidetext = L("");
def->sidetext = "";
def->enum_keys_map = &ConfigOptionEnum<OverhangFanThreshold>::get_enum_values();
def->mode = comAdvanced;
def->enum_values.emplace_back("0%");
@ -2692,7 +2692,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("nozzle_temperature_range_low", coInts);
def->label = L("Min");
//def->tooltip = L("");
//def->tooltip = "";
def->sidetext = L("°C");
def->min = 0;
def->max = max_temp;
@ -2700,7 +2700,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("nozzle_temperature_range_high", coInts);
def->label = L("Max");
//def->tooltip = L("");
//def->tooltip = "";
def->sidetext = L("°C");
def->min = 0;
def->max = max_temp;
@ -2833,8 +2833,8 @@ void PrintConfigDef::init_fff_params()
def = this->add("flush_multiplier", coFloat);
def->label = L("Flush multiplier");
def->tooltip = L("");
def->sidetext = L("");
def->tooltip = "";
def->sidetext = "";
def->mode = comDevelop;
def->min = 0;
def->set_default_value(new ConfigOptionFloat(1.0));

View File

@ -379,7 +379,7 @@ void AuFile::on_input_enter(wxCommandEvent &evt)
fs::path newPath(new_dir_path);
fs::rename(oldPath, newPath);
} else {
/*MessageDialog msg_wingow(nullptr, info_line, _L(""),
/*MessageDialog msg_wingow(nullptr, info_line, "",
wxICON_WARNING | wxOK);
if (msg_wingow.ShowModal() == wxID_CANCEL) {
m_input_name->GetTextCtrl()->SetValue(wxEmptyString);

View File

@ -27,7 +27,7 @@ BBLStatusBarBind::BBLStatusBarBind(wxWindow *parent, int id)
//wxBoxSizer *m_sizer_bottom = new wxBoxSizer(wxHORIZONTAL);
/* m_status_text = new wxStaticText(m_self, wxID_ANY, L(""), wxDefaultPosition, wxDefaultSize, 0);
/* m_status_text = new wxStaticText(m_self, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, 0);
m_status_text->SetForegroundColour(wxColour(107, 107, 107));
m_status_text->SetFont(::Label::Body_13);
m_status_text->Wrap(-1);
@ -37,7 +37,7 @@ BBLStatusBarBind::BBLStatusBarBind(wxWindow *parent, int id)
m_prog->SetValue(0);
m_stext_percent = new wxStaticText(m_self, wxID_ANY, _L(""), wxDefaultPosition, wxDefaultSize, 0);
m_stext_percent = new wxStaticText(m_self, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, 0);
m_stext_percent->SetForegroundColour(wxColour(107, 107, 107));
m_stext_percent->SetFont(::Label::Body_13);
m_stext_percent->Wrap(-1);

View File

@ -26,7 +26,7 @@ BBLStatusBarSend::BBLStatusBarSend(wxWindow *parent, int id)
wxBoxSizer *m_sizer_body = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *m_sizer_bottom = new wxBoxSizer(wxHORIZONTAL);
m_status_text = new wxStaticText(m_self, wxID_ANY, L(""), wxDefaultPosition, wxSize(m_self->FromDIP(280), -1), 0);
m_status_text = new wxStaticText(m_self, wxID_ANY, "", wxDefaultPosition, wxSize(m_self->FromDIP(280), -1), 0);
m_status_text->SetForegroundColour(wxColour(107, 107, 107));
m_status_text->SetFont(::Label::Body_13);
m_status_text->Wrap(m_self->FromDIP(280));
@ -60,7 +60,7 @@ BBLStatusBarSend::BBLStatusBarSend(wxWindow *parent, int id)
m_cancel_cb_fina();
});
m_stext_percent = new wxStaticText(m_self, wxID_ANY, L(""), wxDefaultPosition, wxDefaultSize, 0);
m_stext_percent = new wxStaticText(m_self, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, 0);
m_stext_percent->SetForegroundColour(wxColour(107, 107, 107));
m_stext_percent->SetFont(::Label::Body_13);
m_stext_percent->Wrap(-1);

View File

@ -315,7 +315,7 @@ wxString CameraPopup::to_resolution_label_string(CameraResolution resolution) {
case RESOLUTION_1080P:
return _L("1080p");
default:
return _L("");
return "";
}
return "";
}

View File

@ -4482,7 +4482,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
if (m_extruder_ids.size() <= 1 || !show_flushed_filaments)
append_headers({ {_u8L("Filament"), offsets[0]}, {_u8L("Model"), offsets[2]}});
else
append_headers({ {_u8L("Filament"), offsets[0]}, {_u8L("Model"), offsets[1]}, {_u8L("Flushed"), offsets[2]}, {_u8L(""), offsets[3]}, {_u8L("Total"), offsets[4]}});// to add Tower
append_headers({ {_u8L("Filament"), offsets[0]}, {_u8L("Model"), offsets[1]}, {_u8L("Flushed"), offsets[2]}, {"", offsets[3]}, {_u8L("Total"), offsets[4]}});// to add Tower
break;
}
default: { break; }
@ -5185,7 +5185,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
ImGui::Spacing();
ImGui::Dummy({ window_padding, window_padding });
ImGui::SameLine();
offsets = calculate_offsets({ { _u8L("Options"), { _u8L("")}}, { _u8L("Display"), {""}} }, icon_size);
offsets = calculate_offsets({ { _u8L("Options"), { ""}}, { _u8L("Display"), {""}} }, icon_size);
append_headers({ {_u8L("Options"), offsets[0] }, { _u8L("Display"), offsets[1]} });
for (auto item : options_items)
append_option_item(item, offsets);

View File

@ -2320,7 +2320,7 @@ bool ObjectList::del_subobject_from_object(const int obj_idx, const int idx, con
else if (type == itInstance) {
if (object->instances.size() == 1) {
// BBS: remove snapshot name "Last instance of an object cannot be deleted."
Slic3r::GUI::show_error(nullptr, _L(""));
Slic3r::GUI::show_error(nullptr, "");
return false;
}

View File

@ -2350,11 +2350,11 @@ void MainFrame::init_menubar_as_editor()
//});
//parent_menu->Insert(0, about_item);
append_menu_item(
parent_menu, wxID_ANY, _L(about_title), _L(""),
parent_menu, wxID_ANY, _L(about_title), "",
[this](wxCommandEvent &) { Slic3r::GUI::about();},
"", nullptr, []() { return true; }, this, 0);
append_menu_item(
parent_menu, wxID_ANY, _L("Preferences") + "\tCtrl+,", _L(""),
parent_menu, wxID_ANY, _L("Preferences") + "\tCtrl+,", "",
[this](wxCommandEvent &) {
PreferencesDialog dlg(this);
dlg.ShowModal();
@ -2381,7 +2381,7 @@ void MainFrame::init_menubar_as_editor()
//BBS add Preference
append_menu_item(
m_topbar->GetTopMenu(), wxID_ANY, _L("Preferences") + "\tCtrl+P", _L(""),
m_topbar->GetTopMenu(), wxID_ANY, _L("Preferences") + "\tCtrl+P", "",
[this](wxCommandEvent &) {
PreferencesDialog dlg(this);
dlg.ShowModal();

View File

@ -15,7 +15,7 @@ namespace GUI {
ParamsDialog::ParamsDialog(wxWindow * parent)
: DPIDialog(parent, wxID_ANY, _L(""), wxDefaultPosition,
: DPIDialog(parent, wxID_ANY, "", wxDefaultPosition,
wxDefaultSize, wxCAPTION | wxCLOSE_BOX | wxRESIZE_BORDER)
{
m_panel = new ParamsPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBK_LEFT | wxTAB_TRAVERSAL);

View File

@ -268,7 +268,7 @@ wxString PrintOptionsDialog::sensitivity_level_to_label_string(enum AiMonitorSen
case HIGH:
return _L("High");
default:
return _L("");
return "";
}
return "";
}

View File

@ -65,7 +65,7 @@ PublishDialog::PublishDialog(Plater *plater)
m_main_sizer->Add(0, FromDIP(10), 0, wxEXPAND, 0);
wxBoxSizer *m_progress_text_sizer = new wxBoxSizer(wxHORIZONTAL);
m_text_progress = new wxStaticText(this, wxID_ANY, _L(""), wxDefaultPosition, wxDefaultSize, 0);
m_text_progress = new wxStaticText(this, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, 0);
m_text_progress->Wrap(-1);
m_text_progress->SetFont(Label::Body_12);
m_text_progress->SetForegroundColour(TEXT_LIGHT_GRAY);

View File

@ -1099,7 +1099,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
m_sizer_printer->Add(m_stext_printer_title, 0, wxALL | wxLEFT, FromDIP(5));
m_sizer_printer->Add(0, 0, 0, wxEXPAND | wxLEFT, FromDIP(12));
m_comboBox_printer = new ::ComboBox(this, wxID_ANY, L(""), wxDefaultPosition, wxSize(FromDIP(250), -1), 0, nullptr, wxCB_READONLY);
m_comboBox_printer = new ::ComboBox(this, wxID_ANY, "", wxDefaultPosition, wxSize(FromDIP(250), -1), 0, nullptr, wxCB_READONLY);
m_comboBox_printer->Bind(wxEVT_COMBOBOX, &SelectMachineDialog::on_selection_changed, this);
m_sizer_printer->Add(m_comboBox_printer, 1, wxEXPAND | wxRIGHT, FromDIP(5));

View File

@ -230,7 +230,7 @@ SendToPrinterDialog::SendToPrinterDialog(Plater *plater)
m_sizer_printer->Add(m_stext_printer_title, 0, wxALL | wxLEFT, FromDIP(5));
m_sizer_printer->Add(0, 0, 0, wxEXPAND | wxLEFT, FromDIP(12));
m_comboBox_printer = new ::ComboBox(this, wxID_ANY, L(""), wxDefaultPosition, wxSize(FromDIP(250), -1), 0, nullptr, wxCB_READONLY);
m_comboBox_printer = new ::ComboBox(this, wxID_ANY, "", wxDefaultPosition, wxSize(FromDIP(250), -1), 0, nullptr, wxCB_READONLY);
m_comboBox_printer->Bind(wxEVT_COMBOBOX, &SendToPrinterDialog::on_selection_changed, this);
m_sizer_printer->Add(m_comboBox_printer, 1, wxEXPAND | wxRIGHT, FromDIP(5));

View File

@ -1604,7 +1604,7 @@ void Tab::build_preset_description_line(ConfigOptionsGroup* optgroup)
};
auto detach_preset_btn = [this](wxWindow* parent) {
m_detach_preset_btn = new ScalableButton(parent, wxID_ANY, "lock_normal_sys", _L(""),
m_detach_preset_btn = new ScalableButton(parent, wxID_ANY, "lock_normal_sys", "",
wxDefaultSize, wxDefaultPosition, wxBU_LEFT | wxBU_EXACTFIT, true);
ScalableButton* btn = m_detach_preset_btn;
btn->SetFont(Slic3r::GUI::wxGetApp().normal_font());
@ -2081,7 +2081,7 @@ void TabPrintModel::build()
init_options_list();
auto page = add_options_page(L("Frequent"), "empty");
auto optgroup = page->new_optgroup(L(""));
auto optgroup = page->new_optgroup("");
optgroup->append_single_option_line("layer_height");
optgroup->append_single_option_line("sparse_infill_density");
optgroup->append_single_option_line("wall_loops");

View File

@ -1668,7 +1668,7 @@ bool UnsavedChangesDialog::check_option_valid()
Preset * new_preset = preset_bundle->printers.find_preset(m_new_selected_preset_name);
std::string str_print_type = new_preset->get_current_printer_type(preset_bundle);
if (str_print_type == "C11" && itor->new_value.ToStdString() == "Smooth") {
MessageDialog dlg(wxGetApp().plater(), _L("The P1P printer is not support smooth timelapse, it will not transform the timelapse changes."),
MessageDialog dlg(wxGetApp().plater(), _L("The P1P printer does not support smooth timelapse, use traditional timelapse instead."),
_L("Warning"), wxICON_WARNING | wxOK);
dlg.ShowModal();
m_presetitems.erase(itor);

View File

@ -158,10 +158,10 @@ wxString GuideFrame::SetStartPage(GuidePage startpage, bool load)
else
TargetUrl = from_u8((boost::filesystem::path(resources_dir()) / "web/guide/21/index.html").make_preferred().string());
} else if (startpage == BBL_FILAMENT_ONLY) {
SetTitle(_L(""));
SetTitle("");
TargetUrl = from_u8((boost::filesystem::path(resources_dir()) / "web/guide/23/index.html").make_preferred().string());
} else if (startpage == BBL_MODELS_ONLY) {
SetTitle(_L(""));
SetTitle("");
TargetUrl = from_u8((boost::filesystem::path(resources_dir()) / "web/guide/24/index.html").make_preferred().string());
}
else {

View File

@ -1876,10 +1876,10 @@ void AMSControl::UpdateStepCtrl()
void AMSControl::CreateAms()
{
auto caninfo0_0 = Caninfo{"def_can_0", L(""), *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
auto caninfo0_1 = Caninfo{"def_can_1", L(""), *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
auto caninfo0_2 = Caninfo{"def_can_2", L(""), *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
auto caninfo0_3 = Caninfo{"def_can_3", L(""), *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
auto caninfo0_0 = Caninfo{"def_can_0", (""), *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
auto caninfo0_1 = Caninfo{"def_can_1", (""), *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
auto caninfo0_2 = Caninfo{"def_can_2", (""), *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
auto caninfo0_3 = Caninfo{"def_can_3", (""), *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
AMSinfo ams1 = AMSinfo{"def_ams_0", std::vector<Caninfo>{caninfo0_0, caninfo0_1, caninfo0_2, caninfo0_3}};
AMSinfo ams2 = AMSinfo{"def_ams_1", std::vector<Caninfo>{caninfo0_0, caninfo0_1, caninfo0_2, caninfo0_3}};
@ -1895,10 +1895,10 @@ void AMSControl::CreateAms()
void AMSControl::Reset()
{
auto caninfo0_0 = Caninfo{"def_can_0", L(""), *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
auto caninfo0_1 = Caninfo{"def_can_1", L(""), *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
auto caninfo0_2 = Caninfo{"def_can_2", L(""), *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
auto caninfo0_3 = Caninfo{"def_can_3", L(""), *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
auto caninfo0_0 = Caninfo{"def_can_0", "", *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
auto caninfo0_1 = Caninfo{"def_can_1", "", *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
auto caninfo0_2 = Caninfo{"def_can_2", "", *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
auto caninfo0_3 = Caninfo{"def_can_3", "", *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
AMSinfo ams1 = AMSinfo{"def_ams_0", std::vector<Caninfo>{caninfo0_0, caninfo0_1, caninfo0_2, caninfo0_3}};
AMSinfo ams2 = AMSinfo{"def_ams_1", std::vector<Caninfo>{caninfo0_0, caninfo0_1, caninfo0_2, caninfo0_3}};