Browse Source

xcode 11

tags/v1.5.0
boB Rudis 1 year ago
parent
commit
305525e064
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
3 changed files with 8 additions and 8 deletions
  1. +7
    -2
      RSwitch/Swift/AppDelegate.swift
  2. +1
    -1
      RSwitch/Swift/Menu.swift
  3. +0
    -5
      RSwitch/Swift/Utils/Running.swift

+ 7
- 2
RSwitch/Swift/AppDelegate.swift View File

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


+ 1
- 1
RSwitch/Swift/Menu.swift View File

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


+ 0
- 5
RSwitch/Swift/Utils/Running.swift View File

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