     @menu = Menu.buildFromTemplate @getDefaultTemplate()
     Menu.setApplicationMenu @menu
 
-  update: (@keystrokesByCommand) ->
-    template = @getTemplate()
+  update: (keystrokesByCommand) ->
+    template = @getTemplate(keystrokesByCommand)
     @menu = Menu.buildFromTemplate(template)
     Menu.setApplicationMenu(@menu)
-    @enableWindowItems(true)
+    @enableWindowSpecificItems(true)
 
   allItems: (menu=@menu) ->
     items = []


module.exports =
class ApplicationMenu
  keystrokesByCommand: null
  version: null
  devMode: null
  menu: null

      ]
    ]

  getTemplate: (keystrokesByCommand) ->
    atomMenu =
      label: 'Atom'
      submenu: [
