From f9ed6b9e8e6de742fd28d36ab76ee7677209d19a Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 7 Mar 2022 21:59:20 +0800 Subject: [PATCH] (ctl)PrefWindow // Enforcing Sent Action to CNSLM. --- Source/WindowControllers/ctlPrefWindow.swift | 6 ++++++ .../Source/WindowNIBs/Base.lproj/frmPrefWindow.xib | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/WindowControllers/ctlPrefWindow.swift b/Source/WindowControllers/ctlPrefWindow.swift index 521b5c1d..705a9c9a 100644 --- a/Source/WindowControllers/ctlPrefWindow.swift +++ b/Source/WindowControllers/ctlPrefWindow.swift @@ -168,6 +168,12 @@ extension RangeReplaceableCollection where Element: Hashable { } + // 這裡有必要加上這段處理,用來確保藉由偏好設定介面動過的 CNS 開關能夠立刻生效。 + // 所有涉及到語言模型開關的內容均需要這樣處理。 + @IBAction func toggleCNSSupport(_ sender: Any) { + mgrLangModel.setCNSEnabled(Preferences.cns11643Enabled) + } + @IBAction func toggleTrad2KangXiAction(_ sender: Any) { if chkTrad2KangXi.state == .on && chkTrad2JISShinjitai.state == .on { Preferences.toggleShiftJISShinjitaiOutputEnabled() diff --git a/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index 5c1c8960..62a39d34 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -232,7 +232,7 @@ -