1
0
mirror of https://github.com/Toxblh/MTMR.git synced 2026-01-11 09:28:38 +00:00

Merge pull request #9 from Toxblh/openPreferences

Open preset for editing then you click by Preferences in menu.
This commit is contained in:
Anton Palgunov 2018-04-12 20:07:38 +01:00 committed by GitHub
commit 9393a4e484
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,8 +27,12 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}
@objc func testFn(_ sender: Any?) {
let quoteText = "You click on menu"
print(quoteText)
let task = Process()
let appSupportDirectory = NSSearchPathForDirectoriesInDomains(.applicationSupportDirectory, .userDomainMask, true).first!.appending("/MTMR")
let presetPath = appSupportDirectory.appending("/items.json")
task.launchPath = "/usr/bin/open"
task.arguments = [presetPath]
task.launch()
}
func createMenu() {