diff --git a/RSwitch.xcodeproj/project.pbxproj b/RSwitch.xcodeproj/project.pbxproj index 93c378e..296d8bb 100644 --- a/RSwitch.xcodeproj/project.pbxproj +++ b/RSwitch.xcodeproj/project.pbxproj @@ -558,7 +558,7 @@ "$(PROJECT_DIR)/RSwitch/ObjC/ProcInfo", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 1.5.0; + MARKETING_VERSION = 1.5.1; PRODUCT_BUNDLE_IDENTIFIER = is.rud.bob.RSwitch; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "rswitch-1+"; @@ -591,7 +591,7 @@ "$(PROJECT_DIR)/RSwitch/ObjC/ProcInfo", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 1.5.0; + MARKETING_VERSION = 1.5.1; PRODUCT_BUNDLE_IDENTIFIER = is.rud.bob.RSwitch; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "rswitch-1+"; diff --git a/RSwitch/Base.lproj/Main.storyboard b/RSwitch/Base.lproj/Main.storyboard index 0f06429..9895f64 100644 --- a/RSwitch/Base.lproj/Main.storyboard +++ b/RSwitch/Base.lproj/Main.storyboard @@ -846,7 +846,7 @@ DQ -RSwitch v1.5.0 +RSwitch v1.5.1 Copyright © 2019 Bob Rudis diff --git a/RSwitch/Swift/HandleRSwitch.swift b/RSwitch/Swift/HandleRSwitch.swift index 851100a..5ebc450 100644 --- a/RSwitch/Swift/HandleRSwitch.swift +++ b/RSwitch/Swift/HandleRSwitch.swift @@ -15,10 +15,11 @@ extension AppDelegate { // then removes the current alias and creates the new one. @objc func handleRSwitch(_ sender: NSMenuItem?) { - let fm = FileManager.default; + let item = sender?.representedObject as! String + let fm = FileManager.default let title = sender?.title let rm_link = (RVersions.macos_r_framework as NSString).appendingPathComponent("Current") - let title_link = (RVersions.macos_r_framework as NSString).appendingPathComponent(title!) + let title_link = (RVersions.macos_r_framework as NSString).appendingPathComponent(item) do { try fm.removeItem(atPath: rm_link) diff --git a/RSwitch/Swift/Menu.swift b/RSwitch/Swift/Menu.swift index 98b34bd..69949a3 100644 --- a/RSwitch/Swift/Menu.swift +++ b/RSwitch/Swift/Menu.swift @@ -35,6 +35,10 @@ extension AppDelegate: NSMenuDelegate { } + @objc func subscribeToMailingList(_ sender: NSMenuItem) { + NSWorkspace.shared.open(URL(string: "https://lists.sr.ht/~hrbrmstr/rswitch")!) + } + func menuWillOpen(_ menu: NSMenu) { if (menu != self.statusMenu) { return } @@ -112,6 +116,7 @@ extension AppDelegate: NSMenuDelegate { prefSub.addItem(rstudioCheckItem) menu.addItem(NSMenuItem(title: "Check for update…", action: #selector(checkForUpdate), keyEquivalent: "")) + menu.addItem(NSMenuItem(title: "Subscribe to mailing list…", action: #selector(subscribeToMailingList), keyEquivalent: "")) menu.addItem(NSMenuItem(title: "About RSwitch…", action: #selector(showAbout), keyEquivalent: "")) menu.addItem(NSMenuItem(title: "RSwitch Help…", action: #selector(rswitch_help), keyEquivalent: "")) diff --git a/RSwitch/Swift/MenuActions/BrowseMenuAction.swift b/RSwitch/Swift/MenuActions/BrowseMenuAction.swift index 9f880dc..30f3568 100644 --- a/RSwitch/Swift/MenuActions/BrowseMenuAction.swift +++ b/RSwitch/Swift/MenuActions/BrowseMenuAction.swift @@ -41,6 +41,7 @@ class BrowseMenuAction { private static let webItemsExt = [ BrowseMenuAction(title: "R Package Documentation (rdrr.io)…", url: "https://rdrr.io/"), + BrowseMenuAction(title: "R Compiler Tools for RCpp on macOS…", url: "https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/"), BrowseMenuAction(title: "Rseek…", url: "https://rseek.org"), BrowseMenuAction(title: "R StackOverflow…", url: "https://stackoverflow.com/questions/tagged/r"), BrowseMenuAction(title: "ROpenSci Discuss…", url: "https://discuss.ropensci.org/"), diff --git a/releases/RSwitch-1.5.1.app.zip b/releases/RSwitch-1.5.1.app.zip new file mode 100644 index 0000000..f6280dd Binary files /dev/null and b/releases/RSwitch-1.5.1.app.zip differ