diff --git a/Packages/vChewing_MainAssembly/Sources/MainAssembly/LMMgr_Utilities.swift b/Packages/vChewing_MainAssembly/Sources/MainAssembly/LMMgr_Utilities.swift index 3aa936e9..0575b8b9 100644 --- a/Packages/vChewing_MainAssembly/Sources/MainAssembly/LMMgr_Utilities.swift +++ b/Packages/vChewing_MainAssembly/Sources/MainAssembly/LMMgr_Utilities.swift @@ -311,7 +311,7 @@ public extension LMMgr { } static func openUserDictFile(type: vChewingLM.ReplacableUserDataType, dual: Bool = false, alt: Bool) { - let appIdentifier: String = alt ? "" : "Finder" + let appIdentifier: String = alt ? "com.apple.TextEdit" : "com.apple.finder" openPhraseFile(fromURL: userDictDataURL(mode: IMEApp.currentInputMode, type: type), appIdentifier: appIdentifier) guard dual else { return } openPhraseFile(fromURL: userDictDataURL(mode: IMEApp.currentInputMode.reversed, type: type), appIdentifier: appIdentifier) @@ -326,7 +326,7 @@ public extension LMMgr { if !Self.checkIfUserFilesExistBeforeOpening() { return } DispatchQueue.main.async { switch appIdentifier { - case "Finder": + case "Finder", "com.apple.finder": NSWorkspace.shared.activateFileViewerSelecting([url]) default: guard let textEditURL = NSWorkspace.shared.urlForApplication(withBundleIdentifier: "com.apple.TextEdit") else { return } diff --git a/Source/Modules/WindowControllers/CtlPrefWindow_PhraseEditor.swift b/Source/Modules/WindowControllers/CtlPrefWindow_PhraseEditor.swift index 936e3fc5..54e08798 100644 --- a/Source/Modules/WindowControllers/CtlPrefWindow_PhraseEditor.swift +++ b/Source/Modules/WindowControllers/CtlPrefWindow_PhraseEditor.swift @@ -197,7 +197,7 @@ extension CtlPrefWindow: NSTextViewDelegate, NSTextFieldDelegate { @IBAction func openExternallyPEButtonClicked(_: NSButton) { DispatchQueue.main.async { [weak self] in guard let self = self else { return } - let app: String = NSEvent.keyModifierFlags.contains(.option) ? "TextEdit" : "Finder" + let app: String = NSEvent.keyModifierFlags.contains(.option) ? "com.apple.TextEdit" : "com.apple.finder" LMMgr.shared.openPhraseFile(mode: self.selInputMode, type: self.selUserDataType, appIdentifier: app) } }