Skip to content
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

Merged
merged 4 commits into from
Sep 22, 2020
Merged

Added 'Quit' option under 'File' #746

merged 4 commits into from
Sep 22, 2020

Conversation

owen-mccormick
Copy link
Contributor

This adds a 'Quit' option under the 'File' menu. (#741)

src/menu.js Outdated Show resolved Hide resolved
@yishn yishn linked an issue Sep 21, 2020 that may be closed by this pull request
@owen-mccormick
Copy link
Contributor Author

Thank you! I will try to implement the necessary changes.

@owen-mccormick owen-mccormick marked this pull request as draft September 21, 2020 21:40
@owen-mccormick owen-mccormick marked this pull request as ready for review September 21, 2020 22:28
src/menu.js Outdated
Comment on lines 875 to 881
let preferenceItem = fileMenu.submenu.splice(
fileMenu.submenu.length - 2,
fileMenu.submenu.length - 4,
2
)[1]

fileMenu.submenu.splice(fileMenu.length - 2, 2)[1]

Copy link
Member

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.

Copy link
Contributor Author

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 preferenceItemremoved was the 'Preferences' option.

Copy link
Member

@yishn yishn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@yishn yishn merged commit 3c22c53 into SabakiHQ:master Sep 22, 2020
@rekstein
Copy link

Thank you all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Entry in menu or shortcut to quit sabaki
3 participants