diff --git a/win-linux/src/cascapplicationmanagerwrapper.cpp b/win-linux/src/cascapplicationmanagerwrapper.cpp index ab853cb2b..088e96256 100644 --- a/win-linux/src/cascapplicationmanagerwrapper.cpp +++ b/win-linux/src/cascapplicationmanagerwrapper.cpp @@ -1891,6 +1891,9 @@ bool CAscApplicationManagerWrapper::applySettings(const wstring& wstrjson) _lang_id = l; _reg_user.setValue("locale", _lang_id); + + QJsonObject _json_obj{{"lang", _lang_id}}; + AscAppManager::getInstance().UpdatePlugins(Utils::stringifyJson(_json_obj).toStdWString()); if (!direction_changed) CLangater::reloadTranslations(_lang_id); #ifdef _UPDMODULE @@ -2056,7 +2059,8 @@ void CAscApplicationManagerWrapper::applyTheme(const wstring& theme, bool force) _editor->applyTheme(theme); } - AscAppManager::getInstance().SetSkin(_app.m_themes->current().json()); + QJsonObject _json_obj{{"theme", _app.m_themes->current().json()}}; + AscAppManager::getInstance().UpdatePlugins(Utils::stringifyJson(_json_obj).toStdWString()); AscAppManager::sendCommandTo(SEND_TO_ALL_START_PAGE, L"uitheme:changed", theme); } } diff --git a/win-linux/src/cthemes.cpp b/win-linux/src/cthemes.cpp index 05be7ad55..63bd3d7c0 100644 --- a/win-linux/src/cthemes.cpp +++ b/win-linux/src/cthemes.cpp @@ -546,9 +546,9 @@ auto CTheme::fromJson(const QString& json) -> bool return false; } -auto CTheme::json() const -> std::wstring +auto CTheme::json() const -> QString { - return m_priv->json.isEmpty() ? L"" : m_priv->json.toStdWString(); + return m_priv->json.isEmpty() ? "" : m_priv->json; } auto CTheme::id() const -> std::wstring diff --git a/win-linux/src/cthemes.h b/win-linux/src/cthemes.h index 1e9917270..f3e3e303e 100644 --- a/win-linux/src/cthemes.h +++ b/win-linux/src/cthemes.h @@ -81,7 +81,7 @@ public: auto fromFile(const QString&) -> bool; auto fromJson(const QString&) -> bool; - auto json() const -> std::wstring; + auto json() const -> QString; auto id() const -> std::wstring; auto originalId() const -> std::wstring;