mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
argh
This commit is contained in:
@@ -759,6 +759,15 @@ public class Base {
|
||||
}
|
||||
|
||||
|
||||
static boolean openFolderAvailable() {
|
||||
if (Base.isWindows() || Base.isMacOS()) return true;
|
||||
|
||||
//gnome-open, kde-open
|
||||
if (Preferences.getString("
|
||||
Process p = Runtime.getRuntime.exec(new String[] { "gnome-open" });
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implements the other cross-platform headache of opening
|
||||
* a folder in the machine's native file browser.
|
||||
|
||||
+9
-6
@@ -642,18 +642,21 @@ public class Editor extends JFrame
|
||||
|
||||
menu.add(sketchbook.getImportMenu());
|
||||
|
||||
if (Base.isWindows() || Base.isMacOS()) {
|
||||
// no way to do an 'open in file browser' on other platforms
|
||||
// since there isn't any sort of standard
|
||||
item = newJMenuItem("Show Sketch Folder", 'K', false);
|
||||
item.addActionListener(new ActionListener() {
|
||||
//if (Base.isWindows() || Base.isMacOS()) {
|
||||
// no way to do an 'open in file browser' on other platforms
|
||||
// since there isn't any sort of standard
|
||||
item = newJMenuItem("Show Sketch Folder", 'K', false);
|
||||
item.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
//Base.openFolder(sketchDir);
|
||||
Base.openFolder(sketch.folder);
|
||||
}
|
||||
});
|
||||
menu.add(item);
|
||||
menu.add(item);
|
||||
if (!Base.openFolderAvailable()) {
|
||||
item.setEnabled(false);
|
||||
}
|
||||
|
||||
//menu.addSeparator();
|
||||
|
||||
item = new JMenuItem("Add File...");
|
||||
|
||||
@@ -266,6 +266,9 @@ preproc.imports.jdk14 = javax.xml.parsers,javax.xml.transform,javax.xml.transfor
|
||||
# set the browser to be used on linux
|
||||
browser.linux = mozilla
|
||||
|
||||
# set to the program to be used for launching apps on linux
|
||||
#launcher.linux = gnome-open
|
||||
|
||||
# coloring for the editor line number status bar at the bottom of the screen
|
||||
linestatus.bgcolor = #66665a
|
||||
linestatus.font = SansSerif,plain,10
|
||||
|
||||
Reference in New Issue
Block a user