mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-26 01:44:26 +08:00
Fixes in phrases
This commit is contained in:
parent
7553bbe12d
commit
b30c7c3bb9
@ -3589,7 +3589,7 @@ void GUI_App::open_wifi_config_dialog(bool forced, const wxString& drive_path/*
|
|||||||
// TRN Text of notification when Slicer starts and usb stick with printer settings ini file is present
|
// TRN Text of notification when Slicer starts and usb stick with printer settings ini file is present
|
||||||
, _u8L("Printer configuration file detected on removable media.")
|
, _u8L("Printer configuration file detected on removable media.")
|
||||||
// TRN Text of hypertext of notification when Slicer starts and usb stick with printer settings ini file is present
|
// TRN Text of hypertext of notification when Slicer starts and usb stick with printer settings ini file is present
|
||||||
, _u8L("Write Wi-Fi credetials."), [drive_path](wxEvtHandler* evt_hndlr) {
|
, _u8L("Write Wi-Fi credentials."), [drive_path](wxEvtHandler* evt_hndlr) {
|
||||||
wxGetApp().open_wifi_config_dialog(true, drive_path);
|
wxGetApp().open_wifi_config_dialog(true, drive_path);
|
||||||
return true; });
|
return true; });
|
||||||
return;
|
return;
|
||||||
|
@ -537,6 +537,7 @@ void GLGizmoSVG::on_stop_dragging()
|
|||||||
m_rotate_gizmo.set_angle(PI/2);
|
m_rotate_gizmo.set_angle(PI/2);
|
||||||
|
|
||||||
// apply rotation
|
// apply rotation
|
||||||
|
// TRN This is an item label in the undo-redo stack.
|
||||||
m_parent.do_rotate(L("SVG-Rotate"));
|
m_parent.do_rotate(L("SVG-Rotate"));
|
||||||
m_rotate_start_angle.reset();
|
m_rotate_start_angle.reset();
|
||||||
volume_transformation_changed();
|
volume_transformation_changed();
|
||||||
@ -1425,7 +1426,7 @@ void GLGizmoSVG::draw_filename(){
|
|||||||
|
|
||||||
if (m_filename_preview.empty())
|
if (m_filename_preview.empty())
|
||||||
// TRN - Preview of filename after clear local filepath.
|
// TRN - Preview of filename after clear local filepath.
|
||||||
m_filename_preview = _u8L("Without filename");
|
m_filename_preview = _u8L("Unknown filename");
|
||||||
|
|
||||||
m_filename_preview = ImGuiWrapper::trunc(m_filename_preview, m_gui_cfg->input_width);
|
m_filename_preview = ImGuiWrapper::trunc(m_filename_preview, m_gui_cfg->input_width);
|
||||||
}
|
}
|
||||||
|
@ -1405,28 +1405,6 @@ void MainFrame::init_menubar_as_editor()
|
|||||||
|
|
||||||
fileMenu->AppendSeparator();
|
fileMenu->AppendSeparator();
|
||||||
|
|
||||||
#if 0
|
|
||||||
m_menu_item_repeat = nullptr;
|
|
||||||
append_menu_item(fileMenu, wxID_ANY, _L("Quick Slice") +dots+ "\tCtrl+U", _L("Slice a file into a G-code"),
|
|
||||||
[this](wxCommandEvent&) {
|
|
||||||
wxTheApp->CallAfter([this]() {
|
|
||||||
quick_slice();
|
|
||||||
m_menu_item_repeat->Enable(is_last_input_file());
|
|
||||||
}); }, "cog_go.png");
|
|
||||||
append_menu_item(fileMenu, wxID_ANY, _L("Quick Slice and Save As") +dots +"\tCtrl+Alt+U", _L("Slice a file into a G-code, save as"),
|
|
||||||
[this](wxCommandEvent&) {
|
|
||||||
wxTheApp->CallAfter([this]() {
|
|
||||||
quick_slice(qsSaveAs);
|
|
||||||
m_menu_item_repeat->Enable(is_last_input_file());
|
|
||||||
}); }, "cog_go.png");
|
|
||||||
m_menu_item_repeat = append_menu_item(fileMenu, wxID_ANY, _L("Repeat Last Quick Slice") +"\tCtrl+Shift+U", _L("Repeat last quick slice"),
|
|
||||||
[this](wxCommandEvent&) {
|
|
||||||
wxTheApp->CallAfter([this]() {
|
|
||||||
quick_slice(qsReslice);
|
|
||||||
}); }, "cog_go.png");
|
|
||||||
m_menu_item_repeat->Enable(false);
|
|
||||||
fileMenu->AppendSeparator();
|
|
||||||
#endif
|
|
||||||
m_menu_item_reslice_now = append_menu_item(fileMenu, wxID_ANY, _L("(Re)Slice No&w") + "\tCtrl+R", _L("Start new slicing process"),
|
m_menu_item_reslice_now = append_menu_item(fileMenu, wxID_ANY, _L("(Re)Slice No&w") + "\tCtrl+R", _L("Start new slicing process"),
|
||||||
[this](wxCommandEvent&) { reslice_now(); }, "re_slice", nullptr,
|
[this](wxCommandEvent&) { reslice_now(); }, "re_slice", nullptr,
|
||||||
[this]() { return m_plater != nullptr && can_reslice(); }, this);
|
[this]() { return m_plater != nullptr && can_reslice(); }, this);
|
||||||
@ -1726,133 +1704,6 @@ void MainFrame::update_menubar()
|
|||||||
m_changeable_menu_items[miPrinterTab] ->SetBitmap(*get_bmp_bundle(is_fff ? "printer" : "sla_printer"));
|
m_changeable_menu_items[miPrinterTab] ->SetBitmap(*get_bmp_bundle(is_fff ? "printer" : "sla_printer"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
// To perform the "Quck Slice", "Quick Slice and Save As", "Repeat last Quick Slice" and "Slice to SVG".
|
|
||||||
void MainFrame::quick_slice(const int qs)
|
|
||||||
{
|
|
||||||
// my $progress_dialog;
|
|
||||||
wxString input_file;
|
|
||||||
// eval
|
|
||||||
// {
|
|
||||||
// validate configuration
|
|
||||||
auto config = wxGetApp().preset_bundle->full_config();
|
|
||||||
auto valid = config.validate();
|
|
||||||
if (! valid.empty()) {
|
|
||||||
show_error(this, valid);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// select input file
|
|
||||||
if (!(qs & qsReslice)) {
|
|
||||||
wxFileDialog dlg(this, _L("Choose a file to slice (STL/OBJ/AMF/3MF/SVG):"),
|
|
||||||
wxGetApp().app_config->get_last_dir(), "",
|
|
||||||
file_wildcards(FT_MODEL), wxFD_OPEN | wxFD_FILE_MUST_EXIST);
|
|
||||||
if (dlg.ShowModal() != wxID_OK)
|
|
||||||
return;
|
|
||||||
input_file = dlg.GetPath();
|
|
||||||
if (!(qs & qsExportSVG))
|
|
||||||
m_qs_last_input_file = input_file;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (m_qs_last_input_file.IsEmpty()) {
|
|
||||||
//wxMessageDialog dlg(this, _L("No previously sliced file."),
|
|
||||||
MessageDialog dlg(this, _L("No previously sliced file."),
|
|
||||||
_L("Error"), wxICON_ERROR | wxOK);
|
|
||||||
dlg.ShowModal();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (std::ifstream(m_qs_last_input_file.ToUTF8().data())) {
|
|
||||||
//wxMessageDialog dlg(this, _L("Previously sliced file (")+m_qs_last_input_file+_L(") not found."),
|
|
||||||
MessageDialog dlg(this, _L("Previously sliced file (")+m_qs_last_input_file+_L(") not found."),
|
|
||||||
_L("File Not Found"), wxICON_ERROR | wxOK);
|
|
||||||
dlg.ShowModal();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
input_file = m_qs_last_input_file;
|
|
||||||
}
|
|
||||||
auto input_file_basename = get_base_name(input_file);
|
|
||||||
wxGetApp().app_config->update_skein_dir(get_dir_name(input_file));
|
|
||||||
|
|
||||||
auto bed_shape = Slic3r::Polygon::new_scale(config.option<ConfigOptionPoints>("bed_shape")->values);
|
|
||||||
// auto print_center = Slic3r::Pointf->new_unscale(bed_shape.bounding_box().center());
|
|
||||||
//
|
|
||||||
// auto sprint = new Slic3r::Print::Simple(
|
|
||||||
// print_center = > print_center,
|
|
||||||
// status_cb = > [](int percent, const wxString& msg) {
|
|
||||||
// m_progress_dialog->Update(percent, msg+"…");
|
|
||||||
// });
|
|
||||||
|
|
||||||
// keep model around
|
|
||||||
auto model = Slic3r::Model::read_from_file(input_file.ToUTF8().data());
|
|
||||||
|
|
||||||
// sprint->apply_config(config);
|
|
||||||
// sprint->set_model(model);
|
|
||||||
|
|
||||||
// Copy the names of active presets into the placeholder parser.
|
|
||||||
// wxGetApp().preset_bundle->export_selections(sprint->placeholder_parser);
|
|
||||||
|
|
||||||
// select output file
|
|
||||||
wxString output_file;
|
|
||||||
if (qs & qsReslice) {
|
|
||||||
if (!m_qs_last_output_file.IsEmpty())
|
|
||||||
output_file = m_qs_last_output_file;
|
|
||||||
}
|
|
||||||
else if (qs & qsSaveAs) {
|
|
||||||
// The following line may die if the output_filename_format template substitution fails.
|
|
||||||
wxFileDialog dlg(this, format_wxstr(_L("Save %s file as:"), ((qs & qsExportSVG) ? _L("SVG") : _L("G-code"))),
|
|
||||||
wxGetApp().app_config->get_last_output_dir(get_dir_name(output_file)), get_base_name(input_file),
|
|
||||||
qs & qsExportSVG ? file_wildcards(FT_SVG) : file_wildcards(FT_GCODE),
|
|
||||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
|
|
||||||
if (dlg.ShowModal() != wxID_OK)
|
|
||||||
return;
|
|
||||||
output_file = dlg.GetPath();
|
|
||||||
if (!(qs & qsExportSVG))
|
|
||||||
m_qs_last_output_file = output_file;
|
|
||||||
wxGetApp().app_config->update_last_output_dir(get_dir_name(output_file));
|
|
||||||
}
|
|
||||||
else if (qs & qsExportPNG) {
|
|
||||||
wxFileDialog dlg(this, _L("Save ZIP file as:"),
|
|
||||||
wxGetApp().app_config->get_last_output_dir(get_dir_name(output_file)),
|
|
||||||
get_base_name(output_file), "*.sl1", wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
|
|
||||||
if (dlg.ShowModal() != wxID_OK)
|
|
||||||
return;
|
|
||||||
output_file = dlg.GetPath();
|
|
||||||
}
|
|
||||||
|
|
||||||
// show processbar dialog
|
|
||||||
m_progress_dialog = new wxProgressDialog(_L("Slicing") + dots,
|
|
||||||
// TRN ProgressDialog on reslicing: "input file basename"
|
|
||||||
format_wxstr(_L("Processing %s"), (input_file_basename + dots)),
|
|
||||||
100, nullptr, wxPD_AUTO_HIDE);
|
|
||||||
m_progress_dialog->Pulse();
|
|
||||||
{
|
|
||||||
// my @warnings = ();
|
|
||||||
// local $SIG{ __WARN__ } = sub{ push @warnings, $_[0] };
|
|
||||||
|
|
||||||
// sprint->output_file(output_file);
|
|
||||||
// if (export_svg) {
|
|
||||||
// sprint->export_svg();
|
|
||||||
// }
|
|
||||||
// else if(export_png) {
|
|
||||||
// sprint->export_png();
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// sprint->export_gcode();
|
|
||||||
// }
|
|
||||||
// sprint->status_cb(undef);
|
|
||||||
// Slic3r::GUI::warning_catcher($self)->($_) for @warnings;
|
|
||||||
}
|
|
||||||
m_progress_dialog->Destroy();
|
|
||||||
m_progress_dialog = nullptr;
|
|
||||||
|
|
||||||
auto message = format(_L("%1% was successfully sliced."), input_file_basename);
|
|
||||||
// wxTheApp->notify(message);
|
|
||||||
//wxMessageDialog(this, message, _L("Slicing Done!"), wxOK | wxICON_INFORMATION).ShowModal();
|
|
||||||
MessageDialog(this, message, _L("Slicing Done!"), wxOK | wxICON_INFORMATION).ShowModal();
|
|
||||||
// };
|
|
||||||
// Slic3r::GUI::catch_error(this, []() { if (m_progress_dialog) m_progress_dialog->Destroy(); });
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void MainFrame::reslice_now()
|
void MainFrame::reslice_now()
|
||||||
{
|
{
|
||||||
|
@ -183,7 +183,6 @@ public:
|
|||||||
bool is_last_input_file() const { return !m_qs_last_input_file.IsEmpty(); }
|
bool is_last_input_file() const { return !m_qs_last_input_file.IsEmpty(); }
|
||||||
bool is_dlg_layout() const { return m_layout == ESettingsLayout::Dlg; }
|
bool is_dlg_layout() const { return m_layout == ESettingsLayout::Dlg; }
|
||||||
|
|
||||||
// void quick_slice(const int qs = qsUndef);
|
|
||||||
void reslice_now();
|
void reslice_now();
|
||||||
void repair_stl();
|
void repair_stl();
|
||||||
void export_config();
|
void export_config();
|
||||||
|
@ -750,7 +750,7 @@ void PhysicalPrinterDialog::OnOK(wxEvent& event)
|
|||||||
const auto opt = m_config->option<ConfigOptionEnum<PrintHostType>>("host_type");
|
const auto opt = m_config->option<ConfigOptionEnum<PrintHostType>>("host_type");
|
||||||
if (opt->value == htPrusaConnect) {
|
if (opt->value == htPrusaConnect) {
|
||||||
if (printhost_win && printhost_win->GetValue() != L"https://connect.prusa3d.com"){
|
if (printhost_win && printhost_win->GetValue() != L"https://connect.prusa3d.com"){
|
||||||
InfoDialog msg(this, _L("Warning"), _L("URL of PrusaConnect is different than https://connect.prusa3d.com. Do you wish to continue?"), true, wxYES_NO);
|
InfoDialog msg(this, _L("Warning"), _L("URL of PrusaConnect is different from https://connect.prusa3d.com. Do you want to continue?"), true, wxYES_NO);
|
||||||
if(msg.ShowModal() != wxID_YES){
|
if(msg.ShowModal() != wxID_YES){
|
||||||
printhost_win->SetValue(L"https://connect.prusa3d.com");
|
printhost_win->SetValue(L"https://connect.prusa3d.com");
|
||||||
return;
|
return;
|
||||||
|
@ -2318,7 +2318,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
|||||||
// TRN Text of notification when Slicer starts and usb stick with printer settings ini file is present
|
// TRN Text of notification when Slicer starts and usb stick with printer settings ini file is present
|
||||||
, _u8L("Printer configuration file detected on removable media.")
|
, _u8L("Printer configuration file detected on removable media.")
|
||||||
// TRN Text of hypertext of notification when Slicer starts and usb stick with printer settings ini file is present
|
// TRN Text of hypertext of notification when Slicer starts and usb stick with printer settings ini file is present
|
||||||
, _u8L("Write Wi-Fi credetials."), [evt/*, CONFIG_FILE_NAME*/](wxEvtHandler* evt_hndlr){
|
, _u8L("Write Wi-Fi credentials."), [evt/*, CONFIG_FILE_NAME*/](wxEvtHandler* evt_hndlr){
|
||||||
wxGetApp().open_wifi_config_dialog(true, evt.GetString());
|
wxGetApp().open_wifi_config_dialog(true, evt.GetString());
|
||||||
return true;});
|
return true;});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user