From 07ac60cec35b1f0da71f4ef23aa5a80778bad64a Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sun, 19 May 2019 15:27:58 -0500 Subject: [PATCH] Remove showAddFolderWindow and showAddFeedWindow functions from MainWindowController so that validations will run on AppDelegate. --- Mac/MainWindow/MainWindowController.swift | 8 -------- .../Sidebar/SidebarViewController+ContextualMenus.swift | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Mac/MainWindow/MainWindowController.swift b/Mac/MainWindow/MainWindowController.swift index be1bc61dd..de5bdfa30 100644 --- a/Mac/MainWindow/MainWindowController.swift +++ b/Mac/MainWindow/MainWindowController.swift @@ -243,14 +243,6 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations { } } - @IBAction func showAddFolderWindow(_ sender: Any?) { - appDelegate.showAddFolderSheetOnWindow(window!) - } - - @IBAction func showAddFeedWindow(_ sender: Any?) { - appDelegate.showAddFeedSheetOnWindow(window!, urlString: nil, name: nil, account: nil, folder: nil) - } - @IBAction func openArticleInBrowser(_ sender: Any?) { if let link = currentLink { Browser.open(link) diff --git a/Mac/MainWindow/Sidebar/SidebarViewController+ContextualMenus.swift b/Mac/MainWindow/Sidebar/SidebarViewController+ContextualMenus.swift index c010df427..49674cb19 100644 --- a/Mac/MainWindow/Sidebar/SidebarViewController+ContextualMenus.swift +++ b/Mac/MainWindow/Sidebar/SidebarViewController+ContextualMenus.swift @@ -129,8 +129,8 @@ private extension SidebarViewController { let menu = NSMenu(title: "") - menu.addItem(withTitle: NSLocalizedString("New Feed", comment: "Command"), action: #selector(MainWindowController.showAddFeedWindow(_:)), keyEquivalent: "") - menu.addItem(withTitle: NSLocalizedString("New Folder", comment: "Command"), action: #selector(MainWindowController.showAddFolderWindow(_:)), keyEquivalent: "") + menu.addItem(withTitle: NSLocalizedString("New Feed", comment: "Command"), action: #selector(AppDelegate.showAddFeedWindow(_:)), keyEquivalent: "") + menu.addItem(withTitle: NSLocalizedString("New Folder", comment: "Command"), action: #selector(AppDelegate.showAddFolderWindow(_:)), keyEquivalent: "") return menu }