remove 32/64 pref, add dummy window, other OS X fixes for 7u40

This commit is contained in:
Ben Fry
2013-10-12 21:54:49 -04:00
parent cf559b4a90
commit d821d04c5b
6 changed files with 63 additions and 61 deletions
+2
View File
@@ -1038,6 +1038,7 @@ public class Base {
// Close the running window, avoid window boogers with multiple sketches
editor.internalCloseRunner();
// System.out.println("editors size is " + editors.size());
if (editors.size() == 1) {
// For 0158, when closing the last window /and/ it was already an
// untitled sketch, just give up and let the user quit.
@@ -1077,6 +1078,7 @@ public class Base {
// This will store the sketch count as zero
editors.remove(editor);
// System.out.println("editors size now " + editors.size());
// storeSketches();
// Save out the current prefs state
+8 -2
View File
@@ -116,8 +116,8 @@ public class Preferences {
JTextField fontSizeField;
JCheckBox inputMethodBox;
JCheckBox autoAssociateBox;
JRadioButton bitsThirtyTwoButton;
JRadioButton bitsSixtyFourButton;
//JRadioButton bitsThirtyTwoButton;
//JRadioButton bitsSixtyFourButton;
JComboBox displaySelectionBox;
int displayCount;
@@ -455,6 +455,7 @@ public class Preferences {
// Launch programs as [ ] 32-bit [ ] 64-bit (Mac OS X only)
/*
if (Base.isMacOS()) {
box = Box.createHorizontalBox();
label = new JLabel("Launch programs in ");
@@ -473,6 +474,7 @@ public class Preferences {
box.setBounds(left, top, d.width, d.height);
top += d.height + GUI_BETWEEN;
}
*/
// More preferences are in the ...
@@ -679,6 +681,7 @@ public class Preferences {
}
*/
/*
// If a change has been made between 32- and 64-bit, the libraries need
// to be reloaded so that their native paths are set correctly.
if (Base.isMacOS()) {
@@ -691,6 +694,7 @@ public class Preferences {
}
}
}
*/
String newSizeText = fontSizeField.getText();
try {
@@ -756,6 +760,7 @@ public class Preferences {
memoryField.
setText(get("run.options.memory.maximum")); //$NON-NLS-1$
/*
if (Base.isMacOS()) {
String bits = Preferences.get("run.options.bits"); //$NON-NLS-1$
if (bits.equals("32")) { //$NON-NLS-1$
@@ -769,6 +774,7 @@ public class Preferences {
bitsThirtyTwoButton.setEnabled(false);
}
}
*/
if (autoAssociateBox != null) {
autoAssociateBox.
@@ -22,7 +22,9 @@
package processing.app.platform;
import java.awt.Dimension;
import java.awt.event.*;
import javax.swing.*;
import processing.app.About;
@@ -74,27 +76,37 @@ public class ThinkDifferent implements ApplicationListener {
// Set the menubar to be used when nothing else is open. http://j.mp/dkZmka
// Only available since Java for Mac OS X 10.6 Update 1, but removed
// dynamic loading code because that should be installed in 10.6.8, and
// we may be dropped 10.6 really soon anyway.
// we may be dropped 10.6 really soon anyway
JMenuBar defaultMenuBar = new JMenuBar();
JMenu fileMenu = buildFileMenu(base);
defaultMenuBar.add(fileMenu);
// This is kind of a gross way to do this, but the alternatives? Hrm.
Base.defaultFileMenu = fileMenu;
if (PApplet.javaVersion <= 1.6f) { // doesn't work on Oracle's Java
// if (System.getProperty("java.vendor").contains("Apple") ||
// Base.isUsableOracleJava()) {
try {
JMenuBar defaultMenuBar = new JMenuBar();
JMenu fileMenu = buildFileMenu(base);
defaultMenuBar.add(fileMenu);
application.setDefaultMenuBar(new JMenuBar());
// This is kind of a gross way to do this, but the alternatives? Hrm.
Base.defaultFileMenu = fileMenu;
application.setDefaultMenuBar(defaultMenuBar);
} catch (Exception e) {
e.printStackTrace(); // oh well nevermind
}
} else {
// http://java.net/jira/browse/MACOSX_PORT-775?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
System.err.println("Skipping default menu bar due to Oracle Java 7 bug:");
System.err.println("http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8007267");
// The douchebags at Oracle didn't feel that a working f*king menubar
// on OS X was important enough to make it into the 7u40 release.
//http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8007267
// It languished in the JDK 8 source and has been backported for 7u60:
//http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8022667
JFrame offscreen = new JFrame();
offscreen.setUndecorated(true);
offscreen.setJMenuBar(defaultMenuBar);
Dimension screen = Toolkit.getScreenSize();
offscreen.setLocation(screen.width, screen.height);
offscreen.setVisible(true);
}
}
public ThinkDifferent(Base base) {
this.base = base;
@@ -123,11 +123,7 @@ public class Runner implements MessageConsumer {
}
// public void launch(String appletClassName, boolean presenting) {
// this.appletClassName = appletClassName;
public boolean launchVirtualMachine(boolean presenting) {
// this.presenting = presenting;
String[] vmParams = getMachineParams();
String[] sketchParams = getSketchParams(presenting);
int port = 8000 + (int) (Math.random() * 1000);
@@ -139,10 +135,13 @@ public class Runner implements MessageConsumer {
// Newer (Java 1.5+) version that uses JVMTI
String jdwpArg = "-agentlib:jdwp=transport=dt_socket,address=" + portStr + ",server=y,suspend=y";
// Everyone works the same under Java 7 (also on OS X)
String[] commandArgs = new String[] { Base.getJavaPath(), jdwpArg };
/*
String[] commandArgs = null;
if (!Base.isMacOS()) {
commandArgs = new String[] {
//"java",
Base.getJavaPath(),
jdwpArg
};
@@ -191,36 +190,13 @@ public class Runner implements MessageConsumer {
};
}
}
*/
commandArgs = PApplet.concat(commandArgs, vmParams);
commandArgs = PApplet.concat(commandArgs, sketchParams);
// PApplet.println(commandArgs);
// commandArg.setValue(commandArgs);
launchJava(commandArgs);
// try {
// Thread.sleep(2000);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
// boolean available = false;
// while (!available) {
// try {
// Socket socket = new Socket((String) null, port);
//// socket.close();
// // this should mean we're all set?
// available = true;
//
// } catch (IOException e) {
// System.out.println("waiting");
// //e.printStackTrace();
// try {
// Thread.sleep(100);
// } catch (InterruptedException e1) {
// e1.printStackTrace();
// }
// }
// }
AttachingConnector connector = (AttachingConnector)
findConnector("com.sun.jdi.SocketAttach");
+6 -4
View File
@@ -21,6 +21,12 @@ X allow println() and print() to take varargs
o https://github.com/processing/processing/issues/2056
X causes conflict with printing arrays
X added printArray() function instead
o custom DPI settings with PDF
X https://github.com/processing/processing/pull/2069
X pdf not rendering unicode with beginRecord()
X seems to have fixed itself / can't reproduce
X http://code.google.com/p/processing/issues/detail?id=90
X https://github.com/processing/processing/issues/129
opengl
X fix inconsistency with P2D and resetMatrix()
@@ -46,8 +52,6 @@ _ 'collector' class.. Dict that points to a list
_ String as a key, int/float/string list as values
high
_ custom DPI settings with PDF
_ https://github.com/processing/processing/pull/2069
_ loadPixels doesn't set alpha value for pixels on Java2D
_ https://github.com/processing/processing/issues/2030
_ blendMode(ADD) is broken with default renderer
@@ -540,8 +544,6 @@ _ touchEvent(), gestureEvent()?
LIBRARIES / PDF
_ pdf not rendering unicode with beginRecord()
_ http://code.google.com/p/processing/issues/detail?id=90
_ beginRecord() doesn't use current settings of the sketch
_ sometimes reported as a bug, but probably not a good way to
_ consistently carry these over
+17 -13
View File
@@ -16,6 +16,11 @@ X https://github.com/processing/processing/issues/2103
X still having right-click issues (re-opened)
X https://github.com/processing/processing/issues/2103
cleaning
o the first time someone hides a tab, put up a msg explaining what it does
o "don't warn me about this anymore"
X removed this feature a while back
serial
X closing several bugs because no longer relevant
X need 64-bit version of RXTX library
@@ -58,16 +63,14 @@ _ and the command line tools Preferences > Downloads > Command Line Tools
_ appbundler will have an NPE if the osx binary isn't built
_ also need to have 10.8 version of the SDK (old Xcode won't work)
_ type looks a little feeble on OS X
_ retina problem? may need to turn off (on?) smoothing
_ type looks a little feeble on OS X with non-retina machines
_ https://github.com/processing/processing/issues/2135
_ type cut off in dialog boxes on OS X retina machines
_ https://github.com/processing/processing/issues/2116
_ dialog box icon is fuzzy on OS X retina machines
_ https://github.com/processing/processing/issues/2117
_ solution might be our own dialog boxes (see 'dialogs' section)
_ also need to have a central menubar
_ add the offscreen window hack
_ otherwise mode change causes "do you want to quit?" on OS X
_ fix console font on Windows and Linux with 7u40
_ the message area text also looks ugly.. can we fix?
_ add pref to select PDE font (so that CJKV languages work better)
@@ -117,6 +120,11 @@ X http://www.oracle.com/technetwork/java/javase/jdk-7-readme-429198.html
7u40 switch
X make OS X launch from its local JRE
X also need to have a central menubar
X add the offscreen window hack
X otherwise mode change causes "do you want to quit?" on OS X
X remove 32- and 64-bit preference from Preferences on OS X
o try the bundle on Mac Mini running 10.6
_ change how export is handled
_ remove ability to export cross-platform apps
@@ -129,9 +137,8 @@ _ change app stub in OS X exported application
_ we become full 64-bit on OS X
_ meaning that the macosx32 video library goes away
_ and the preference for launching in 32- or 64-bit mode
_ try the bundle on Mac Mini running 10.6
_ make sure it's only running on 64-bit machines?
_ try installing 10.7.3 on Mac Mini and check whether things run
_ make sure it's only running on 64-bit machines?
_ try installing 10.7.3 on Mac Mini and check whether things run
_ bring back the splash screen
_ update github instructions
_ only JRE needed at this point
@@ -358,15 +365,11 @@ PDE - Processing Development Environment
PDE / Dialogs
_ proper dialog support
_ http://javagraphics.blogspot.com/2008/06/joptionpane-making-alternative.html
_ two-tiered dialogs for everything - use big font/little font style throughout
_ http://javagraphics.blogspot.com/2008/06/joptionpane-making-alternative.html
_ option to suppress warning dialogs
_ starting with the one about modifying the sketch name for spaces
_ http://code.google.com/p/processing/issues/detail?id=7
_ the first time someone hides a tab, put up a msg explaining what it does
_ "don't warn me about this anymore"
_ add "don't warn me about this" for sketch renaming
_ make sure renamed version doesn't exist already
_ prompt user before nuking applet or application folders
@@ -406,7 +409,8 @@ _ missing brackets, unmatched brackets
_ examples added to the bug report
_ http://code.google.com/p/processing/issues/detail?id=6
_ enums not supported properly
_ http://code.google.com/p/processing/issues/detail?id=1352
_ https://github.com/processing/processing/issues/1390
X http://code.google.com/p/processing/issues/detail?id=1352
low (features)
_ combining char/int/etc casts in one statement causes preproc trouble