Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/client/StarClientApplication.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-12-10 18:49:29 +1100
committerKae <80987908+Novaenia@users.noreply.github.com>2024-12-10 18:49:29 +1100
commitd95eac316405fb100963d47dcd95ccced3462383 (patch)
tree8229a98c4b96cbd4268c5ceb02f3a3b5754a6daa /source/client/StarClientApplication.cpp
parentdd52188e53e690f8eb872421f8a4c3bcc5699133 (diff)
Input: binds can now make the clipboard available while held, config option to always allow
Diffstat (limited to 'source/client/StarClientApplication.cpp')
-rw-r--r--source/client/StarClientApplication.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/client/StarClientApplication.cpp b/source/client/StarClientApplication.cpp
index b4e0955..71bec5d 100644
--- a/source/client/StarClientApplication.cpp
+++ b/source/client/StarClientApplication.cpp
@@ -543,8 +543,9 @@ void ClientApplication::changeState(MainAppState newState) {
m_universeClient->setLuaCallbacks("input", LuaBindings::makeInputCallbacks());
m_universeClient->setLuaCallbacks("voice", LuaBindings::makeVoiceCallbacks());
m_universeClient->setLuaCallbacks("camera", LuaBindings::makeCameraCallbacks(&m_worldPainter->camera()));
- if (!m_root->configuration()->get("safeScripts").toBool())
- m_universeClient->setLuaCallbacks("clipboard", LuaBindings::makeClipboardCallbacks(appController()));
+
+ Json alwaysAllow = m_root->configuration()->getPath("safe.alwaysAllowClipboard");
+ m_universeClient->setLuaCallbacks("clipboard", LuaBindings::makeClipboardCallbacks(appController(), alwaysAllow && alwaysAllow.toBool()));
auto heldScriptPanes = make_shared<List<MainInterface::ScriptPaneInfo>>();