Load from browser cache removed

Old "debugger" tool removed in favor of new real debugger
Hotkeys unified
This commit is contained in:
Jindra Petřík
2015-11-16 16:04:03 +01:00
parent c04675e353
commit 632e5156c8
4 changed files with 317 additions and 151 deletions

View File

@@ -28,6 +28,7 @@ import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.KeyStroke;
import javax.swing.MenuElement;
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
@@ -97,9 +98,12 @@ public class MainFrameClassicMenu extends MainFrameMenu {
}
@Override
public void addMenuItem(String path, String title, String icon, ActionListener action, int priority, final ActionListener subLoader, boolean isLeaf) {
public void addMenuItem(String path, String title, String icon, ActionListener action, int priority, final ActionListener subLoader, boolean isLeaf, HotKey key) {
path = mapping(path);
menuHotkeys.put(path, key);
menuActions.put(path, action);
if (!isLeaf) {
//action is ignored
addMenu(path, title, icon, subLoader);
@@ -123,6 +127,9 @@ public class MainFrameClassicMenu extends MainFrameMenu {
if (action != null) {
menuItem.addActionListener(action);
}
if (key != null) {
menuItem.setAccelerator(KeyStroke.getKeyStroke(key.key, key.getModifier()));
}
if (parentMenu instanceof JMenu) {
((JMenu) parentMenu).add(menuItem);
} else {
@@ -132,8 +139,10 @@ public class MainFrameClassicMenu extends MainFrameMenu {
}
@Override
public void addToggleMenuItem(String path, String title, String group, String icon, ActionListener action, int priority) {
public void addToggleMenuItem(String path, String title, String group, String icon, ActionListener action, int priority, HotKey key) {
path = mapping(path);
menuHotkeys.put(path, key);
String parentPath = "";
if (path.contains("/")) {
parentPath = path.substring(0, path.lastIndexOf('/'));