diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 7245a3ad0..33d5957f4 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -96,7 +96,7 @@ public class Base { // int editorCount; // Editor[] editors; - java.util.List editors = + java.util.List editors = Collections.synchronizedList(new ArrayList()); // ArrayList editors = Collections.synchronizedList(new ArrayList()); Editor activeEditor; @@ -168,20 +168,20 @@ public class Base { "p { font: 11pt \"Lucida Grande\"; margin-top: 8px }"+ " " + "The standard menu bar has been disabled." + - "

Due to an Apple bug, the Processing menu bar is " + - "unusable when run on Mac OS X 10.5 (Leopard). " + + "

Due to an Apple bug, the Processing menu bar is " + + "unusable when run on Mac OS X 10.5 (Leopard). " + "As a workaround, the menu bar will be placed inside " + "the editor window. This setting can be changed in the " + "Preferences window.

" + ""; // String warning = -// "Due to an Apple bug, the Processing menu bar is\n" + -// "unusable when run on Mac OS X 10.5 (Leopard).\n" + +// "Due to an Apple bug, the Processing menu bar is\n" + +// "unusable when run on Mac OS X 10.5 (Leopard).\n" + // "As a workaround, the menu bar is placed inside\n" + // "the editor window."; Object[] options = { "OK", "More Info" }; int result = JOptionPane.showOptionDialog(new Frame(), - warning, + warning, "Menu Bar Problem", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, @@ -196,10 +196,10 @@ public class Base { if (result == 1) { // More Info Base.openURL("http://dev.processing.org/bugs/show_bug.cgi?id=786"); } - } + } } + System.setProperty("apple.laf.useScreenMenuBar", menubar); } - System.setProperty("apple.laf.useScreenMenuBar", menubar); } // Set the look and feel before opening the window @@ -212,7 +212,7 @@ public class Base { System.err.println(e.getMessage()); //e.printStackTrace(); } - + // Create a location for untitled sketches untitledFolder = createTempFolder("untitled"); untitledFolder.deleteOnExit(); @@ -396,7 +396,7 @@ public class Base { String path = editor.getSketch().getMainFilePath(); // In case of a crash, save untitled sketches if they contain changes. // (Added this for release 0158, may not be a good idea.) - if (path.startsWith(untitledPath) && + if (path.startsWith(untitledPath) && !editor.getSketch().isModified()) { continue; } @@ -561,7 +561,7 @@ public class Base { activeEditor.handleOpenInternal(path); activeEditor.untitled = true; return true; - + } catch (IOException e) { activeEditor.statusError(e); return false; @@ -707,12 +707,12 @@ public class Base { //if (editorCount == 1) { if (editors.size() == 1) { - // For 0158, when closing the last window /and/ it was already an + // For 0158, when closing the last window /and/ it was already an // untitled sketch, just give up and let the user quit. // if (Preferences.getBoolean("sketchbook.closing_last_window_quits") || // (editor.untitled && !editor.getSketch().isModified())) { Object[] options = { "OK", "Cancel" }; - String prompt = Base.isMacOS() ? + String prompt = Base.isMacOS() ? " " + "