This repository was archived by the owner on Oct 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmenu.js
More file actions
95 lines (93 loc) · 2.55 KB
/
Copy pathmenu.js
File metadata and controls
95 lines (93 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
const { app, Menu, shell } = require("electron");
module.exports = function() {
var template = [
{
label: "Gmail",
submenu: [
{ label: "About Gmail", role: "about" },
{ type: "separator" },
{ label: "Services", role: "services", submenu: [] },
{ type: "separator" },
{ label: "Hide Gmail", accelerator: "Command+H", role: "hide" },
{
label: "Hide Others",
accelerator: "Command+Alt+H",
role: "hideothers"
},
{ label: "Show All", role: "unhide" },
{ type: "separator" },
{
label: "Quit",
accelerator: "Command+Q",
click: function() {
app.quit();
}
}
]
},
{
label: "Edit",
submenu: [
{ label: "Undo", accelerator: "CmdOrCtrl+Z", role: "undo" },
{ label: "Redo", accelerator: "Shift+CmdOrCtrl+Z", role: "redo" },
{ type: "separator" },
{ label: "Cut", accelerator: "CmdOrCtrl+X", role: "cut" },
{ label: "Copy", accelerator: "CmdOrCtrl+C", role: "copy" },
{ label: "Paste", accelerator: "CmdOrCtrl+V", role: "paste" },
{
label: "Paste and match style",
accelerator: "Shift+CmdOrCtrl+V",
selector: "pasteAndMatchStyle:"
},
{ label: "Select All", accelerator: "CmdOrCtrl+A", role: "selectall" }
]
},
{
label: "View",
submenu: [
{
label: "Reload",
accelerator: "CmdOrCtrl+R",
click: function(item, win) {
if (win) win.reload();
}
},
{
label: "Toggle Full Screen",
accelerator: "Ctrl+Command+F",
click: function(item, win) {
if (win) win.setFullScreen(!win.isFullScreen());
}
},
{
label: "Toggle Developer Tools",
accelerator: "Alt+Command+I",
click: function(item, win) {
if (win) win.toggleDevTools();
}
}
]
},
{
label: "Window",
role: "window",
submenu: [
{ label: "Minimize", accelerator: "CmdOrCtrl+M", role: "minimize" },
{ label: "Close", accelerator: "CmdOrCtrl+W", role: "close" }
]
},
{
label: "Help",
role: "help",
submenu: [
{
label: "View on GitHub",
click: function() {
shell.openExternal("http://github.com/fgnass/gmail-app");
}
}
]
}
];
Menu.setApplicationMenu(Menu.buildFromTemplate(template));
};