-
-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added 'Quit' option under 'File' #746
Conversation
Thank you! I will try to implement the necessary changes. |
src/menu.js
Outdated
let preferenceItem = fileMenu.submenu.splice( | ||
fileMenu.submenu.length - 2, | ||
fileMenu.submenu.length - 4, | ||
2 | ||
)[1] | ||
|
||
fileMenu.submenu.splice(fileMenu.length - 2, 2)[1] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead you can write
.splice(
fileMenu.submenu.length - 4,
4
)[1]
to remove the four last entries, so there's no need for two separate mutations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have done so. I am sorry for requiring so much feedback, as I am new to JavaScript and I thought that it would be clearer if all that the code defining preferenceItem
removed was the 'Preferences' option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
Thank you all! |
This adds a 'Quit' option under the 'File' menu. (#741)