@@ -75,9 +75,6 @@ static public void init() {
75
75
// This ensures that any new/added preference will be present.
76
76
defaults = new HashMap <>(table );
77
77
78
- // other things that have to be set explicitly for the defaults
79
- setColor ("run.window.bgcolor" , SystemColor .control ); //$NON-NLS-1$
80
-
81
78
// next load user preferences file
82
79
preferencesFile = Base .getSettingsFile (PREFS_FILE );
83
80
boolean firstRun = !preferencesFile .exists ();
@@ -94,31 +91,12 @@ static public void init() {
94
91
}
95
92
}
96
93
97
- if (checkSketchbookPref () || firstRun ) {
98
- // if (firstRun) {
94
+ if (firstRun ) {
99
95
// create a new preferences file if none exists
100
96
// saves the defaults out to the file
101
97
save ();
102
98
}
103
99
104
- PApplet .useNativeSelect =
105
- Preferences .getBoolean ("chooser.files.native" ); //$NON-NLS-1$
106
-
107
- // Adding option to disable this in case it's getting in the way
108
- if (get ("proxy.system" ).equals ("true" )) {
109
- // Use the system proxy settings by default
110
- // https://github.com/processing/processing/issues/2643
111
- System .setProperty ("java.net.useSystemProxies" , "true" );
112
- }
113
-
114
- // Set HTTP, HTTPS, and SOCKS proxies for individuals
115
- // who want/need to override the system setting
116
- // http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html
117
- // Less readable version with the Oracle style sheet:
118
- // http://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html
119
- handleProxy ("http" , "http.proxyHost" , "http.proxyPort" );
120
- handleProxy ("https" , "https.proxyHost" , "https.proxyPort" );
121
- handleProxy ("socks" , "socksProxyHost" , "socksProxyPort" );
122
100
}
123
101
124
102
@@ -130,18 +108,6 @@ static public void skipInit() {
130
108
}
131
109
132
110
133
- static void handleProxy (String protocol , String hostProp , String portProp ) {
134
- String proxyHost = get ("proxy." + protocol + ".host" );
135
- String proxyPort = get ("proxy." + protocol + ".port" );
136
- if (proxyHost != null && proxyHost .length () != 0 &&
137
- proxyPort != null && proxyPort .length () != 0 ) {
138
- System .setProperty (hostProp , proxyHost );
139
- System .setProperty (portProp , proxyPort );
140
- }
141
-
142
- }
143
-
144
-
145
111
static public String getPreferencesPath () {
146
112
return preferencesFile .getAbsolutePath ();
147
113
}
@@ -339,42 +305,4 @@ static public void setColor(String attr, Color what) {
339
305
set (attr , "#" + PApplet .hex (what .getRGB () & 0xffffff , 6 )); //$NON-NLS-1$
340
306
}
341
307
342
-
343
-
344
- // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
345
-
346
-
347
- /**
348
- * Check for a 4.0 sketchbook location, and if none exists,
349
- * try to grab it from the 3.0 sketchbook location.
350
- * @return true if a location was found and the pref didn't exist
351
- */
352
- static protected boolean checkSketchbookPref () {
353
- // If a 4.0 sketchbook location has never been inited
354
- if (getSketchbookPath () == null ) {
355
- String threePath = get ("sketchbook.path.three" ); //$NON-NLS-1$
356
- // If they've run the 3.0 version, start with that location
357
- if (threePath != null ) {
358
- setSketchbookPath (threePath );
359
- return true ; // save the sketchbook right away
360
- }
361
- // Otherwise it'll be null, and reset properly by Base
362
- }
363
- return false ;
364
- }
365
-
366
-
367
- static public String getOldSketchbookPath () {
368
- return get ("sketchbook.path.three" ); //$NON-NLS-1$
369
- }
370
-
371
-
372
- static public String getSketchbookPath () {
373
- return get ("sketchbook.path.four" ); //$NON-NLS-1$
374
- }
375
-
376
-
377
- public static void setSketchbookPath (String path ) {
378
- set ("sketchbook.path.four" , path ); //$NON-NLS-1$
379
- }
380
308
}
0 commit comments