Skip to content

Commit d66e094

Browse files
committed
Revert ""Add library" moved into "Import library" menu"
This reverts commit 1866050.
1 parent 5e8df5e commit d66e094

File tree

3 files changed

+17
-21
lines changed

3 files changed

+17
-21
lines changed

app/src/processing/app/Base.java

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -943,20 +943,10 @@ protected void rebuildSketchbookMenu(JMenu menu) {
943943
}
944944

945945

946-
public void rebuildImportMenu(JMenu importMenu, final Editor editor) {
946+
public void rebuildImportMenu(JMenu importMenu) {
947+
//System.out.println("rebuilding import menu");
947948
importMenu.removeAll();
948-
949-
JMenuItem addLibraryMenuItem = new JMenuItem(_("Add Library..."));
950-
addLibraryMenuItem.addActionListener(new ActionListener() {
951-
public void actionPerformed(ActionEvent e) {
952-
Base.this.handleAddZipLibrary(editor);
953-
Base.this.onBoardOrPortChange();
954-
Base.this.rebuildImportMenu(Editor.importMenu, editor);
955-
}
956-
});
957-
importMenu.add(addLibraryMenuItem);
958-
importMenu.addSeparator();
959-
949+
960950
// reset the set of libraries
961951
libraries = new HashSet<File>();
962952

@@ -1008,7 +998,7 @@ public void onBoardOrPortChange() {
1008998
}
1009999

10101000

1011-
public void rebuildBoardsMenu(JMenu menu, final Editor editor) {
1001+
public void rebuildBoardsMenu(JMenu menu) {
10121002
//System.out.println("rebuilding boards menu");
10131003
menu.removeAll();
10141004
ButtonGroup group = new ButtonGroup();

app/src/processing/app/Editor.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,10 +627,20 @@ public void actionPerformed(ActionEvent e) {
627627

628628
if (importMenu == null) {
629629
importMenu = new JMenu(_("Import Library..."));
630-
base.rebuildImportMenu(importMenu, this);
630+
base.rebuildImportMenu(importMenu);
631631
}
632632
sketchMenu.add(importMenu);
633633

634+
item = new JMenuItem(_("Add Library from ZIP"));
635+
item.addActionListener(new ActionListener() {
636+
public void actionPerformed(ActionEvent e) {
637+
base.handleAddZipLibrary(Editor.this);
638+
base.onBoardOrPortChange();
639+
base.rebuildImportMenu(Editor.importMenu);
640+
}
641+
});
642+
sketchMenu.add(item);
643+
634644
item = newJMenuItem(_("Show Sketch Folder"), 'K');
635645
item.addActionListener(new ActionListener() {
636646
public void actionPerformed(ActionEvent e) {
@@ -680,7 +690,7 @@ public void actionPerformed(ActionEvent e) {
680690

681691
if (boardsMenu == null) {
682692
boardsMenu = new JMenu(_("Board"));
683-
base.rebuildBoardsMenu(boardsMenu, this);
693+
base.rebuildBoardsMenu(boardsMenu);
684694
}
685695
menu.add(boardsMenu);
686696

build/shared/revisions.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
ARDUINO 1.0.5 - 2013.04.08
2+
ARDUINO 1.0.5 - 2013.03.29
33

44
[core]
55

@@ -15,10 +15,6 @@ ARDUINO 1.0.5 - 2013.04.08
1515

1616
* Upgrades to WiFi firmwares
1717

18-
[ide]
19-
20-
* Backport from 1.5: install Library from file
21-
2218
ARDUINO 1.0.4 - 2013.03.11
2319

2420
[core]

0 commit comments

Comments
 (0)