mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
feat: add stealth mode select step to setup wizard (#6104)
feat: add stealth mode select to setup wizard feat: enable stealth mode until user finishes setup wizard Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
parent
3510158cd8
commit
f0f5c3bbe9
11 changed files with 157 additions and 7 deletions
|
@ -109,6 +109,7 @@ GuideFrame::GuideFrame(GUI_App *pGUI, long style)
|
|||
// INI
|
||||
m_SectionName = "firstguide";
|
||||
PrivacyUse = false;
|
||||
StealthMode = false;
|
||||
InstallNetplugin = false;
|
||||
|
||||
m_MainPtr = pGUI;
|
||||
|
@ -486,6 +487,15 @@ void GuideFrame::OnScriptMessage(wxWebViewEvent &evt)
|
|||
else
|
||||
InstallNetplugin = false;
|
||||
}
|
||||
else if (strCmd == "save_stealth_mode") {
|
||||
wxString strAction = j["data"]["action"];
|
||||
|
||||
if (strAction == "yes") {
|
||||
StealthMode = true;
|
||||
} else {
|
||||
StealthMode = false;
|
||||
}
|
||||
}
|
||||
} catch (std::exception &e) {
|
||||
// wxMessageBox(e.what(), "json Exception", MB_OK);
|
||||
BOOST_LOG_TRIVIAL(trace) << "GuideFrame::OnScriptMessage;Error:" << e.what();
|
||||
|
@ -616,6 +626,7 @@ int GuideFrame::SaveProfile()
|
|||
// m_MainPtr->app_config->set(std::string(m_SectionName.mb_str()), "privacyuse", "0");
|
||||
|
||||
m_MainPtr->app_config->set("region", m_Region);
|
||||
m_MainPtr->app_config->set_bool("stealth_mode", StealthMode);
|
||||
|
||||
//finish
|
||||
m_MainPtr->app_config->set(std::string(m_SectionName.mb_str()), "finish", "1");
|
||||
|
@ -1222,6 +1233,9 @@ int GuideFrame::LoadProfile()
|
|||
m_ProfileJson["network_plugin_install"] = wxGetApp().app_config->get("app","installed_networking");
|
||||
m_ProfileJson["network_plugin_compability"] = wxGetApp().is_compatibility_version() ? "1" : "0";
|
||||
network_plugin_ready = wxGetApp().is_compatibility_version();
|
||||
|
||||
StealthMode = wxGetApp().app_config->get_bool("app","stealth_mode");
|
||||
m_ProfileJson["stealth_mode"] = StealthMode;
|
||||
}
|
||||
catch (std::exception &e) {
|
||||
//wxLogMessage("GUIDE: load_profile_error %s ", e.what());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue