mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 18:35:37 +01:00
properly handle loose pde files, lots of error messages, etc
This commit is contained in:
@@ -239,7 +239,7 @@ public class PdeSketchbook {
|
||||
public String handleOpen() {
|
||||
// swing's file choosers are ass ugly, so we use the
|
||||
// native (awt peered) dialogs instead
|
||||
FileDialog fd = new FileDialog(new Frame(),
|
||||
FileDialog fd = new FileDialog(editor, //new Frame(),
|
||||
"Open a Processing sketch...",
|
||||
FileDialog.LOAD);
|
||||
//if (handleOpenDirectory == null) {
|
||||
@@ -249,8 +249,10 @@ public class PdeSketchbook {
|
||||
fd.setDirectory(PdePreferences.get("sketchbook.path"));
|
||||
|
||||
// only show .pde files as eligible bachelors
|
||||
// TODO this doesn't seem to ever be used. AWESOME.
|
||||
fd.setFilenameFilter(new FilenameFilter() {
|
||||
public boolean accept(File dir, String name) {
|
||||
System.out.println("check filter on " + dir + " " + name);
|
||||
return name.endsWith(".pde");
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user