mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 15:44:12 -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
|
@ -81,6 +81,15 @@ std::string AppConfig::get_hms_host()
|
|||
// #endif
|
||||
}
|
||||
|
||||
bool AppConfig::get_stealth_mode()
|
||||
{
|
||||
// always return true when user did not finish setup wizard yet
|
||||
if (!get_bool("firstguide","finish")) {
|
||||
return true;
|
||||
}
|
||||
return get_bool("stealth_mode");
|
||||
}
|
||||
|
||||
void AppConfig::reset()
|
||||
{
|
||||
m_storage.clear();
|
||||
|
|
|
@ -45,6 +45,7 @@ public:
|
|||
|
||||
std::string get_language_code();
|
||||
std::string get_hms_host();
|
||||
bool get_stealth_mode();
|
||||
|
||||
// Clear and reset to defaults.
|
||||
void reset();
|
||||
|
@ -80,8 +81,10 @@ public:
|
|||
{ std::string value; this->get(section, key, value); return value; }
|
||||
std::string get(const std::string &key) const
|
||||
{ std::string value; this->get("app", key, value); return value; }
|
||||
bool get_bool(const std::string §ion, const std::string &key) const
|
||||
{ return this->get(section, key) == "true" || this->get(key) == "1"; }
|
||||
bool get_bool(const std::string &key) const
|
||||
{ return this->get(key) == "true" || this->get(key) == "1"; }
|
||||
{ return this->get_bool("app", key); }
|
||||
void set(const std::string §ion, const std::string &key, const std::string &value)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue