Skip to content

Commit a6a59f1

Browse files
committed
Revert "Merge branch 'master' of github.com:arduino/Arduino into diskloader_reboot"
This reverts commit df9835e, reversing changes made to ec45af8. Conflicts: hardware/arduino/variants/mega/pins_arduino.h libraries/Ethernet/examples/PachubeClientString/PachubeClientString.ino
1 parent f2bd8a5 commit a6a59f1

File tree

40 files changed

+1915
-2219
lines changed

40 files changed

+1915
-2219
lines changed

app/src/processing/app/Base.java

+19-9
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ protected String createNewUntitled() throws IOException {
545545
newbieDir.mkdirs();
546546

547547
// Make an empty pde file
548-
File newbieFile = new File(newbieDir, newbieName + ".pde");
548+
File newbieFile = new File(newbieDir, newbieName + ".ino");
549549
new FileOutputStream(newbieFile); // create the file
550550
return newbieFile.getAbsolutePath();
551551
}
@@ -637,7 +637,8 @@ public void handleOpenPrompt() {
637637
public boolean accept(File dir, String name) {
638638
// TODO this doesn't seem to ever be used. AWESOME.
639639
//System.out.println("check filter on " + dir + " " + name);
640-
return name.toLowerCase().endsWith(".pde");
640+
return name.toLowerCase().endsWith(".ino")
641+
|| name.toLowerCase().endsWith(".pde");
641642
}
642643
});
643644

@@ -1024,22 +1025,28 @@ public void actionPerformed(ActionEvent actionevent) {
10241025
}
10251026

10261027

1027-
public void rebuildBurnBootloaderMenu(JMenu menu) {
1028-
//System.out.println("rebuilding burn bootloader menu");
1028+
public void rebuildProgrammerMenu(JMenu menu) {
1029+
//System.out.println("rebuilding programmer menu");
10291030
menu.removeAll();
1031+
ButtonGroup group = new ButtonGroup();
10301032
for (Target target : targetsTable.values()) {
10311033
for (String programmer : target.getProgrammers().keySet()) {
10321034
AbstractAction action =
10331035
new AbstractAction(
1034-
"w/ " + target.getProgrammers().get(programmer).get("name")) {
1036+
target.getProgrammers().get(programmer).get("name")) {
10351037
public void actionPerformed(ActionEvent actionevent) {
1036-
activeEditor.handleBurnBootloader((String) getValue("target"),
1037-
(String) getValue("programmer"));
1038+
Preferences.set("programmer", getValue("target") + ":" +
1039+
getValue("programmer"));
10381040
}
10391041
};
10401042
action.putValue("target", target.getName());
10411043
action.putValue("programmer", programmer);
1042-
JMenuItem item = new JMenuItem(action);
1044+
JMenuItem item = new JRadioButtonMenuItem(action);
1045+
if (Preferences.get("programmer").equals(target.getName() + ":" +
1046+
programmer)) {
1047+
item.setSelected(true);
1048+
}
1049+
group.add(item);
10431050
menu.add(item);
10441051
}
10451052
}
@@ -1099,7 +1106,10 @@ public void actionPerformed(ActionEvent e) {
10991106
File subfolder = new File(folder, list[i]);
11001107
if (!subfolder.isDirectory()) continue;
11011108

1102-
File entry = new File(subfolder, list[i] + ".pde");
1109+
File entry = new File(subfolder, list[i] + ".ino");
1110+
if (!entry.exists() && (new File(subfolder, list[i] + ".pde")).exists()) {
1111+
entry = new File(subfolder, list[i] + ".pde");
1112+
}
11031113
// if a .pde file of the same prefix as the folder exists..
11041114
if (entry.exists()) {
11051115
//String sanityCheck = sanitizedName(list[i]);

0 commit comments

Comments
 (0)