From a2aa20b6b272171c53bcd05f96376f45aa3fb3ee Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 29 Nov 2013 16:21:43 +0800 Subject: [PATCH] Add "Edit" menu in specs window. --- spec/main.js | 50 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/spec/main.js b/spec/main.js index 3c747d435a0a..1f77bb13b8d7 100644 --- a/spec/main.js +++ b/spec/main.js @@ -53,16 +53,40 @@ app.on('finish-launching', function() { ], }, { - label: 'Window', + label: 'Edit', submenu: [ { - label: 'Open', - accelerator: 'CommandOrControl+O', + label: 'Undo', + accelerator: 'CommandOrControl+Z', + selector: 'undo:', }, { - label: 'Close', - accelerator: 'CommandOrControl+W', - click: function(item, window) { window.close(); } + label: 'Redo', + accelerator: 'CommandOrControl+Shift+Z', + selector: 'redo:', + }, + { + type: 'separator', + }, + { + label: 'Cut', + accelerator: 'CommandOrControl+X', + selector: 'cut:', + }, + { + label: 'Copy', + accelerator: 'CommandOrControl+C', + selector: 'copy:', + }, + { + label: 'Paste', + accelerator: 'CommandOrControl+V', + selector: 'paste:', + }, + { + label: 'Select All', + accelerator: 'CommandOrControl+A', + selector: 'selectAll:', }, ] }, @@ -85,6 +109,20 @@ app.on('finish-launching', function() { }, ] }, + { + label: 'Window', + submenu: [ + { + label: 'Open', + accelerator: 'CommandOrControl+O', + }, + { + label: 'Close', + accelerator: 'CommandOrControl+W', + click: function(item, window) { window.close(); } + }, + ] + }, { label: 'Help', submenu: [],