Add default IME language and per-app/global CN-EN scope settings.

Wire config + settings UI for default_ime_mode / ime_mode_scope, and sync unified mode across apps when scope is global.
This commit is contained in:
fanlusky committed 2026-07-28 20:26:25 +08:00
1 parent 71fa7dddeb
commit 6632e9ebcf
6 files changed
+151 -2

No files matched your search

+18
View File
@@ -1662,6 +1662,22 @@ HRESULT OnControllerCreatedSettingsWnd( //
PostSettingsConfig();
}
}
else if (path == "input.default_ime_mode")
{
const std::string value = json::value_to<std::string>(data.at("value"));
if (SetConfiguredDefaultImeMode(value))
{
PostSettingsConfig();
}
}
else if (path == "input.ime_mode_scope")
{
const std::string value = json::value_to<std::string>(data.at("value"));
if (SetConfiguredImeModeScope(value))
{
PostSettingsConfig();
}
}
else if (path == "input.shuangpin_schema")
{
const std::string value = json::value_to<std::string>(data.at("value"));
@@ -2087,6 +2103,8 @@ void PostSettingsConfig()
{"type", "configSnapshot"},
{"data", {{"input", {{"schema", GetConfiguredInputSchemeName()},
{"character_set", GetConfiguredCharacterSet()},
{"default_ime_mode", GetConfiguredDefaultImeMode()},
{"ime_mode_scope", GetConfiguredImeModeScope()},
{"shuangpin_schema", GetConfiguredShuangpinSchema()},
{"wubi_schema", GetConfiguredWubiSchema()}}},
{"general", {{"floating_toolbar", GetConfiguredFloatingToolbarEnabled()},