From 14248e819ccc6b139f2698f7c4e981714dbe2af0 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 13 Feb 2022 14:16:17 +0800 Subject: [PATCH] Pref // Add Apple Zhuyin Eten base keyboard layout. --- Source/WindowControllers/ctlPrefWindow.swift | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Source/WindowControllers/ctlPrefWindow.swift b/Source/WindowControllers/ctlPrefWindow.swift index aa93d365..1ab3bcf5 100644 --- a/Source/WindowControllers/ctlPrefWindow.swift +++ b/Source/WindowControllers/ctlPrefWindow.swift @@ -132,10 +132,16 @@ extension RangeReplaceableCollection where Element: Hashable { basisKeyboardLayoutButton.menu?.addItem(menuItem) } - let menuItem = NSMenuItem() - menuItem.title = String(format: NSLocalizedString("Apple Zhuyin Bopomofo", comment: "")) - menuItem.representedObject = String("com.apple.keylayout.ZhuyinBopomofo") - basisKeyboardLayoutButton.menu?.addItem(menuItem) + let menuItem_AppleZhuyinBopomofo = NSMenuItem() + menuItem_AppleZhuyinBopomofo.title = String(format: NSLocalizedString("Apple Zhuyin Bopomofo", comment: "")) + menuItem_AppleZhuyinBopomofo.representedObject = String("com.apple.keylayout.ZhuyinBopomofo") + basisKeyboardLayoutButton.menu?.addItem(menuItem_AppleZhuyinBopomofo) + + let menuItem_AppleZhuyinEten = NSMenuItem() + menuItem_AppleZhuyinEten.title = String(format: NSLocalizedString("Apple Zhuyin Eten", comment: "")) + menuItem_AppleZhuyinEten.representedObject = String("com.apple.keylayout.ZhuyinEten") + basisKeyboardLayoutButton.menu?.addItem(menuItem_AppleZhuyinEten) + basisKeyboardLayoutButton.select(chosenBaseKeyboardLayoutItem ?? usKeyboardLayoutItem) selectionKeyComboBox.usesDataSource = false