@@ -182,37 +182,41 @@ const createMenu = () => {
182
182
] ;
183
183
} else {
184
184
// File menu for Windows & Linux
185
+ const submenu = [
186
+ {
187
+ label : getLocale ( 'about' ) ,
188
+ click : ( ) => sendToAllWindows ( 'open-dialog-about' ) ,
189
+ } ,
190
+ {
191
+ type : 'separator' ,
192
+ } ,
193
+ {
194
+ label : getLocale ( 'preferencesMenuItem' ) ,
195
+ accelerator : 'CmdOrCtrl+,' ,
196
+ click : ( ) => sendToAllWindows ( 'go-to-preferences' ) ,
197
+ } ,
198
+ { type : 'separator' } ,
199
+ { role : 'quit' , label : getLocale ( 'quit' ) } ,
200
+ ] ;
201
+ if ( updaterEnabled ) {
202
+ submenu . splice ( 1 , 0 , {
203
+ type : 'separator' ,
204
+ } ) ;
205
+ submenu . splice ( 2 , 0 , {
206
+ label : getLocale ( 'checkForUpdates' ) ,
207
+ click : ( ) => {
208
+ prepareUpdaterForAppImage ( autoUpdater ) ;
209
+ global . updateSilent = false ;
210
+ autoUpdater . checkForUpdates ( ) ;
211
+ } ,
212
+ } ) ;
213
+ submenu . splice ( 3 , 0 , {
214
+ type : 'separator' ,
215
+ } ) ;
216
+ }
185
217
template . unshift ( {
186
218
label : getLocale ( 'file' ) ,
187
- submenu : [
188
- {
189
- label : getLocale ( 'about' ) ,
190
- click : ( ) => sendToAllWindows ( 'open-dialog-about' ) ,
191
- } ,
192
- {
193
- type : 'separator' ,
194
- visible : updaterEnabled ,
195
- } ,
196
- {
197
- label : getLocale ( 'checkForUpdates' ) ,
198
- click : ( ) => {
199
- prepareUpdaterForAppImage ( autoUpdater ) ;
200
- global . updateSilent = false ;
201
- autoUpdater . checkForUpdates ( ) ;
202
- } ,
203
- visible : updaterEnabled ,
204
- } ,
205
- {
206
- type : 'separator' ,
207
- } ,
208
- {
209
- label : getLocale ( 'preferencesMenuItem' ) ,
210
- accelerator : 'CmdOrCtrl+,' ,
211
- click : ( ) => sendToAllWindows ( 'go-to-preferences' ) ,
212
- } ,
213
- { type : 'separator' } ,
214
- { role : 'quit' , label : getLocale ( 'quit' ) } ,
215
- ] ,
219
+ submenu,
216
220
} ) ;
217
221
}
218
222
0 commit comments