From 320f380fac291416ce8ab450d142f160ef13cf31 Mon Sep 17 00:00:00 2001 From: Chetan Kothari Date: Wed, 24 Aug 2016 08:41:36 +0530 Subject: [PATCH] Disable File Open menu item This prevents the `java.security.AccessControlException: access denied` exception. --- .../org/lobobrowser/primary/ext/ComponentSource.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Primary_Extension/org/lobobrowser/primary/ext/ComponentSource.java b/src/Primary_Extension/org/lobobrowser/primary/ext/ComponentSource.java index 87808c82..712255e1 100644 --- a/src/Primary_Extension/org/lobobrowser/primary/ext/ComponentSource.java +++ b/src/Primary_Extension/org/lobobrowser/primary/ext/ComponentSource.java @@ -179,7 +179,10 @@ public JMenu getFileMenu() { openMenu.add(menuItem("New Window", 'N', KeyStroke.getKeyStroke(KeyEvent.VK_N, CMD_CTRL_KEY_MASK), this.actionPool.blankWindowAction)); openMenu.add(menuItem("Cloned Window", 'C', this.actionPool.clonedWindowAction)); - 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); + openMenu.add(fileMenuItem); final JMenu menu = new JMenu("File"); menu.setMnemonic('F');