24
24
25
25
import org .apache .commons .exec .CommandLine ;
26
26
import org .apache .commons .exec .Executor ;
27
- import processing .app .Preferences ;
27
+ import processing .app .PreferencesData ;
28
28
import processing .app .debug .TargetPackage ;
29
29
import processing .app .tools .ExternalProcessExecutor ;
30
30
import processing .app .legacy .PConstants ;
@@ -64,7 +64,7 @@ public File getDefaultSketchbookFolder() throws Exception {
64
64
65
65
public void openURL (String url ) throws Exception {
66
66
if (openFolderAvailable ()) {
67
- String launcher = Preferences .get ("launcher" );
67
+ String launcher = PreferencesData .get ("launcher" );
68
68
if (launcher != null ) {
69
69
Runtime .getRuntime ().exec (new String [] { launcher , url });
70
70
}
@@ -73,15 +73,15 @@ public void openURL(String url) throws Exception {
73
73
74
74
75
75
public boolean openFolderAvailable () {
76
- if (Preferences .get ("launcher" ) != null ) {
76
+ if (PreferencesData .get ("launcher" ) != null ) {
77
77
return true ;
78
78
}
79
79
80
80
// Attempt to use xdg-open
81
81
try {
82
82
Process p = Runtime .getRuntime ().exec (new String [] { "xdg-open" });
83
83
p .waitFor ();
84
- Preferences .set ("launcher" , "xdg-open" );
84
+ PreferencesData .set ("launcher" , "xdg-open" );
85
85
return true ;
86
86
} catch (Exception e ) { }
87
87
@@ -90,15 +90,15 @@ public boolean openFolderAvailable() {
90
90
Process p = Runtime .getRuntime ().exec (new String [] { "gnome-open" });
91
91
p .waitFor ();
92
92
// Not installed will throw an IOException (JDK 1.4.2, Ubuntu 7.04)
93
- Preferences .set ("launcher" , "gnome-open" );
93
+ PreferencesData .set ("launcher" , "gnome-open" );
94
94
return true ;
95
95
} catch (Exception e ) { }
96
96
97
97
// Attempt with kde-open
98
98
try {
99
99
Process p = Runtime .getRuntime ().exec (new String [] { "kde-open" });
100
100
p .waitFor ();
101
- Preferences .set ("launcher" , "kde-open" );
101
+ PreferencesData .set ("launcher" , "kde-open" );
102
102
return true ;
103
103
} catch (Exception e ) { }
104
104
@@ -108,7 +108,7 @@ public boolean openFolderAvailable() {
108
108
109
109
public void openFolder (File file ) throws Exception {
110
110
if (openFolderAvailable ()) {
111
- String launcher = Preferences .get ("launcher" );
111
+ String launcher = PreferencesData .get ("launcher" );
112
112
try {
113
113
String [] params = new String [] { launcher , file .getAbsolutePath () };
114
114
//processing.core.PApplet.println(params);
0 commit comments