This commit is contained in:
benfry
2007-06-26 03:10:56 +00:00
parent 136677c6ee
commit 02c509a150
3 changed files with 21 additions and 6 deletions
+9
View File
@@ -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
View File
@@ -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...");
+3
View 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