Skip to content

Commit b276a75

Browse files
committed
Pre-merge upstream Arduino
2 parents 38973dc + 2313f6e commit b276a75

File tree

103 files changed

+60144
-1874
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+60144
-1874
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
app/bin/
2+
app/pde.jar
3+
build/macosx/work/
4+
core/bin/
5+
core/core.jar
6+
build/macosx/arduino.xcworkspace/contents.xcworkspacedata
7+
8+
build/macosx/arduino.xcworkspace/xcuserdata/mellis.xcuserdatad/UserInterfaceState.xcuserstate

app/src/processing/app/Base.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
* files and images, etc) that comes from that.
4747
*/
4848
public class Base {
49-
public static final int REVISION = 100;
49+
public static final int REVISION = 101;
5050
/** This might be replaced by main() if there's a lib/version.txt file. */
51-
static String VERSION_NAME = "0100";
51+
static String VERSION_NAME = "0101";
5252
/** Set true if this a proper release rather than a numbered revision. */
5353
static public boolean RELEASE = false;
5454

@@ -171,6 +171,9 @@ static public void main(String args[]) {
171171
// run static initialization that grabs all the prefs
172172
Preferences.init(null);
173173

174+
// load the I18n module for internationalization
175+
I18n.init(Preferences.get("editor.languages.current"));
176+
174177
// setup the theme coloring fun
175178
Theme.init();
176179

@@ -1535,12 +1538,12 @@ static public String getHardwarePath() {
15351538

15361539

15371540
static public String getAvrBasePath() {
1538-
if(Base.isLinux()) {
1539-
return ""; // avr tools are installed system-wide and in the path
1540-
} else {
1541-
return getHardwarePath() + File.separator + "tools" +
1542-
File.separator + "avr" + File.separator + "bin" + File.separator;
1543-
}
1541+
String path = getHardwarePath() + File.separator + "tools" +
1542+
File.separator + "avr" + File.separator + "bin" + File.separator;
1543+
if (Base.isLinux() && !(new File(path)).exists()) {
1544+
return ""; // use distribution provided avr tools if bundled tools missing
1545+
}
1546+
return path;
15441547
}
15451548

15461549

app/src/processing/app/Editor.java

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ public void windowDeactivated(WindowEvent e) {
264264
splitPane.setDividerSize(dividerSize);
265265
}
266266

267-
splitPane.setMinimumSize(new Dimension(600, 400));
267+
// the following changed from 600, 400 for netbooks
268+
// http://code.google.com/p/arduino/issues/detail?id=52
269+
splitPane.setMinimumSize(new Dimension(600, 100));
268270
box.add(splitPane);
269271

270272
// hopefully these are no longer needed w/ swing
@@ -288,19 +290,9 @@ public void windowDeactivated(WindowEvent e) {
288290
setPlacement(location);
289291

290292

291-
// If the window is resized too small this will resize it again to the
292-
// minimums. Adapted by Chris Lonnen from comments here:
293-
// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4320050
294-
// as a fix for http://dev.processing.org/bugs/show_bug.cgi?id=25
295-
final int minW = Preferences.getInteger("editor.window.width.min");
296-
final int minH = Preferences.getInteger("editor.window.height.min");
297-
addComponentListener(new java.awt.event.ComponentAdapter() {
298-
public void componentResized(ComponentEvent event) {
299-
setSize((getWidth() < minW) ? minW : getWidth(),
300-
(getHeight() < minH) ? minH : getHeight());
301-
}
302-
});
303-
293+
// Set the minimum size for the editor window
294+
setMinimumSize(new Dimension(Preferences.getInteger("editor.window.width.min"),
295+
Preferences.getInteger("editor.window.height.min")));
304296
// System.out.println("t3");
305297

306298
// Bring back the general options for the editor
@@ -1135,7 +1127,11 @@ protected JMenu buildEditMenu() {
11351127
undoItem.addActionListener(undoAction = new UndoAction());
11361128
menu.add(undoItem);
11371129

1138-
redoItem = newJMenuItem(_("Redo"), 'Y');
1130+
if (!Base.isMacOS()) {
1131+
redoItem = newJMenuItem(_("Redo"), 'Y');
1132+
} else {
1133+
redoItem = newJMenuItemShift(_("Redo"), 'Z');
1134+
}
11391135
redoItem.addActionListener(redoAction = new RedoAction());
11401136
menu.add(redoItem);
11411137

@@ -1247,10 +1243,29 @@ public void actionPerformed(ActionEvent e) {
12471243
item.addActionListener(new ActionListener() {
12481244
public void actionPerformed(ActionEvent e) {
12491245
if (find != null) {
1250-
//find.find(true);
1251-
//FindReplace find = new FindReplace(Editor.this); //.show();
1252-
find.find(true);
1246+
find.findNext();
1247+
}
1248+
}
1249+
});
1250+
menu.add(item);
1251+
1252+
item = newJMenuItemShift(_("Find Previous"), 'G');
1253+
item.addActionListener(new ActionListener() {
1254+
public void actionPerformed(ActionEvent e) {
1255+
if (find != null) {
1256+
find.findPrevious();
1257+
}
1258+
}
1259+
});
1260+
menu.add(item);
1261+
1262+
item = newJMenuItem(_("Use Selection For Find"), 'E');
1263+
item.addActionListener(new ActionListener() {
1264+
public void actionPerformed(ActionEvent e) {
1265+
if (find == null) {
1266+
find = new FindReplace(Editor.this);
12531267
}
1268+
find.setFindText( getSelectedText() );
12541269
}
12551270
});
12561271
menu.add(item);

app/src/processing/app/EditorListener.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,14 @@ public boolean keyPressed(KeyEvent event) {
122122
}
123123
}
124124

125+
if ((event.getModifiers() & KeyEvent.CTRL_MASK) != 0) {
126+
// Consume ctrl-m(carriage return) keypresses
127+
if (code == KeyEvent.VK_M) {
128+
event.consume(); // does nothing
129+
return false;
130+
}
131+
}
132+
125133
if ((event.getModifiers() & KeyEvent.META_MASK) != 0) {
126134
//event.consume(); // does nothing
127135
return false;

0 commit comments

Comments
 (0)