From 7fb48357c4db5d7db7e9b10f8aefbdee982d1827 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 5 May 2023 13:29:21 +0800 Subject: [PATCH] Prefs // Add acceptLeadingIntonations(). --- .../Sources/Shared/Protocols/PrefMgrProtocol.swift | 1 + Packages/vChewing_Shared/Sources/Shared/Shared.swift | 1 + Source/Modules/PrefMgr_Core.swift | 3 +++ 3 files changed, 5 insertions(+) diff --git a/Packages/vChewing_Shared/Sources/Shared/Protocols/PrefMgrProtocol.swift b/Packages/vChewing_Shared/Sources/Shared/Protocols/PrefMgrProtocol.swift index 50811888..4bb703a1 100644 --- a/Packages/vChewing_Shared/Sources/Shared/Protocols/PrefMgrProtocol.swift +++ b/Packages/vChewing_Shared/Sources/Shared/Protocols/PrefMgrProtocol.swift @@ -68,6 +68,7 @@ public protocol PrefMgrProtocol { var currencyNumeralsEnabled: Bool { get set } var halfWidthPunctuationEnabled: Bool { get set } var escToCleanInputBuffer: Bool { get set } + var acceptLeadingIntonations: Bool { get set } var specifyIntonationKeyBehavior: Int { get set } var specifyShiftBackSpaceKeyBehavior: Int { get set } var specifyShiftTabKeyBehavior: Bool { get set } diff --git a/Packages/vChewing_Shared/Sources/Shared/Shared.swift b/Packages/vChewing_Shared/Sources/Shared/Shared.swift index a67e098a..598aa040 100644 --- a/Packages/vChewing_Shared/Sources/Shared/Shared.swift +++ b/Packages/vChewing_Shared/Sources/Shared/Shared.swift @@ -41,6 +41,7 @@ public enum UserDef: String, CaseIterable { case kHalfWidthPunctuationEnabled = "HalfWidthPunctuationEnable" case kMoveCursorAfterSelectingCandidate = "MoveCursorAfterSelectingCandidate" case kEscToCleanInputBuffer = "EscToCleanInputBuffer" + case kAcceptLeadingIntonations = "AcceptLeadingIntonations" case kSpecifyIntonationKeyBehavior = "SpecifyIntonationKeyBehavior" case kSpecifyShiftBackSpaceKeyBehavior = "SpecifyShiftBackSpaceKeyBehavior" case kSpecifyShiftTabKeyBehavior = "SpecifyShiftTabKeyBehavior" diff --git a/Source/Modules/PrefMgr_Core.swift b/Source/Modules/PrefMgr_Core.swift index 4c516b1f..3b469af6 100644 --- a/Source/Modules/PrefMgr_Core.swift +++ b/Source/Modules/PrefMgr_Core.swift @@ -273,6 +273,9 @@ public class PrefMgr: PrefMgrProtocol { @AppProperty(key: UserDef.kEscToCleanInputBuffer.rawValue, defaultValue: true) public var escToCleanInputBuffer: Bool + @AppProperty(key: UserDef.kAcceptLeadingIntonations.rawValue, defaultValue: true) + public var acceptLeadingIntonations: Bool + @AppProperty(key: UserDef.kSpecifyIntonationKeyBehavior.rawValue, defaultValue: 0) public var specifyIntonationKeyBehavior: Int