             label: 'View'
             submenu: templateView viewstate
         }
-        if isDarwin
-            {
-                label: 'Window'
-                submenu: templateWindow viewstate
-            }
+        {
+            label: 'Window'
+            submenu: templateWindow viewstate
+        } if isDarwin
     ].filter (n) -> n != undefined
 
 module.exports = (viewstate) ->

isNotDarwin = platform != 'darwin'

acceleratorMap = {
    hideyakyak: {default: 'Control+H', darwin:'Command+H'}
    hideothers: {default: '', darwin:'Command+Shift+H'}
    showall: {default: '', darwin:''}
    openinspector: {default: 'Control+Alt+I', darwin:'Command+Alt+I'}
    quit: {default: 'Control+Q', darwin:'Command+Q'}
    undo: {default: 'Control+Z', darwin:'Command+Z'}
    redo: {default: 'Control+Shift+Z', darwin:'Command+Shift+Z'}
    cut: {default: '', darwin:'Command+X'}
    copy: {default: '', darwin:'Command+C'}
    paste: {default: '', darwin:'Command+V'}
    selectall: {default: '', darwin:'Command+A'}
    togglefullscreen: {default: 'Control+Alt+F', darwin:'Command+Control+F'}
    zoomin: {default: 'Control+Plus', darwin:'Command+Plus'}
    zoomout: {default: 'Control+-', darwin:'Command+-'}
    resetzoom: {default: 'Control+0', darwin:'Command+0'}
    previousconversation: {default: 'Control+K', darwin:'Command+Shift+Tab'}
    nextconversation:  {default: 'Control+J', darwin:'Command+Tab'}
    conversation1: {default: 'Alt+1', darwin:'Command+1'}
    conversation2: {default: 'Alt+2', darwin:'Command+2'}


templateEdit = (viewstate) ->
    [
        { role: 'undo' }
        { role: 'redo' }
        { type: 'separator' }
        { role: 'cut' }
        { role: 'copy' }
        { role: 'paste' }
        { role: 'selectall' }
    ].filter (n) -> n != undefined

templateView = (viewstate) ->
