     }
 
     @IBAction func magicURLRedirectPress(_ sender: NSMenuItem) {
-        let keyPath = UserSettings.disabledMagicURLs.keyPath
         UserSettings.disabledMagicURLs.value = (sender.state == NSOnState)
-        NotificationCenter.default.post(name: Notification.Name(rawValue: keyPath), object: nil)
     }
     
     @IBAction func openFilePress(_ sender: AnyObject) {

class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate {

    @IBOutlet weak var magicURLMenu: NSMenuItem!
    @IBOutlet weak var percentageMenu: NSMenuItem!
    @IBOutlet weak var fullScreenFloatMenu: NSMenuItem!
    @IBOutlet weak var autoHideTitleMenu: NSMenuItem!

    fileprivate var alpha: CGFloat = 60 {
        didSet {
            NotificationCenter.default.post(name: Notification.Name(rawValue: UserSettings.opacityPercentage.keyPath), object: nil)
        }
    }
    
    fileprivate func didUpdateAlpha(_ newAlpha: CGFloat) {
        alpha = newAlpha / 100
    }
    
    @IBOutlet weak var translucencyMenu: NSMenuItem!
    fileprivate var translucencyPreference: TranslucencyPreference = .never {
        didSet {
            NotificationCenter.default.post(name: Notification.Name(rawValue: UserSettings.translucencyPreference.keyPath), object: nil)
        }
    }
    
    enum TranslucencyPreference: Int {
        case never = 0
        case always = 1
        case mouseOver = 2
        case mouseOutside = 3
    }
    
    //  MARK:- Global IBAction, but ship to keyWindow when able
    @IBOutlet weak var appMenu: NSMenu!
    @IBOutlet weak var appItem: NSMenuItem!
	var appStatusItem:NSStatusItem = NSStatusBar.system().statusItem(withLength: NSVariableStatusItemLength)
    
    internal func menuClicked(_ sender: AnyObject) {
        if let menuItem = sender as? NSMenuItem {
            Swift.print("Menu '\(menuItem.title)' clicked")
        }
    }
    @IBAction func autoHideTitlePress(_ sender: NSMenuItem) {
        let keyPath = UserSettings.autoHideTitle.keyPath
        UserSettings.autoHideTitle.value = (sender.state == NSOffState)
        NotificationCenter.default.post(name: Notification.Name(rawValue: keyPath), object: nil)
    }
    @IBAction func floatOverFullScreenAppsPress(_ sender: NSMenuItem) {
        let keyPath = UserSettings.disabledFullScreenFloat.keyPath
        UserSettings.disabledFullScreenFloat.value = (sender.state == NSOnState)
        NotificationCenter.default.post(name: Notification.Name(rawValue: keyPath), object: nil)
    }
	@IBAction func hideAppStatusItem(_ sender: NSMenuItem) {
		UserSettings.HideAppMenu.value = (sender.state == NSOffState)

        return resDict
    }

    @objc fileprivate func haveNewTitle(_ notification: Notification) {
        if let itemURL = notification.object as? URL {
            let item: PlayItem = PlayItem.init()
            var fileURL: URL? = nil
