         }
 
         if (keyPath == UserSetting.AutoHideTitle.userDefaultsKey) {
-            autoHideTitle = NSUserDefaults.standardUserDefaults().boolForKey(keyPath!)
-            if autoHideTitle {
+            appDelegate.autoHideTitle = NSUserDefaults.standardUserDefaults().boolForKey(keyPath!)
+            if appDelegate.autoHideTitle {
                 if lastStyle == 0 { lastStyle = (self.view.window?.styleMask)! }
                 self.view.window!.titleVisibility = NSWindowTitleVisibility.Hidden;
                 self.view.window?.styleMask = NSBorderlessWindowMask

import AVFoundation

class MyWebView : WKWebView {
	internal func menuClicked(sender: AnyObject) {
		if let menuItem = sender as? NSMenuItem {
			Swift.print("Menu \(menuItem.title) clicked")

		subOpen.addItem(item)

		item = NSMenuItem(title: "Location", action: #selector(HeliumPanelController.openLocationPress(_:)), keyEquivalent: "")
		item.target = wc
		subOpen.addItem(item)

		menu.addItem(NSMenuItem.separatorItem())

		item = NSMenuItem(title: "Playlists", action: #selector(WebViewController.presentPlaylistSheet(_:)), keyEquivalent: "")
		item.target = self.UIDelegate
		menu.addItem(item)

		menu.addItem(NSMenuItem.separatorItem())

		item = NSMenuItem(title: "Preferences", action: #selector(menuClicked(_:)), keyEquivalent: "")
		menu.addItem(item)
		let subPref = NSMenu()
		item.submenu = subPref

		item = NSMenuItem(title: "Auto-hide Title Bar", action: #selector(appDelegate.autoHideTitle(_:)), keyEquivalent: "")
		item.state = NSUserDefaults.standardUserDefaults().integerForKey(UserSetting.AutoHideTitle.userDefaultsKey)
		item.target = appDelegate
		subPref.addItem(item)

		item = NSMenuItem(title: "Float Above All Spaces", action: #selector(AppDelegate.floatOverFullScreenAppsPress(_:)), keyEquivalent: "")
		item.state = 1 - NSUserDefaults.standardUserDefaults().integerForKey(UserSetting.DisabledFullScreenFloat.userDefaultsKey)
		item.target = appDelegate
		subPref.addItem(item)
		
		item = NSMenuItem(title: "Home Page", action: #selector(AppDelegate.homePagePress(_:)), keyEquivalent: "")
		item.target = appDelegate
		subPref.addItem(item)

		item = NSMenuItem(title: "Magic URL Redirects", action: #selector(AppDelegate.magicURLRedirectToggled(_:)), keyEquivalent: "")
		item.state = 1 - NSUserDefaults.standardUserDefaults().integerForKey(UserSetting.DisabledMagicURLs.userDefaultsKey)
		item.target = NSApp.delegate
		subPref.addItem(item)

		item = NSMenuItem(title: "Translucency", action: #selector(menuClicked(_:)), keyEquivalent: "")
		subPref.addItem(item)
		let subTranslucency = NSMenu()
		item.submenu = subTranslucency

		item = NSMenuItem(title: "Enabled", action: #selector(HeliumPanelController.translucencyPress(_:)), keyEquivalent: "")
		item.state = wc.translucencyEnabled == true ? NSOnState : NSOffState
		item.target = wc
		subTranslucency.addItem(item)
