             "alt": NSEvent.modifierFlags().intersect(.AlternateKeyMask) != []
         ]
     }
-    
+
     func application(sender: NSApplication, openFiles filenames: [String]) {
         for filename in filenames {
             callUrlHandlers(nil)(url: NSURL(fileURLWithPath: filename ))

        let img: NSImage! = NSImage(named: "statusitem")
        img.template = true

        let bar = NSStatusBar.systemStatusBar()        
        // Workaround for some bug: -1 instead of NSVariableStatusItemLength
        statusItem = bar.statusItemWithLength(CGFloat(-1))
        statusItem.menu = statusItemMenu

    func applicationDidBecomeActive(aNotification: NSNotification) {
        isActive = true
    }

    func applicationDidResignActive(aNotification: NSNotification) {
        isActive = false
    }
