PrefUI // Alt+Ellipsis button to use Finder to open paths.
This commit is contained in:
parent
fd4bc39032
commit
100a16a9e6
|
@ -49,6 +49,12 @@ struct VwrPrefPaneCassette: View {
|
|||
TextField(fdrCassetteDataDefault, text: $cassettePath).disabled(true)
|
||||
.help(cassettePath)
|
||||
Button {
|
||||
if NSEvent.modifierFlags == .option, !cassettePath.isEmpty {
|
||||
NSWorkspace.shared.activateFileViewerSelecting(
|
||||
[URL(fileURLWithPath: cassettePath)]
|
||||
)
|
||||
return
|
||||
}
|
||||
Self.dlgOpenFile.title = NSLocalizedString(
|
||||
"Choose your desired cassette file path.", comment: ""
|
||||
)
|
||||
|
|
|
@ -63,6 +63,12 @@ struct VwrPrefPaneDictionary: View {
|
|||
TextField(fdrUserDataDefault, text: $userDataFolderSpecified).disabled(true)
|
||||
.help(userDataFolderSpecified)
|
||||
Button {
|
||||
if NSEvent.modifierFlags == .option, !userDataFolderSpecified.isEmpty {
|
||||
NSWorkspace.shared.activateFileViewerSelecting(
|
||||
[URL(fileURLWithPath: userDataFolderSpecified)]
|
||||
)
|
||||
return
|
||||
}
|
||||
Self.dlgOpenPath.title = NSLocalizedString(
|
||||
"Choose your desired user data folder.", comment: ""
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue