diff --git a/src/libslic3r/AppConfig.cpp b/src/libslic3r/AppConfig.cpp index 1f1b1623b0..c8d1687e12 100644 --- a/src/libslic3r/AppConfig.cpp +++ b/src/libslic3r/AppConfig.cpp @@ -68,6 +68,15 @@ void AppConfig::set_defaults() if (get("export_sources_full_pathnames").empty()) set("export_sources_full_pathnames", "0"); +#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN +#ifdef _WIN32 + if (get("associate_3mf").empty()) + set("associate_3mf", "0"); + if (get("associate_stl").empty()) + set("associate_stl", "0"); +#endif // _WIN32 +#endif // ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN + // remove old 'use_legacy_opengl' parameter from this config, if present if (!get("use_legacy_opengl").empty()) erase("", "use_legacy_opengl"); @@ -109,6 +118,14 @@ void AppConfig::set_defaults() if (get("use_inches").empty()) set("use_inches", "0"); } +#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN + else { +#ifdef _WIN32 + if (get("associate_gcode").empty()) + set("associate_gcode", "0"); +#endif // _WIN32 + } +#endif // ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN if (get("seq_top_layer_only").empty()) set("seq_top_layer_only", "1"); diff --git a/src/libslic3r/Technologies.hpp b/src/libslic3r/Technologies.hpp index 738fdd7c07..85493d6f1f 100644 --- a/src/libslic3r/Technologies.hpp +++ b/src/libslic3r/Technologies.hpp @@ -80,6 +80,7 @@ #define ENABLE_SHOW_WIPE_MOVES (1 && ENABLE_2_3_0_BETA1) #define ENABLE_DRAG_AND_DROP_FIX (1 && ENABLE_2_3_0_BETA1) +#define ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN (1 && ENABLE_2_3_0_BETA1) #endif // _prusaslicer_technologies_h_ diff --git a/src/slic3r/GUI/ConfigWizard.cpp b/src/slic3r/GUI/ConfigWizard.cpp index b993fb3277..18e89f1146 100644 --- a/src/slic3r/GUI/ConfigWizard.cpp +++ b/src/slic3r/GUI/ConfigWizard.cpp @@ -238,7 +238,7 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, wxSt : from_u8(model.name); if (i == 1) { - auto *alt_label = new wxStaticText(variants_panel, wxID_ANY, _(L("Alternate nozzles:"))); + auto *alt_label = new wxStaticText(variants_panel, wxID_ANY, _L("Alternate nozzles:")); alt_label->SetFont(font_alt_nozzle); variants_sizer->Add(alt_label, 0, wxBOTTOM, 3); is_variants = true; @@ -302,9 +302,9 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, wxSt if (/*titles.size() > 1*/is_variants) { // It only makes sense to add the All / None buttons if there's multiple printers - auto *sel_all_std = new wxButton(this, wxID_ANY, titles.size() > 1 ? _(L("All standard")) : _(L("Standard"))); - auto *sel_all = new wxButton(this, wxID_ANY, _(L("All"))); - auto *sel_none = new wxButton(this, wxID_ANY, _(L("None"))); + auto *sel_all_std = new wxButton(this, wxID_ANY, titles.size() > 1 ? _L("All standard") : _L("Standard")); + auto *sel_all = new wxButton(this, wxID_ANY, _L("All")); + auto *sel_none = new wxButton(this, wxID_ANY, _L("None")); sel_all_std->Bind(wxEVT_BUTTON, [this](const wxCommandEvent &event) { this->select_all(true, false); }); sel_all->Bind(wxEVT_BUTTON, [this](const wxCommandEvent &event) { this->select_all(true, true); }); sel_none->Bind(wxEVT_BUTTON, [this](const wxCommandEvent &event) { this->select_all(false); }); @@ -444,14 +444,14 @@ PageWelcome::PageWelcome(ConfigWizard *parent) #else _utf8(L("Welcome to the %s Configuration Wizard")) #endif - ) % SLIC3R_APP_NAME).str()), _(L("Welcome"))) + ) % SLIC3R_APP_NAME).str()), _L("Welcome")) , welcome_text(append_text(from_u8((boost::format( _utf8(L("Hello, welcome to %s! This %s helps you with the initial configuration; just a few settings and you will be ready to print."))) % SLIC3R_APP_NAME % _utf8(ConfigWizard::name())).str()) )) , cbox_reset(append( - new wxCheckBox(this, wxID_ANY, _(L("Remove user profiles (a snapshot will be taken beforehand)"))) + new wxCheckBox(this, wxID_ANY, _L("Remove user profiles (a snapshot will be taken beforehand)")) )) { welcome_text->Hide(); @@ -582,10 +582,10 @@ PageMaterials::PageMaterials(ConfigWizard *parent, Materials *materials, wxStrin grid->AddGrowableCol(3, 1); grid->AddGrowableRow(1, 1); - grid->Add(new wxStaticText(this, wxID_ANY, _(L("Printer:")))); + grid->Add(new wxStaticText(this, wxID_ANY, _L("Printer:"))); grid->Add(new wxStaticText(this, wxID_ANY, list1name)); - grid->Add(new wxStaticText(this, wxID_ANY, _(L("Vendor:")))); - grid->Add(new wxStaticText(this, wxID_ANY, _(L("Profile:")))); + grid->Add(new wxStaticText(this, wxID_ANY, _L("Vendor:"))); + grid->Add(new wxStaticText(this, wxID_ANY, _L("Profile:"))); grid->Add(list_printer, 0, wxEXPAND); grid->Add(list_type, 0, wxEXPAND); @@ -593,8 +593,8 @@ PageMaterials::PageMaterials(ConfigWizard *parent, Materials *materials, wxStrin grid->Add(list_profile, 1, wxEXPAND); auto *btn_sizer = new wxBoxSizer(wxHORIZONTAL); - auto *sel_all = new wxButton(this, wxID_ANY, _(L("All"))); - auto *sel_none = new wxButton(this, wxID_ANY, _(L("None"))); + auto *sel_all = new wxButton(this, wxID_ANY, _L("All")); + auto *sel_none = new wxButton(this, wxID_ANY, _L("None")); btn_sizer->Add(sel_all, 0, wxRIGHT, em / 2); btn_sizer->Add(sel_none); @@ -657,7 +657,7 @@ void PageMaterials::reload_presets() { clear(); - list_printer->append(_(L("(All)")), &EMPTY); + list_printer->append(_L("(All)"), &EMPTY); //list_printer->SetLabelMarkup("bald"); for (const Preset* printer : materials->printers) { list_printer->append(printer->name, &printer->name); @@ -686,10 +686,10 @@ void PageMaterials::set_compatible_printers_html_window(const std::vector* are not compatible with some installed printers.")); + wxString first_line = _L("Filaments marked with * are not compatible with some installed printers."); wxString text; if (all_printers) { - wxString second_line = _(L("All installed printers are compatible with the selected filament.")); + wxString second_line = _L("All installed printers are compatible with the selected filament."); text = wxString::Format( "" "