Skip to content

Commit

Permalink
Fix "Open Settings" URL scheme
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Mazanov <alexandr.mazanov@gmail.com>
  • Loading branch information
melonamin committed Jan 30, 2024
1 parent 4c38b7a commit e52e3d8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions TRex/App/UI/MenuBarItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,6 @@ class MenubarItem: NSObject {
@objc func showPreferences() {
NSApp.openSettings()
return
// if #available(macOS 14.0, *) {
// NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil)
// return
// }
// if #available(macOS 13.0, *) {
// NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil)
// return
// }
// NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil)
}
}

Expand Down
2 changes: 1 addition & 1 deletion TRex/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
case "captureclipboardautomation":
trex.capture(.captureClipboardAndTriggerAutomation)
case "showpreferences":
NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil)
NSApp.openSettings()
case "shortcut":
if let name = url.queryParameters?["name"] {
preferences.autoRunShortcut = name
Expand Down

0 comments on commit e52e3d8

Please sign in to comment.