PhraseEditor // Allow calling TextEdit if the option key is pressed.
This commit is contained in:
parent
2c684a925c
commit
34e9ca9493
|
@ -187,7 +187,8 @@ public struct VwrPhraseEditorUI: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func callExternalAppToOpenPhraseFile() {
|
private func callExternalAppToOpenPhraseFile() {
|
||||||
delegate?.openPhraseFile(mode: selInputMode, type: selUserDataType, app: "Finder")
|
let app: String = NSEvent.modifierFlags.contains(.option) ? "TextEdit" : "Finder"
|
||||||
|
delegate?.openPhraseFile(mode: selInputMode, type: selUserDataType, app: app)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Main View.
|
// MARK: - Main View.
|
||||||
|
|
|
@ -190,7 +190,8 @@ extension CtlPrefWindow: NSTextViewDelegate, NSTextFieldDelegate {
|
||||||
|
|
||||||
@IBAction func openExternallyPEButtonClicked(_: NSButton) {
|
@IBAction func openExternallyPEButtonClicked(_: NSButton) {
|
||||||
DispatchQueue.main.async { [self] in
|
DispatchQueue.main.async { [self] in
|
||||||
LMMgr.shared.openPhraseFile(mode: selInputMode, type: selUserDataType, app: "Finder")
|
let app: String = NSEvent.modifierFlags.contains(.option) ? "TextEdit" : "Finder"
|
||||||
|
LMMgr.shared.openPhraseFile(mode: selInputMode, type: selUserDataType, app: app)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue