summaryrefslogtreecommitdiff
path: root/core/app_settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/app_settings.py')
-rw-r--r--core/app_settings.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/core/app_settings.py b/core/app_settings.py
index e8bc7ae..ea3ac49 100644
--- a/core/app_settings.py
+++ b/core/app_settings.py
@@ -51,3 +51,22 @@ def save_settings(cfg: dict) -> None:
json.dump(cfg, f, indent=2)
except Exception:
pass
+
+
+# ── Developer mode ────────────────────────────────────────────────────────
+#
+# In-memory cache so widgets that build device/config UI (Add Device dialog,
+# per-device config panels, plugin panels) can check this without needing
+# the full settings dict threaded through their constructors. MainWindow
+# keeps it in sync with the persisted setting whenever settings are
+# loaded/applied — see set_developer_mode() calls in ui/main_window.py.
+_dev_mode = True
+
+
+def is_developer_mode() -> bool:
+ return _dev_mode
+
+
+def set_developer_mode(value: bool) -> None:
+ global _dev_mode
+ _dev_mode = value