git ssb

16+

Dominic / patchbay



Commit 9132118089771e8d960b2590aece46b1b7f121a7

--amend

mixmix committed on 11/5/2018, 12:13:33 AM
Parent: c5f3ae9b32ca1c2db67647aed1f069264dd936e8

Files changed

index.jschanged
main.jschanged
index.jsView
@@ -7,58 +7,12 @@
77 var windows = {}
88 var quitting = false
99
1010 console.log('STARTING electron')
11-
1211 electron.app.on('ready', () => {
13- // set up menus
14- var menu = defaultMenu(electron.app, electron.shell)
15- var view = menu.find(x => x.label === 'View')
16- view.submenu = [
17- { role: 'reload' },
18- { role: 'toggledevtools' },
19- { type: 'separator' },
20- { role: 'resetzoom' },
21- { role: 'zoomin' },
22- { role: 'zoomout' },
23- { type: 'separator' },
24- { role: 'togglefullscreen' }
25- ]
26- var win = menu.find(x => x.label === 'Window')
27- win.submenu = [
28- { role: 'minimize' },
29- { role: 'zoom' },
30- { role: 'close', label: 'Close Window', accelerator: 'CmdOrCtrl+Shift+W' },
31- { type: 'separator' },
32- {
33- label: 'Close Tab',
34- accelerator: 'CmdOrCtrl+W',
35- click () {
36- windows.main.webContents.send('closeTab')
37- }
38- },
39- {
40- label: 'Select Next Tab',
41- accelerator: 'CmdOrCtrl+Shift+]',
42- click () {
43- windows.main.webContents.send('nextTab')
44- }
45- },
46- {
47- label: 'Select Previous Tab',
48- accelerator: 'CmdOrCtrl+Shift+[',
49- click () {
50- windows.main.webContents.send('previousTab')
51- }
52- },
53- { type: 'separator' },
54- { role: 'front' }
55- ]
12 + startMenus()
5613
57- Menu.setApplicationMenu(Menu.buildFromTemplate(menu))
58-
5914 startBackgroundProcess()
60-
6115 // wait until server has started before opening main window
6216 electron.ipcMain.once('server-started', function (ev, config) {
6317 openMainWindow()
6418 })
@@ -158,4 +112,51 @@
158112
159113 window.loadURL('file://' + Path.join(__dirname, 'assets', 'base.html'))
160114 return window
161115 }
116 +
117 +function startMenus () {
118 + var menu = defaultMenu(electron.app, electron.shell)
119 + var view = menu.find(x => x.label === 'View')
120 + view.submenu = [
121 + { role: 'reload' },
122 + { role: 'toggledevtools' },
123 + { type: 'separator' },
124 + { role: 'resetzoom' },
125 + { role: 'zoomin' },
126 + { role: 'zoomout' },
127 + { type: 'separator' },
128 + { role: 'togglefullscreen' }
129 + ]
130 + var win = menu.find(x => x.label === 'Window')
131 + win.submenu = [
132 + { role: 'minimize' },
133 + { role: 'zoom' },
134 + { role: 'close', label: 'Close Window', accelerator: 'CmdOrCtrl+Shift+W' },
135 + { type: 'separator' },
136 + {
137 + label: 'Close Tab',
138 + accelerator: 'CmdOrCtrl+W',
139 + click () {
140 + windows.main.webContents.send('closeTab')
141 + }
142 + },
143 + {
144 + label: 'Select Next Tab',
145 + accelerator: 'CmdOrCtrl+Shift+]',
146 + click () {
147 + windows.main.webContents.send('nextTab')
148 + }
149 + },
150 + {
151 + label: 'Select Previous Tab',
152 + accelerator: 'CmdOrCtrl+Shift+[',
153 + click () {
154 + windows.main.webContents.send('previousTab')
155 + }
156 + },
157 + { type: 'separator' },
158 + { role: 'front' }
159 + ]
160 +
161 + Menu.setApplicationMenu(Menu.buildFromTemplate(menu))
162 +}
main.jsView
@@ -49,9 +49,8 @@
4949 }
5050
5151 // for electro[n]
5252 if (typeof window !== 'undefined' && !module.parent.parent) {
53- // debugger
5453 // TODO spin up settings check which modules are wanted
5554 const args = [ ...values(plugins), patchbay, patchcore ]
5655 // plugings loaded first will over-ride core modules loaded later
5756 const sockets = combine.apply(null, args)

Built with git-ssb-web