Base.boardsCustomMenus is not a static any more

This commit is contained in:
Federico Fissore 2015-03-20 10:14:36 +01:00
parent a053088691
commit 930289aa65
2 changed files with 6 additions and 6 deletions

View File

@ -91,7 +91,7 @@ public class Base {
// these menus are shared so that the board and serial port selections
// are the same for all windows (since the board and serial port that are
// actually used are determined by the preferences, which are shared)
static List<JMenu> boardsCustomMenus;
private List<JMenu> boardsCustomMenus;
static public void main(String args[]) throws Exception {
System.setProperty("awt.useSystemAAFontSettings", "on");
@ -1315,7 +1315,7 @@ public class Base {
return item;
}
private static void filterVisibilityOfSubsequentBoardMenus(TargetBoard board,
private void filterVisibilityOfSubsequentBoardMenus(TargetBoard board,
int fromIndex) {
for (int i = fromIndex; i < boardsCustomMenus.size(); i++) {
JMenu menu = boardsCustomMenus.get(i);
@ -1801,7 +1801,7 @@ public class Base {
return BaseNoGui.getBoardPreferences();
}
public static List<JMenu> getBoardsCustomMenus() {
public List<JMenu> getBoardsCustomMenus() {
return boardsCustomMenus;
}

View File

@ -191,7 +191,7 @@ public class Editor extends JFrame implements RunnerListener {
fileMenu.insert(examplesMenu, 3);
sketchMenu.insert(importMenu, 4);
int offset = 0;
for (JMenu menu : Base.getBoardsCustomMenus()) {
for (JMenu menu : base.getBoardsCustomMenus()) {
toolsMenu.insert(menu, numTools + offset);
offset++;
}
@ -205,7 +205,7 @@ public class Editor extends JFrame implements RunnerListener {
fileMenu.remove(sketchbookMenu);
fileMenu.remove(examplesMenu);
sketchMenu.remove(importMenu);
for (JMenu menu : Base.getBoardsCustomMenus()) {
for (JMenu menu : base.getBoardsCustomMenus()) {
toolsMenu.remove(menu);
}
toolsMenu.remove(serialMenu);
@ -702,7 +702,7 @@ public class Editor extends JFrame implements RunnerListener {
// XXX: DAM: these should probably be implemented using the Tools plugin
// API, if possible (i.e. if it supports custom actions, etc.)
for (JMenu menu : Base.getBoardsCustomMenus()) {
for (JMenu menu : base.getBoardsCustomMenus()) {
toolsMenu.add(menu);
}