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

Disable File Open menu item #217

Merged
merged 1 commit into from
Aug 24, 2016

Conversation

chetankothari
Copy link
Contributor

This prevents the java.security.AccessControlException: access denied
exception.

Closes #132

This prevents the `java.security.AccessControlException: access denied`
exception.
openMenu.add(menuItem("File...", 'F', KeyStroke.getKeyStroke(KeyEvent.VK_O, CMD_CTRL_KEY_MASK), this.actionPool.openFileAction));
final JMenuItem fileMenuItem = menuItem("File...", 'F', KeyStroke.getKeyStroke(KeyEvent.VK_O, CMD_CTRL_KEY_MASK), this.actionPool.openFileAction);
// TODO enable the menu item once access control UI is implemented
fileMenuItem.setEnabled(false);
Copy link
Contributor Author

@chetankothari chetankothari Aug 24, 2016

Choose a reason for hiding this comment

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

Was thinking if we should pass in a flag to menuItem to return a disabled item, or use disabled action. Let me know what you think about it.

Copy link
Member

Choose a reason for hiding this comment

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

A flag to menuItem would be more "functional", yeah. But if it is used only in this one case, I would leave it aside as a minor thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. Will check for usage and see if we can get that done.

@hrj hrj merged commit bba88b4 into gngrOrg:master Aug 24, 2016
@hrj
Copy link
Member

hrj commented Aug 24, 2016

Merged; thanks!

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

Successfully merging this pull request may close these issues.

2 participants