No known key found for this signature in database
GPG Key ID: 1D7529BE14E2BBA9
3 changed files with
8 additions and
8 deletions
-
RSwitch/Swift/AppDelegate.swift
-
RSwitch/Swift/Menu.swift
-
RSwitch/Swift/Utils/Running.swift
|
|
@ -11,6 +11,11 @@ import Cocoa |
|
|
|
@NSApplicationMain |
|
|
|
class AppDelegate: NSObject, NSApplicationDelegate { |
|
|
|
|
|
|
|
@objc func showAabout(_ sender: NSMenuItem?) { abtController.showWindow(self) } |
|
|
|
|
|
|
|
@objc func performTimer(_ sender: Timer) { print("timer fired") } |
|
|
|
|
|
|
|
|
|
|
|
var mainStoryboard: NSStoryboard! |
|
|
|
var abtController: NSWindowController! |
|
|
|
|
|
|
@ -57,7 +62,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { |
|
|
|
timer = Timer.scheduledTimer( |
|
|
|
timeInterval: 3600, |
|
|
|
target: self, |
|
|
|
selector: #selector(updateTimer), |
|
|
|
selector: #selector(performTimer), |
|
|
|
userInfo: nil, |
|
|
|
repeats: true |
|
|
|
) |
|
|
|
|
|
@ -75,7 +75,7 @@ extension AppDelegate: NSMenuDelegate { |
|
|
|
|
|
|
|
// Add an About item |
|
|
|
menu.addItem(NSMenuItem.separator()) |
|
|
|
menu.addItem(NSMenuItem(title: "About RSwitch…", action: #selector(about), keyEquivalent: "")) |
|
|
|
menu.addItem(NSMenuItem(title: "About RSwitch…", action: #selector(showAabout), keyEquivalent: "")) |
|
|
|
menu.addItem(NSMenuItem(title: "RSwitch Help…", action: #selector(rswitch_help), keyEquivalent: "")) |
|
|
|
|
|
|
|
// Toggle Dock Icon |
|
|
|
|
|
@ -11,11 +11,6 @@ import Cocoa |
|
|
|
|
|
|
|
extension AppDelegate { |
|
|
|
|
|
|
|
// Show about dialog |
|
|
|
@objc func about(_ sender: NSMenuItem?) { abtController.showWindow(self) } |
|
|
|
|
|
|
|
@objc func updateTimer(_ sender: Timer) { print("timer fired") } |
|
|
|
|
|
|
|
// Show the framework dir in a new Finder window |
|
|
|
@objc func openFrameworksDir(_ sender: NSMenuItem?) { |
|
|
|
NSWorkspace.shared.openFile(RVersions.macos_r_framework, withApplication: "Finder") |
|
|
|