/* Tèsèvè
 * A simple static webserver, in an app.
 *
 * ~/app.js - Application entry point
 * started at 25/08/2015, by leny@flatLand!
 */

"use strict";

var electron = require( "app" ),
    BrowserWindow = require( "browser-window" ),
    path = require( "path" ),
    lodash = require( "lodash" ),
    os = require( "os" );

global.app = {
    "windows": {}
};

electron.on( "window-all-closed", function() {
    return electron.quit(); // TODO: TMP
    if( process.platform !== "darwin" ) {
        electron.quit();
    }
} );

electron.on( "ready", function() {

    var oWindow = new BrowserWindow( {
        "id": lodash.uniqueId(),
        "title": "Tèsèvè",
        "icon": path.resolve( __dirname, "assets/icon.png" ),
        "width": 640,
        "height": 480,
        "min-width": 640,
        "min-height": 480,
        "center": true,
        "standard-window": false,
        "resizable": true,
        "frame": false,
        "show": false
    } );

    oWindow.openDevTools();

    global.app.windows[ oWindow.id ] = oWindow;

    oWindow.on( "closed", function( a, b, c, d ) {
        delete global.app.windows[ this.id ];
        oWindow = null;
    } );

    oWindow.loadUrl( "file://" + __dirname + "/app.html" );

} );

@@ -317,20 +317,50 @@
 re( %22os%22
+ ),%0A    Menu = require( %22menu%22
  );%0A
-
 %0Aglobal.
@@ -389,16 +389,1957 @@
  %7B%7D%0A%7D;%0A%0A
+var oMenu = %5B%0A    %7B%0A        %22label%22: %22T%C3%A8s%C3%A8v%C3%A8%22,%0A        %22submenu%22: %5B%0A            %7B%0A                %22label%22: %22About T%C3%A8s%C3%A8v%C3%A8%22,%0A                %22selector%22: %22orderFrontStandardAboutPanel:%22%0A            %7D,%0A            %7B%0A                %22type%22: %22separator%22%0A            %7D,%0A            %7B%0A                %22label%22: %22Services%22,%0A                %22submenu%22: %5B%5D%0A            %7D,%0A            %7B%0A                %22type%22: %22separator%22%0A            %7D,%0A            %7B%0A                %22label%22: %22Hide Electron%22,%0A                %22accelerator%22: %22CmdOrCtrl+H%22,%0A                %22selector%22: %22hide:%22%0A            %7D,%0A            %7B%0A                %22label%22: %22Hide Others%22,%0A                %22accelerator%22: %22CmdOrCtrl+Shift+H%22,%0A                %22selector%22: %22hideOtherApplications:%22%0A            %7D,%0A            %7B%0A                %22label%22: %22Show All%22,%0A                %22selector%22: %22unhideAllApplications:%22%0A            %7D,%0A            %7B%0A                %22type%22: %22separator%22%0A            %7D,%0A            %7B%0A                %22label%22: %22Quit%22,%0A                %22accelerator%22: %22CmdOrCtrl+Q%22,%0A                %22selector%22: %22terminate:%22%0A            %7D%0A        %5D%0A    %7D,%0A    %7B%0A        %22label%22: %22Server%22,%0A        %22submenu%22: %5B%0A            %7B%0A                %22label%22: %22New Server%22,%0A                %22accelerator%22: %22CmdOrCtrl+N%22,%0A                %22click%22: function() %7B%0A                    console.log( %22Create new window!%22 );%0A                %7D%0A            %7D,%0A            %7B%0A                %22type%22: %22separator%22%0A            %7D,%0A            %7B%0A                %22label%22: %22Close Server%22,%0A                %22accelerator%22: %22CmdOrCtrl+W%22,%0A                %22click%22: function() %7B%0A                    console.log( %22Close current window!%22 );%0A                %7D%0A            %7D,%0A            %7B%0A                %22label%22: %22Close All Servers%22,%0A                %22accelerator%22: %22CmdOrCtrl+Shift+W%22,%0A                %22click%22: function() %7B%0A                    console.log( %22Close current window!%22 );%0A                %7D%0A            %7D,%0A        %5D%0A    %7D%0A%5D;%0A%0A
 electron
@@ -2497,16 +2497,16 @@
 %7D%0A%7D );%0A%0A
-
 electron
@@ -2533,16 +2533,84 @@
 on() %7B%0A%0A
+    // Menu.setApplicationMenu( Menu.buildFromTemplate( oMenu ) );%0A%0A
     var 

Prepare menu code