Repo // Use new tags for pinyin parsers.
This commit is contained in:
parent
f3280ebf44
commit
a1fd56b872
|
@ -178,12 +178,12 @@ public enum KeyboardParser: Int, CaseIterable {
|
|||
case ofETen26 = 3
|
||||
case ofHsu = 2
|
||||
case ofStarlight = 9
|
||||
case ofHanyuPinyin = 10
|
||||
case ofSecondaryPinyin = 11
|
||||
case ofYalePinyin = 12
|
||||
case ofHualuoPinyin = 13
|
||||
case ofUniversalPinyin = 14
|
||||
case ofWadeGilesPinyin = 15
|
||||
case ofHanyuPinyin = 100
|
||||
case ofSecondaryPinyin = 101
|
||||
case ofYalePinyin = 102
|
||||
case ofHualuoPinyin = 103
|
||||
case ofUniversalPinyin = 104
|
||||
case ofWadeGilesPinyin = 105
|
||||
|
||||
public var localizedMenuName: String {
|
||||
let rawString: String = {
|
||||
|
|
|
@ -39,11 +39,7 @@ public extension PrefMgr {
|
|||
}
|
||||
}
|
||||
// 注拼槽注音排列選項糾錯。
|
||||
var isKeyboardParserOptionValid = false
|
||||
KeyboardParser.allCases.forEach {
|
||||
if $0.rawValue == keyboardParser { isKeyboardParserOptionValid = true }
|
||||
}
|
||||
if !isKeyboardParserOptionValid {
|
||||
if KeyboardParser(rawValue: keyboardParser) == nil {
|
||||
keyboardParser = 0
|
||||
}
|
||||
// 基礎鍵盤排列選項糾錯。
|
||||
|
|
|
@ -52,7 +52,7 @@ struct VwrPrefPaneKeyboard: View {
|
|||
Text("↻ㄅ" + " " + NSLocalizedString("Eten Trad.", comment: ""))
|
||||
}
|
||||
Button {
|
||||
keyboardParser = 10
|
||||
keyboardParser = 100
|
||||
basicKeyboardLayout = "com.apple.keylayout.ABC"
|
||||
} label: {
|
||||
Text("↻A")
|
||||
|
@ -66,7 +66,7 @@ struct VwrPrefPaneKeyboard: View {
|
|||
selection: $keyboardParser
|
||||
) {
|
||||
ForEach(KeyboardParser.allCases, id: \.self) { item in
|
||||
if [7, 10].contains(item.rawValue) { Divider() }
|
||||
if [7, 100].contains(item.rawValue) { Divider() }
|
||||
Text(item.localizedMenuName).tag(item.rawValue)
|
||||
}.id(UUID())
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ class CtlPrefWindow: NSWindowController, NSWindowDelegate {
|
|||
parserButton.menu?.removeAllItems()
|
||||
let basicParserID = PrefMgr.shared.keyboardParser
|
||||
KeyboardParser.allCases.forEach { item in
|
||||
if [7, 10].contains(item.rawValue) {
|
||||
if [7, 100].contains(item.rawValue) {
|
||||
parserButton.menu?.addItem(NSMenuItem.separator())
|
||||
}
|
||||
let menuItem = NSMenuItem()
|
||||
|
|
Loading…
Reference in New Issue