From 091f2c6135e575c4252ea37fa8545779c4570132 Mon Sep 17 00:00:00 2001 From: pallab-js Date: Wed, 15 Apr 2026 15:05:51 +0530 Subject: [PATCH] impl(cm): implement change_theme and change_language callbacks (#14782) * docs: fix typos in documentation and code comments - Fix 'seperated' -> 'separated' in remote_input.dart - Fix 'seperators' -> 'separators' in fuse/cs.rs - Update outdated 'OSX' -> 'macOS' in virtual display README Signed-off-by: pallab-js * impl(cm): implement change_theme and change_language callbacks These callbacks were previously empty TODO stubs. Now they properly invoke the Sciter UI handlers to notify the UI when theme or language changes occur. Signed-off-by: pallab-js --------- Signed-off-by: pallab-js --- flutter/lib/common/widgets/remote_input.dart | 2 +- libs/clipboard/src/platform/unix/fuse/cs.rs | 2 +- libs/virtual_display/dylib/README.md | 2 +- src/ui/cm.rs | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/flutter/lib/common/widgets/remote_input.dart b/flutter/lib/common/widgets/remote_input.dart index e35da6424..5871033db 100644 --- a/flutter/lib/common/widgets/remote_input.dart +++ b/flutter/lib/common/widgets/remote_input.dart @@ -31,7 +31,7 @@ class RawKeyFocusScope extends StatelessWidget { // https://github.com/flutter/flutter/issues/154053 final useRawKeyEvents = isLinux && !isWeb; // FIXME: On Windows, `AltGr` will generate `Alt` and `Control` key events, - // while `Alt` and `Control` are seperated key events for en-US input method. + // while `Alt` and `Control` are separated key events for en-US input method. return FocusScope( autofocus: true, child: Focus( diff --git a/libs/clipboard/src/platform/unix/fuse/cs.rs b/libs/clipboard/src/platform/unix/fuse/cs.rs index 0f1cf8739..fa1dea71d 100644 --- a/libs/clipboard/src/platform/unix/fuse/cs.rs +++ b/libs/clipboard/src/platform/unix/fuse/cs.rs @@ -12,7 +12,7 @@ //! //! For now, we transfer all file names with windows separators, UTF-16 encoded. //! *Need a way to transfer file names with '\' safely*. -//! Maybe we can use URL encoded file names and '/' seperators as a new standard, while keep the support to old schemes. +//! Maybe we can use URL encoded file names and '/' separators as a new standard, while keep the support to old schemes. //! //! # Note //! - all files on FS should be read only, and mark the owner to be the current user diff --git a/libs/virtual_display/dylib/README.md b/libs/virtual_display/dylib/README.md index 30fa588f1..fb71c3c56 100644 --- a/libs/virtual_display/dylib/README.md +++ b/libs/virtual_display/dylib/README.md @@ -29,4 +29,4 @@ TODO ## X11 -## OSX +## macOS diff --git a/src/ui/cm.rs b/src/ui/cm.rs index 15b7b9435..8eb8f494e 100644 --- a/src/ui/cm.rs +++ b/src/ui/cm.rs @@ -52,12 +52,12 @@ impl InvokeUiCM for SciterHandler { self.call("newMessage", &make_args!(id, text)); } - fn change_theme(&self, _dark: String) { - // TODO + fn change_theme(&self, dark: String) { + self.call("changeTheme", &make_args!(dark)); } fn change_language(&self) { - // TODO + self.call("changeLanguage", &make_args!()); } fn show_elevation(&self, show: bool) {