From 980b97a1a0417621f73b440eb59e791fbd4e7f99 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Wed, 3 Aug 2022 21:10:38 +0800 Subject: [PATCH] Repo // Lock the maximum compositor size to 30. --- Source/Modules/IMEModules/mgrPrefs.swift | 4 +- .../Resources/Base.lproj/Localizable.strings | 2 - Source/Resources/en.lproj/Localizable.strings | 2 - Source/Resources/ja.lproj/Localizable.strings | 2 - .../zh-Hans.lproj/Localizable.strings | 2 - .../zh-Hant.lproj/Localizable.strings | 2 - Source/UI/PrefUI/suiPrefPaneExperience.swift | 20 ---- .../WindowNIBs/Base.lproj/frmPrefWindow.xib | 103 +++--------------- .../WindowNIBs/en.lproj/frmPrefWindow.strings | 1 - .../WindowNIBs/ja.lproj/frmPrefWindow.strings | 1 - .../zh-Hans.lproj/frmPrefWindow.strings | 1 - .../zh-Hant.lproj/frmPrefWindow.strings | 1 - 12 files changed, 18 insertions(+), 123 deletions(-) diff --git a/Source/Modules/IMEModules/mgrPrefs.swift b/Source/Modules/IMEModules/mgrPrefs.swift index 15a18334..8d786fe8 100644 --- a/Source/Modules/IMEModules/mgrPrefs.swift +++ b/Source/Modules/IMEModules/mgrPrefs.swift @@ -24,7 +24,6 @@ public enum UserDef: String, CaseIterable { case kShouldAutoReloadUserDataFiles = "ShouldAutoReloadUserDataFiles" case kUseRearCursorMode = "useRearCursorMode" case kUseHorizontalCandidateList = "UseHorizontalCandidateList" - case kComposingBufferSize = "ComposingBufferSize" case kChooseCandidateUsingSpace = "ChooseCandidateUsingSpace" case kCNS11643Enabled = "CNS11643Enabled" case kSymbolInputEnabled = "SymbolInputEnabled" @@ -376,8 +375,7 @@ public enum mgrPrefs { @UserDefault(key: UserDef.kUseHorizontalCandidateList.rawValue, defaultValue: true) static var useHorizontalCandidateList: Bool - @ComposingBufferSize(key: UserDef.kComposingBufferSize.rawValue) - static var composingBufferSize: Int + static var composingBufferSize: Int { 30 } @UserDefault(key: UserDef.kChooseCandidateUsingSpace.rawValue, defaultValue: true) static var chooseCandidateUsingSpace: Bool diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 7fdaca04..cee51779 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -103,7 +103,6 @@ "Automatically correct reading combinations when typing" = "Automatically correct reading combinations when typing"; "Automatically reload user data files if changes detected" = "Automatically reload user data files if changes detected"; "Basic Keyboard Layout:" = "Basic Keyboard Layout:"; -"Buffer Limit:" = "Buffer Limit:"; "Candidate Layout:" = "Candidate Layout:"; "Candidate Size:" = "Candidate Size:"; "Change user interface language (will reboot the IME)." = "Change user interface language (will reboot the IME)."; @@ -160,7 +159,6 @@ "Space & ESC Key:" = "Space & ESC Key:"; "Space to +cycle candidates, Shift+Space to +cycle pages" = "Space to +cycle candidates, Shift+Space to +cycle pages"; "Space to +cycle pages, Shift+Space to +cycle candidates" = "Space to +cycle pages, Shift+Space to +cycle candidates"; -"Specify the maximum characters allowed in the composition buffer." = "Specify the maximum characters allowed in the composition buffer."; "Starlight" = "Starlight"; "Stop farting (when typed phonetic combination is invalid, etc.)" = "Stop farting (when typed phonetic combination is invalid, etc.)"; "Traditional Chinese" = "Traditional Chinese"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 7fdaca04..cee51779 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -103,7 +103,6 @@ "Automatically correct reading combinations when typing" = "Automatically correct reading combinations when typing"; "Automatically reload user data files if changes detected" = "Automatically reload user data files if changes detected"; "Basic Keyboard Layout:" = "Basic Keyboard Layout:"; -"Buffer Limit:" = "Buffer Limit:"; "Candidate Layout:" = "Candidate Layout:"; "Candidate Size:" = "Candidate Size:"; "Change user interface language (will reboot the IME)." = "Change user interface language (will reboot the IME)."; @@ -160,7 +159,6 @@ "Space & ESC Key:" = "Space & ESC Key:"; "Space to +cycle candidates, Shift+Space to +cycle pages" = "Space to +cycle candidates, Shift+Space to +cycle pages"; "Space to +cycle pages, Shift+Space to +cycle candidates" = "Space to +cycle pages, Shift+Space to +cycle candidates"; -"Specify the maximum characters allowed in the composition buffer." = "Specify the maximum characters allowed in the composition buffer."; "Starlight" = "Starlight"; "Stop farting (when typed phonetic combination is invalid, etc.)" = "Stop farting (when typed phonetic combination is invalid, etc.)"; "Traditional Chinese" = "Traditional Chinese"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 148db8cb..7aa9df53 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -103,7 +103,6 @@ "Automatically correct reading combinations when typing" = "入力中で打ち間違った発音組み合わせを自動的に訂正する"; "Automatically reload user data files if changes detected" = "ユーザー辞書データの変更を自動検出し、自動的に再読込"; "Basic Keyboard Layout:" = "基礎キーボード:"; -"Buffer Limit:" = "緩衝列の容量:"; "Candidate Layout:" = "入力候補陳列の仕様"; "Candidate Size:" = "候補文字の字号:"; "Change user interface language (will reboot the IME)." = "アプリ表示用言語をご指定下さい、そして入力アプリは自動的に再起動。"; @@ -160,7 +159,6 @@ "Space & ESC Key:" = "ESC と Space:"; "Space to +cycle candidates, Shift+Space to +cycle pages" = "Shift+Space で次のページ、Space で次の候補文字を"; "Space to +cycle pages, Shift+Space to +cycle candidates" = "Space で次のページ、Shift+Space で次の候補文字を"; -"Specify the maximum characters allowed in the composition buffer." = "緩衝列に入れる文字の数の上限をご指定ください。"; "Starlight" = "星光配列"; "Stop farting (when typed phonetic combination is invalid, etc.)" = "マナーモード // 外すと入力間違った時に変な声が出る"; "Traditional Chinese" = "繁体中国語"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 2dc53355..cc601500 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -103,7 +103,6 @@ "Automatically correct reading combinations when typing" = "敲字时自动纠正读音组合"; "Automatically reload user data files if changes detected" = "自动检测并载入使用者语汇档案变更"; "Basic Keyboard Layout:" = "基础键盘布局:"; -"Buffer Limit:" = "组字区容量:"; "Candidate Layout:" = "候选字窗布局:"; "Candidate Size:" = "候选字窗字号:"; "Change user interface language (will reboot the IME)." = "变更输入法介面语言,会自动重启输入法。"; @@ -161,7 +160,6 @@ "Space & ESC Key:" = "ESC 与空格键:"; "Space to +cycle candidates, Shift+Space to +cycle pages" = "Shift+空格键 换下一页,空格键 换选下一个后选字"; "Space to +cycle pages, Shift+Space to +cycle candidates" = "空格键 换下一页,Shift+空格键 换选下一个后选字"; -"Specify the maximum characters allowed in the composition buffer." = "请指定组字缓冲区内的文字数的上限。"; "Starlight" = "星光排列"; "Stop farting (when typed phonetic combination is invalid, etc.)" = "廉耻模式 // 取消勾选的话,敲错字时会有异音"; "Traditional Chinese" = "繁体中文"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 09f9c864..e3fdce9b 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -103,7 +103,6 @@ "Automatically correct reading combinations when typing" = "敲字時自動糾正讀音組合"; "Automatically reload user data files if changes detected" = "自動檢測並載入使用者語彙檔案變更"; "Basic Keyboard Layout:" = "基礎鍵盤佈局:"; -"Buffer Limit:" = "組字區容量:"; "Candidate Layout:" = "候選字窗佈局:"; "Candidate Size:" = "候選字窗字號:"; "Change user interface language (will reboot the IME)." = "變更輸入法介面語言,會自動重啟輸入法。"; @@ -160,7 +159,6 @@ "Space & ESC Key:" = "ESC 與空格鍵:"; "Space to +cycle candidates, Shift+Space to +cycle pages" = "Shift+空格鍵 換下一頁,空格鍵 換選下一個後選字"; "Space to +cycle pages, Shift+Space to +cycle candidates" = "空格鍵 換下一頁,Shift+空格鍵 換選下一個後選字"; -"Specify the maximum characters allowed in the composition buffer." = "請指定組字緩衝區內的文字數的上限。"; "Starlight" = "星光排列"; "Stop farting (when typed phonetic combination is invalid, etc.)" = "廉恥模式 // 取消勾選的話,敲錯字時會有異音"; "Traditional Chinese" = "繁體中文"; diff --git a/Source/UI/PrefUI/suiPrefPaneExperience.swift b/Source/UI/PrefUI/suiPrefPaneExperience.swift index 187f5844..8c8e721a 100644 --- a/Source/UI/PrefUI/suiPrefPaneExperience.swift +++ b/Source/UI/PrefUI/suiPrefPaneExperience.swift @@ -29,8 +29,6 @@ struct suiPrefPaneExperience: View { @State private var selKeyBehaviorESCForClearingTheBuffer = UserDefaults.standard.bool( forKey: UserDef.kEscToCleanInputBuffer.rawValue) @State private var selEnableSCPCTypingMode = UserDefaults.standard.bool(forKey: UserDef.kUseSCPCTypingMode.rawValue) - @State private var selComposingBufferSize = UserDefaults.standard.integer( - forKey: UserDef.kComposingBufferSize.rawValue) @State private var selAutoCorrectReadingCombination = UserDefaults.standard.bool( forKey: UserDef.kAutoCorrectReadingCombination.rawValue) @State private var selAlsoConfirmAssociatedCandidatesByEnter = UserDefaults.standard.bool( @@ -80,24 +78,6 @@ struct suiPrefPaneExperience: View { ) .preferenceDescription() } - Preferences.Section(bottomDivider: true, label: { Text(LocalizedStringKey("Buffer Limit:")) }) { - Picker("", selection: $selComposingBufferSize) { - Text("10").tag(10) - Text("15").tag(15) - Text("20").tag(20) - Text("25").tag(25) - Text("30").tag(30) - Text("35").tag(35) - Text("40").tag(40) - }.onChange(of: selComposingBufferSize) { value in - mgrPrefs.composingBufferSize = value - } - .labelsHidden() - .horizontalRadioGroupLayout() - .pickerStyle(RadioGroupPickerStyle()) - Text(LocalizedStringKey("Specify the maximum characters allowed in the composition buffer.")) - .preferenceDescription() - } Preferences.Section(bottomDivider: true, label: { Text(LocalizedStringKey("Cursor Selection:")) }) { Picker("", selection: $selCursorPosition) { Text(LocalizedStringKey("in front of the phrase (like macOS built-in Zhuyin IME)")).tag(0) diff --git a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index f59676f7..bfc22739 100644 --- a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -1,8 +1,8 @@ - + - + @@ -28,7 +28,7 @@ - + @@ -366,7 +366,7 @@ - + @@ -374,7 +374,7 @@ - + @@ -399,7 +399,7 @@ - + @@ -436,7 +436,7 @@ - + @@ -444,7 +444,7 @@ - + @@ -469,7 +469,7 @@ - + @@ -477,7 +477,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -