Tech ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN set as default
This commit is contained in:
parent
19cfeb1a78
commit
8cb8a24ded
7 changed files with 10 additions and 56 deletions
|
@ -68,14 +68,12 @@ 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())
|
||||
|
@ -127,14 +125,12 @@ void AppConfig::set_defaults()
|
|||
if (get("color_mapinulation_panel").empty())
|
||||
set("color_mapinulation_panel", "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");
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
//=============
|
||||
// debug techs
|
||||
//=============
|
||||
|
||||
// Shows camera target in the 3D scene
|
||||
#define ENABLE_SHOW_CAMERA_TARGET 0
|
||||
// Log debug messages to console when changing selection
|
||||
|
@ -27,26 +26,14 @@
|
|||
#define ENABLE_GCODE_VIEWER_STATISTICS 0
|
||||
// Enable G-Code viewer comparison between toolpaths height and width detected from gcode and calculated at gcode generation
|
||||
#define ENABLE_GCODE_VIEWER_DATA_CHECKING 0
|
||||
|
||||
|
||||
// Enable rendering of objects using environment map
|
||||
#define ENABLE_ENVIRONMENT_MAP 0
|
||||
// Enable smoothing of objects normals
|
||||
#define ENABLE_SMOOTH_NORMALS 0
|
||||
|
||||
|
||||
//====================
|
||||
// 2.3.0.alpha4 techs
|
||||
//====================
|
||||
#define ENABLE_2_3_0_ALPHA4 1
|
||||
|
||||
#define ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS (1 && ENABLE_2_3_0_ALPHA4)
|
||||
|
||||
|
||||
//===================
|
||||
// 2.3.0.beta1 techs
|
||||
//===================
|
||||
#define ENABLE_2_3_0_BETA1 1
|
||||
|
||||
#define ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN (1 && ENABLE_2_3_0_BETA1)
|
||||
// Enable rendering markers for options in preview as fixed screen size points
|
||||
#define ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS 1
|
||||
|
||||
|
||||
//====================
|
||||
|
@ -54,11 +41,17 @@
|
|||
//====================
|
||||
#define ENABLE_2_3_1_ALPHA1 1
|
||||
|
||||
// Enable splitting of vertex buffers used to render toolpaths
|
||||
#define ENABLE_SPLITTED_VERTEX_BUFFER (1 && ENABLE_2_3_1_ALPHA1)
|
||||
// Enable rendering only starting and final caps for toolpaths
|
||||
#define ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS (1 && ENABLE_SPLITTED_VERTEX_BUFFER)
|
||||
// Enable reload from disk command for 3mf files
|
||||
#define ENABLE_RELOAD_FROM_DISK_FOR_3MF (1 && ENABLE_2_3_1_ALPHA1)
|
||||
// Removes obsolete warning texture code
|
||||
#define ENABLE_WARNING_TEXTURE_REMOVAL (1 && ENABLE_2_3_1_ALPHA1)
|
||||
// Enable showing gcode line numbers in previeww horizontal slider
|
||||
#define ENABLE_GCODE_LINES_ID_IN_H_SLIDER (1 && ENABLE_2_3_1_ALPHA1)
|
||||
// Enable validation of custom gcode against gcode processor resserved keywords
|
||||
#define ENABLE_VALIDATE_CUSTOM_GCODE (1 && ENABLE_2_3_1_ALPHA1)
|
||||
|
||||
|
||||
|
|
|
@ -1186,7 +1186,6 @@ PageReloadFromDisk::PageReloadFromDisk(ConfigWizard* parent)
|
|||
box_pathnames->Bind(wxEVT_CHECKBOX, [this](wxCommandEvent& event) { this->full_pathnames = event.IsChecked(); });
|
||||
}
|
||||
|
||||
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
#ifdef _WIN32
|
||||
PageFilesAssociation::PageFilesAssociation(ConfigWizard* parent)
|
||||
: ConfigWizardPage(parent, _L("Files association"), _L("Files association"))
|
||||
|
@ -1200,7 +1199,6 @@ PageFilesAssociation::PageFilesAssociation(ConfigWizard* parent)
|
|||
// append(cb_gcode);
|
||||
}
|
||||
#endif // _WIN32
|
||||
#endif // ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
|
||||
PageMode::PageMode(ConfigWizard *parent)
|
||||
: ConfigWizardPage(parent, _L("View mode"), _L("View mode"))
|
||||
|
@ -1813,11 +1811,9 @@ void ConfigWizard::priv::load_pages()
|
|||
|
||||
index->add_page(page_update);
|
||||
index->add_page(page_reload_from_disk);
|
||||
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
#ifdef _WIN32
|
||||
index->add_page(page_files_association);
|
||||
#endif // _WIN32
|
||||
#endif // ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
index->add_page(page_mode);
|
||||
|
||||
index->go_to(former_active); // Will restore the active item/page if possible
|
||||
|
@ -2411,7 +2407,6 @@ void ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese
|
|||
app_config->set("preset_update", page_update->preset_update ? "1" : "0");
|
||||
app_config->set("export_sources_full_pathnames", page_reload_from_disk->full_pathnames ? "1" : "0");
|
||||
|
||||
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
#ifdef _WIN32
|
||||
app_config->set("associate_3mf", page_files_association->associate_3mf() ? "1" : "0");
|
||||
app_config->set("associate_stl", page_files_association->associate_stl() ? "1" : "0");
|
||||
|
@ -2429,7 +2424,6 @@ void ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese
|
|||
// }
|
||||
|
||||
#endif // _WIN32
|
||||
#endif // ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
|
||||
page_mode->serialize_mode(app_config);
|
||||
|
||||
|
@ -2594,11 +2588,9 @@ ConfigWizard::ConfigWizard(wxWindow *parent)
|
|||
|
||||
p->add_page(p->page_update = new PageUpdate(this));
|
||||
p->add_page(p->page_reload_from_disk = new PageReloadFromDisk(this));
|
||||
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
#ifdef _WIN32
|
||||
p->add_page(p->page_files_association = new PageFilesAssociation(this));
|
||||
#endif // _WIN32
|
||||
#endif // ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
p->add_page(p->page_mode = new PageMode(this));
|
||||
p->add_page(p->page_firmware = new PageFirmware(this));
|
||||
p->add_page(p->page_bed = new PageBedShape(this));
|
||||
|
|
|
@ -393,7 +393,6 @@ struct PageReloadFromDisk : ConfigWizardPage
|
|||
PageReloadFromDisk(ConfigWizard* parent);
|
||||
};
|
||||
|
||||
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
#ifdef _WIN32
|
||||
struct PageFilesAssociation : ConfigWizardPage
|
||||
{
|
||||
|
@ -410,7 +409,6 @@ public:
|
|||
// bool associate_gcode() const { return cb_gcode->IsChecked(); }
|
||||
};
|
||||
#endif // _WIN32
|
||||
#endif // ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
|
||||
struct PageMode: ConfigWizardPage
|
||||
{
|
||||
|
@ -572,11 +570,9 @@ struct ConfigWizard::priv
|
|||
PageCustom *page_custom = nullptr;
|
||||
PageUpdate *page_update = nullptr;
|
||||
PageReloadFromDisk *page_reload_from_disk = nullptr;
|
||||
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
#ifdef _WIN32
|
||||
PageFilesAssociation* page_files_association = nullptr;
|
||||
#endif // _WIN32
|
||||
#endif // ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
PageMode *page_mode = nullptr;
|
||||
PageVendors *page_vendors = nullptr;
|
||||
Pages3rdparty pages_3rdparty;
|
||||
|
|
|
@ -835,14 +835,10 @@ bool GUI_App::on_init_inner()
|
|||
|
||||
if (is_editor()) {
|
||||
#ifdef __WXMSW__
|
||||
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
if (app_config->get("associate_3mf") == "1")
|
||||
#endif // ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
associate_3mf_files();
|
||||
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
if (app_config->get("associate_stl") == "1")
|
||||
associate_stl_files();
|
||||
#endif // ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
#endif // __WXMSW__
|
||||
|
||||
preset_updater = new PresetUpdater();
|
||||
|
@ -858,9 +854,7 @@ bool GUI_App::on_init_inner()
|
|||
}
|
||||
else {
|
||||
#ifdef __WXMSW__
|
||||
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
if (app_config->get("associate_gcode") == "1")
|
||||
#endif // ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
associate_gcode_files();
|
||||
#endif // __WXMSW__
|
||||
}
|
||||
|
@ -1722,7 +1716,6 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
|
|||
if (dlg.seq_top_layer_only_changed())
|
||||
#endif // ENABLE_GCODE_LINES_ID_IN_H_SLIDER
|
||||
this->plater_->refresh_print();
|
||||
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
#ifdef _WIN32
|
||||
if (is_editor()) {
|
||||
if (app_config->get("associate_3mf") == "1")
|
||||
|
@ -1735,7 +1728,6 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
|
|||
associate_gcode_files();
|
||||
}
|
||||
#endif // _WIN32
|
||||
#endif // ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
}
|
||||
if (app_layout_changed) {
|
||||
// hide full main_sizer for mainFrame
|
||||
|
@ -2303,7 +2295,6 @@ void GUI_App::associate_3mf_files()
|
|||
::SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nullptr, nullptr);
|
||||
}
|
||||
|
||||
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
void GUI_App::associate_stl_files()
|
||||
{
|
||||
wchar_t app_path[MAX_PATH];
|
||||
|
@ -2327,7 +2318,6 @@ void GUI_App::associate_stl_files()
|
|||
// notify Windows only when any of the values gets changed
|
||||
::SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nullptr, nullptr);
|
||||
}
|
||||
#endif // ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
|
||||
void GUI_App::associate_gcode_files()
|
||||
{
|
||||
|
|
|
@ -279,13 +279,11 @@ public:
|
|||
bool is_gl_version_greater_or_equal_to(unsigned int major, unsigned int minor) const { return m_opengl_mgr.get_gl_info().is_version_greater_or_equal_to(major, minor); }
|
||||
bool is_glsl_version_greater_or_equal_to(unsigned int major, unsigned int minor) const { return m_opengl_mgr.get_gl_info().is_glsl_version_greater_or_equal_to(major, minor); }
|
||||
|
||||
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
#ifdef __WXMSW__
|
||||
void associate_3mf_files();
|
||||
void associate_stl_files();
|
||||
void associate_gcode_files();
|
||||
#endif // __WXMSW__
|
||||
#endif // ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
|
||||
private:
|
||||
bool on_init_inner();
|
||||
|
@ -297,13 +295,6 @@ private:
|
|||
|
||||
bool config_wizard_startup();
|
||||
void check_updates(const bool verbose);
|
||||
|
||||
#if !ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
#ifdef __WXMSW__
|
||||
void associate_3mf_files();
|
||||
void associate_gcode_files();
|
||||
#endif // __WXMSW__
|
||||
#endif // !ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
};
|
||||
|
||||
DECLARE_APP(GUI_App)
|
||||
|
|
|
@ -106,7 +106,6 @@ void PreferencesDialog::build()
|
|||
option = Option(def, "export_sources_full_pathnames");
|
||||
m_optgroup_general->append_single_option_line(option);
|
||||
|
||||
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
#ifdef _WIN32
|
||||
// Please keep in sync with ConfigWizard
|
||||
def.label = L("Associate .3mf files to PrusaSlicer");
|
||||
|
@ -123,7 +122,6 @@ void PreferencesDialog::build()
|
|||
option = Option(def, "associate_stl");
|
||||
m_optgroup_general->append_single_option_line(option);
|
||||
#endif // _WIN32
|
||||
#endif // ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
|
||||
// Please keep in sync with ConfigWizard
|
||||
def.label = L("Update built-in Presets automatically");
|
||||
|
@ -184,7 +182,6 @@ void PreferencesDialog::build()
|
|||
option = Option(def, "default_action_on_select_preset");
|
||||
m_optgroup_general->append_single_option_line(option);
|
||||
}
|
||||
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
#ifdef _WIN32
|
||||
else {
|
||||
def.label = L("Associate .gcode files to PrusaSlicer G-code Viewer");
|
||||
|
@ -195,7 +192,6 @@ void PreferencesDialog::build()
|
|||
m_optgroup_general->append_single_option_line(option);
|
||||
}
|
||||
#endif // _WIN32
|
||||
#endif // ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
|
||||
#if __APPLE__
|
||||
def.label = L("Use Retina resolution for the 3D scene");
|
||||
|
|
Loading…
Reference in a new issue