Guest User

Untitled

a guest
Feb 20th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. class MenuBarController
  2.  
  3. attr_accessor :timePortalHudWindow
  4.  
  5. def applicationDidBecomeActive(notification)
  6. # Create our status bar for the application
  7. puts "Initializing....."
  8. # menuZone = NSMenu.menuZone()
  9. # menu = NSMenu.allocWithZone(menuZone)
  10.  
  11. menuItem = NSStatusBar.systemStatusBar.statusItemWithLength(NSVariableStatusItemLength)
  12.  
  13. # And set it's details
  14. menuItem.setHighlightMode(true)
  15. menuItem.setImage(NSImage.imageNamed("MenuBarIcon.png"))
  16. menuItem.setAction(displayInformationWindow)
  17. menuItem.setEnabled(true)
  18.  
  19. puts "Initialized"
  20.  
  21. # Also, create a window
  22. end
  23.  
  24. def displayInformationWindow
  25. puts "Clicked!"
  26. end
  27. end
Add Comment
Please, Sign In to add comment