         }
     ]
     if os.platform() == 'darwin'
-        tmp = tmp.concat {
+        tmpl.push {
             label: 'Hide Dock icon'
             type: 'checkbox'
             enabled: viewstate.showtray
             checked:  viewstate.hidedockicon
             click: -> action 'togglehidedockicon'
         }
-    tmp
+    tmpl
 
 templateWindow = (viewstate, os) ->
-    tmp = [
+    tmpl = [
         {
             label: 'Minimize'
             accelerator: acceleratorMap['minimize'][os]

  ]

templateEdit = (viewstate) ->
    tmp = [
        { label: 'Undo', accelerator: acceleratorMap['undo'][os], selector: 'undo:' }
        { label: 'Redo', accelerator: acceleratorMap['redo'][os], selector: 'redo:' }
    ]
    if os.platform() == 'darwin'
        tmp = tmp.concat [
          { type: 'separator' }
          { label: 'Cut', accelerator: acceleratorMap['cut'][os], selector: 'cut:' }
          { label: 'Copy', accelerator: acceleratorMap['copy'][os], selector: 'copy:' }
          { label: 'Paste', accelerator: acceleratorMap['paste'][os], selector: 'paste:' }
          { label: 'Select All', accelerator: acceleratorMap['selectall'][os], selector: 'selectAll:' }
        ]
    tmp

templateView = (viewstate) ->
    tmp = [
        {
            label: 'Conversation List'
            submenu: [

    ]

    if os.platform() == 'darwin'
        tmpl.push [{
              label: 'Hide Others'
              accelerator: acceleratorMap['hideother'][os]
              selector: 'hideOtherApplications:'
        }
        { label: 'Show All', selector: 'unhideAllApplications:' }
        ]
    tmpl.push [
      { type: 'separator' }
      {
          label: 'Open Inspector'
