mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-24 01:01:15 -06:00
Merge remote-tracking branch 'origin/master' into ys_menuicons
This commit is contained in:
commit
b62351299d
172 changed files with 15728 additions and 651 deletions
|
|
@ -12,7 +12,7 @@ AboutDialogLogo::AboutDialogLogo(wxWindow* parent)
|
|||
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize)
|
||||
{
|
||||
this->SetBackgroundColour(*wxWHITE);
|
||||
this->logo = wxBitmap(from_u8(Slic3r::var("Slic3r_192px.png")), wxBITMAP_TYPE_PNG);
|
||||
this->logo = wxBitmap(from_u8(Slic3r::var("PrusaSlicer_192px.png")), wxBITMAP_TYPE_PNG);
|
||||
this->SetMinSize(this->logo.GetSize());
|
||||
|
||||
this->Bind(wxEVT_PAINT, &AboutDialogLogo::onRepaint, this);
|
||||
|
|
@ -45,7 +45,7 @@ AboutDialog::AboutDialog()
|
|||
main_sizer->Add(hsizer, 0, wxEXPAND | wxALL, 20);
|
||||
|
||||
// logo
|
||||
m_logo_bitmap = ScalableBitmap(this, "Slic3r_192px.png", 192);
|
||||
m_logo_bitmap = ScalableBitmap(this, "PrusaSlicer_192px.png", 192);
|
||||
m_logo = new wxStaticBitmap(this, wxID_ANY, m_logo_bitmap.bmp());
|
||||
hsizer->Add(m_logo, 1, wxALIGN_CENTER_VERTICAL);
|
||||
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ void AppConfig::reset_selections()
|
|||
|
||||
std::string AppConfig::config_path()
|
||||
{
|
||||
return (boost::filesystem::path(Slic3r::data_dir()) / "slic3r.ini").make_preferred().string();
|
||||
return (boost::filesystem::path(Slic3r::data_dir()) / (SLIC3R_APP_KEY ".ini")).make_preferred().string();
|
||||
}
|
||||
|
||||
std::string AppConfig::version_check_url() const
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ void BedShapePanel::load_stl()
|
|||
model = Model::read_from_file(file_name);
|
||||
}
|
||||
catch (std::exception &e) {
|
||||
auto msg = _(L("Error! ")) + file_name + " : " + e.what() + ".";
|
||||
auto msg = _(L("Error!")) + " " + file_name + " : " + e.what() + ".";
|
||||
show_error(this, msg);
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ static wxString generate_html_row(const Config::Snapshot &snapshot, bool row_eve
|
|||
text += "\">";
|
||||
text += "<td>";
|
||||
// Format the row header.
|
||||
text += wxString("<font size=\"5\"><b>") + (snapshot_active ? _(L("Active: ")) : "") +
|
||||
text += wxString("<font size=\"5\"><b>") + (snapshot_active ? _(L("Active")) + ": " : "") +
|
||||
Utils::format_local_date_time(snapshot.time_captured) + ": " + format_reason(snapshot.reason);
|
||||
if (! snapshot.comment.empty())
|
||||
text += " (" + wxString::FromUTF8(snapshot.comment.data()) + ")";
|
||||
|
|
|
|||
|
|
@ -653,7 +653,7 @@ void PageTemperatures::apply_custom_config(DynamicPrintConfig &config)
|
|||
|
||||
ConfigWizardIndex::ConfigWizardIndex(wxWindow *parent)
|
||||
: wxPanel(parent)
|
||||
, bg(ScalableBitmap(parent, "Slic3r_192px_transparent.png", 192))
|
||||
, bg(ScalableBitmap(parent, "PrusaSlicer_192px_transparent.png", 192))
|
||||
, bullet_black(ScalableBitmap(parent, "bullet_black.png"))
|
||||
, bullet_blue(ScalableBitmap(parent, "bullet_blue.png"))
|
||||
, bullet_white(ScalableBitmap(parent, "bullet_white.png"))
|
||||
|
|
@ -1062,7 +1062,7 @@ void ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese
|
|||
// Public
|
||||
|
||||
ConfigWizard::ConfigWizard(wxWindow *parent, RunReason reason)
|
||||
: DPIDialog(parent, wxID_ANY, wxString(SLIC3R_APP_NAME) + " - " + _(name().ToStdString()), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||
: DPIDialog(parent, wxID_ANY, wxString(SLIC3R_APP_NAME) + " - " + name(), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||
, p(new priv(this))
|
||||
{
|
||||
this->SetFont(wxGetApp().normal_font());
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ struct FirmwareDialog::priv
|
|||
|
||||
template<class ...Args> void queue_error(const wxString &format, Args... args) {
|
||||
queue_message(format, args...);
|
||||
queue_event(AE_STATUS, _(L("Flashing failed: ")) + wxString::Format(format, args...));
|
||||
queue_event(AE_STATUS, _(L("Flashing failed")) +": "+ wxString::Format(format, args...));
|
||||
avrdude->cancel();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1691,11 +1691,11 @@ void GLCanvas3D::render()
|
|||
ImGuiWrapper& imgui = *wxGetApp().imgui();
|
||||
imgui.set_next_window_bg_alpha(0.5f);
|
||||
imgui.begin(std::string("Render statistics"), ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse);
|
||||
imgui.text("Last frame: ");
|
||||
imgui.text(_(L("Last frame")) +": ");
|
||||
ImGui::SameLine();
|
||||
imgui.text(std::to_string(m_render_stats.last_frame));
|
||||
ImGui::SameLine();
|
||||
imgui.text(" ms");
|
||||
imgui.text(" "+_(L("ms")));
|
||||
imgui.end();
|
||||
#endif // ENABLE_RENDER_STATISTICS
|
||||
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ bool GUI_App::on_init_inner()
|
|||
wxCHECK_MSG(wxDirExists(resources_dir), false,
|
||||
wxString::Format("Resources path does not exist or is not a directory: %s", resources_dir));
|
||||
|
||||
SetAppName(SLIC3R_APP_KEY "-beta");
|
||||
SetAppName(SLIC3R_APP_KEY);
|
||||
SetAppDisplayName(SLIC3R_APP_NAME);
|
||||
|
||||
// Enable this to get the default Win32 COMCTRL32 behavior of static boxes.
|
||||
|
|
@ -568,7 +568,7 @@ bool GUI_App::select_language()
|
|||
m_wxLocale = new wxLocale; // FIXME: leak?
|
||||
m_wxLocale->Init(lang->Language);
|
||||
m_wxLocale->AddCatalogLookupPathPrefix(from_u8(localization_dir()));
|
||||
m_wxLocale->AddCatalog("Slic3rPE");
|
||||
m_wxLocale->AddCatalog(SLIC3R_APP_KEY);
|
||||
//FIXME This is a temporary workaround, the correct solution is to switch to "C" locale during file import / export only.
|
||||
wxSetlocale(LC_NUMERIC, "C");
|
||||
Preset::update_suffix_modified();
|
||||
|
|
@ -613,7 +613,7 @@ bool GUI_App::load_language()
|
|||
} else {
|
||||
m_wxLocale->Init(info->Language);
|
||||
m_wxLocale->AddCatalogLookupPathPrefix(from_u8(localization_dir()));
|
||||
m_wxLocale->AddCatalog("Slic3rPE");
|
||||
m_wxLocale->AddCatalog(SLIC3R_APP_KEY);
|
||||
m_imgui->set_language(into_u8(info->CanonicalName));
|
||||
}
|
||||
//FIXME This is a temporary workaround, the correct solution is to switch to "C" locale during file import / export only.
|
||||
|
|
@ -650,7 +650,7 @@ std::vector<const wxLanguageInfo*> GUI_App::get_installed_languages()
|
|||
langinfo = wxLocale::FindLanguageInfo(filename);
|
||||
if (langinfo != NULL) {
|
||||
auto full_file_name = dir.GetName() + wxFileName::GetPathSeparator() +
|
||||
filename + wxFileName::GetPathSeparator() + "Slic3rPE" + wxT(".mo");
|
||||
filename + wxFileName::GetPathSeparator() + SLIC3R_APP_KEY + wxT(".mo");
|
||||
if (wxFileExists(full_file_name)) {
|
||||
res.push_back(langinfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1208,8 +1208,6 @@ wxMenuItem* ObjectList::append_menu_item_instance_to_object(wxMenu* menu, wxWind
|
|||
|
||||
void ObjectList::append_menu_items_osx(wxMenu* menu)
|
||||
{
|
||||
append_menu_item_delete(menu);
|
||||
|
||||
append_menu_item(menu, wxID_ANY, _(L("Rename")), "",
|
||||
[this](wxCommandEvent&) { rename_item(); }, "", menu);
|
||||
|
||||
|
|
@ -1324,9 +1322,6 @@ void ObjectList::create_part_popupmenu(wxMenu *menu)
|
|||
|
||||
void ObjectList::create_instance_popupmenu(wxMenu*menu)
|
||||
{
|
||||
#ifdef __WXOSX__
|
||||
append_menu_item_delete(menu);
|
||||
#endif // __WXOSX__
|
||||
m_menu_item_split_instances = append_menu_item_instance_to_object(menu, wxGetApp().plater());
|
||||
|
||||
/* New behavior logic:
|
||||
|
|
@ -1437,7 +1432,7 @@ void ObjectList::load_part( ModelObject* model_object,
|
|||
model = Model::read_from_file(input_file);
|
||||
}
|
||||
catch (std::exception &e) {
|
||||
auto msg = _(L("Error! ")) + input_file + " : " + e.what() + ".";
|
||||
auto msg = _(L("Error!")) + " " + input_file + " : " + e.what() + ".";
|
||||
show_error(parent, msg);
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -2544,7 +2539,7 @@ void ObjectList::change_part_type()
|
|||
|
||||
const wxString names[] = { _(L("Part")), _(L("Modifier")), _(L("Support Enforcer")), _(L("Support Blocker")) };
|
||||
|
||||
auto new_type = ModelVolumeType(wxGetSingleChoiceIndex(_(L("Type")) + ":", _(L("Select type of part")), wxArrayString(4, names), int(type)));
|
||||
auto new_type = ModelVolumeType(wxGetSingleChoiceIndex(_(L("Type:")), _(L("Select type of part")), wxArrayString(4, names), int(type)));
|
||||
|
||||
if (new_type == type || new_type == ModelVolumeType::INVALID)
|
||||
return;
|
||||
|
|
@ -2834,10 +2829,6 @@ void ObjectList::show_multi_selection_menu()
|
|||
|
||||
wxMenu* menu = new wxMenu();
|
||||
|
||||
#ifdef __WXOSX__
|
||||
append_menu_item_delete(menu);
|
||||
#endif //__WXOSX__
|
||||
|
||||
if (extruders_count() > 1)
|
||||
append_menu_item(menu, wxID_ANY, _(L("Set extruder for selected items")),
|
||||
_(L("Select extruder number for selected objects and/or parts")),
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ void ObjectSettings::update_settings_list()
|
|||
auto opt_key = (line.get_options())[0].opt_id; //we assume that we have one option per line
|
||||
|
||||
auto btn = new ScalableButton(parent, wxID_ANY, m_bmp_delete);
|
||||
btn->SetToolTip(_(L("Remove parameter")));
|
||||
|
||||
btn->Bind(wxEVT_BUTTON, [opt_key, config, this](wxEvent &event) {
|
||||
config->erase(opt_key);
|
||||
|
|
|
|||
|
|
@ -837,7 +837,7 @@ RENDER_AGAIN:
|
|||
if (m_new_point_head_diameter > diameter_upper_cap)
|
||||
m_new_point_head_diameter = diameter_upper_cap;
|
||||
|
||||
m_imgui->text(_(L("Head diameter: ")));
|
||||
m_imgui->text(_(L("Head diameter")) + ": ");
|
||||
ImGui::SameLine(m_imgui->scaled(6.66f));
|
||||
ImGui::PushItemWidth(m_imgui->scaled(8.33f));
|
||||
if (ImGui::SliderFloat("", &m_new_point_head_diameter, 0.1f, diameter_upper_cap, "%.1f")) {
|
||||
|
|
@ -876,7 +876,7 @@ RENDER_AGAIN:
|
|||
}
|
||||
else { // not in editing mode:
|
||||
ImGui::PushItemWidth(m_imgui->scaled(5.55f));
|
||||
m_imgui->text(_(L("Minimal points distance: ")));
|
||||
m_imgui->text(_(L("Minimal points distance")) + ": ");
|
||||
ImGui::SameLine(m_imgui->scaled(9.44f));
|
||||
|
||||
std::vector<const ConfigOption*> opts = get_config_options({"support_points_density_relative", "support_points_minimal_distance"});
|
||||
|
|
@ -887,7 +887,7 @@ RENDER_AGAIN:
|
|||
if (value_changed)
|
||||
m_model_object->config.opt<ConfigOptionFloat>("support_points_minimal_distance", true)->value = minimal_point_distance;
|
||||
|
||||
m_imgui->text(_(L("Support points density: ")));
|
||||
m_imgui->text(_(L("Support points density")) + ": ");
|
||||
ImGui::SameLine(m_imgui->scaled(9.44f));
|
||||
if (ImGui::SliderFloat(" ", &density, 0.f, 200.f, "%.f %%")) {
|
||||
value_changed = true;
|
||||
|
|
@ -925,7 +925,7 @@ RENDER_AGAIN:
|
|||
// Following is rendered in both editing and non-editing mode:
|
||||
m_imgui->text("");
|
||||
if (m_clipping_plane_distance == 0.f)
|
||||
m_imgui->text(_(L("Clipping of view:"))+ " ");
|
||||
m_imgui->text(_(L("Clipping of view"))+ ": ");
|
||||
else {
|
||||
if (m_imgui->button(_(L("Reset direction")))) {
|
||||
wxGetApp().CallAfter([this](){
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ KBShortcutsDialog::KBShortcutsDialog()
|
|||
auto main_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
// logo
|
||||
m_logo_bmp = ScalableBitmap(this, "Slic3r_32px.png", 32);
|
||||
m_logo_bmp = ScalableBitmap(this, "PrusaSlicer_32px.png", 32);
|
||||
|
||||
// fonts
|
||||
const wxFont& font = wxGetApp().normal_font();
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace Slic3r {
|
|||
namespace GUI {
|
||||
|
||||
MainFrame::MainFrame() :
|
||||
DPIFrame(NULL, wxID_ANY, SLIC3R_BUILD, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, "mainframe"),
|
||||
DPIFrame(NULL, wxID_ANY, wxString(SLIC3R_BUILD) + " " + _(L("based on Slic3r")), wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, "mainframe"),
|
||||
m_printhost_queue_dlg(new PrintHostQueueDialog(this))
|
||||
{
|
||||
// Fonts were created by the DPIFrame constructor for the monitor, on which the window opened.
|
||||
|
|
@ -50,7 +50,7 @@ DPIFrame(NULL, wxID_ANY, SLIC3R_BUILD, wxDefaultPosition, wxDefaultSize, wxDEFAU
|
|||
SetIcon(wxIcon(szExeFileName, wxBITMAP_TYPE_ICO));
|
||||
}
|
||||
#else
|
||||
SetIcon(wxIcon(Slic3r::var("Slic3r_128px.png"), wxBITMAP_TYPE_PNG));
|
||||
SetIcon(wxIcon(Slic3r::var("PrusaSlicer_128px.png"), wxBITMAP_TYPE_PNG));
|
||||
#endif // _WIN32
|
||||
|
||||
// initialize status bar
|
||||
|
|
@ -58,7 +58,7 @@ DPIFrame(NULL, wxID_ANY, SLIC3R_BUILD, wxDefaultPosition, wxDefaultSize, wxDEFAU
|
|||
m_statusbar->embed(this);
|
||||
m_statusbar->set_status_text(_(L("Version")) + " " +
|
||||
SLIC3R_VERSION +
|
||||
_(L(" - Remember to check for updates at http://github.com/prusa3d/slic3r/releases")));
|
||||
_(L(" - Remember to check for updates at http://github.com/prusa3d/PrusaSlicer/releases")));
|
||||
|
||||
/* Load default preset bitmaps before a tabpanel initialization,
|
||||
* but after filling of an em_unit value
|
||||
|
|
@ -541,7 +541,7 @@ void MainFrame::init_menubar()
|
|||
{
|
||||
append_menu_item(helpMenu, wxID_ANY, _(L("Prusa 3D &Drivers")), _(L("Open the Prusa3D drivers download page in your browser")),
|
||||
[this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://www.prusa3d.com/drivers/"); });
|
||||
append_menu_item(helpMenu, wxID_ANY, _(L("Prusa Edition &Releases")), _(L("Open the Prusa Edition releases page in your browser")),
|
||||
append_menu_item(helpMenu, wxID_ANY, _(L("Software &Releases")), _(L("Open the software releases page in your browser")),
|
||||
[this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/prusa3d/slic3r/releases"); });
|
||||
//# my $versioncheck = $self->_append_menu_item($helpMenu, "Check for &Updates...", "Check for new Slic3r versions", sub{
|
||||
//# wxTheApp->check_version(1);
|
||||
|
|
@ -678,7 +678,7 @@ void MainFrame::quick_slice(const int qs)
|
|||
}
|
||||
else if (qs & qsSaveAs) {
|
||||
// The following line may die if the output_filename_format template substitution fails.
|
||||
auto dlg = new wxFileDialog(this, _(L("Save ")) + (qs & qsExportSVG ? _(L("SVG")) : _(L("G-code"))) + _(L(" file as:")),
|
||||
auto dlg = new wxFileDialog(this, wxString::Format(_(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);
|
||||
|
|
@ -705,7 +705,9 @@ void MainFrame::quick_slice(const int qs)
|
|||
}
|
||||
|
||||
// show processbar dialog
|
||||
m_progress_dialog = new wxProgressDialog(_(L("Slicing")) + dots, _(L("Processing ")) + input_file_basename + "…",
|
||||
m_progress_dialog = new wxProgressDialog(_(L("Slicing")) + dots,
|
||||
// TRN "Processing input_file_basename"
|
||||
wxString::Format(_(L("Processing %s")), input_file_basename + dots),
|
||||
100, this, 4);
|
||||
m_progress_dialog->Pulse();
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ MsgDialog::MsgDialog(wxWindow *parent, const wxString &title, const wxString &he
|
|||
rightsizer->Add(btn_sizer, 0, wxALIGN_RIGHT);
|
||||
|
||||
if (! bitmap.IsOk()) {
|
||||
bitmap = create_scaled_bitmap(this, "Slic3r_192px.png", 192);
|
||||
bitmap = create_scaled_bitmap(this, "PrusaSlicer_192px.png", 192);
|
||||
}
|
||||
|
||||
logo = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap);
|
||||
|
|
@ -99,7 +99,7 @@ ErrorDialog::ErrorDialog(wxWindow *parent, const wxString &msg)
|
|||
btn_ok->SetFocus();
|
||||
btn_sizer->Add(btn_ok, 0, wxRIGHT, HORIZ_SPACING);
|
||||
|
||||
logo->SetBitmap(create_scaled_bitmap(this, "Slic3r_192px_grayscale.png", 192));
|
||||
logo->SetBitmap(create_scaled_bitmap(this, "PrusaSlicer_192px_grayscale.png", 192));
|
||||
|
||||
SetMaxSize(wxSize(-1, CONTENT_MAX_HEIGHT*wxGetApp().em_unit()));
|
||||
Fit();
|
||||
|
|
|
|||
|
|
@ -438,11 +438,14 @@ void ConfigOptionsGroup::on_kill_focus(const std::string& opt_key)
|
|||
void ConfigOptionsGroup::reload_config()
|
||||
{
|
||||
for (auto &kvp : m_opt_map) {
|
||||
// Name of the option field (name of the configuration key, possibly suffixed with '#' and the index of a scalar inside a vector.
|
||||
const std::string &opt_id = kvp.first;
|
||||
// option key (may be scalar or vector)
|
||||
const std::string &opt_key = kvp.second.first;
|
||||
// index in the vector option, zero for scalars
|
||||
int opt_index = kvp.second.second;
|
||||
const ConfigOptionDef &option = m_options.at(opt_id).opt;
|
||||
this->set_value(opt_key, config_value(opt_key, opt_index, option.gui_flags == "serialized"));
|
||||
this->set_value(opt_id, config_value(opt_key, opt_index, option.gui_flags == "serialized"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3304,7 +3304,7 @@ void Plater::remove(size_t obj_idx) { p->remove(obj_idx); }
|
|||
void Plater::reset() { p->reset(); }
|
||||
void Plater::reset_with_confirm()
|
||||
{
|
||||
if (wxMessageDialog((wxWindow*)this, _(L("All objects will be removed, continue ?")), _(L("Delete all")), wxYES_NO | wxYES_DEFAULT | wxCENTRE).ShowModal() == wxID_YES)
|
||||
if (wxMessageDialog((wxWindow*)this, _(L("All objects will be removed, continue ?")), wxString(SLIC3R_APP_NAME) + " - " + _(L("Delete all")), wxYES_NO | wxCANCEL | wxYES_DEFAULT | wxCENTRE).ShowModal() == wxID_YES)
|
||||
reset();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ void PreferencesDialog::build()
|
|||
// Please keep in sync with ConfigWizard
|
||||
def.label = L("Check for application updates");
|
||||
def.type = coBool;
|
||||
def.tooltip = L("If enabled, Slic3r checks for new versions of " SLIC3R_APP_NAME " online. When a new version becomes available a notification is displayed at the next application startup (never during program usage). This is only a notification mechanisms, no automatic installation is done.");
|
||||
def.tooltip = L("If enabled, PrusaSlicer will check for the new versions of itself online. When a new version becomes available a notification is displayed at the next application startup (never during program usage). This is only a notification mechanisms, no automatic installation is done.");
|
||||
def.set_default_value(new ConfigOptionBool(app_config->get("version_check") == "1"));
|
||||
option = Option (def, "version_check");
|
||||
m_optgroup->append_single_option_line(option);
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ void PresetBundle::load_compatible_bitmaps(wxWindow *window)
|
|||
*m_bitmapCompatible = create_scaled_bitmap(nullptr, "flag_green");
|
||||
*m_bitmapIncompatible = create_scaled_bitmap(nullptr, "flag_red");
|
||||
*m_bitmapLock = create_scaled_bitmap(nullptr, "lock_closed");
|
||||
*m_bitmapLockOpen = create_scaled_bitmap(nullptr, "sys_unlock.png");
|
||||
*m_bitmapLockOpen = create_scaled_bitmap(nullptr, "lock_open");
|
||||
|
||||
prints .set_bitmap_compatible(m_bitmapCompatible);
|
||||
filaments .set_bitmap_compatible(m_bitmapCompatible);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#include "PresetBundle.hpp"
|
||||
#include "PresetHints.hpp"
|
||||
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <wx/intl.h>
|
||||
|
||||
#include "GUI.hpp"
|
||||
|
|
@ -18,38 +17,41 @@ namespace Slic3r {
|
|||
std::string PresetHints::cooling_description(const Preset &preset)
|
||||
{
|
||||
std::string out;
|
||||
char buf[MIN_BUF_LENGTH/*4096*/];
|
||||
if (preset.config.opt_bool("cooling", 0)) {
|
||||
|
||||
if (preset.config.opt_bool("cooling", 0)) {
|
||||
int slowdown_below_layer_time = preset.config.opt_int("slowdown_below_layer_time", 0);
|
||||
int min_fan_speed = preset.config.opt_int("min_fan_speed", 0);
|
||||
int max_fan_speed = preset.config.opt_int("max_fan_speed", 0);
|
||||
int min_print_speed = int(preset.config.opt_float("min_print_speed", 0) + 0.5);
|
||||
int fan_below_layer_time = preset.config.opt_int("fan_below_layer_time", 0);
|
||||
sprintf(buf, _CHB(L("If estimated layer time is below ~%ds, fan will run at %d%% and print speed will be reduced so that no less than %ds are spent on that layer (however, speed will never be reduced below %dmm/s).")),
|
||||
slowdown_below_layer_time, max_fan_speed, slowdown_below_layer_time, min_print_speed);
|
||||
out += buf;
|
||||
|
||||
out += (boost::format(_utf8(L("If estimated layer time is below ~%1%s, "
|
||||
"fan will run at %2%%% and print speed will be reduced "
|
||||
"so that no less than %3%s are spent on that layer "
|
||||
"(however, speed will never be reduced below %4%mm/s).")))
|
||||
% slowdown_below_layer_time % max_fan_speed % slowdown_below_layer_time % min_print_speed).str();
|
||||
|
||||
if (fan_below_layer_time > slowdown_below_layer_time) {
|
||||
sprintf(buf, _CHB(L("\nIf estimated layer time is greater, but still below ~%ds, fan will run at a proportionally decreasing speed between %d%% and %d%%.")),
|
||||
fan_below_layer_time, max_fan_speed, min_fan_speed);
|
||||
out += buf;
|
||||
out += (boost::format(_utf8(L("\nIf estimated layer time is greater, but still below ~%1%s, "
|
||||
"fan will run at a proportionally decreasing speed between %2%%% and %3%%%.")))
|
||||
% fan_below_layer_time % max_fan_speed % min_fan_speed).str();
|
||||
}
|
||||
out += _CHB(L("\nDuring the other layers, fan "));
|
||||
out += _utf8(L("\nDuring the other layers, fan")) + " ";
|
||||
} else {
|
||||
out = _CHB(L("Fan "));
|
||||
out = _utf8(L("Fan")) + " ";
|
||||
}
|
||||
if (preset.config.opt_bool("fan_always_on", 0)) {
|
||||
int disable_fan_first_layers = preset.config.opt_int("disable_fan_first_layers", 0);
|
||||
int min_fan_speed = preset.config.opt_int("min_fan_speed", 0);
|
||||
sprintf(buf, _CHB(L("will always run at %d%% ")), min_fan_speed);
|
||||
out += buf;
|
||||
if (disable_fan_first_layers > 1) {
|
||||
sprintf(buf, _CHB(L("except for the first %d layers")), disable_fan_first_layers);
|
||||
out += buf;
|
||||
}
|
||||
|
||||
out += (boost::format(_utf8(L("will always run at %1%%%"))) % min_fan_speed).str() + " ";
|
||||
|
||||
if (disable_fan_first_layers > 1)
|
||||
out += (boost::format(_utf8(L("except for the first %1% layers."))) % disable_fan_first_layers).str();
|
||||
else if (disable_fan_first_layers == 1)
|
||||
out += _CHB(L("except for the first layer"));
|
||||
out += _utf8(L("except for the first layer."));
|
||||
} else
|
||||
out += _CHB(L("will be turned off."));
|
||||
out += _utf8(L("will be turned off."));
|
||||
|
||||
return out;
|
||||
}
|
||||
|
|
@ -150,7 +152,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle
|
|||
limit_by_first_layer_speed(std::max(external_perimeter_speed, small_perimeter_speed), max_print_speed));
|
||||
if (max_flow < external_perimeter_rate) {
|
||||
max_flow = external_perimeter_rate;
|
||||
max_flow_extrusion_type = _CHB(L("external perimeters"));
|
||||
max_flow_extrusion_type = _utf8(L("external perimeters"));
|
||||
}
|
||||
double perimeter_rate = Flow::new_from_config_width(frPerimeter,
|
||||
first_positive(first_layer_extrusion_width_ptr, perimeter_extrusion_width, extrusion_width),
|
||||
|
|
@ -159,7 +161,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle
|
|||
limit_by_first_layer_speed(std::max(perimeter_speed, small_perimeter_speed), max_print_speed));
|
||||
if (max_flow < perimeter_rate) {
|
||||
max_flow = perimeter_rate;
|
||||
max_flow_extrusion_type = _CHB(L("perimeters"));
|
||||
max_flow_extrusion_type = _utf8(L("perimeters"));
|
||||
}
|
||||
}
|
||||
if (! bridging && infill_extruder_active) {
|
||||
|
|
@ -168,7 +170,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle
|
|||
nozzle_diameter, lh, bfr).mm3_per_mm() * limit_by_first_layer_speed(infill_speed, max_print_speed);
|
||||
if (max_flow < infill_rate) {
|
||||
max_flow = infill_rate;
|
||||
max_flow_extrusion_type = _CHB(L("infill"));
|
||||
max_flow_extrusion_type = _utf8(L("infill"));
|
||||
}
|
||||
}
|
||||
if (solid_infill_extruder_active) {
|
||||
|
|
@ -178,7 +180,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle
|
|||
(bridging ? bridge_speed : limit_by_first_layer_speed(solid_infill_speed, max_print_speed));
|
||||
if (max_flow < solid_infill_rate) {
|
||||
max_flow = solid_infill_rate;
|
||||
max_flow_extrusion_type = _CHB(L("solid infill"));
|
||||
max_flow_extrusion_type = _utf8(L("solid infill"));
|
||||
}
|
||||
if (! bridging) {
|
||||
double top_solid_infill_rate = Flow::new_from_config_width(frInfill,
|
||||
|
|
@ -186,7 +188,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle
|
|||
nozzle_diameter, lh, bfr).mm3_per_mm() * limit_by_first_layer_speed(top_solid_infill_speed, max_print_speed);
|
||||
if (max_flow < top_solid_infill_rate) {
|
||||
max_flow = top_solid_infill_rate;
|
||||
max_flow_extrusion_type = _CHB(L("top solid infill"));
|
||||
max_flow_extrusion_type = _utf8(L("top solid infill"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -197,7 +199,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle
|
|||
(bridging ? bridge_speed : limit_by_first_layer_speed(support_material_speed, max_print_speed));
|
||||
if (max_flow < support_material_rate) {
|
||||
max_flow = support_material_rate;
|
||||
max_flow_extrusion_type = _CHB(L("support"));
|
||||
max_flow_extrusion_type = _utf8(L("support"));
|
||||
}
|
||||
}
|
||||
if (support_material_interface_extruder_active) {
|
||||
|
|
@ -207,26 +209,23 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle
|
|||
(bridging ? bridge_speed : limit_by_first_layer_speed(support_material_interface_speed, max_print_speed));
|
||||
if (max_flow < support_material_interface_rate) {
|
||||
max_flow = support_material_interface_rate;
|
||||
max_flow_extrusion_type = _CHB(L("support interface"));
|
||||
max_flow_extrusion_type = _utf8(L("support interface"));
|
||||
}
|
||||
}
|
||||
//FIXME handle gap_fill_speed
|
||||
if (! out.empty())
|
||||
out += "\n";
|
||||
out += (first_layer ? _CHB(L("First layer volumetric")) : (bridging ? _CHB(L("Bridging volumetric")) : _CHB(L("Volumetric"))));
|
||||
out += _CHB(L(" flow rate is maximized "));
|
||||
out += (first_layer ? _utf8(L("First layer volumetric")) : (bridging ? _utf8(L("Bridging volumetric")) : _utf8(L("Volumetric"))));
|
||||
out += " " + _utf8(L("flow rate is maximized")) + " ";
|
||||
bool limited_by_max_volumetric_speed = max_volumetric_speed > 0 && max_volumetric_speed < max_flow;
|
||||
out += (limited_by_max_volumetric_speed ?
|
||||
_CHB(L("by the print profile maximum")) :
|
||||
(_CHB(L("when printing ")) + max_flow_extrusion_type))
|
||||
+ _CHB(L(" with a volumetric rate "));
|
||||
_utf8(L("by the print profile maximum")) :
|
||||
(_utf8(L("when printing"))+ " " + max_flow_extrusion_type))
|
||||
+ " " + _utf8(L("with a volumetric rate"))+ " ";
|
||||
if (limited_by_max_volumetric_speed)
|
||||
max_flow = max_volumetric_speed;
|
||||
char buf[MIN_BUF_LENGTH/*2048*/];
|
||||
sprintf(buf, _CHB(L("%3.2f mm³/s")), max_flow);
|
||||
out += buf;
|
||||
sprintf(buf, _CHB(L(" at filament speed %3.2f mm/s.")), max_flow / filament_crossection);
|
||||
out += buf;
|
||||
|
||||
out += (boost::format(_utf8(L("%3.2f mm³/s at filament speed %3.2f mm/s."))) % max_flow % (max_flow / filament_crossection)).str();
|
||||
}
|
||||
|
||||
return out;
|
||||
|
|
@ -244,7 +243,7 @@ std::string PresetHints::recommended_thin_wall_thickness(const PresetBundle &pre
|
|||
|
||||
std::string out;
|
||||
if (layer_height <= 0.f){
|
||||
out += _CHB(L("Recommended object thin wall thickness: Not available due to invalid layer height."));
|
||||
out += _utf8(L("Recommended object thin wall thickness: Not available due to invalid layer height."));
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
@ -260,16 +259,13 @@ std::string PresetHints::recommended_thin_wall_thickness(const PresetBundle &pre
|
|||
|
||||
if (num_perimeters > 0) {
|
||||
int num_lines = std::min(num_perimeters * 2, 10);
|
||||
char buf[MIN_BUF_LENGTH/*256*/];
|
||||
sprintf(buf, _CHB(L("Recommended object thin wall thickness for layer height %.2f and ")), layer_height);
|
||||
out += buf;
|
||||
out += (boost::format(_utf8(L("Recommended object thin wall thickness for layer height %.2f and"))) % layer_height).str() + " ";
|
||||
// Start with the width of two closely spaced
|
||||
double width = external_perimeter_flow.width + external_perimeter_flow.spacing();
|
||||
for (int i = 2; i <= num_lines; thin_walls ? ++ i : i += 2) {
|
||||
if (i > 2)
|
||||
out += ", ";
|
||||
sprintf(buf, _CHB(L("%d lines: %.2lf mm")), i, width);
|
||||
out += buf;
|
||||
out += (boost::format(_utf8(L("%d lines: %.2f mm"))) % i % width).str() + " ";
|
||||
width += perimeter_flow.spacing() * (thin_walls ? 1.f : 2.f);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,16 +67,18 @@ ProgressStatusBar::ProgressStatusBar(wxWindow *parent, int id):
|
|||
}
|
||||
|
||||
ProgressStatusBar::~ProgressStatusBar() {
|
||||
if(m_timer->IsRunning()) m_timer->Stop();
|
||||
if(m_timer && m_timer->IsRunning()) m_timer->Stop();
|
||||
}
|
||||
|
||||
int ProgressStatusBar::get_progress() const
|
||||
{
|
||||
return m_prog->GetValue();
|
||||
return m_prog ? m_prog->GetValue() : 0;
|
||||
}
|
||||
|
||||
void ProgressStatusBar::set_progress(int val)
|
||||
{
|
||||
if(!m_prog) return;
|
||||
|
||||
if(!m_prog->IsShown()) show_progress(true);
|
||||
if(val < 0) return;
|
||||
|
||||
|
|
@ -91,24 +93,28 @@ void ProgressStatusBar::set_progress(int val)
|
|||
|
||||
int ProgressStatusBar::get_range() const
|
||||
{
|
||||
return m_prog->GetRange();
|
||||
return m_prog ? m_prog->GetRange() : 0;
|
||||
}
|
||||
|
||||
void ProgressStatusBar::set_range(int val)
|
||||
{
|
||||
if(val != m_prog->GetRange()) {
|
||||
if(m_prog && val != m_prog->GetRange()) {
|
||||
m_prog->SetRange(val);
|
||||
}
|
||||
}
|
||||
|
||||
void ProgressStatusBar::show_progress(bool show)
|
||||
{
|
||||
m_prog->Show(show);
|
||||
m_prog->Pulse();
|
||||
if(m_prog) {
|
||||
m_prog->Show(show);
|
||||
m_prog->Pulse();
|
||||
}
|
||||
}
|
||||
|
||||
void ProgressStatusBar::start_busy(int rate)
|
||||
{
|
||||
if(!m_prog) return;
|
||||
|
||||
m_busy = true;
|
||||
show_progress(true);
|
||||
if (!m_timer->IsRunning()) {
|
||||
|
|
@ -118,6 +124,8 @@ void ProgressStatusBar::start_busy(int rate)
|
|||
|
||||
void ProgressStatusBar::stop_busy()
|
||||
{
|
||||
if(!m_timer || !m_prog) return;
|
||||
|
||||
m_timer->Stop();
|
||||
show_progress(false);
|
||||
m_prog->SetValue(0);
|
||||
|
|
@ -126,13 +134,15 @@ void ProgressStatusBar::stop_busy()
|
|||
|
||||
void ProgressStatusBar::set_cancel_callback(ProgressStatusBar::CancelFn ccb) {
|
||||
m_cancel_cb = ccb;
|
||||
if(ccb) m_cancelbutton->Show();
|
||||
else m_cancelbutton->Hide();
|
||||
if(m_cancelbutton) {
|
||||
if(ccb) m_cancelbutton->Show();
|
||||
else m_cancelbutton->Hide();
|
||||
}
|
||||
}
|
||||
|
||||
void ProgressStatusBar::run(int rate)
|
||||
{
|
||||
if(!m_timer->IsRunning()) {
|
||||
if(m_timer && !m_timer->IsRunning()) {
|
||||
m_timer->Start(rate);
|
||||
}
|
||||
}
|
||||
|
|
@ -140,12 +150,12 @@ void ProgressStatusBar::run(int rate)
|
|||
void ProgressStatusBar::embed(wxFrame *frame)
|
||||
{
|
||||
wxFrame* mf = frame ? frame : GUI::wxGetApp().mainframe;
|
||||
mf->SetStatusBar(self);
|
||||
if(mf) mf->SetStatusBar(self);
|
||||
}
|
||||
|
||||
void ProgressStatusBar::set_status_text(const wxString& txt)
|
||||
{
|
||||
self->SetStatusText(txt);
|
||||
if(self) self->SetStatusText(txt);
|
||||
}
|
||||
|
||||
void ProgressStatusBar::set_status_text(const std::string& txt)
|
||||
|
|
@ -160,12 +170,12 @@ void ProgressStatusBar::set_status_text(const char *txt)
|
|||
|
||||
void ProgressStatusBar::show_cancel_button()
|
||||
{
|
||||
m_cancelbutton->Show();
|
||||
if(m_cancelbutton) m_cancelbutton->Show();
|
||||
}
|
||||
|
||||
void ProgressStatusBar::hide_cancel_button()
|
||||
{
|
||||
m_cancelbutton->Hide();
|
||||
if(m_cancelbutton) m_cancelbutton->Hide();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ void Chart::draw() {
|
|||
int text_height = 0;
|
||||
dc.GetTextExtent(label,&text_width,&text_height);
|
||||
dc.DrawText(label,wxPoint(0.5*(m_rect.GetRight()+m_rect.GetLeft())-text_width/2.f, m_rect.GetBottom()+0.5*legend_side));
|
||||
label = _(L("Volumetric speed")) + " (" + _(L("mm")) + wxString("³/", wxConvUTF8) + _(L("s")) + ")";
|
||||
label = _(L("Volumetric speed")) + " (" + _(L("mm³/s")) + ")";
|
||||
dc.GetTextExtent(label,&text_width,&text_height);
|
||||
dc.DrawRotatedText(label,wxPoint(0,0.5*(m_rect.GetBottom()+m_rect.GetTop())+text_width/2.f),90);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ SysInfoDialog::SysInfoDialog()
|
|||
main_sizer->Add(hsizer, 1, wxEXPAND | wxALL, 10);
|
||||
|
||||
// logo
|
||||
m_logo_bmp = ScalableBitmap(this, "Slic3r_192px.png", 192);
|
||||
m_logo_bmp = ScalableBitmap(this, "PrusaSlicer_192px.png", 192);
|
||||
m_logo = new wxStaticBitmap(this, wxID_ANY, m_logo_bmp.bmp());
|
||||
hsizer->Add(m_logo, 0, wxALIGN_CENTER_VERTICAL);
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,8 @@ void Tab::create_preset_tab()
|
|||
|
||||
add_scaled_button(panel, &m_btn_hide_incompatible_presets, m_bmp_hide_incompatible_presets.name());
|
||||
|
||||
m_btn_save_preset->SetToolTip(_(L("Save current ")) + m_title);
|
||||
// TRN "Save current Settings"
|
||||
m_btn_save_preset->SetToolTip(wxString::Format(_(L("Save current %s")),m_title));
|
||||
m_btn_delete_preset->SetToolTip(_(L("Delete this preset")));
|
||||
m_btn_delete_preset->Disable();
|
||||
|
||||
|
|
@ -254,7 +255,7 @@ void Tab::create_preset_tab()
|
|||
// Fill cache for mode bitmaps
|
||||
m_mode_bitmap_cache.reserve(3);
|
||||
m_mode_bitmap_cache.push_back(ScalableBitmap(this, "mode_simple_.png"));
|
||||
m_mode_bitmap_cache.push_back(ScalableBitmap(this, "mode_middle_.png"));
|
||||
m_mode_bitmap_cache.push_back(ScalableBitmap(this, "mode_advanced_.png"));
|
||||
m_mode_bitmap_cache.push_back(ScalableBitmap(this, "mode_expert_.png"));
|
||||
|
||||
// Initialize the DynamicPrintConfig by default keys/values.
|
||||
|
|
@ -916,13 +917,13 @@ void Tab::update_preset_description_line()
|
|||
wxString description_line = preset.is_default ?
|
||||
_(L("It's a default preset.")) : preset.is_system ?
|
||||
_(L("It's a system preset.")) :
|
||||
_(L("Current preset is inherited from ")) + (parent == nullptr ?
|
||||
"default preset." :
|
||||
":\n\t" + parent->name);
|
||||
wxString::Format(_(L("Current preset is inherited from %s")), (parent == nullptr ?
|
||||
_(L("default preset"))+"." :
|
||||
":\n\t" + parent->name));
|
||||
|
||||
if (preset.is_default || preset.is_system)
|
||||
description_line += "\n\t" + _(L("It can't be deleted or modified. ")) +
|
||||
"\n\t" + _(L("Any modifications should be saved as a new preset inherited from this one. ")) +
|
||||
description_line += "\n\t" + _(L("It can't be deleted or modified.")) +
|
||||
"\n\t" + _(L("Any modifications should be saved as a new preset inherited from this one.")) +
|
||||
"\n\t" + _(L("To do that please specify a new name for the preset."));
|
||||
|
||||
if (parent && parent->vendor)
|
||||
|
|
@ -1356,10 +1357,10 @@ void TabPrint::update()
|
|||
correct_100p_fill = true;
|
||||
}
|
||||
// get fill_pattern name from enum_labels for using this one at dialog_msg
|
||||
str_fill_pattern = m_config->def()->get("fill_pattern")->enum_labels[fill_pattern];
|
||||
str_fill_pattern = _utf8(m_config->def()->get("fill_pattern")->enum_labels[fill_pattern]);
|
||||
if (!correct_100p_fill) {
|
||||
wxString msg_text = _(L("The ")) + str_fill_pattern + _(L(" infill pattern is not supposed to work at 100% density.\n"
|
||||
"\nShall I switch to rectilinear fill pattern?"));
|
||||
wxString msg_text = GUI::from_u8((boost::format(_utf8(L("The %1% infill pattern is not supposed to work at 100%% density.\n\n"
|
||||
"Shall I switch to rectilinear fill pattern?"))) % str_fill_pattern).str());
|
||||
auto dialog = new wxMessageDialog(parent(), msg_text, _(L("Infill")), wxICON_WARNING | wxYES | wxNO);
|
||||
DynamicPrintConfig new_conf = *m_config;
|
||||
if (dialog->ShowModal() == wxID_YES) {
|
||||
|
|
@ -1450,6 +1451,7 @@ void TabPrint::update()
|
|||
|
||||
m_recommended_thin_wall_thickness_description_line->SetText(
|
||||
from_u8(PresetHints::recommended_thin_wall_thickness(*m_preset_bundle)));
|
||||
Layout();
|
||||
|
||||
// Thaw();
|
||||
m_update_cnt--;
|
||||
|
|
@ -1478,7 +1480,7 @@ void TabFilament::build()
|
|||
optgroup->append_single_option_line("filament_density");
|
||||
optgroup->append_single_option_line("filament_cost");
|
||||
|
||||
optgroup = page->new_optgroup(_(L("Temperature ")) + wxString("°C", wxConvUTF8));
|
||||
optgroup = page->new_optgroup(_(L("Temperature")) + wxString(" °C", wxConvUTF8));
|
||||
Line line = { _(L("Extruder")), "" };
|
||||
line.append_option(optgroup->get_option("first_layer_temperature"));
|
||||
line.append_option(optgroup->get_option("temperature"));
|
||||
|
|
@ -1632,6 +1634,7 @@ void TabFilament::update()
|
|||
m_cooling_description_line->SetText(text);
|
||||
text = from_u8(PresetHints::maximum_volumetric_flow_description(*m_preset_bundle));
|
||||
m_volumetric_speed_description_line->SetText(text);
|
||||
Layout();
|
||||
|
||||
bool cooling = m_config->opt_bool("cooling", 0);
|
||||
bool fan_always_on = cooling || m_config->opt_bool("fan_always_on", 0);
|
||||
|
|
@ -1737,7 +1740,7 @@ void TabPrinter::build_printhost(ConfigOptionsGroup *optgroup)
|
|||
Line cafile_line = optgroup->create_single_option_line("printhost_cafile");
|
||||
|
||||
auto printhost_cafile_browse = [this, optgroup] (wxWindow* parent) {
|
||||
auto btn = new wxButton(parent, wxID_ANY, _(L(" Browse "))+dots, wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||
auto btn = new wxButton(parent, wxID_ANY, " " + _(L("Browse"))+" " +dots, wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||
btn->SetFont(Slic3r::GUI::wxGetApp().normal_font());
|
||||
btn->SetBitmap(create_scaled_bitmap(this, "browse"));
|
||||
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
|
@ -1818,7 +1821,7 @@ void TabPrinter::build_fff()
|
|||
Line line = optgroup->create_single_option_line("bed_shape");//{ _(L("Bed shape")), "" };
|
||||
line.widget = [this](wxWindow* parent) {
|
||||
ScalableButton* btn;
|
||||
add_scaled_button(parent, &btn, "printer_white", _(L(" Set ")) + dots, wxBU_LEFT | wxBU_EXACTFIT);
|
||||
add_scaled_button(parent, &btn, "printer_white", " " + _(L("Set")) + " " + dots, wxBU_LEFT | wxBU_EXACTFIT);
|
||||
btn->SetFont(wxGetApp().normal_font());
|
||||
|
||||
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
|
@ -2019,7 +2022,7 @@ void TabPrinter::build_sla()
|
|||
Line line = optgroup->create_single_option_line("bed_shape");//{ _(L("Bed shape")), "" };
|
||||
line.widget = [this](wxWindow* parent) {
|
||||
ScalableButton* btn;
|
||||
add_scaled_button(parent, &btn, "printer_white", _(L(" Set ")) + dots, wxBU_LEFT | wxBU_EXACTFIT);
|
||||
add_scaled_button(parent, &btn, "printer_white", " " + _(L("Set")) + " " + dots, wxBU_LEFT | wxBU_EXACTFIT);
|
||||
btn->SetFont(wxGetApp().normal_font());
|
||||
|
||||
|
||||
|
|
@ -2343,11 +2346,12 @@ void TabPrinter::update_pages()
|
|||
{
|
||||
m_preset_bundle->update_multi_material_filament_presets();
|
||||
on_value_change("extruders_count", m_extruders_count);
|
||||
wxGetApp().sidebar().update_objects_list_extruder_column(m_extruders_count);
|
||||
}
|
||||
}
|
||||
else
|
||||
m_pages.swap(m_pages_fff);
|
||||
|
||||
wxGetApp().sidebar().update_objects_list_extruder_column(m_extruders_count);
|
||||
}
|
||||
else
|
||||
m_pages_sla.empty() ? build_sla() : m_pages.swap(m_pages_sla);
|
||||
|
|
@ -2770,8 +2774,8 @@ bool Tab::may_discard_current_dirty_preset(PresetCollection* presets /*= nullptr
|
|||
std::string type_name = presets->name();
|
||||
wxString tab = " ";
|
||||
wxString name = old_preset.is_default ?
|
||||
wxString::Format(_(L("Default preset (%s)")), _(type_name)) : //_(L("Default ")) + type_name + _(L(" preset")) :
|
||||
wxString::Format(_(L("Preset (%s)")), _(type_name)) + "\n" + tab + old_preset.name; //type_name + _(L(" preset\n")) + tab + old_preset.name;
|
||||
wxString::Format(_(L("Default preset (%s)")), _(type_name)) :
|
||||
wxString::Format(_(L("Preset (%s)")), _(type_name)) + "\n" + tab + old_preset.name;
|
||||
|
||||
// Collect descriptions of the dirty options.
|
||||
wxString changes;
|
||||
|
|
@ -2888,11 +2892,10 @@ void Tab::save_preset(std::string name /*= ""*/)
|
|||
|
||||
if (name.empty()) {
|
||||
const Preset &preset = m_presets->get_selected_preset();
|
||||
auto default_name = preset.is_default ? "Untitled" : preset.name;
|
||||
if (preset.is_system) {
|
||||
default_name += " - ";
|
||||
default_name += _(L("Copy")).ToUTF8().data();
|
||||
}
|
||||
auto default_name = preset.is_default ? "Untitled" :
|
||||
preset.is_system ? (boost::format(_utf8(L("%1% - Copy"))) % preset.name).str() :
|
||||
preset.name;
|
||||
|
||||
bool have_extention = boost::iends_with(default_name, ".ini");
|
||||
if (have_extention) {
|
||||
size_t len = default_name.length()-4;
|
||||
|
|
@ -2948,10 +2951,12 @@ void Tab::delete_preset()
|
|||
{
|
||||
auto current_preset = m_presets->get_selected_preset();
|
||||
// Don't let the user delete the ' - default - ' configuration.
|
||||
wxString action = current_preset.is_external ? _(L("remove")) : _(L("delete"));
|
||||
wxString msg = _(L("Are you sure you want to ")) + action + _(L(" the selected preset?"));
|
||||
action = current_preset.is_external ? _(L("Remove")) : _(L("Delete"));
|
||||
wxString title = action + _(L(" Preset"));
|
||||
std::string action = current_preset.is_external ? _utf8(L("remove")) : _utf8(L("delete"));
|
||||
// TRN remove/delete
|
||||
const wxString msg = from_u8((boost::format(_utf8(L("Are you sure you want to %1% the selected preset?"))) % action).str());
|
||||
action = current_preset.is_external ? _utf8(L("Remove")) : _utf8(L("Delete"));
|
||||
// TRN Remove/Delete
|
||||
wxString title = from_u8((boost::format(_utf8(L("%1% Preset"))) % action).str()); //action + _(L(" Preset"));
|
||||
if (current_preset.is_default ||
|
||||
wxID_YES != wxMessageDialog(parent(), msg, title, wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION).ShowModal())
|
||||
return;
|
||||
|
|
@ -3001,7 +3006,7 @@ wxSizer* Tab::compatible_widget_create(wxWindow* parent, PresetDependencies &dep
|
|||
{
|
||||
deps.checkbox = new wxCheckBox(parent, wxID_ANY, _(L("All")));
|
||||
deps.checkbox->SetFont(Slic3r::GUI::wxGetApp().normal_font());
|
||||
add_scaled_button(parent, &deps.btn, "printer_white", _(L(" Set ")) + dots, wxBU_LEFT | wxBU_EXACTFIT);
|
||||
add_scaled_button(parent, &deps.btn, "printer_white", wxString::Format(" %s %s", _(L("Set")), dots), wxBU_LEFT | wxBU_EXACTFIT);
|
||||
deps.btn->SetFont(Slic3r::GUI::wxGetApp().normal_font());
|
||||
|
||||
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
|
@ -3256,7 +3261,8 @@ ConfigOptionsGroupShp Page::new_optgroup(const wxString& title, int noncommon_la
|
|||
|
||||
void SavePresetWindow::build(const wxString& title, const std::string& default_name, std::vector<std::string> &values)
|
||||
{
|
||||
auto text = new wxStaticText(this, wxID_ANY, _(L("Save ")) + title + _(L(" as:")),
|
||||
// TRN Preset
|
||||
auto text = new wxStaticText(this, wxID_ANY, wxString::Format(_(L("Save %s as:")), title),
|
||||
wxDefaultPosition, wxDefaultSize);
|
||||
m_combo = new wxComboBox(this, wxID_ANY, from_u8(default_name),
|
||||
wxDefaultPosition, wxDefaultSize, 0, 0, wxTE_PROCESS_ENTER);
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ MsgDataIncompatible::MsgDataIncompatible(const std::unordered_map<std::string, w
|
|||
MsgDialog(nullptr, wxString::Format(_(L("%s incompatibility")), SLIC3R_APP_NAME),
|
||||
wxString::Format(_(L("%s configuration is incompatible")), SLIC3R_APP_NAME), wxID_NONE)
|
||||
{
|
||||
logo->SetBitmap(create_scaled_bitmap(this, "Slic3r_192px_grayscale.png", 192));
|
||||
logo->SetBitmap(create_scaled_bitmap(this, "PrusaSlicer_192px_grayscale.png", 192));
|
||||
|
||||
auto *text = new wxStaticText(this, wxID_ANY, wxString::Format(_(L(
|
||||
"This version of %s is not compatible with currently installed configuration bundles.\n"
|
||||
|
|
|
|||
|
|
@ -2542,7 +2542,7 @@ ModeSizer::ModeSizer(wxWindow *parent, int hgap/* = 10*/) :
|
|||
|
||||
std::vector < std::pair < wxString, std::string >> buttons = {
|
||||
{_(L("Simple")), "mode_simple_sq.png"},
|
||||
{_(L("Advanced")), "mode_middle_sq.png"},
|
||||
{_(L("Advanced")), "mode_advanced_sq.png"},
|
||||
{_(L("Expert")), "mode_expert_sq.png"}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue