From 16cd658bb7fad64eca5c15447f7ebc1c2d209944 Mon Sep 17 00:00:00 2001 From: benfry Date: Sun, 30 Jan 2005 19:33:20 +0000 Subject: [PATCH] more registry tweaks --- app/PdeBase.java | 12 +++++++----- todo.txt | 1 - 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/PdeBase.java b/app/PdeBase.java index 8671b7040..1f4f11e13 100644 --- a/app/PdeBase.java +++ b/app/PdeBase.java @@ -242,6 +242,8 @@ public class PdeBase { static public File getDefaultSketchbookFolder() { + File sketchbookFolder = null; + if (platform == MACOSX) { // looking for /Users/blah/Documents/Processing @@ -261,7 +263,7 @@ public class PdeBase { MRJOSType domainDocuments = new MRJOSType("docs"); File libraryFolder = MRJFileUtils.findFolder(domainDocuments); //MRJFileUtils.findFolder(kUserDomain, domainDocuments); - return new File(libraryFolder, "Processing"); + sketchbookFolder = new File(libraryFolder, "Processing"); } catch (FileNotFoundException e) { showError("sketch folder problem", @@ -270,6 +272,7 @@ public class PdeBase { } else if (platform == WINDOWS) { // looking for Documents and Settings/blah/My Documents/Processing + // (though using a reg key since it's different on other platforms) // http://support.microsoft.com/?kbid=221837&sd=RMVP // The path to the My Documents folder is stored in the @@ -291,7 +294,7 @@ public class PdeBase { topKey.closeKey(); // necessary? localKey.closeKey(); - return new File(personalPath, "Processing"); + sketchbookFolder = new File(personalPath, "Processing"); } catch (Exception e) { showError("Problem getting documents folder", @@ -299,16 +302,15 @@ public class PdeBase { } } - return null; - // if it failed, or if on linux, prompt the user or quit - /* File home = new File(System.getProperty("user.home")); File phome = new File(home, ".processing"); if (!phome.exists()) phome.mkdirs(); return phome; */ + + return sketchbookFolder; } diff --git a/todo.txt b/todo.txt index eafa908d6..397638562 100644 --- a/todo.txt +++ b/todo.txt @@ -23,7 +23,6 @@ X 1.4 version: -Dapple.awt.showGrowBox=false X put 'play' on a SwingWorker thread _ test this on a pc to see how it goes, especially with opengl - sketchbook/prefs location _ read from registry key to get the proper name for these folders _ also find some way to do this on the mac