diff --git a/TouchBarBar.xcodeproj/project.xcworkspace/xcuserdata/gui.xcuserdatad/UserInterfaceState.xcuserstate b/TouchBarBar.xcodeproj/project.xcworkspace/xcuserdata/gui.xcuserdatad/UserInterfaceState.xcuserstate index deca745..3cec1d4 100644 Binary files a/TouchBarBar.xcodeproj/project.xcworkspace/xcuserdata/gui.xcuserdatad/UserInterfaceState.xcuserstate and b/TouchBarBar.xcodeproj/project.xcworkspace/xcuserdata/gui.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/TouchBarBar/WindowController.swift b/TouchBarBar/WindowController.swift index 8af05db..4813f44 100644 --- a/TouchBarBar/WindowController.swift +++ b/TouchBarBar/WindowController.swift @@ -8,30 +8,23 @@ import Cocoa - fileprivate extension NSTouchBarCustomizationIdentifier { - - static let touchBar = NSTouchBarCustomizationIdentifier("com.hung-truong.touchfart") + static let touchBar = NSTouchBarCustomizationIdentifier("com.guidouil.touchbarbar") } fileprivate extension NSTouchBarItemIdentifier { - static let champagne = NSTouchBarItemIdentifier("champagne") static let cocktail = NSTouchBarItemIdentifier("cocktail") static let beer = NSTouchBarItemIdentifier("beer") static let martini = NSTouchBarItemIdentifier("martini") } - class WindowController: NSWindowController, NSTouchBarDelegate { - override func windowDidLoad() { super.windowDidLoad() - // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. } - - + func Isaac(sender: NSButton) { let title = sender.title @@ -39,10 +32,8 @@ class WindowController: NSWindowController, NSTouchBarDelegate { return } sound.play() - } - - + @available(OSX 10.12.1, *) override func makeTouchBar() -> NSTouchBar? { let touchBar = NSTouchBar() @@ -51,7 +42,6 @@ class WindowController: NSWindowController, NSTouchBarDelegate { touchBar.defaultItemIdentifiers = [.champagne, .cocktail, .beer, .martini] return touchBar - } @available(OSX 10.12.1, *) @@ -79,7 +69,6 @@ class WindowController: NSWindowController, NSTouchBarDelegate { let button = NSButton(title: "🍹", target: self, action: #selector(Isaac)) touchBarItem.view = button return touchBarItem - } } }