diff --git a/Source/Modules/WindowControllers/CtlClientListMgr.swift b/Source/Modules/WindowControllers/CtlClientListMgr.swift index 6bac8eda..7d0a7a15 100644 --- a/Source/Modules/WindowControllers/CtlClientListMgr.swift +++ b/Source/Modules/WindowControllers/CtlClientListMgr.swift @@ -97,12 +97,20 @@ extension CtlClientListMgr { theTextView.textContainer?.containerSize = NSSize(width: maxFloat, height: maxFloat) theTextView.textContainer?.widthTracksTextView = false + // 預先填寫近期用過威注音輸入法的客體軟體,最多二十筆。 + theTextView.textContainer?.textView?.string = { + let recentClients = SessionCtl.recentClientBundleIdentifiers.keys.compactMap { + PrefMgr.shared.clientsIMKTextInputIncapable.keys.contains($0) ? nil : $0 + } + return recentClients.sorted().joined(separator: "\n") + }() + alert.accessoryView = scrollview alert.beginSheetModal(for: window) { result in switch result { case .alertFirstButtonReturn, .alertSecondButtonReturn: theTextView.textContainer?.textView?.string.components(separatedBy: "\n").filter { !$0.isEmpty }.forEach { - self.applyNewValue($0) + self.applyNewValue($0, highMitigation: result == .alertFirstButtonReturn) } if result == .alertFirstButtonReturn { break } let dlgOpenPath = NSOpenPanel()