Browse Source

xcode 11

tags/v1.5.0
boB Rudis 3 years ago
parent
commit
305525e064
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 9
      RSwitch/Swift/AppDelegate.swift
  2. 2
      RSwitch/Swift/Menu.swift
  3. 5
      RSwitch/Swift/Utils/Running.swift

9
RSwitch/Swift/AppDelegate.swift

@ -10,7 +10,12 @@ 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
)

2
RSwitch/Swift/Menu.swift

@ -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

5
RSwitch/Swift/Utils/Running.swift

@ -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")

Loading…
Cancel
Save