Maybe fixed menu
authorRemixDev <deezloaderremix@gmail.com>
Sun, 10 Mar 2019 20:02:02 +0000 (21:02 +0100)
committerRemixDev <deezloaderremix@gmail.com>
Sun, 10 Mar 2019 20:02:02 +0000 (21:02 +0100)
app/main.js

index dce27018f46122670910103a0f197ad590c5075b..41d3b12de5bd284da2825ae4083e013ce25fa4b5 100644 (file)
@@ -66,25 +66,6 @@ function loadSettings(){
        }
 }
 
-var template = [{
-    label: "Application",
-    submenu: [
-        { label: "Quit", accelerator: "Command+Q", click: function() { app.quit(); }}
-    ]}, {
-    label: "Edit",
-    submenu: [
-        { label: "Undo", accelerator: "CmdOrCtrl+Z", selector: "undo:" },
-        { label: "Redo", accelerator: "Shift+CmdOrCtrl+Z", selector: "redo:" },
-        { type: "separator" },
-        { label: "Cut", accelerator: "CmdOrCtrl+X", selector: "cut:" },
-        { label: "Copy", accelerator: "CmdOrCtrl+C", selector: "copy:" },
-        { label: "Paste", accelerator: "CmdOrCtrl+V", selector: "paste:" },
-        { label: "Select All", accelerator: "CmdOrCtrl+A", selector: "selectAll:" }
-    ]}
-]
-
-Menu.setApplicationMenu(Menu.buildFromTemplate(template))
-
 function createTray(){
        tray = new Tray(trayIcon);
        const contextMenu = Menu.buildFromTemplate([
@@ -132,6 +113,24 @@ function createWindow () {
        });
 
        mainWindow.setMenu(null);
+       var template = [{
+           label: "Application",
+           submenu: [
+               { label: "Quit", accelerator: "Command+Q", click: function() { app.quit(); }}
+           ]}, {
+           label: "Edit",
+           submenu: [
+               { label: "Undo", accelerator: "CmdOrCtrl+Z", selector: "undo:" },
+               { label: "Redo", accelerator: "Shift+CmdOrCtrl+Z", selector: "redo:" },
+               { type: "separator" },
+               { label: "Cut", accelerator: "CmdOrCtrl+X", selector: "cut:" },
+               { label: "Copy", accelerator: "CmdOrCtrl+C", selector: "copy:" },
+               { label: "Paste", accelerator: "CmdOrCtrl+V", selector: "paste:" },
+               { label: "Select All", accelerator: "CmdOrCtrl+A", selector: "selectAll:" }
+           ]}
+       ]
+
+       Menu.setApplicationMenu(Menu.buildFromTemplate(template))
 
        // and load the index.html of the app.
        mainWindow.loadURL('http://localhost:' + appConfig.serverPort);