Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MenuBarController
- attr_accessor :timePortalHudWindow
- def applicationDidBecomeActive(notification)
- # Create our status bar for the application
- puts "Initializing....."
- # menuZone = NSMenu.menuZone()
- # menu = NSMenu.allocWithZone(menuZone)
- menuItem = NSStatusBar.systemStatusBar.statusItemWithLength(NSVariableStatusItemLength)
- # And set it's details
- menuItem.setHighlightMode(true)
- menuItem.setImage(NSImage.imageNamed("MenuBarIcon.png"))
- menuItem.setAction(displayInformationWindow)
- menuItem.setEnabled(true)
- puts "Initialized"
- # Also, create a window
- end
- def displayInformationWindow
- puts "Clicked!"
- end
- end
Add Comment
Please, Sign In to add comment