4242 * files and images, etc) that comes from that.
4343 */
4444public class Base {
45- static final int VERSION = 158 ;
46- static final String VERSION_NAME = "0158 Beta" ;
45+ static final int VERSION = 159 ;
46+ static final String VERSION_NAME = "0159 Beta" ;
4747
4848 static final int [] platforms = new int [] {
4949 PConstants .WINDOWS , PConstants .MACOSX , PConstants .LINUX
@@ -154,22 +154,29 @@ static public void main(String args[]) {
154154
155155 // run static initialization that grabs all the prefs
156156 Preferences .init (null );
157-
157+
158158 // setup the theme coloring fun
159159 Theme .init ();
160160
161161 if (Base .isMacOS ()) {
162- String fiasco = "apple.laf.useScreenMenuBar" ;
163- String menubar = Preferences .get (fiasco );
164- if (menubar == null ) {
162+ String properMenuBar = "apple.laf.useScreenMenuBar" ;
163+ String menubar = Preferences .get (properMenuBar );
164+ if (menubar != null ) {
165+ // Get the current menu bar setting and use it
166+ System .setProperty (properMenuBar , menubar );
167+
168+ } else {
169+ // 10.4 is not affected, 10.5 (and prolly 10.6) are
165170 if (System .getProperty ("os.version" ).startsWith ("10.4" )) {
166- menubar = "true" ;
167- Preferences .set (fiasco , menubar );
171+ // Don't bother checking next time
172+ Preferences .set (properMenuBar , "true" );
173+ // Also set the menubar now
174+ System .setProperty (properMenuBar , "true" );
168175
169176 } else {
170- // 10.4 is not affected, 10.5 (and prolly 10.6) are
177+ // Running 10.5 or 10.6 or whatever, give 'em the business
171178 String warning =
172- "<html> " +
179+ "<html>" +
173180 "<head> <style type=\" text/css\" >" +
174181 "b { font: 13pt \" Lucida Grande\" }" +
175182 "p { font: 11pt \" Lucida Grande\" ; margin-top: 8px }" +
@@ -192,15 +199,16 @@ static public void main(String args[]) {
192199 options [0 ]);
193200 if (result == -1 ) {
194201 // They hit ESC or closed the window, so just hide it for now
195- System .setProperty (fiasco , "false" );
196202 // But don't bother setting the preference in the file
197203 } else {
198- Preferences .set (fiasco , menubar );
204+ // Shut off in the preferences for next time
205+ Preferences .set (properMenuBar , "false" );
199206 if (result == 1 ) { // More Info
200207 Base .openURL ("http://dev.processing.org/bugs/show_bug.cgi?id=786" );
201208 }
202- System .setProperty ("apple.laf.useScreenMenuBar" , "false" );
203209 }
210+ // Whether or not canceled, set to false (right now) if we're on 10.5
211+ System .setProperty (properMenuBar , "false" );
204212 }
205213 }
206214 }
@@ -1624,14 +1632,14 @@ static public File getContentFile(String name) {
16241632 }
16251633
16261634
1627- /**
1635+ /**
16281636 * Get an image associated with the current color theme.
16291637 */
16301638 static public Image getThemeImage (String name , Component who ) {
16311639 return getLibImage ("theme/" + name , who );
16321640 }
1633-
1634-
1641+
1642+
16351643 /**
16361644 * Return an Image object from inside the Processing lib folder.
16371645 */
0 commit comments