mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 05:39:18 +01:00
minor tweaks, extend timeout for contrib download
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
package processing.app.contrib;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
|
||||
@@ -55,7 +56,7 @@ public class ContributionManager {
|
||||
try {
|
||||
// System.out.println("downloading file " + source);
|
||||
URLConnection conn = source.openConnection();
|
||||
conn.setConnectTimeout(1000);
|
||||
conn.setConnectTimeout(2000);
|
||||
conn.setReadTimeout(5000);
|
||||
|
||||
// TODO this is often -1, may need to set progress to indeterminate
|
||||
@@ -78,6 +79,9 @@ public class ContributionManager {
|
||||
out.close();
|
||||
success = true;
|
||||
|
||||
} catch (SocketTimeoutException ste) {
|
||||
progress.error(ste);
|
||||
|
||||
} catch (IOException ioe) {
|
||||
progress.error(ioe);
|
||||
ioe.printStackTrace();
|
||||
|
||||
@@ -110,8 +110,8 @@ public class ContributionManagerDialog {
|
||||
if (isError()) {
|
||||
status.setErrorMessage("An error occured when downloading " +
|
||||
"the list of available contributions.");
|
||||
} else {
|
||||
status.updateUI();
|
||||
// } else {
|
||||
// status.updateUI();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -289,14 +289,12 @@ public class ContributionManagerDialog {
|
||||
disposeFrame();
|
||||
}
|
||||
});
|
||||
ActionListener disposer = new ActionListener() {
|
||||
// handle window closing commands for ctrl/cmd-W or hitting ESC.
|
||||
Toolkit.registerWindowCloseKeys(dialog.getRootPane(), new ActionListener() {
|
||||
public void actionPerformed(ActionEvent actionEvent) {
|
||||
disposeFrame();
|
||||
}
|
||||
};
|
||||
Toolkit.registerWindowCloseKeys(dialog.getRootPane(), disposer);
|
||||
|
||||
// handle window closing commands for ctrl/cmd-W or hitting ESC.
|
||||
});
|
||||
|
||||
dialog.getContentPane().addKeyListener(new KeyAdapter() {
|
||||
public void keyPressed(KeyEvent e) {
|
||||
@@ -422,7 +420,6 @@ public class ContributionManagerDialog {
|
||||
public void updateStyle() {
|
||||
if (showingHint) {
|
||||
setText(filterHint);
|
||||
|
||||
// setForeground(UIManager.getColor("TextField.light")); // too light
|
||||
setForeground(Color.gray);
|
||||
setFont(getFont().deriveFont(Font.ITALIC));
|
||||
|
||||
@@ -96,10 +96,9 @@ A https://github.com/processing/processing/issues/1483
|
||||
A http://code.google.com/p/processing/issues/detail?id=1445
|
||||
A exit() crashes Java on P2D and 3D when fullscreen only
|
||||
A https://github.com/processing/processing/issues/12
|
||||
|
||||
_ Default filter on PGraphics does nothing (JAVA2D) or causes crash (P2D/P3D)
|
||||
_ http://code.google.com/p/processing/issues/detail?id=1496
|
||||
_ https://github.com/processing/processing/issues/1534
|
||||
X https://github.com/processing/processing/issues/1534
|
||||
|
||||
cleaning/earlier
|
||||
C textureWrap() CLAMP and REPEAT now added
|
||||
|
||||
Reference in New Issue
Block a user