mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-17 06:52:18 +01:00
Revert ""Add library" moved into "Import library" menu"
This reverts commit 1866050e0783e85b814c6afb57fa36318f3496bb.
This commit is contained in:
parent
5e8df5ec88
commit
d66e094a3b
@ -943,20 +943,10 @@ public class Base {
|
||||
}
|
||||
|
||||
|
||||
public void rebuildImportMenu(JMenu importMenu, final Editor editor) {
|
||||
public void rebuildImportMenu(JMenu importMenu) {
|
||||
//System.out.println("rebuilding import menu");
|
||||
importMenu.removeAll();
|
||||
|
||||
JMenuItem addLibraryMenuItem = new JMenuItem(_("Add Library..."));
|
||||
addLibraryMenuItem.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Base.this.handleAddZipLibrary(editor);
|
||||
Base.this.onBoardOrPortChange();
|
||||
Base.this.rebuildImportMenu(Editor.importMenu, editor);
|
||||
}
|
||||
});
|
||||
importMenu.add(addLibraryMenuItem);
|
||||
importMenu.addSeparator();
|
||||
|
||||
|
||||
// reset the set of libraries
|
||||
libraries = new HashSet<File>();
|
||||
|
||||
@ -1008,7 +998,7 @@ public class Base {
|
||||
}
|
||||
|
||||
|
||||
public void rebuildBoardsMenu(JMenu menu, final Editor editor) {
|
||||
public void rebuildBoardsMenu(JMenu menu) {
|
||||
//System.out.println("rebuilding boards menu");
|
||||
menu.removeAll();
|
||||
ButtonGroup group = new ButtonGroup();
|
||||
|
@ -627,10 +627,20 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
|
||||
if (importMenu == null) {
|
||||
importMenu = new JMenu(_("Import Library..."));
|
||||
base.rebuildImportMenu(importMenu, this);
|
||||
base.rebuildImportMenu(importMenu);
|
||||
}
|
||||
sketchMenu.add(importMenu);
|
||||
|
||||
item = new JMenuItem(_("Add Library from ZIP"));
|
||||
item.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
base.handleAddZipLibrary(Editor.this);
|
||||
base.onBoardOrPortChange();
|
||||
base.rebuildImportMenu(Editor.importMenu);
|
||||
}
|
||||
});
|
||||
sketchMenu.add(item);
|
||||
|
||||
item = newJMenuItem(_("Show Sketch Folder"), 'K');
|
||||
item.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
@ -680,7 +690,7 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
|
||||
if (boardsMenu == null) {
|
||||
boardsMenu = new JMenu(_("Board"));
|
||||
base.rebuildBoardsMenu(boardsMenu, this);
|
||||
base.rebuildBoardsMenu(boardsMenu);
|
||||
}
|
||||
menu.add(boardsMenu);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
ARDUINO 1.0.5 - 2013.04.08
|
||||
ARDUINO 1.0.5 - 2013.03.29
|
||||
|
||||
[core]
|
||||
|
||||
@ -15,10 +15,6 @@ ARDUINO 1.0.5 - 2013.04.08
|
||||
|
||||
* Upgrades to WiFi firmwares
|
||||
|
||||
[ide]
|
||||
|
||||
* Backport from 1.5: install Library from file
|
||||
|
||||
ARDUINO 1.0.4 - 2013.03.11
|
||||
|
||||
[core]
|
||||
|
Loading…
x
Reference in New Issue
Block a user