diff options
| author | Rider Linden <rider@lindenlab.com> | 2026-08-12 16:08:52 -0700 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2026-08-12 16:08:52 -0700 |
| commit | 222f568123c0ac9b6e4ed7be0dae020c8cb3f832 (patch) | |
| tree | d663d52d0957a26e08836365612a5de99735e8a9 | |
| parent | 32a8200a788b286073a11c81255aac471aa37b67 (diff) | |
Issue 6131: Show toast when starting and stopping the script edit server.
| -rw-r--r-- | indra/newview/llscripteditorws.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 21 |
2 files changed, 31 insertions, 0 deletions
diff --git a/indra/newview/llscripteditorws.cpp b/indra/newview/llscripteditorws.cpp index 2b77ff1481..0487ebd06d 100644 --- a/indra/newview/llscripteditorws.cpp +++ b/indra/newview/llscripteditorws.cpp @@ -45,6 +45,7 @@ #include "llinventorytype.h" #include "llinventorydefines.h" #include "llnotecard.h" +#include "llnotificationsutil.h" #include "llpreviewnotecard.h" #include "llpreviewscript.h" #include "llprocess.h" @@ -261,11 +262,18 @@ LLScriptEditorWSServer::ptr_t LLScriptEditorWSServer::ensureServerRunning() if (!server->isRunning()) { + U16 port = static_cast<U16>(gSavedSettings.getS32("ExternalWebsocketSyncPort")); + LLSD args; + args["PORT"] = static_cast<S32>(port); + if (!wsmgr.startServer(DEFAULT_SERVER_NAME)) { LL_WARNS("ScriptEditorWS") << "Failed to start script editor websocket server" << LL_ENDL; + LLNotificationsUtil::add("ExternalEditorServerFailed", args); return nullptr; } + + LLNotificationsUtil::add("ExternalEditorServerStarted", args); } return server; @@ -377,6 +385,8 @@ void LLScriptEditorWSServer::onStopped() mActiveConnections.clear(); LL_INFOS("ScriptEditorWS") << "Script editor WebSocket server stopped, all state cleaned up" << LL_ENDL; + + LLNotificationsUtil::add("ExternalEditorServerStopped"); } void LLScriptEditorWSServer::onConnectionOpened(const LLWebsocketMgr::WSConnection::ptr_t& connection) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index a9adb772e5..d45dcfc87e 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -7056,6 +7056,27 @@ The string [STRING_NAME] is missing from strings.xml type="notifytip"> [MESSAGE] </notification> + + <notification + icon="notifytip.tga" + name="ExternalEditorServerStarted" + type="notifytip"> +External editor server started on port [PORT]. + </notification> + + <notification + icon="notifytip.tga" + name="ExternalEditorServerFailed" + type="notifytip"> +Failed to start external editor server on port [PORT]. + </notification> + + <notification + icon="notifytip.tga" + name="ExternalEditorServerStopped" + type="notifytip"> +External editor server stopped. + </notification> <notification icon="notifytip.tga" |
