Skip to content

Commit 83de1f1

Browse files
committed
note about args to open(), and move to file menu
1 parent 4c8fa46 commit 83de1f1

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

app/src/processing/app/Base.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -600,10 +600,6 @@ public JMenu initDefaultFileMenu() {
600600
item.addActionListener(e -> thinkDifferentExamples());
601601
defaultFileMenu.add(item);
602602

603-
item = new JMenuItem("Restart");
604-
item.addActionListener(e -> handleRestart());
605-
defaultFileMenu.add(item);
606-
607603
return defaultFileMenu;
608604
}
609605

@@ -1784,7 +1780,8 @@ public void handleRestart() {
17841780
System.out.println("launching");
17851781
Process p;
17861782
if (Platform.isMacOS()) {
1787-
p = Runtime.getRuntime().exec(new String[]{
1783+
p = Runtime.getRuntime().exec(new String[] {
1784+
// -n allows more than one instance to be opened at a time
17881785
"open", "-n", "-a", app.getAbsolutePath()
17891786
});
17901787
} else {

app/src/processing/app/ui/Editor.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,14 @@ protected JMenu buildFileMenu(JMenuItem[] exportItems) {
697697
item.addActionListener(e -> handlePrint());
698698
fileMenu.add(item);
699699

700+
{
701+
fileMenu.addSeparator();
702+
703+
item = new JMenuItem("Restart");
704+
item.addActionListener(e -> base.handleRestart());
705+
fileMenu.add(item);
706+
}
707+
700708
// Mac OS X already has its own preferences and quit menu.
701709
// That's right! Think different, b*tches!
702710
if (!Platform.isMacOS()) {

0 commit comments

Comments
 (0)